add sudo.man.pl and sudoers.man.pl from upstream, which were apparently
authorBdale Garbee <bdale@gag.com>
Fri, 20 Nov 2009 22:18:51 +0000 (15:18 -0700)
committerBdale Garbee <bdale@gag.com>
Fri, 20 Nov 2009 22:18:51 +0000 (15:18 -0700)
accidentally left out of the 1.7.2p1 tarball, and restore the Makefile.in
content which calls them, closes: #557204

Makefile.in
debian/changelog
sudo.man.pl [new file with mode: 0644]
sudoers.man.pl [new file with mode: 0644]

index a26f6cdea126ac0c796a863f32f60ac14ee00a99..207004d065676ce700f8d556f0f78584b0a225e1 100644 (file)
@@ -365,7 +365,7 @@ sia.o: $(authdir)/sia.c $(AUTHDEP)
 
 sudo.man.in: $(srcdir)/sudo.pod
        @rm -f $(srcdir)/$@
-       ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" >> $@ )
+       ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" | perl -p sudo.man.pl >> $@ )
 
 sudo.man: sudo.man.in
        CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
@@ -383,7 +383,7 @@ visudo.cat: visudo.man
 
 sudoers.man.in: $(srcdir)/sudoers.pod
        @rm -f $(srcdir)/$@
-       ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudoers.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" >> $@ )
+       ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudoers.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" | perl -p sudoers.man.pl >> $@ )
 
 sudoers.man:: sudoers.man.in
        CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
index 559b8dc852f68b6b2a3100634af6cd34b63fe78e..e1281ba329d5c26e8e8d5d5ca231d09ce3eb1f07 100644 (file)
@@ -1,3 +1,9 @@
+sudo (1.7.2p1-2) UNRELEASED; urgency=low
+
+  * working on substitution variables in man pages
+
+ -- Bdale Garbee <bdale@gag.com>  Fri, 20 Nov 2009 07:31:30 -0700
+
 sudo (1.7.2p1-1) unstable; urgency=low
 
   * new upstream version
diff --git a/sudo.man.pl b/sudo.man.pl
new file mode 100644 (file)
index 0000000..4d23fbd
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/perl -p
+
+BEGIN {
+    %tags = ( 'a', '@BAMAN@', 'c', '@LCMAN@', 'r', '@SEMAN@', 't', '@SEMAN@');
+    $t = undef;
+}
+if (/^\.IP(.*-([acrt]))?/) {
+    $t = $1 ? $tags{$2} : undef;
+} elsif (/-a.*auth_type/) {
+    $_ = $tags{'a'} . $_;
+} elsif (/(-c.*class.*\||login_cap)/) {
+    $_ = $tags{'c'} . $_;
+} elsif (/-r.*role.*-t.*type/) {
+    $_ = $tags{'r'} . $_;
+}
+
+# Fix up broken pod2man formatting of F<@foo@/bar>
+s/\\fI\\f(\(C)?I\@([^\@]*)\\fI\@/\\fI\@$2\@/g;
+
+# comment out Compile-time-specific lines in DESCRIPTION
+if ($t) {
+    $_ = $t . $_;
+}
diff --git a/sudoers.man.pl b/sudoers.man.pl
new file mode 100644 (file)
index 0000000..9ee210a
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/perl -p
+
+BEGIN {
+    $t = undef;
+}
+
+if (/^\./) {
+    if (/^\.I[PX].*use_loginclass/) {
+       $t = '@LCMAN@';
+    } elsif (/^\.I[PX].*(role|type)/) {
+       $t = '@SEMAN@';
+    } else {
+       $t = undef;
+    }
+}
+
+# Fix up broken pod2man formatting of F<@foo@/bar>
+s/\\fI\\f(\(C)?I\@([^\@]*)\\fI\@/\\fI\@$2\@/g;
+s/\\f\(\CW\@([^\@]*)\\fR\@/\@$1\@/g;
+#\f(CW@secure_path\fR@
+
+# Comment out Compile-time-specific lines in DESCRIPTION
+if ($t) {
+    $_ = $t . $_;
+}