about summary refs log tree commit diff
path: root/overlays/patches
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-04-04 11:35:22 +0000
committerAlyssa Ross <hi@alyssa.is>2021-04-04 12:07:47 +0000
commitfa7256d178388b270d9ffe5924483c8f511e9454 (patch)
tree1b07a9a387b8f0433444cc2f829605cf822b8c1d /overlays/patches
parent1c129f2b121320df6e7e86fa6572fd5a522437e1 (diff)
downloadnixlib-fa7256d178388b270d9ffe5924483c8f511e9454.tar
nixlib-fa7256d178388b270d9ffe5924483c8f511e9454.tar.gz
nixlib-fa7256d178388b270d9ffe5924483c8f511e9454.tar.bz2
nixlib-fa7256d178388b270d9ffe5924483c8f511e9454.tar.lz
nixlib-fa7256d178388b270d9ffe5924483c8f511e9454.tar.xz
nixlib-fa7256d178388b270d9ffe5924483c8f511e9454.tar.zst
nixlib-fa7256d178388b270d9ffe5924483c8f511e9454.zip
public-inbox: 1.5.0 -> 1.6.1
Diffstat (limited to 'overlays/patches')
-rw-r--r--overlays/patches/public-inbox/0001-view-don-t-show-page-if-no-links-follow-it.patch12
-rw-r--r--overlays/patches/public-inbox/0002-wwwstream-make-source-info-configurable.patch64
-rw-r--r--overlays/patches/public-inbox/default.nix5
3 files changed, 27 insertions, 54 deletions
diff --git a/overlays/patches/public-inbox/0001-view-don-t-show-page-if-no-links-follow-it.patch b/overlays/patches/public-inbox/0001-view-don-t-show-page-if-no-links-follow-it.patch
index 911273da1371..866974532a85 100644
--- a/overlays/patches/public-inbox/0001-view-don-t-show-page-if-no-links-follow-it.patch
+++ b/overlays/patches/public-inbox/0001-view-don-t-show-page-if-no-links-follow-it.patch
@@ -1,4 +1,4 @@
-From e330a3b56e43e4415e0aeede4052050ef8ae8b23 Mon Sep 17 00:00:00 2001
+From 7678ad7f23347a40125055702bfa357a12260ff6 Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Thu, 16 Jan 2020 18:08:33 +0000
 Subject: [PATCH 1/2] view: don't show `page:' if no links follow it
@@ -8,12 +8,12 @@ Subject: [PATCH 1/2] view: don't show `page:' if no links follow it
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
-index b6d7acaf..689bc4a1 100644
+index 1d5119cd..78998113 100644
 --- a/lib/PublicInbox/View.pm
 +++ b/lib/PublicInbox/View.pm
-@@ -1122,7 +1122,9 @@ sub pagination_footer ($$) {
- 		$next = $next ? "$next " : '     ';
- 		$prev .= qq! <a\nhref='$latest'>latest</a>!;
+@@ -1179,7 +1179,9 @@ sub pagination_footer ($$) {
+ 		$next = $next ? "$next | " : '             | ';
+ 		$prev .= qq[ | <a\nhref="$latest">latest</a>];
  	}
 -	"<hr><pre>page: $next$prev</pre>";
 +	if ($prev || $next) {
@@ -21,7 +21,7 @@ index b6d7acaf..689bc4a1 100644
 +	}
  }
  
- sub index_nav { # callback for WwwStream
+ sub paginate_recent ($$) {
 -- 
 2.30.0
 
diff --git a/overlays/patches/public-inbox/0002-wwwstream-make-source-info-configurable.patch b/overlays/patches/public-inbox/0002-wwwstream-make-source-info-configurable.patch
index 3814058c9fc0..d7d40c82996d 100644
--- a/overlays/patches/public-inbox/0002-wwwstream-make-source-info-configurable.patch
+++ b/overlays/patches/public-inbox/0002-wwwstream-make-source-info-configurable.patch
@@ -1,19 +1,19 @@
-From 9f671548a468aa4b0ea6c490db0617b132903661 Mon Sep 17 00:00:00 2001
+From 49ae6aacb43963af273e6011a6d9191caa3c7846 Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Fri, 17 Jan 2020 15:21:42 +0000
 Subject: [PATCH 2/2] wwwstream: make source info configurable
 
 ---
  Documentation/public-inbox-config.pod |  6 ++++++
- lib/PublicInbox/WwwListing.pm         |  9 +++++----
- lib/PublicInbox/WwwStream.pm          | 28 +++++++++++++++++++++++----
- 3 files changed, 35 insertions(+), 8 deletions(-)
+ lib/PublicInbox/WwwListing.pm         |  2 +-
+ lib/PublicInbox/WwwStream.pm          | 27 +++++++++++++++++++++++----
+ 3 files changed, 30 insertions(+), 5 deletions(-)
 
 diff --git a/Documentation/public-inbox-config.pod b/Documentation/public-inbox-config.pod
-index 4c9994dc..45e73af5 100644
+index 2d845f16..d04b14ad 100644
 --- a/Documentation/public-inbox-config.pod
 +++ b/Documentation/public-inbox-config.pod
-@@ -186,6 +186,12 @@ and the path may be "/dev/null" or any empty file.
+@@ -178,6 +178,12 @@ and the path may be "/dev/null" or any empty file.
  Multiple files may be specified and will be included in the
  order specified.
  
@@ -27,45 +27,24 @@ index 4c9994dc..45e73af5 100644
  
  This may be set to C<none> to disable the use of SpamAssassin
 diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm
-index fcf17d96..b991c2ea 100644
+index bda2761c..5438bfe4 100644
 --- a/lib/PublicInbox/WwwListing.pm
 +++ b/lib/PublicInbox/WwwListing.pm
-@@ -103,8 +103,8 @@ sub ibx_entry {
- 	$tmp;
- }
- 
--sub html ($$) {
--	my ($env, $list) = @_;
-+sub html ($$$) {
-+	my ($pi_config, $env, $list) = @_;
- 	my $title = 'public-inbox';
- 	my $out = '';
- 	my $code = 404;
-@@ -122,7 +122,8 @@ sub html ($$) {
- 		$out = '<pre>'.$l->to_html($tmp).'</pre><hr>';
- 	}
- 	$out = "<html><head><title>$title</title></head><body>" . $out;
--	$out .= '<pre>'. PublicInbox::WwwStream::code_footer($env) .
-+	$out .= '<pre>' .
-+	        PublicInbox::WwwStream::code_footer($pi_config, $env) .
- 		'</pre></body></html>';
- 
- 	my $h = [ 'Content-Type', 'text/html; charset=UTF-8' ];
-@@ -237,7 +238,7 @@ sub call {
- 		js($env, $list);
- 	} else { # /
- 		my $list = $self->{www_cb}->($self, $env, 'www');
--		html($env, $list);
-+		html($self->{pi_config}, $env, $list);
+@@ -99,7 +99,7 @@ sub psgi_triple {
+ 		$gzf->zmore('no inboxes, yet');
  	}
- }
- 
+ 	my $out = $gzf->zflush('</pre><hr><pre>'.
+-			PublicInbox::WwwStream::code_footer($ctx->{env}) .
++			PublicInbox::WwwStream::code_footer($ctx->{pi_config}, $ctx->{env}) .
+ 			'</pre></body></html>');
+ 	$h->[3] = bytes::length($out);
+ 	[ $code, $h, [ $out ] ];
 diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
-index 915a71ba..a71ef6e1 100644
+index 638f4e27..2af8e900 100644
 --- a/lib/PublicInbox/WwwStream.pm
 +++ b/lib/PublicInbox/WwwStream.pm
-@@ -79,10 +79,30 @@ sub _html_top ($) {
- 		'</head><body>'. $top . (delete($ctx->{-html_tip}) // '');
+@@ -96,10 +96,29 @@ EOF
+ 	@ret; # may be empty
  }
  
 -sub code_footer ($) {
@@ -85,9 +64,8 @@ index 915a71ba..a71ef6e1 100644
 +	<$fh>;
 +}
 +
-+sub code_footer {
++sub code_footer ($$) {
 +	my ($pi_config, $env) = @_;
-+
  	my $u = prurl($env, $CODE_URL);
 -	qq(AGPL code for this site: git clone <a\nhref="$u">$u</a>)
 +	my $default_info = qq(git clone <a\n href="$u">$u</a>);
@@ -98,10 +76,10 @@ index 915a71ba..a71ef6e1 100644
  }
  
  sub _html_end {
-@@ -154,7 +174,7 @@ EOF
- 	'<hr><pre>'.join("\n\n",
+@@ -174,7 +193,7 @@ EOF
  		$desc,
  		$urls,
+ 		coderepos($ctx),
 -		code_footer($ctx->{env})
 +		code_footer($ctx->{www}->{pi_config}, $ctx->{env})
  	).'</pre></body></html>';
diff --git a/overlays/patches/public-inbox/default.nix b/overlays/patches/public-inbox/default.nix
index 7f61e99484b8..7c354ec8b17b 100644
--- a/overlays/patches/public-inbox/default.nix
+++ b/overlays/patches/public-inbox/default.nix
@@ -2,11 +2,6 @@
 
 public-inbox.overrideAttrs ({ patches ? [], ... }: {
   patches = patches ++ [
-    (fetchpatch {
-      url = "https://80x24.org/public-inbox.git/patch/?id=41ecd08ee60daa495de3a2fc2c0296dc9cc9a0b3";
-      sha256 = "1skn2ncr9g6k78fiscwkqisg4k0pv133sf4pyzryn3ahb09i1yqn";
-    })
-
     ./0001-view-don-t-show-page-if-no-links-follow-it.patch
     ./0002-wwwstream-make-source-info-configurable.patch
   ];