]> Sergey Matveev's repositories - public-inbox.git/commitdiff
doc: add more 3rd-party refs, use Debian manpages for xapian
authorEric Wong <e@80x24.org>
Wed, 3 Nov 2021 21:01:21 +0000 (21:01 +0000)
committerEric Wong <e@80x24.org>
Thu, 4 Nov 2021 03:29:33 +0000 (03:29 +0000)
curl, torsocks, and gitglossary manpages are all newly
referenced, so make sure they're linkified properly in HTML.
We'll be using Debian's manpages as an ad-free, Tor-accessible
host for manpages as a fallback since hosting manpages for all
3rd-party projects we reference doesn't scale.

Documentation/extman.perl [deleted file]
Documentation/include.mk
Documentation/lei-add-external.pod
Documentation/lei-import.pod
Documentation/lei-q.pod
Documentation/public-inbox-clone.pod
Documentation/public-inbox-fetch.pod
Documentation/txt2pre
MANIFEST
Makefile.PL

diff --git a/Documentation/extman.perl b/Documentation/extman.perl
deleted file mode 100755 (executable)
index c6cfb4c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/perl -w
-# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
-# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-# prints a manpage to stdout
-use strict;
-my $xapmsg = 'See https://xapian.org/ for more information on Xapian';
-my $usage = "$0 /path/to/manpage.SECTION.txt";
-my $manpage = shift or die $usage;
-my $MAN = $ENV{MAN} || 'man';
-my @args;
-$manpage = (split('/', $manpage))[-1];
-$manpage =~ s/\.txt\z//;
-$manpage =~ s/\A\.//; # no leading dot (see Documentation/include.mk)
-$manpage =~ s/\.(\d+.*)\z// and push @args, $1; # section
-push @args, $manpage;
-
-# don't use UTF-8 characters which readers may not have fonts for
-$ENV{LC_ALL} = $ENV{LANG} = 'C';
-$ENV{COLUMNS} = '76'; # same as pod2text default
-$ENV{PAGER} = 'cat';
-my $cmd = join(' ', $MAN, @args);
-system($MAN, @args) and die "$cmd failed: $!\n";
-$manpage =~ /\A(?:copydatabase|xapian-compact)\z/ and
-       print "\n\n", $xapmsg, "\n";
-
-# touch -r $(man -w $section $manpage) output.txt
-if (-f \*STDOUT) {
-       open(my $fh, '-|', $MAN, '-w', @args) or die "$MAN -w broken?: $!\n";
-       chomp(my $path = <$fh>);
-       my @st = stat($path) or die "stat($path) failed: $!\n";
-       # 9 - mtime
-       utime($st[9], $st[9], \*STDOUT) or die "utime(STDOUT) failed: $!\n";
-}
index 149f9e3ce42e4a40ce66426d187ae7321c606079..af5f7f24df718740c747fb6959db5cb927021b12 100644 (file)
@@ -105,18 +105,16 @@ doc: $(docs)
 
 gz-doc: $(gz_docs)
 
-gz-xdoc: $(gz_xdocs)
-
 rsync-doc: NEWS.atom.gz
        # /usr/share/doc/rsync/scripts/git-set-file-times{.gz} on Debian systems
        # It is also at: https://yhbt.net/git-set-file-times
        -git set-file-times $(docs) $(txt)
-       $(MAKE) gz-doc gz-xdoc
-       $(RSYNC) --chmod=Fugo=r -av $(rsync_docs) $(rsync_xdocs) $(RSYNC_DEST)
+       $(MAKE) gz-doc
+       $(RSYNC) --chmod=Fugo=r -av $(rsync_docs) $(RSYNC_DEST)
 
 clean-doc:
        $(RM_F) $(man1) $(man5) $(man7) $(man8) $(gz_docs) $(docs_html) \
-               $(mantxt) $(rsync_xdocs) \
+               $(mantxt) \
                NEWS NEWS.atom NEWS.html Documentation/standards.txt \
                Documentation/flow.html Documentation/flow.html.gz \
                Documentation/flow.txt.gz
index 1761eed1ed784a260caca2cdf0a5189f1b075813..7afcad637f7317044a2409c75341dd8f7074d90a 100644 (file)
@@ -69,7 +69,7 @@ Suppress feedback messages.
 
 =item --no-torsocks
 
-Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.
+Whether to wrap L<git(1)> and L<curl(1)> commands with L<torsocks(1)>.
 
 Default: C<auto>
 
index 25f1daf5f32f88768e763362a7cf323d61f08388..ad769084c05cf9da4ebe176a06273d6cfb2f18ce 100644 (file)
@@ -77,7 +77,7 @@ Import already seen IMAP and NNTP articles.
 
 =item --no-torsocks
 
-Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.
+Whether to wrap L<git(1)> and L<curl(1)> commands with L<torsocks(1)>.
 
 Default: C<auto>
 
index fe281d7b0121945fa3df486d5509c8edcd109bbd..fd82965540710010de0fc21d4ccbeb37c6d8e09c 100644 (file)
@@ -237,7 +237,7 @@ Suppress feedback messages.
 
 =item --no-torsocks
 
-Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.
+Whether to wrap L<git(1)> and L<curl(1)> commands with L<torsocks(1)>.
 
 Default: C<auto>
 
index 103260913d92a41c400e47441d8483b3b43ac851..c80c3c5fded6dc156228ae95ebc5111d2b1ddccc 100644 (file)
@@ -67,7 +67,7 @@ Increases verbosity, also passed to L<git-fetch(1)>.
 
 =item --no-torsocks
 
-Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.
+Whether to wrap L<git(1)> and L<curl(1)> commands with L<torsocks(1)>.
 
 Default: C<auto>
 
index 1890ae75928817d6a3ad9c0eda17147e479e512e..c78ffc0bc13769f418c0a512c248fc1097dd62a3 100644 (file)
@@ -71,7 +71,7 @@ Increases verbosity, also passed to L<git-fetch(1)>.
 
 =item --no-torsocks
 
-Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.
+Whether to wrap L<git(1)> and L<curl(1)> commands with L<torsocks(1)>.
 
 Default: C<auto>
 
index f6b2ad966b696a67b6fb2d52c9f55e0435b60ebd..def544731375e53cd3dbfdeacc6364bdd804dd20 100755 (executable)
@@ -76,11 +76,6 @@ for (qw[lei(1)
        $xurls{$n} = "$n.html";
 }
 
-for (qw[copydatabase(1) xapian-compact(1)]) {
-       my ($n) = (/([\w\-\.]+)/);
-       $xurls{$_} = ".$n.1.html"
-}
-
 for (qw[make(1) flock(2) setrlimit(2) vfork(2) tmpfs(5)]) {
        my ($n, $s) = (/([\w\-]+)\((\d)\)/);
        $xurls{$_} = "http://www.man7.org/linux/man-pages/man$s/$n.$s.html";
@@ -103,6 +98,7 @@ for (qw[git(1)
        git-init(1)
        git-send-email(1)
        gitrepository-layout(5)
+       gitglossary(7)
 ]) {
        my ($n) = (/([\w\-\.]+)/);
        $xurls{$_} = "https://kernel.org/pub/software/scm/git/docs/$n.html"
@@ -118,6 +114,7 @@ for (qw[
        $xurls{$_} = "https://www.freedesktop.org/software/systemd/man/$n.html";
 }
 
+# favor upstream docs if they exist, use manpages.debian.org if they don't
 $xurls{'netrc(5)'} = 'https://manpages.debian.org/stable/ftp/netrc.5.en.html';
 $xurls{'mbsync(1)'} =
        'https://manpages.debian.org/stable/isync/mbsync.1.en.html';
@@ -135,6 +132,13 @@ $xurls{'cgitrc(5)'} = 'https://git.zx2c4.com/cgit/tree/cgitrc.5.txt';
 $xurls{'prove(1)'} = 'https://perldoc.perl.org/prove.html';
 $xurls{'mbox(5)'} = 'https://manpages.debian.org/stable/mutt/mbox.5.en.html';
 $xurls{'mmdf(5)'} = 'https://manpages.debian.org/stable/mutt/mmdf.5.en.html';
+$xurls{'torsocks(1)'} =
+       'https://manpages.debian.org/stable/torsocks/torsocks.1.en.html';
+$xurls{'curl(1)'} = 'https://manpages.debian.org/stable/curl/curl.1.en.html';
+$xurls{'copydatabase(1)'} =
+ 'https://manpages.debian.org/stable/xapian-tools/copydatabase.1.en.html';
+$xurls{'xapian-compact(1)'} =
+ 'https://manpages.debian.org/stable/xapian-tools/xapian-compact.1.en.html';
 
 my $str = do { local $/; <STDIN> };
 my ($title) = ($str =~ /\A([^\n]+)/);
index 47eadad2e4031f0ae9382f9a2835f19c6122fc3f..46e0e099d9832a12b39951d9b59b03cd4ede7027 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -17,7 +17,6 @@ Documentation/common.perl
 Documentation/dc-dlvr-spam-flow.txt
 Documentation/design_notes.txt
 Documentation/design_www.txt
-Documentation/extman.perl
 Documentation/flow.ge
 Documentation/flow.txt
 Documentation/hosted.txt
index 8c8c0235f35bc38320f5dd0478bfa9439afa08e9..b7851adae152fe32bde3ac8658b8b9f6c2002dac 100644 (file)
@@ -101,23 +101,6 @@ $v->{gz_docs} = [ map { "$_.gz" } (@{$v->{docs}},@{$v->{docs_html}}) ];
 $v->{rsync_docs} = [ @{$v->{gz_docs}}, @{$v->{docs}},
        @{$v->{docs_html}}, qw(NEWS.atom NEWS.atom.gz)];
 
-# external manpages which we host ourselves, since some packages
-# (currently just Xapian) doesn't host manpages themselves.
-my @xman = qw(copydatabase.1 xapian-compact.1);
-$v->{xdocs} = [ map { "Documentation/.$_.txt" } @xman ];
-$v->{xdocs_html} = [ map { "Documentation/.$_.html" } @xman ];
-for (@{$v->{xdocs}}) {
-       $t->{"$_:"} = [
-               '$(PERL) -w Documentation/extman.perl $@ >$@+',
-               'mv $@+ $@'
-       ];
-       my $html = $_;
-       $html =~ s/\.txt\z/.html/;
-       $t->{"$html : $_"} = [ "\$(txt2pre) <$_" ];
-}
-$v->{gz_xdocs} = [ map { "$_.gz" } (@{$v->{xdocs_html}}, @{$v->{xdocs}}) ];
-$v->{rsync_xdocs} = [ @{$v->{gz_xdocs}}, @{$v->{xdocs_html}}, @{$v->{xdocs}} ];
-
 my $TGTS = join("\n", map {;
        my $tgt_prereq = $_;
        my $cmds = $t->{$_};