about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-01 01:03:31 +0000
committerEric Wong <e@80x24.org>2016-07-01 01:11:41 +0000
commit79bf257cbc4e188992f540d6b4ae1bd5cbcf26ee (patch)
tree1b89612dc673d58b363f25c2d038f0b796cf705b
parentbd3ed82913cd065636525a5dd8bab9edcb3e3cb1 (diff)
downloadpublic-inbox-79bf257cbc4e188992f540d6b4ae1bd5cbcf26ee.tar.gz
Might as well eat our own dogfood...
-rw-r--r--Documentation/dc-dlvr-spam-flow.txt2
-rw-r--r--README2
-rw-r--r--examples/public-inbox.psgi14
-rw-r--r--examples/unsubscribe.psgi3
-rw-r--r--lib/PublicInbox/Unsubscribe.pm2
-rw-r--r--lib/PublicInbox/WwwStream.pm6
6 files changed, 21 insertions, 8 deletions
diff --git a/Documentation/dc-dlvr-spam-flow.txt b/Documentation/dc-dlvr-spam-flow.txt
index 5a7e2902..d151d272 100644
--- a/Documentation/dc-dlvr-spam-flow.txt
+++ b/Documentation/dc-dlvr-spam-flow.txt
@@ -45,4 +45,4 @@ delivery path as well as removing the message from the git tree.
 * spamc / spamd - SpamAssassin: http://spamassassin.apache.org/
 
 * report-spam / dc-dlvr - distributed with public-inbox in the scripts/
-  directory: git clone git://80x24.org/public-inbox
+  directory: git clone https://public-inbox.org/public-inbox.git
diff --git a/README b/README
index a91c45b0..ca4e2a86 100644
--- a/README
+++ b/README
@@ -87,7 +87,7 @@ Hacking
 
 Source code is available via git:
 
-        git clone git://80x24.org/public-inbox
+        git clone https://public-inbox.org/public-inbox.git
 
 See below for contact info.
 
diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi
index 4edbf5e3..a90a2bc3 100644
--- a/examples/public-inbox.psgi
+++ b/examples/public-inbox.psgi
@@ -11,6 +11,10 @@ use PublicInbox::WWW;
 PublicInbox::WWW->preload;
 use Plack::Builder;
 my $www = PublicInbox::WWW->new;
+
+# share the public-inbox code itself:
+my $src = $ENV{SRC_GIT_DIR}; # '/path/to/public-inbox.git'
+
 builder {
         eval {
                 enable 'Deflater',
@@ -40,5 +44,13 @@ builder {
         #        format => '%t "%r" %>s %b %D';
 
         enable 'Head';
-        sub { $www->call(@_) };
+        sub {
+                my ($env) = @_;
+                # share public-inbox.git code!
+                if ($src && $env->{PATH_INFO} =~ m!\A/public-inbox\.git/(.*)!) {
+                        PublicInbox::GitHTTPBackend::serve($env, $src, $1);
+                } else {
+                        $www->call($env);
+                }
+        };
 }
diff --git a/examples/unsubscribe.psgi b/examples/unsubscribe.psgi
index beeab9f8..5b9b16cc 100644
--- a/examples/unsubscribe.psgi
+++ b/examples/unsubscribe.psgi
@@ -17,7 +17,8 @@ my $app = PublicInbox::Unsubscribe->new(
                 # the archives runs as a different user.
                 PublicInbox::Config->new('/home/pi/.public-inbox/config')
         },
-        code_url => 'git://80x24.org/public-inbox.git', # change if you fork
+        # change if you fork
+        code_url => 'https://public-inbox.org/public-inbox.git',
         owner_email => 'BOFH@example.com',
         confirm => 0,
 
diff --git a/lib/PublicInbox/Unsubscribe.pm b/lib/PublicInbox/Unsubscribe.pm
index 79234aa1..46d5d8d7 100644
--- a/lib/PublicInbox/Unsubscribe.pm
+++ b/lib/PublicInbox/Unsubscribe.pm
@@ -12,7 +12,7 @@ use warnings;
 use Crypt::CBC;
 use Plack::Util;
 use MIME::Base64 qw(decode_base64url);
-my $CODE_URL = 'git://80x24.org/public-inbox.git';
+my $CODE_URL = 'https://public-inbox.org/public-inbox.git';
 my @CT_HTML = ('Content-Type', 'text/html; charset=UTF-8');
 
 sub new {
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index d9abb5ab..97a6dc78 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 use PublicInbox::Hval qw(ascii_html);
 use URI;
-use constant PI_URL => 'https://public-inbox.org/README.html';
+use constant PI_URL => 'https://public-inbox.org/public-inbox.git';
 
 sub new {
         my ($class, $ctx, $cb) = @_;
@@ -86,8 +86,8 @@ sub _html_end {
         '<pre>'.join("\n",
                 '- ' . $desc,
                 $urls,
-                'served with software from public-inbox: '
-                        ."<a\nhref=\"$url\">$url</a>",
+                'Archived served using code from public-inbox:',
+                "\tgit clone $url",
         ).'</pre></body></html>';
 }