testsuite: fix FTBFS against perl-5.18
Version: 9.2.4-5
This commit is contained in:
parent
304cc8de27
commit
44506bd77e
83
postgresql-9.2.4-perl-5.18.patch
Normal file
83
postgresql-9.2.4-perl-5.18.patch
Normal file
@ -0,0 +1,83 @@
|
||||
commit 035a5e1e8c346efe25df6be4627b5f24cc3736b1
|
||||
Author: Tom Lane <tgl@sss.pgh.pa.us>
|
||||
AuthorDate: Mon Jun 3 14:19:26 2013 -0400
|
||||
Commit: Tom Lane <tgl@sss.pgh.pa.us>
|
||||
CommitDate: Mon Jun 3 14:19:26 2013 -0400
|
||||
|
||||
Add semicolons to eval'd strings to hide a minor Perl behavioral change.
|
||||
|
||||
"eval q{foo}" used to complain that the error was on line 2 of the eval'd
|
||||
string, because eval internally tacked on "\n;" so that the end of the
|
||||
erroneous command was indeed on line 2. But as of Perl 5.18 it more
|
||||
sanely says that the error is on line 1. To avoid Perl-version-dependent
|
||||
regression test results, use "eval q{foo;}" instead in the two places
|
||||
where this matters. Per buildfarm.
|
||||
|
||||
Since people might try to use newer Perl versions with older PG releases,
|
||||
back-patch as far as 9.0 where these test cases were added.
|
||||
|
||||
diff --git a/src/pl/plperl/expected/plperl.out b/src/pl/plperl/expected/plperl.out
|
||||
index 29c1d11..d23a302 100644
|
||||
--- a/src/pl/plperl/expected/plperl.out
|
||||
+++ b/src/pl/plperl/expected/plperl.out
|
||||
@@ -626,8 +626,8 @@ DO $$ open my $fh, "</nonesuch"; $$ LANGUAGE plperl;
|
||||
ERROR: 'open' trapped by operation mask at line 1.
|
||||
CONTEXT: PL/Perl anonymous code block
|
||||
-- check that eval is allowed and eval'd restricted ops are caught
|
||||
-DO $$ eval q{chdir '.'}; warn "Caught: $@"; $$ LANGUAGE plperl;
|
||||
-WARNING: Caught: 'chdir' trapped by operation mask at line 2.
|
||||
+DO $$ eval q{chdir '.';}; warn "Caught: $@"; $$ LANGUAGE plperl;
|
||||
+WARNING: Caught: 'chdir' trapped by operation mask at line 1.
|
||||
CONTEXT: PL/Perl anonymous code block
|
||||
-- check that compiling do (dofile opcode) is allowed
|
||||
-- but that executing it for a file not already loaded (via require) dies
|
||||
diff --git a/src/pl/plperl/expected/plperl_init.out b/src/pl/plperl/expected/plperl_init.out
|
||||
index a21ea0b..133828e 100644
|
||||
--- a/src/pl/plperl/expected/plperl_init.out
|
||||
+++ b/src/pl/plperl/expected/plperl_init.out
|
||||
@@ -1,14 +1,14 @@
|
||||
-- test plperl.on_plperl_init errors are fatal
|
||||
-- This test tests setting on_plperl_init after loading plperl
|
||||
LOAD 'plperl';
|
||||
-SET SESSION plperl.on_plperl_init = ' system("/nonesuch") ';
|
||||
+SET SESSION plperl.on_plperl_init = ' system("/nonesuch"); ';
|
||||
SHOW plperl.on_plperl_init;
|
||||
- plperl.on_plperl_init
|
||||
------------------------
|
||||
- system("/nonesuch")
|
||||
+ plperl.on_plperl_init
|
||||
+------------------------
|
||||
+ system("/nonesuch");
|
||||
(1 row)
|
||||
|
||||
DO $$ warn 42 $$ language plperl;
|
||||
-ERROR: 'system' trapped by operation mask at line 2.
|
||||
+ERROR: 'system' trapped by operation mask at line 1.
|
||||
CONTEXT: while executing plperl.on_plperl_init
|
||||
PL/Perl anonymous code block
|
||||
diff --git a/src/pl/plperl/sql/plperl.sql b/src/pl/plperl/sql/plperl.sql
|
||||
index ad36161..dc6b169 100644
|
||||
--- a/src/pl/plperl/sql/plperl.sql
|
||||
+++ b/src/pl/plperl/sql/plperl.sql
|
||||
@@ -405,7 +405,7 @@ DO $$ qx("/nonesuch"); $$ LANGUAGE plperl;
|
||||
DO $$ open my $fh, "</nonesuch"; $$ LANGUAGE plperl;
|
||||
|
||||
-- check that eval is allowed and eval'd restricted ops are caught
|
||||
-DO $$ eval q{chdir '.'}; warn "Caught: $@"; $$ LANGUAGE plperl;
|
||||
+DO $$ eval q{chdir '.';}; warn "Caught: $@"; $$ LANGUAGE plperl;
|
||||
|
||||
-- check that compiling do (dofile opcode) is allowed
|
||||
-- but that executing it for a file not already loaded (via require) dies
|
||||
diff --git a/src/pl/plperl/sql/plperl_init.sql b/src/pl/plperl/sql/plperl_init.sql
|
||||
index d60268d..4ebf3f8 100644
|
||||
--- a/src/pl/plperl/sql/plperl_init.sql
|
||||
+++ b/src/pl/plperl/sql/plperl_init.sql
|
||||
@@ -3,7 +3,7 @@
|
||||
-- This test tests setting on_plperl_init after loading plperl
|
||||
LOAD 'plperl';
|
||||
|
||||
-SET SESSION plperl.on_plperl_init = ' system("/nonesuch") ';
|
||||
+SET SESSION plperl.on_plperl_init = ' system("/nonesuch"); ';
|
||||
|
||||
SHOW plperl.on_plperl_init;
|
||||
|
@ -111,6 +111,10 @@ Patch7: postgresql-9.2.4-aarch64-atomic.patch
|
||||
# Comments for these patches are in the patch files.
|
||||
Patch8: postgresql-man.patch
|
||||
|
||||
# Build even with Perl 5.18+
|
||||
# ~> upstream (035a5e1e8c34)
|
||||
Patch9: postgresql-9.2.4-perl-5.18.patch
|
||||
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk
|
||||
BuildRequires: perl(ExtUtils::Embed), perl-devel
|
||||
BuildRequires: readline-devel zlib-devel
|
||||
@ -338,6 +342,7 @@ benchmarks.
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
# We used to run autoconf here, but there's no longer any real need to,
|
||||
# since Postgres ships with a reasonably modern configure script.
|
||||
@ -1109,6 +1114,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jul 23 2013 Pavel Raiskup <praiskup@redhat.com> - 9.2.4-5
|
||||
- fix testsuite to allow build against Perl 5.18
|
||||
|
||||
* Thu Jul 18 2013 Petr Pisar <ppisar@redhat.com> - 9.2.4-5
|
||||
- Perl 5.18 rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user