From 9185e1be831fe71aa8a2bebe171528afa140cd94 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 17:44:30 +0000 Subject: [PATCH] import UBI perl-DBD-Pg-3.18.0-6.el10 --- .gitignore | 2 +- .perl-DBD-Pg.metadata | 1 - ...-removal-of-WITH-OIDS-in-PostgreSQL-.patch | 72 ----- ...-Don-t-try-to-silence-ERRORs-in-test.patch | 32 -- ...essages-FATAL-test-on-upcoming-Postg.patch | 50 --- ...ing-error-detection-on-PostgreSQL-12.patch | 52 --- ...w-for-changed-message-of-pg_ctl-outp.patch | 30 -- ...-conditional-catalog-query-fragments.patch | 66 ---- ...f-deprecated-pg_attrdef.adsrc-column.patch | 37 --- ...deprecated-pg_constraint.consrc-colu.patch | 32 -- SPECS/perl-DBD-Pg.spec => perl-DBD-Pg.spec | 305 ++++++++++++++---- sources | 1 + 12 files changed, 248 insertions(+), 432 deletions(-) delete mode 100644 .perl-DBD-Pg.metadata delete mode 100644 SOURCES/DBD-Pg-3.7.4-Adjust-tests-for-removal-of-WITH-OIDS-in-PostgreSQL-.patch delete mode 100644 SOURCES/DBD-Pg-3.7.4-Don-t-try-to-silence-ERRORs-in-test.patch delete mode 100644 SOURCES/DBD-Pg-3.7.4-Fix-client_min_messages-FATAL-test-on-upcoming-Postg.patch delete mode 100644 SOURCES/DBD-Pg-3.7.4-Fix-ping-error-detection-on-PostgreSQL-12.patch delete mode 100644 SOURCES/DBD-Pg-3.7.4-Fix-test-to-allow-for-changed-message-of-pg_ctl-outp.patch delete mode 100644 SOURCES/DBD-Pg-3.7.4-Inline-no-longer-conditional-catalog-query-fragments.patch delete mode 100644 SOURCES/DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_attrdef.adsrc-column.patch delete mode 100644 SOURCES/DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_constraint.consrc-colu.patch rename SPECS/perl-DBD-Pg.spec => perl-DBD-Pg.spec (60%) create mode 100644 sources diff --git a/.gitignore b/.gitignore index 8dc2f3d..77be851 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/DBD-Pg-3.7.4.tar.gz +DBD-Pg-3.18.0.tar.gz diff --git a/.perl-DBD-Pg.metadata b/.perl-DBD-Pg.metadata deleted file mode 100644 index d3383b7..0000000 --- a/.perl-DBD-Pg.metadata +++ /dev/null @@ -1 +0,0 @@ -6f0598fef195203057bae7947859590e8b79e497 SOURCES/DBD-Pg-3.7.4.tar.gz diff --git a/SOURCES/DBD-Pg-3.7.4-Adjust-tests-for-removal-of-WITH-OIDS-in-PostgreSQL-.patch b/SOURCES/DBD-Pg-3.7.4-Adjust-tests-for-removal-of-WITH-OIDS-in-PostgreSQL-.patch deleted file mode 100644 index 491c76c..0000000 --- a/SOURCES/DBD-Pg-3.7.4-Adjust-tests-for-removal-of-WITH-OIDS-in-PostgreSQL-.patch +++ /dev/null @@ -1,72 +0,0 @@ -From fe47b5e148a79d0d8935293bdc05cd4444ca87cd Mon Sep 17 00:00:00 2001 -From: Dagfinn Ilmari Mannsaker -Date: Tue, 9 Apr 2019 17:44:38 +0100 -Subject: [PATCH] Adjust tests for removal of WITH OIDS in PostgreSQL 12 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Petr Písař: Ported to 3.7.4 from -ab1808c7b9cbac7099972105ec59b56e7d6ed5a6. - -Signed-off-by: Petr Písař ---- - t/03dbmethod.t | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/t/03dbmethod.t b/t/03dbmethod.t -index a89a054..97f375e 100644 ---- a/t/03dbmethod.t -+++ b/t/03dbmethod.t -@@ -757,6 +757,8 @@ $sth = $dbh->statistics_info(undef,undef,'dbd_pg_test9',undef,undef); - is ($sth, undef, $t); - - -+my $with_oids = $pgversion < 120000 ? 'WITH OIDS' : ''; -+my $hash_index_idx = $with_oids ? 5 : 4; - ## Create some tables with various indexes - { - local $SIG{__WARN__} = sub {}; -@@ -772,10 +774,10 @@ is ($sth, undef, $t); - $dbh->do("CREATE TABLE $table2 (a INT, b INT, c INT, PRIMARY KEY(a,b), UNIQUE(b,c))"); - $dbh->do("CREATE INDEX dbd_pg_test2_expr ON $table2(c,(a+b))"); - -- $dbh->do("CREATE TABLE $table3 (a INT, b INT, c INT, PRIMARY KEY(a)) WITH OIDS"); -+ $dbh->do("CREATE TABLE $table3 (a INT, b INT, c INT, PRIMARY KEY(a)) $with_oids"); - $dbh->do("CREATE UNIQUE INDEX dbd_pg_test3_index_b ON $table3(b)"); - $dbh->do("CREATE INDEX dbd_pg_test3_index_c ON $table3 USING hash(c)"); -- $dbh->do("CREATE INDEX dbd_pg_test3_oid ON $table3(oid)"); -+ $dbh->do("CREATE INDEX dbd_pg_test3_oid ON $table3(oid)") if $with_oids; - $dbh->do("CREATE UNIQUE INDEX dbd_pg_test3_pred ON $table3(c) WHERE c > 0 AND c < 45"); - $dbh->commit(); - } -@@ -801,7 +803,7 @@ one => [ - [ undef, $schema, $table3, '0', undef, 'dbd_pg_test3_index_b', 'btree', 1, 'b', 'A', '0', '1', undef, 'b' ], - [ undef, $schema, $table3, '0', undef, 'dbd_pg_test3_pkey', 'btree', 1, 'a', 'A', '0', '1', undef, 'a' ], - [ undef, $schema, $table3, '0', undef, 'dbd_pg_test3_pred', 'btree', 1, 'c', 'A', '0', '1', '((c > 0) AND (c < 45))', 'c' ], -- [ undef, $schema, $table3, '1', undef, 'dbd_pg_test3_oid', 'btree', 1, 'oid', 'A', '0', '1', undef, 'oid' ], -+ ($with_oids ? [ undef, $schema, $table3, '1', undef, 'dbd_pg_test3_oid', 'btree', 1, 'oid', 'A', '0', '1', undef, 'oid' ] : ()), - [ undef, $schema, $table3, '1', undef, 'dbd_pg_test3_index_c', 'hashed', 1, 'c', 'A', '0', '4', undef, 'c' ], - ], - three_uo => [ -@@ -834,7 +836,7 @@ $t="Correct stats output for $table3"; - $sth = $dbh->statistics_info(undef,$schema,$table3,undef,undef); - $stats = $sth->fetchall_arrayref; - ## Too many intra-version differences to try for an exact number here: --$correct_stats->{three}[5][11] = $stats->[5][11] = 0; -+$correct_stats->{three}[$hash_index_idx][11] = $stats->[$hash_index_idx][11] = 0; - is_deeply ($stats, $correct_stats->{three}, $t); - - $t="Correct stats output for $table3 (unique only)"; -@@ -856,7 +858,7 @@ is_deeply ($stats, $correct_stats->{three_uo}, $t); - $t="Correct stats output for $table3"; - $sth = $dbh->statistics_info(undef,undef,$table3,undef,undef); - $stats = $sth->fetchall_arrayref; -- $correct_stats->{three}[5][11] = $stats->[5][11] = 0; -+ $correct_stats->{three}[$hash_index_idx][11] = $stats->[$hash_index_idx][11] = 0; - is_deeply ($stats, $correct_stats->{three}, $t); - - $t="Correct stats output for $table3 (unique only)"; --- -2.21.0 - diff --git a/SOURCES/DBD-Pg-3.7.4-Don-t-try-to-silence-ERRORs-in-test.patch b/SOURCES/DBD-Pg-3.7.4-Don-t-try-to-silence-ERRORs-in-test.patch deleted file mode 100644 index 40d4fad..0000000 --- a/SOURCES/DBD-Pg-3.7.4-Don-t-try-to-silence-ERRORs-in-test.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 5c5269ef7e9c3db2d6090c411e5aa71fffdc4c04 Mon Sep 17 00:00:00 2001 -From: Dagfinn Ilmari Mannsaker -Date: Tue, 9 Apr 2019 17:49:10 +0100 -Subject: [PATCH] Don't try to silence ERRORs in test -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -PostrgreSQL 12 no longer allows setting client_min_messages='FATAL', -and ERROR is sufficient in this case anyway. - -Signed-off-by: Petr Písař ---- - t/04misc.t | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/t/04misc.t b/t/04misc.t -index f739f8a..21b9261 100644 ---- a/t/04misc.t -+++ b/t/04misc.t -@@ -113,7 +113,7 @@ $BC$ - - is( $sth->err, undef, q{Statement attribute 'err' is initially undef}); - -- $dbh->do(q{SET client_min_messages = 'FATAL'}); -+ $dbh->do(q{SET client_min_messages = 'ERROR'}); - - TODO: { - local $TODO = q{Known bug: notice and warnings should set err to 6}; --- -2.21.0 - diff --git a/SOURCES/DBD-Pg-3.7.4-Fix-client_min_messages-FATAL-test-on-upcoming-Postg.patch b/SOURCES/DBD-Pg-3.7.4-Fix-client_min_messages-FATAL-test-on-upcoming-Postg.patch deleted file mode 100644 index b083ec2..0000000 --- a/SOURCES/DBD-Pg-3.7.4-Fix-client_min_messages-FATAL-test-on-upcoming-Postg.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 2b60151aea6f03ac7e846aae0d21e7f335cad99c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= -Date: Wed, 9 Jan 2019 21:24:09 +0000 -Subject: [PATCH] Fix client_min_messages=FATAL test on upcoming PostgreSQL - releases - -The upcoming minor releases of PostgreSQL cap client_min_messages to -ERROR to avoid the case this test was testing for. Skip the test if -client_min_messages doesn't come back as 'fatal' after we set it. ---- - t/02attribs.t | 23 ++++++++++++++--------- - 1 file changed, 14 insertions(+), 9 deletions(-) - -diff --git a/t/02attribs.t b/t/02attribs.t -index b9ecd90..75e8f48 100644 ---- a/t/02attribs.t -+++ b/t/02attribs.t -@@ -1204,15 +1204,20 @@ $sth->execute(); - is ($warning, undef, $t); - - ## Special case in which errors are not sent to the client! --$t = q{When client_min_messages is FATAL, we do our best to alert the caller it's a Bad Idea}; --$dbh->do(q{SET client_min_messages = 'FATAL'}); --$dbh->{RaiseError} = 0; --$dbh->{AutoCommit} = 1; --eval { -- $dbh->do('SELECT 1 FROM nonesuh'); --}; --my $errorstring = $dbh->errstr; --like ( $errorstring, qr/Perhaps client_min_messages/, $t); -+SKIP: { -+ $t = q{When client_min_messages is FATAL, we do our best to alert the caller it's a Bad Idea}; -+ $dbh->do(q{SET client_min_messages = 'FATAL'}); -+ skip "This version of PostgreSQL caps client_min_messages to ERROR", 1 -+ unless $dbh->selectrow_array('SHOW client_min_messages') eq 'fatal'; -+ -+ $dbh->{RaiseError} = 0; -+ $dbh->{AutoCommit} = 1; -+ eval { -+ $dbh->do('SELECT 1 FROM nonesuh'); -+ }; -+ my $errorstring = $dbh->errstr; -+ like ( $errorstring, qr/Perhaps client_min_messages/, $t); -+} - $dbh->rollback(); - $dbh->do(q{SET client_min_message = 'NOTICE'}); - $dbh->{RaiseError} = 1; --- -2.20.1 - diff --git a/SOURCES/DBD-Pg-3.7.4-Fix-ping-error-detection-on-PostgreSQL-12.patch b/SOURCES/DBD-Pg-3.7.4-Fix-ping-error-detection-on-PostgreSQL-12.patch deleted file mode 100644 index e9354a1..0000000 --- a/SOURCES/DBD-Pg-3.7.4-Fix-ping-error-detection-on-PostgreSQL-12.patch +++ /dev/null @@ -1,52 +0,0 @@ -From c1eadf4e3dd49a344b38d70a46bd66c2d749e65f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= -Date: Tue, 9 Apr 2019 18:50:35 +0100 -Subject: [PATCH] Fix ->ping error detection on PostgreSQL 12 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The libpq write error handling was revamped in PostgreSQL 12, so it -can return a non-NULL pointer even if it encouters a fatal error. - -Instead rely on PQresultStatus() to detect fatal errors (including -NULL pointers). - -Petr Písař: Ported to 3.7.4 from 3e1a89a8e5557607932e57b85a2bbc875c2821b6. - -Signed-off-by: Petr Písař ---- - dbdimp.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/dbdimp.c b/dbdimp.c -index f5c8703..0f7941a 100644 ---- a/dbdimp.c -+++ b/dbdimp.c -@@ -493,19 +493,19 @@ int dbd_db_ping (SV * dbh) - tstatus = pg_db_txn_status(aTHX_ imp_dbh); - if (TRACE5_slow) TRC(DBILOGFP, "%sdbd_db_ping txn_status is %d\n", THEADER_slow, tstatus); - -- if (tstatus >= 4) { /* Unknown, so we err on the side of "bad" */ -+ if (tstatus >= PQTRANS_UNKNOWN) { /* Unknown, so we err on the side of "bad" */ - if (TEND_slow) TRC(DBILOGFP, "%sEnd dbd_pg_ping (result: -2 unknown/bad)\n", THEADER_slow); - return -2; - } - - /* No matter what state we are in, send an empty query to the backend */ - result = PQexec(imp_dbh->conn, "/* DBD::Pg ping test v3.7.4 */"); -- if (NULL == result) { -+ status = PQresultStatus(result); -+ PQclear(result); -+ if (PGRES_FATAL_ERROR == status) { - /* Something very bad, usually indicating the backend is gone */ - return -3; - } -- status = PQresultStatus(result); -- PQclear(result); - - /* We expect to see an empty query most times */ - if (PGRES_EMPTY_QUERY == status) { --- -2.21.0 - diff --git a/SOURCES/DBD-Pg-3.7.4-Fix-test-to-allow-for-changed-message-of-pg_ctl-outp.patch b/SOURCES/DBD-Pg-3.7.4-Fix-test-to-allow-for-changed-message-of-pg_ctl-outp.patch deleted file mode 100644 index ba93f94..0000000 --- a/SOURCES/DBD-Pg-3.7.4-Fix-test-to-allow-for-changed-message-of-pg_ctl-outp.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 575c869da97a9f387cb26016f521e02b2708eb71 Mon Sep 17 00:00:00 2001 -From: Erik Rijkers -Date: Mon, 8 Apr 2019 21:53:17 -0400 -Subject: [PATCH] Fix test to allow for changed message of pg_ctl output. CPAN - RT #128966 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Písař ---- - t/dbdpg_test_setup.pl | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/t/dbdpg_test_setup.pl b/t/dbdpg_test_setup.pl -index 24f44ab..8dd17a2 100644 ---- a/t/dbdpg_test_setup.pl -+++ b/t/dbdpg_test_setup.pl -@@ -331,7 +331,7 @@ version: $version - $info = qx{$pg_ctl --help 2>&1}; - }; - last GETHANDLE if $@; ## Fail - pg_ctl bad -- if (!defined $info or ($info !~ /\@postgresql\.org/ and $info !~ /run as root/)) { -+ if (!defined $info or ($info !~ /\@[a-z.-]*?postgresql\.org/ and $info !~ /run as root/)) { - $@ = defined $initdb ? "Bad pg_ctl output: $info" : 'Bad pg_ctl output'; - last GETHANDLE; ## Fail - pg_ctl bad - } --- -2.21.0 - diff --git a/SOURCES/DBD-Pg-3.7.4-Inline-no-longer-conditional-catalog-query-fragments.patch b/SOURCES/DBD-Pg-3.7.4-Inline-no-longer-conditional-catalog-query-fragments.patch deleted file mode 100644 index 4832b01..0000000 --- a/SOURCES/DBD-Pg-3.7.4-Inline-no-longer-conditional-catalog-query-fragments.patch +++ /dev/null @@ -1,66 +0,0 @@ -From c73d40c6e219621c4bdc1fe9cadd52b7f09e8560 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= -Date: Mon, 31 Dec 2018 18:45:57 +0100 -Subject: [PATCH] Inline no-longer-conditional catalog query fragments -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Some bits of catalog queries needed version-specific variants, but when -support for the versions that necessitated them was removed, the -variables were left in place. This removes these now-unnecessary -variables and puts the SQL fragments back in the query. - -The pg_get_expr() call does not need to be conditional, it exists in 7.4 -too: https://www.postgresql.org/docs/7.4/functions-misc.html - -Petr Písař: Ported to 3.7.4 from -c7ea8fd90b5fc09f28e090e0e00cbb2708eda4cc. - -Signed-off-by: Petr Písař ---- - Pg.pm | 14 +++----------- - 1 file changed, 3 insertions(+), 11 deletions(-) - -diff --git a/Pg.pm b/Pg.pm -index 9c664e9..5658d1b 100644 ---- a/Pg.pm -+++ b/Pg.pm -@@ -443,14 +443,6 @@ use 5.008001; - - my $whereclause = join "\n\t\t\t\tAND ", '', @search; - -- my $schemajoin = 'JOIN pg_catalog.pg_namespace n ON (n.oid = c.relnamespace)'; -- -- my $remarks = 'pg_catalog.col_description(a.attrelid, a.attnum)'; -- -- my $column_def = $dbh->{private_dbdpg}{version} >= 80000 -- ? 'pg_catalog.pg_get_expr(af.adbin, af.adrelid)' -- : 'af.adsrc'; -- - my $col_info_sql = qq! - SELECT - NULL::text AS "TABLE_CAT" -@@ -464,8 +456,8 @@ use 5.008001; - , NULL::text AS "DECIMAL_DIGITS" - , NULL::text AS "NUM_PREC_RADIX" - , CASE a.attnotnull WHEN 't' THEN 0 ELSE 1 END AS "NULLABLE" -- , $remarks AS "REMARKS" -- , $column_def AS "COLUMN_DEF" -+ , pg_catalog.col_description(a.attrelid, a.attnum) AS "REMARKS" -+ , pg_catalog.pg_get_expr(af.adbin, af.adrelid) AS "COLUMN_DEF" - , NULL::text AS "SQL_DATA_TYPE" - , NULL::text AS "SQL_DATETIME_SUB" - , NULL::text AS "CHAR_OCTET_LENGTH" -@@ -486,7 +478,7 @@ use 5.008001; - JOIN pg_catalog.pg_attribute a ON (t.oid = a.atttypid) - JOIN pg_catalog.pg_class c ON (a.attrelid = c.oid) - LEFT JOIN pg_catalog.pg_attrdef af ON (a.attnum = af.adnum AND a.attrelid = af.adrelid) -- $schemajoin -+ JOIN pg_catalog.pg_namespace n ON (n.oid = c.relnamespace) - WHERE - a.attnum >= 0 - AND c.relkind IN ('r','v','m') --- -2.21.0 - diff --git a/SOURCES/DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_attrdef.adsrc-column.patch b/SOURCES/DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_attrdef.adsrc-column.patch deleted file mode 100644 index c6de09f..0000000 --- a/SOURCES/DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_attrdef.adsrc-column.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 88d2f8f1fc95bcd16e95d3fc667783fb7a9ab05b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= -Date: Fri, 11 Jan 2019 23:47:29 +0000 -Subject: [PATCH] Remove usage of deprecated pg_attrdef.adsrc column -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It doesn't track outside change that might affect the representation, -and will be removed in PostgreSQL 12. - -Petr Písař: Ported to 3.7.4 from 88d2f8f1fc95bcd16e95d3fc667783fb7a9ab05b. ---- - Pg.pm | 4 ++-- - -diff --git a/Pg.pm b/Pg.pm -index 2b46800..0ffe083 100644 ---- a/Pg.pm -+++ b/Pg.pm -@@ -349,12 +349,12 @@ use 5.008001; - $oid =~ /(\d+)/ or die qq{OID was not numeric?!?\n}; - $oid = $1; - ## This table has a primary key. Is there a sequence associated with it via a unique, indexed column? -- $SQL = "SELECT a.attname, i.indisprimary, pg_catalog.pg_get_expr(adbin,adrelid)\n". -+ $SQL = "SELECT a.attname, i.indisprimary, pg_catalog.pg_get_expr(d.adbin, d.adrelid)\n". - "FROM pg_catalog.pg_index i, pg_catalog.pg_attribute a, pg_catalog.pg_attrdef d\n ". - "WHERE i.indrelid = $oid AND d.adrelid=a.attrelid AND d.adnum=a.attnum\n". - " AND a.attrelid = $oid AND i.indisunique IS TRUE\n". - " AND a.atthasdef IS TRUE AND i.indkey[0]=a.attnum\n". -- q{ AND d.adsrc ~ '^nextval'}; -+ " AND pg_catalog.pg_get_expr(d.adbin, d.adrelid) ~ '^nextval'"; - $sth = $dbh->prepare($SQL); - $count = $sth->execute(); - if (!defined $count or $count eq '0E0') { --- -2.21.0 - diff --git a/SOURCES/DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_constraint.consrc-colu.patch b/SOURCES/DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_constraint.consrc-colu.patch deleted file mode 100644 index 96ac060..0000000 --- a/SOURCES/DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_constraint.consrc-colu.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 35080ce5535e233428a7e17320e111962daec7e1 Mon Sep 17 00:00:00 2001 -From: Dagfinn Ilmari Mannsaker -Date: Tue, 9 Apr 2019 17:40:55 +0100 -Subject: [PATCH] Remove usage of deprecated pg_constraint.consrc column -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It doesn't track outside change that might affect the representation, -and will be removed in PostgreSQL 12. - -Petr Písař: Ported to 3.7.4 from 35080ce5535e233428a7e17320e111962daec7e1. ---- - Pg.pm | 3 ++- - -diff --git a/Pg.pm b/Pg.pm -index 9e0e9d7..13cd68f 100644 ---- a/Pg.pm -+++ b/Pg.pm -@@ -530,7 +530,8 @@ use 5.008001; - $row->[$col_map{DATA_TYPE}] = DBD::Pg::db::pg_type_info($dbh,$row->[$col_map{DATA_TYPE}]); - - # Add pg_constraint -- my $SQL = q{SELECT consrc FROM pg_catalog.pg_constraint WHERE contype = 'c' AND }. -+ my $SQL = q{SELECT pg_catalog.pg_get_constraintdef(oid) }. -+ q{FROM pg_catalog.pg_constraint WHERE contype = 'c' AND }. - qq{conrelid = $aid AND conkey = '{$attnum}'}; - my $info = $dbh->selectall_arrayref($SQL); - if (@$info) { --- -2.21.0 - diff --git a/SPECS/perl-DBD-Pg.spec b/perl-DBD-Pg.spec similarity index 60% rename from SPECS/perl-DBD-Pg.spec rename to perl-DBD-Pg.spec index edd4447..889b9ce 100644 --- a/SPECS/perl-DBD-Pg.spec +++ b/perl-DBD-Pg.spec @@ -1,64 +1,47 @@ -Name: perl-DBD-Pg -Summary: A PostgreSQL interface for perl -Version: 3.7.4 -Release: 4%{?dist} -# Pg.pm, README: Points to directory which contains GPLv2+ and Artistic -# other files: Same as Perl (GPL+ or Artistic) -License: GPLv2+ or Artistic -Group: Development/Libraries -Source0: http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/DBD-Pg-%{version}.tar.gz -# Adapt to changes in libpq 12, bug #1772373, in upstream 3.8.0 -Patch0: DBD-Pg-3.7.4-Fix-ping-error-detection-on-PostgreSQL-12.patch -# 1/2 Adapt tests to removal of client_min_messages='FATAL' in PostgreSQL 12, -# bug #1772373, CPAN RT#128529, in upstream 3.8.0 -Patch1: DBD-Pg-3.7.4-Fix-client_min_messages-FATAL-test-on-upcoming-Postg.patch -# 1/2 Do not use pg_attrdef.adsrc column in last_insert_id() that was removed in -# PostgreSQL 12, bug #1772373, in upstream 3.8.0 -Patch2: DBD-Pg-3.7.4-Inline-no-longer-conditional-catalog-query-fragments.patch -# 2/2 Do not use pg_attrdef.adsrc column in last_insert_id() that was removed in -# PostgreSQL 12, bug #1772373, in upstream 3.8.0 -Patch3: DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_attrdef.adsrc-column.patch -# Adapt tests to changes in pg_ctl 12 output, bug #1772373, CPAN RT#128966, -# in upstream 3.8.0 -Patch4: DBD-Pg-3.7.4-Fix-test-to-allow-for-changed-message-of-pg_ctl-outp.patch -# Do not use pg_constraint.consrc column in column_info() that was removed in -# PostgreSQL 12, bug #1772373, in upstream 3.8.0 -Patch5: DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_constraint.consrc-colu.patch -# Adapt tests to removal of WITH OIDS in PostgreSQL 12, bug #1772373, -# in upstream 3.8.0 -Patch6: DBD-Pg-3.7.4-Adjust-tests-for-removal-of-WITH-OIDS-in-PostgreSQL-.patch -# 2/2 Adapt tests to removal of client_min_messages='FATAL' in PostgreSQL 12, -# bug #1772373, CPAN RT#128529, in upstream 3.8.0 -Patch7: DBD-Pg-3.7.4-Don-t-try-to-silence-ERRORs-in-test.patch -URL: http://search.cpan.org/dist/DBD-Pg/ +# Perform optional tests +%bcond_without perl_DBD_Pg_enables_optional_test +Name: perl-DBD-Pg +Summary: A PostgreSQL interface for Perl +Version: 3.18.0 +Release: 6%{?dist} +# Pg.pm, README: Points to directory which contains GPL-2.0-or-later and Artistic-1.0-Perl +# other files: Same as Perl (GPL-1.0-or-later OR Artistic-1.0-Perl) +License: GPL-2.0-or-later OR Artistic-1.0-Perl +Source0: https://cpan.metacpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-%{version}.tar.gz +URL: https://metacpan.org/release/DBD-Pg + +BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc BuildRequires: make BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-interpreter +BuildRequires: perl(:VERSION) >= 5.8.1 BuildRequires: perl(Carp) BuildRequires: perl(Config) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(File::Spec) BuildRequires: perl(lib) BuildRequires: perl(strict) -BuildRequires: perl(vars) BuildRequires: perl(warnings) -BuildRequires: postgresql-devel >= 7.4 +BuildRequires: libpq-devel # Run-time: +BuildRequires: perl(constant) # Prevent bug #443495 BuildRequires: perl(DBI) >= 1.614 -BuildRequires: perl(DynaLoader) BuildRequires: perl(Exporter) BuildRequires: perl(if) BuildRequires: perl(version) +BuildRequires: perl(XSLoader) # Tests: BuildRequires: perl(charnames) -BuildRequires: perl(constant) BuildRequires: perl(Cwd) BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Encode) +BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Temp) BuildRequires: perl(open) BuildRequires: perl(POSIX) BuildRequires: perl(Test::More) >= 0.88 @@ -66,40 +49,86 @@ BuildRequires: perl(Test::Simple) BuildRequires: perl(Time::HiRes) BuildRequires: perl(utf8) BuildRequires: postgresql-server +%if %{with perl_DBD_Pg_enables_optional_test} # Optional tests: -BuildRequires: perl(Encode) -BuildRequires: perl(File::Temp) +BuildRequires: perl(Time::Piece) +%endif -Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(DBI) >= 1.614 %{?perl_default_filter} %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(DBD::Pg\\)$ %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(DBI\\)$ +# Filter modules bundled for tests +%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir} +%global __requires_exclude %{__requires_exclude}|^perl\\(App::Info.*\\) +%global __requires_exclude %{__requires_exclude}|^perl\\(dbdpg_test_setup.pl\\) + %description DBD::Pg is a Perl module that works with the DBI module to provide access to PostgreSQL databases. +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +Requires: perl(Test::Simple) +Requires: postgresql-server +%if %{with perl_DBD_Pg_enables_optional_test} +# Optional tests: +Requires: perl(Time::Piece) +%endif + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + %prep %setup -q -n DBD-Pg-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 +# Help generators to recognize Perl scripts +for F in t/*.t t/*.pl; do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F" + chmod +x "$F" +done %build -perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" NO_PACKLIST=1 -make %{?_smp_mflags} +unset AUTOMATED_TESTING DBDPG_GCCDEBUG PERL_MM_USE_DEFAULT \ + POSTGRES_HOME POSTGRES_INCLUDE POSTGRES_LIB +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1 +%{make_build} %install -make pure_install DESTDIR=$RPM_BUILD_ROOT -find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -delete -%{_fixperms} $RPM_BUILD_ROOT/* +%{make_install} +find %{buildroot} -type f -name '*.bs' -empty -delete +%{_fixperms} %{buildroot}/* + +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' +#!/bin/bash +set -e +# If variables undefined, package test will create it's own database. +unset DBI_DSN DBI_USER DBI_PASS +unset DBDPG_DEBUG DBDPG_INITDB DBDPG_NOCLEANUP DBDPG_TEST_ALWAYS_ENV \ + DBDPG_TESTINITDB PGDATABASE PGINITDB POSTGRES_HOME POSTGRES_LIB \ + TEST_OUTPUT TEST_SIGNATURE +# The tests write to temporary database which is placed in $DIR +DIR=$(mktemp -d) +pushd "$DIR" +cp -a %{_libexecdir}/%{name}/* ./ +# When tests are run by root, 'postgres' is used as DBI_USER +# DBI_USER has to be able to write to the $DIR +if [ `id -u` -eq 0 ]; then + chown -hR postgres:postgres $DIR +fi +# Jobs can't be run in parallel +prove -I . +popd +rm -rf "$DIR" +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test %check # Full test coverage requires a live PostgreSQL database (see the README file) @@ -107,22 +136,180 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -delete #export DBI_USER= #export DBI_PASS= # If variables undefined, package test will create it's own database. +unset DBI_DSN DBI_USER DBI_PASS +unset DBDPG_DEBUG DBDPG_INITDB DBDPG_NOCLEANUP DBDPG_TEST_ALWAYS_ENV \ + DBDPG_TESTINITDB PGDATABASE PGINITDB POSTGRES_HOME POSTGRES_LIB \ + TEST_OUTPUT TEST_SIGNATURE make test %files +%license LICENSES/* %doc Changes README README.dev TODO %{perl_vendorarch}/DBD/ %{perl_vendorarch}/auto/DBD/ %{perl_vendorarch}/Bundle/DBD/Pg.pm -%{_mandir}/man3/*.3* +%{_mandir}/man3/*DBD*.3* + +%files tests +%{_libexecdir}/%{name} %changelog -* Fri Nov 08 2019 Petr Pisar - 3.7.4-4 -- Adapt to changes in libpq 12 (bug #1772373) -- Adapt to changes in PostgreSQL 12 (bug #1772373) +* Tue Oct 29 2024 Troy Dawson - 3.18.0-6 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 -* Fri Mar 29 2019 Jitka Plesnikova - 3.7.4-3 -- Rebuild with enable hardening (bug #1636329) +* Thu Aug 08 2024 Troy Dawson - 3.18.0-5 +- Bump release for Aug 2024 java mass rebuild + +* Mon Jun 24 2024 Troy Dawson - 3.18.0-4 +- Bump release for June 2024 mass rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 3.18.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 3.18.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Dec 07 2023 Jitka Plesnikova - 3.18.0-1 +- 3.18.0 bump (rhbz#2253383) + +* Wed Oct 25 2023 Jitka Plesnikova - 3.17.0-2 +- Package tests + +* Thu Aug 24 2023 Jitka Plesnikova - 3.17.0-1 +- 3.17.0 bump (rhbz#2234337) + +* Thu Jul 20 2023 Fedora Release Engineering - 3.16.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jul 11 2023 Jitka Plesnikova - 3.16.3-2 +- Perl 5.38 rebuild + +* Wed Apr 05 2023 Jitka Plesnikova - 3.16.3-1 +- 3.16.3 bump + +* Mon Mar 06 2023 Jitka Plesnikova - 3.16.1-1 +- 3.16.1 bump + +* Fri Jan 20 2023 Fedora Release Engineering - 3.16.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Nov 16 2022 Ondřej Sloup - 3.16.0-2 +- Rebuild for new PostgreSQL 15 + +* Mon Aug 08 2022 Jitka Plesnikova - 3.16.0-1 +- 3.16.0 bump + +* Fri Jul 22 2022 Fedora Release Engineering - 3.15.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue May 31 2022 Jitka Plesnikova - 3.15.1-2 +- Perl 5.36 rebuild + +* Mon Feb 21 2022 Jitka Plesnikova - 3.15.1-1 +- 3.15.1 bump + +* Fri Jan 21 2022 Fedora Release Engineering - 3.15.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 3.15.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue May 25 2021 Jitka Plesnikova - 3.15.0-1 +- 3.15.0 bump + +* Fri May 21 2021 Jitka Plesnikova - 3.14.2-4 +- Perl 5.34 rebuild + +* Mon Feb 08 2021 Pavel Raiskup - 3.14.2-3 +- rebuild for libpq ABI fix rhbz#1908268 + +* Wed Jan 27 2021 Fedora Release Engineering - 3.14.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Aug 17 2020 Petr Pisar - 3.14.2-1 +- 3.14.2 bump + +* Tue Jul 28 2020 Fedora Release Engineering - 3.14.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 21 2020 Petr Pisar - 3.14.0-1 +- 3.14.0 bump + +* Tue Jun 23 2020 Jitka Plesnikova - 3.13.0-2 +- Perl 5.32 rebuild + +* Thu Jun 18 2020 Jitka Plesnikova - 3.13.0-1 +- 3.13.0 bump + +* Mon Jun 08 2020 Jitka Plesnikova - 3.12.3-1 +- 3.12.3 bump + +* Fri Jun 05 2020 Jitka Plesnikova - 3.12.2-1 +- 3.12.2 bump + +* Wed Jun 03 2020 Jitka Plesnikova - 3.12.1-1 +- 3.12.1 bump + +* Mon May 11 2020 Jitka Plesnikova - 3.12.0-1 +- 3.12.0 bump + +* Wed Apr 29 2020 Jitka Plesnikova - 3.11.1-1 +- 3.11.1 bump + +* Fri Apr 24 2020 Petr Pisar - 3.11.0-1 +- 3.11.0 bump + +* Tue Mar 24 2020 Jitka Plesnikova - 3.10.5-1 +- 3.10.5 bump + +* Tue Feb 04 2020 Jitka Plesnikova - 3.10.4-1 +- 3.10.4 bump + +* Wed Jan 29 2020 Fedora Release Engineering - 3.10.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 21 2020 Jitka Plesnikova - 3.10.3-1 +- 3.10.3 bump + +* Mon Jan 20 2020 Jitka Plesnikova - 3.10.2-1 +- 3.10.2 bump + +* Tue Jan 14 2020 Jitka Plesnikova - 3.10.1-1 +- 3.10.1 bump + +* Wed Sep 04 2019 Jitka Plesnikova - 3.10.0-1 +- 3.10.0 bump + +* Mon Aug 19 2019 Jitka Plesnikova - 3.9.1-1 +- 3.9.1 bump + +* Wed Aug 14 2019 Jitka Plesnikova - 3.9.0-1 +- 3.9.0 bump + +* Fri Jul 26 2019 Fedora Release Engineering - 3.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jul 08 2019 Jitka Plesnikova - 3.8.1-1 +- 3.8.1 bump + +* Fri May 31 2019 Jitka Plesnikova - 3.8.0-2 +- Perl 5.30 rebuild + +* Fri Apr 26 2019 Jitka Plesnikova - 3.8.0-1 +- 3.8.0 bump + +* Fri Mar 22 2019 Jitka Plesnikova - 3.7.4-6 +- Fix failing test (bug #1679574) + +* Fri Feb 01 2019 Fedora Release Engineering - 3.7.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 3.7.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Jun 28 2018 Jitka Plesnikova - 3.7.4-3 +- Perl 5.28 rebuild * Mon Feb 19 2018 Jitka Plesnikova - 3.7.4-2 - Add build-require gcc diff --git a/sources b/sources new file mode 100644 index 0000000..37aaa7e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (DBD-Pg-3.18.0.tar.gz) = 0a81d1993f22a923776ab57f1437dbee2b5c42de091e274355dbcc9bb07e3db0c22126d0037de8de43fafeab9c947db1e3692087127027a0b13eed538fc2e1ee