summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Barnes2022-06-12 10:50:45 +1000
committerJake Barnes2022-06-12 10:50:45 +1000
commitca04d90b8d78aea73014efb24f46664337c1ddaf (patch)
tree24804069c2749f03a01ae1ecfdfd51a725fac9e4
parent4f5bebd55771b975dc1bcc29a12c90fa71d6bf0f (diff)
downloadaur-ca04d90b8d78aea73014efb24f46664337c1ddaf.tar.gz
Fix perl 5.36
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD4
-rw-r--r--postgresql-fix-perl-5.36.patch58
3 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e24706b3287b..f32c88939db3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -22,6 +22,7 @@ pkgbase = postgresql-12
source = https://ftp.postgresql.org/pub/source/v12.11/postgresql-12.11.tar.bz2
source = postgresql-run-socket.patch
source = postgresql-perl-rpath.patch
+ source = postgresql-fix-perl-5.36.patch
source = postgresql.pam
source = postgresql.logrotate
source = postgresql.service
@@ -31,6 +32,7 @@ pkgbase = postgresql-12
sha256sums = 1026248a5fd2beeaf43e4c7236ac817e56d58b681a335856465dfbc75b3e8302
sha256sums = d8173b336551d022f00792c0e2f1a52c6938a0003ce86b4f3cfd3aa84128612e
sha256sums = bd8e0f6ecb7c1b9b5d34eaa1d456cac20160e8350a9a151e31557a0ec7a51deb
+ sha256sums = 1422ca85a926abfeef9ce4b49710f2d403a3164a727fee221a24af49cd7372f8
sha256sums = 57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5
sha256sums = 6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e
sha256sums = 25fb140b90345828dc01a4f286345757e700a47178bab03d217a7a5a79105b57
@@ -40,6 +42,7 @@ pkgbase = postgresql-12
b2sums = 7062d334f3ef3b98f69e709f5de744324c7ce53ea516384902632a454a2ccadfd7bcc0c9ef4d51a685dd7a06e1fdccc292109294517831181c3db30bc2b7be91
b2sums = 7204c1ed073b7f60cd4ddf1ce0802c25ce8fa3b5a7dd0a92869775e5a25262ed5d8e0534aee8568ac93b049d6d215fd49d2a92dc487058e92273685eb5e5ba05
b2sums = 748515d1fcb0176dac4d74435e8fbe655989e31cc65cb2871bf05822dd5cc52b2e4014b8915f039c6f09b0230236add830ce981c7dc1b2269bdaad6620e88e8b
+ b2sums = b84313702a27c4ab9d52169b9678a3ae778ad39639de8b07596c322dee32e7ca9418c344f59b5df635fd10fb70252b4d77e40dee80d5d895eec21979d45c33b5
b2sums = 3eab84d332d96678fe6e435ee243c8f1a82b838f601d61d3604d11e918aed7a62202edca5e476c4b9031ed284570e6fcd6c659cfdbd9624aa0019d3233755f81
b2sums = 2209b7550acad7955102ec6922754b4046b2a2ad2a7e1cfb2cc4053c0705abac7aa7d7968eab617f50894797d06345f51c9a669926bd2a77dcf688206a2027e0
b2sums = a4255df47b7ac1418d20aa73aa0f6e70c7952a10d706e5523043c48b2c3b6d8e39838049dfcc826913cd0f2c06502561d1abe8b19cce7071db66139ae93a37bf
diff --git a/PKGBUILD b/PKGBUILD
index ef49ab04a96d..c290d01e9c20 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,6 +15,7 @@ makedepends=('krb5' 'libxml2' 'python' 'python2' 'perl' 'tcl>=8.6.0' 'openssl>=1
source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2
postgresql-run-socket.patch
postgresql-perl-rpath.patch
+ postgresql-fix-perl-5.36.patch
postgresql.pam
postgresql.logrotate
postgresql.service
@@ -24,6 +25,7 @@ source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.ta
sha256sums=('1026248a5fd2beeaf43e4c7236ac817e56d58b681a335856465dfbc75b3e8302'
'd8173b336551d022f00792c0e2f1a52c6938a0003ce86b4f3cfd3aa84128612e'
'bd8e0f6ecb7c1b9b5d34eaa1d456cac20160e8350a9a151e31557a0ec7a51deb'
+ '1422ca85a926abfeef9ce4b49710f2d403a3164a727fee221a24af49cd7372f8'
'57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
'6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e'
'25fb140b90345828dc01a4f286345757e700a47178bab03d217a7a5a79105b57'
@@ -33,6 +35,7 @@ sha256sums=('1026248a5fd2beeaf43e4c7236ac817e56d58b681a335856465dfbc75b3e8302'
b2sums=('7062d334f3ef3b98f69e709f5de744324c7ce53ea516384902632a454a2ccadfd7bcc0c9ef4d51a685dd7a06e1fdccc292109294517831181c3db30bc2b7be91'
'7204c1ed073b7f60cd4ddf1ce0802c25ce8fa3b5a7dd0a92869775e5a25262ed5d8e0534aee8568ac93b049d6d215fd49d2a92dc487058e92273685eb5e5ba05'
'748515d1fcb0176dac4d74435e8fbe655989e31cc65cb2871bf05822dd5cc52b2e4014b8915f039c6f09b0230236add830ce981c7dc1b2269bdaad6620e88e8b'
+ 'b84313702a27c4ab9d52169b9678a3ae778ad39639de8b07596c322dee32e7ca9418c344f59b5df635fd10fb70252b4d77e40dee80d5d895eec21979d45c33b5'
'3eab84d332d96678fe6e435ee243c8f1a82b838f601d61d3604d11e918aed7a62202edca5e476c4b9031ed284570e6fcd6c659cfdbd9624aa0019d3233755f81'
'2209b7550acad7955102ec6922754b4046b2a2ad2a7e1cfb2cc4053c0705abac7aa7d7968eab617f50894797d06345f51c9a669926bd2a77dcf688206a2027e0'
'a4255df47b7ac1418d20aa73aa0f6e70c7952a10d706e5523043c48b2c3b6d8e39838049dfcc826913cd0f2c06502561d1abe8b19cce7071db66139ae93a37bf'
@@ -44,6 +47,7 @@ prepare() {
cd postgresql-${pkgver}
patch -p1 < ../postgresql-run-socket.patch
patch -p1 < ../postgresql-perl-rpath.patch
+ patch -p1 < ../postgresql-fix-perl-5.36.patch
}
build() {
diff --git a/postgresql-fix-perl-5.36.patch b/postgresql-fix-perl-5.36.patch
new file mode 100644
index 000000000000..90c6ceb41787
--- /dev/null
+++ b/postgresql-fix-perl-5.36.patch
@@ -0,0 +1,58 @@
+From c08538734522f27646dd5fe68d61e16a59477f6e Mon Sep 17 00:00:00 2001
+From: Tom Lane <tgl@sss.pgh.pa.us>
+Date: Wed, 1 Jun 2022 16:15:47 -0400
+Subject: [PATCH] Fix pl/perl test case so it will still work under Perl 5.36.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Perl 5.36 has reclassified the warning condition that this test
+case used, so that the expected error fails to appear. Tweak
+the test so it instead exercises a case that's handled the same
+way in all Perl versions of interest.
+
+This appears to meet our standards for back-patching into
+out-of-support branches: it changes no user-visible behavior
+but enables testing of old branches with newer tools.
+Hence, back-patch as far as 9.2.
+
+Dagfinn Ilmari Mannsåker, per report from Jitka Plesníková.
+
+Discussion: https://postgr.es/m/564579.1654093326@sss.pgh.pa.us
+---
+ src/pl/plperl/expected/plperl.out | 6 +++---
+ src/pl/plperl/sql/plperl.sql | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/pl/plperl/expected/plperl.out b/src/pl/plperl/expected/plperl.out
+index d8a1ff5dd8d1..e3d7c8896a23 100644
+--- a/src/pl/plperl/expected/plperl.out
++++ b/src/pl/plperl/expected/plperl.out
+@@ -724,9 +724,9 @@ DO $do$ use strict; my $name = "foo"; my $ref = $$name; $do$ LANGUAGE plperl;
+ ERROR: Can't use string ("foo") as a SCALAR ref while "strict refs" in use at line 1.
+ CONTEXT: PL/Perl anonymous code block
+ -- check that we can "use warnings" (in this case to turn a warn into an error)
+--- yields "ERROR: Useless use of sort in scalar context."
+-DO $do$ use warnings FATAL => qw(void) ; my @y; my $x = sort @y; 1; $do$ LANGUAGE plperl;
+-ERROR: Useless use of sort in scalar context at line 1.
++-- yields "ERROR: Useless use of sort in void context."
++DO $do$ use warnings FATAL => qw(void) ; my @y; sort @y; 1; $do$ LANGUAGE plperl;
++ERROR: Useless use of sort in void context at line 1.
+ CONTEXT: PL/Perl anonymous code block
+ -- make sure functions marked as VOID without an explicit return work
+ CREATE OR REPLACE FUNCTION myfuncs() RETURNS void AS $$
+diff --git a/src/pl/plperl/sql/plperl.sql b/src/pl/plperl/sql/plperl.sql
+index b0d950b2304a..bb0b8ce4cb61 100644
+--- a/src/pl/plperl/sql/plperl.sql
++++ b/src/pl/plperl/sql/plperl.sql
+@@ -469,8 +469,8 @@ DO $$ use blib; $$ LANGUAGE plperl;
+ DO $do$ use strict; my $name = "foo"; my $ref = $$name; $do$ LANGUAGE plperl;
+
+ -- check that we can "use warnings" (in this case to turn a warn into an error)
+--- yields "ERROR: Useless use of sort in scalar context."
+-DO $do$ use warnings FATAL => qw(void) ; my @y; my $x = sort @y; 1; $do$ LANGUAGE plperl;
++-- yields "ERROR: Useless use of sort in void context."
++DO $do$ use warnings FATAL => qw(void) ; my @y; sort @y; 1; $do$ LANGUAGE plperl;
+
+ -- make sure functions marked as VOID without an explicit return work
+ CREATE OR REPLACE FUNCTION myfuncs() RETURNS void AS $$