]> Sergey Matveev's repositories - public-inbox.git/commitdiff
update git repo location to https:// using GitHTTPBackend.pm
authorEric Wong <e@80x24.org>
Fri, 1 Jul 2016 01:03:31 +0000 (01:03 +0000)
committerEric Wong <e@80x24.org>
Fri, 1 Jul 2016 01:11:41 +0000 (01:11 +0000)
Might as well eat our own dogfood...

Documentation/dc-dlvr-spam-flow.txt
README
examples/public-inbox.psgi
examples/unsubscribe.psgi
lib/PublicInbox/Unsubscribe.pm
lib/PublicInbox/WwwStream.pm

index 5a7e290249f82c0712188fc78279e847e88fb3ab..d151d272d0aea390d6f08260ef06fe7a8ce738b6 100644 (file)
@@ -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 a91c45b0415ad4ad7d55b44a835ef2e22719a6a6..ca4e2a86ed35b0f690d50c5e222d6c7b2af8ee47 100644 (file)
--- 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.
 
index 4edbf5e369914f3f12334b5aa4afa5f14f5bce4a..a90a2bc3ae7544ebedcc5eb04d64b52750989231 100644 (file)
@@ -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);
+               }
+       };
 }
index beeab9f89f0d7faf3b8fa16c2be58796b18381f5..5b9b16cc793fa5329f21d1494509a9fef27bfd24 100644 (file)
@@ -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,
 
index 79234aa170aeb20a6cae3b5eff03b4e7d475cae7..46d5d8d7ea286844eb8f353650fc9ba1067d324a 100644 (file)
@@ -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 {
index d9abb5ab8068756d51c3f5aaae5b9098703744ce..97a6dc78815b1e5e4734a855303c1cf9c00948bf 100644 (file)
@@ -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>';
 }