public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Paul Howarth <paul@city-fan.org>
To: git-commits@fedoraproject.org
Subject: [rpms/perl-DBD-CSV] rawhide: Fix test failure with DBI 1.648 onwards
Date: Mon, 08 Jun 2026 09:06:40 GMT	[thread overview]
Message-ID: <178090960098.1.7614226812110749271.rpms-perl-DBD-CSV-24fb90ce3b3b@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/perl-DBD-CSV
            Branch : rawhide
            Commit : 24fb90ce3b3b754a4f00296e6a6fd2939600fcfa
            Author : Paul Howarth <paul@city-fan.org>
            Date   : 2026-06-08T10:04:14+01:00
            Stats  : +81/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/perl-DBD-CSV/c/24fb90ce3b3b754a4f00296e6a6fd2939600fcfa?branch=rawhide

            Log:
            Fix test failure with DBI 1.648 onwards

Based on https://github.com/perl5-dbi/DBD-CSV/commit/ae091790

---
diff --git a/DBD-CSV-0.62-dbi-1.648.patch b/DBD-CSV-0.62-dbi-1.648.patch
new file mode 100644
index 0000000..59bf9c0
--- /dev/null
+++ b/DBD-CSV-0.62-dbi-1.648.patch
@@ -0,0 +1,71 @@
+From ae091790398088a66b22fa572856bfeb4db4c78a Mon Sep 17 00:00:00 2001
+From: "H.Merijn Brand - Tux" <linux@tux.freedom.nl>
+Date: Thu, 28 May 2026 10:06:33 +0200
+Subject: [PATCH] New test for DBI-1.648 CVE fix
+
+---
+ t/70_csv.t | 24 +++++++++++++++++++++++-
+ t/lib.pl   |  3 +--
+ 2 files changed, 26 insertions(+), 4 deletions(-)
+
+diff --git a/t/70_csv.t b/t/70_csv.t
+index 30d2d59..a65385a 100644
+--- a/t/70_csv.t
++++ b/t/70_csv.t
+@@ -3,6 +3,7 @@
+ use strict;
+ use warnings;
+ use Test::More;
++use File::Spec;
+ 
+ BEGIN { use_ok ("DBI"); }
+ do "./t/lib.pl";
+@@ -85,12 +86,33 @@ ok ($dbh = Connect ($dsn),			"connect");
+ # Check, whether the csv_tables->{$tbl}{file} attribute works
+ like (my $def4 = TableDefinition ($tbl4, @tbl_def),
+ 	qr{^create table $tbl4}i,		"table definition");
+-ok ($dbh->{csv_tables}{$tbl4}{file} = DbFile ($tbl4), "set table/file");
++{   my $dbf4 = DbFile ($tbl4);
++    my $dbd4 = DbDir ();
++
++    $dbh->{f_dir_search} = [ $dbd4 ];
++    ok ($dbh->{csv_tables}{$tbl4}{file} = $dbf4, "set table/file");
++    }
+ ok ($dbh->do ($def4),				"create table");
+ ok (-f DbFile ($tbl4),				"does exists");
+ 
+ ok ($dbh->do ("drop table $tbl4"),		"drop table");
+ 
++if ($DBI::VERSION ge "1.648") {
++    ok (my $tbl5 = FindNewTable ($dbh),			"find new test table");
++    my $dir5 = File::Spec->catdir (DbDir (), "not-in-scope");
++    mkdir $dir5;
++    ok (my $dbf5 = File::Spec->catdir ($dir5, $tbl5),	"in bad location");
++    ok (!-f $dbf5,					"does not exist");
++    ok ($dbh->{csv_tables}{$tbl5}{file} = $dbf5,	"set to illegal location");
++    {   my @d;
++	local $SIG{__DIE__}  = sub { push @d => @_ };
++	local $dbh->{PrintError} = 0;
++	eval { $dbh->do ("create table $tbl5 (x char)"); };
++	like ("@d", qr{is unsafe and not allowed},	"unsafe caught");
++	};
++    rmdir $dir5;
++    }
++
+ ok ($dbh->disconnect,				"disconnect");
+ undef $dbh;
+ 
+diff --git a/t/lib.pl b/t/lib.pl
+index 9050d91..74e3f0f 100644
+--- a/t/lib.pl
++++ b/t/lib.pl
+@@ -116,8 +116,7 @@ sub DbCleanup {
+ 
+     my $testtable = "testaa";
+ 
+-    sub FindNewTable
+-    {
++    sub FindNewTable {
+ 	my $dbh = shift;
+ 
+ 	my @tables = defined $listTablesHook ? $listTablesHook->($dbh)

diff --git a/perl-DBD-CSV.spec b/perl-DBD-CSV.spec
index 8074cd7..23618b0 100644
--- a/perl-DBD-CSV.spec
+++ b/perl-DBD-CSV.spec
@@ -1,10 +1,11 @@
 Name:           perl-DBD-CSV
 Version:        0.62
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        DBI driver for CSV files
 License:        GPL-1.0-or-later OR Artistic-1.0-Perl
 URL:            https://metacpan.org/release/DBD-CSV
 Source0:        https://cpan.metacpan.org/modules/by-module/DBD/DBD-CSV-%{version}.tgz
+Patch0:         DBD-CSV-0.62-dbi-1.648.patch
 BuildArch:      noarch
 # Module Build
 BuildRequires:  coreutils
@@ -51,6 +52,11 @@ MS Excel data.
 
 %prep
 %setup -q -n DBD-CSV-%{version}
+
+# Fix test failure with DBI 1.648 onwards
+# Based on https://github.com/perl5-dbi/DBD-CSV/commit/ae091790398088a66b22fa572856bfeb4db4c78a
+%patch -P0 -p1
+
 chmod -c a-x ChangeLog README lib/DBD/*.pm lib/Bundle/DBD/*.pm
 
 %build
@@ -72,6 +78,9 @@ make test
 %{_mandir}/man3/DBD::CSV.3*
 
 %changelog
+* Mon Jun  8 2026 Paul Howarth <paul@city-fan.org> - 0.62-5
+- Fix test failure with DBI 1.648 onwards
+
 * Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.62-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
 

                 reply	other threads:[~2026-06-08  9:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178090960098.1.7614226812110749271.rpms-perl-DBD-CSV-24fb90ce3b3b@fedoraproject.org \
    --to=paul@city-fan.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox