diff options
-rw-r--r-- | debian/changelog | 19 | ||||
-rw-r--r-- | debian/control | 8 | ||||
-rw-r--r-- | debian/copyright | 2 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/use_regexes_to_test_database_uris_and_dsns.patch | 96 | ||||
-rw-r--r-- | debian/upstream/metadata | 4 | ||||
-rw-r--r-- | t/mysql.t | 6 | ||||
-rw-r--r-- | t/oracle.t | 4 | ||||
-rw-r--r-- | t/snowflake.t | 4 | ||||
-rw-r--r-- | t/sqlite.t | 2 |
10 files changed, 132 insertions, 14 deletions
diff --git a/debian/changelog b/debian/changelog index aabf7466..921b60aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,22 @@ +sqitch (1.3.1-2) unstable; urgency=medium + + * Team upload. + + [ Debian Janitor ] + * Add missing build dependency on dh-strip-nondeterminism for command + dh_strip_nondeterminism. + * Set upstream metadata fields: Bug-Database, Bug-Submit. + * Update standards version to 4.6.2, no changes needed. + + [ gregor herrmann ] + * Add patch from upstream Git repo to fix tests with + newer liburi-db-perl and libwww-perl. + * Update years of packaging copyright. + * Add test dependency on tzdata. + Needed by (at least) t/plan_cmd.t. + + -- gregor herrmann <gregoa@debian.org> Sun, 18 Jun 2023 19:25:25 +0200 + sqitch (1.3.1-1) unstable; urgency=medium * Team upload. diff --git a/debian/control b/debian/control index b19bec60..c3ba8dcf 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,8 @@ Testsuite: autopkgtest-pkg-perl Priority: optional Build-Depends: debhelper-compat (= 13), libmodule-build-perl, - perl + perl, + dh-strip-nondeterminism Build-Depends-Indep: libalgorithm-backoff-perl <!nocheck>, libcapture-tiny-perl <!nocheck>, libclass-xsaccessor-perl <!nocheck>, @@ -51,8 +52,9 @@ Build-Depends-Indep: libalgorithm-backoff-perl <!nocheck>, libtype-tiny-xs-perl <!nocheck>, liburi-db-perl (>= 0.20) <!nocheck>, liburi-perl <!nocheck>, - sqlite3 <!nocheck> -Standards-Version: 4.6.1 + sqlite3 <!nocheck>, + tzdata <!nocheck> +Standards-Version: 4.6.2 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/sqitch Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/sqitch.git Homepage: https://sqitch.org/ diff --git a/debian/copyright b/debian/copyright index 45d3afcd..8608718c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -20,7 +20,7 @@ License: Expat Files: debian/* Copyright: 2014, 2015, Christian Hofstaedtler <zeha@debian.org> - 2014-2022, gregor herrmann <gregoa@debian.org> + 2014-2023, gregor herrmann <gregoa@debian.org> License: Artistic or GPL-1+ License: Artistic diff --git a/debian/patches/series b/debian/patches/series index eae37e5e..67c5682c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ fix-bad-whatis-man.patch +use_regexes_to_test_database_uris_and_dsns.patch diff --git a/debian/patches/use_regexes_to_test_database_uris_and_dsns.patch b/debian/patches/use_regexes_to_test_database_uris_and_dsns.patch new file mode 100644 index 00000000..b62866d9 --- /dev/null +++ b/debian/patches/use_regexes_to_test_database_uris_and_dsns.patch @@ -0,0 +1,96 @@ +From bcf02509ac35b8b4a72a6779bec8c8394613025a Mon Sep 17 00:00:00 2001 +From: "David E. Wheeler" <david@justatheory.com> +Date: Wed, 10 May 2023 19:13:39 -0400 +Subject: [PATCH] Use regexes to test database URIs & DSNs + +When there is a username but no password, URI used to leave an orphan +colon in the URI (reported in libwww-perl/URI#13). That bug was fixed in +libwww-perl/URI#31, leading to failures in Sqitch tests expecting the +colon to be present. + +libwww-perl/URI-db#23 also changed the DSN of URI::Oracle to specify the +database name with `service_name=`. + +So change the tests to use regular expressions to match such URIs and +DSNs, so that the presence of the colon or service name is optional. +Resolves #744. +--- + Changes | 4 ++++ + t/mysql.t | 6 +++--- + t/oracle.t | 4 ++-- + t/snowflake.t | 4 ++-- + t/sqlite.t | 2 +- + 5 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/t/mysql.t b/t/mysql.t +index bf34c720..33ce8aed 100644 +--- a/t/mysql.t ++++ b/t/mysql.t +@@ -135,14 +135,14 @@ ok $mysql = $CLASS->new(sqitch => $sqitch, target => $target), + is $mysql->client, '/path/to/mysql', 'client should be as configured'; + is $mysql->uri->as_string, 'db:mysql://me:pwd@foo.com/widgets', + 'URI should be as configured'; +-is $mysql->target->name, 'db:mysql://me:@foo.com/widgets', ++like $mysql->target->name, qr{^db:mysql://me:?\@foo\.com/widgets$}, + 'target name should be the URI without the password'; +-is $mysql->destination, 'db:mysql://me:@foo.com/widgets', ++like $mysql->destination, qr{^db:mysql://me:?\@foo\.com/widgets$}, + 'destination should be the URI without the password'; + is $mysql->registry, 'meta', 'registry should be as configured'; + is $mysql->registry_uri->as_string, 'db:mysql://me:pwd@foo.com/meta', + 'Sqitch DB URI should be the same as uri but with DB name "meta"'; +-is $mysql->registry_destination, 'db:mysql://me:@foo.com/meta', ++like $mysql->registry_destination, qr{^db:mysql://me:?\@foo\.com/meta$}, + 'registry_destination should be the sqitch DB URL without the password'; + is_deeply [$mysql->mysql], [ + '/path/to/mysql', +diff --git a/t/oracle.t b/t/oracle.t +index a5aabd22..4c81a1f5 100644 +--- a/t/oracle.t ++++ b/t/oracle.t +@@ -243,7 +243,7 @@ $target = App::Sqitch::Target->new( + sqitch => $sqitch, + uri => URI::db->new('db:oracle:secure_user_tns.tpg'), + ); +-is $target->uri->dbi_dsn, 'dbi:Oracle:secure_user_tns.tpg', ++like $target->uri->dbi_dsn, qr{^dbi:Oracle:(?:service_name=)?secure_user_tns\.tpg$}, + 'Database-only URI should produce proper DSN'; + isa_ok $ora = $CLASS->new( + sqitch => $sqitch, +@@ -263,7 +263,7 @@ $target = App::Sqitch::Target->new( + sqitch => $sqitch, + uri => URI::db->new('db:oracle://:@/wallet_tns_name'), + ); +-is $target->uri->dbi_dsn, 'dbi:Oracle:wallet_tns_name', ++like $target->uri->dbi_dsn, qr{dbi:Oracle:(?:service_name=)?wallet_tns_name$}, + 'Database and double-slash URI should produce proper DSN'; + isa_ok $ora = $CLASS->new( + sqitch => $sqitch, +diff --git a/t/snowflake.t b/t/snowflake.t +index bec9e42e..3dc34e2c 100644 +--- a/t/snowflake.t ++++ b/t/snowflake.t +@@ -322,8 +322,8 @@ is $snow->registry, 'meta', 'registry should be as configured'; + is $snow->uri->as_string, + 'db:snowflake://fred:hi@foo.snowflakecomputing.com/try?warehouse=foo;role=yup', + 'URI should be as configured with full domain name'; +-is $snow->destination, +- 'db:snowflake://fred:@foo.snowflakecomputing.com/try?warehouse=foo;role=yup', ++like $snow->destination, ++ qr{^db:snowflake://fred:?\@foo\.snowflakecomputing\.com/try\?warehouse=foo;role=yup$}, + 'Destination should omit password'; + + is $snow->client, '/path/to/snowsql', 'client should be as configured'; +diff --git a/t/sqlite.t b/t/sqlite.t +index ce18fc45..42307390 100644 +--- a/t/sqlite.t ++++ b/t/sqlite.t +@@ -157,7 +157,7 @@ is $sqlite->destination, 'noext', + 'Destination should be configured target name'; + is $sqlite->registry_uri->as_string, 'db:sqlite://x:foo@/path/to/registry.db', + 'registry_uri should fall back on config wth extension'; +-is $sqlite->registry_destination, 'db:sqlite://x:@/path/to/registry.db', ++like $sqlite->registry_destination, qr{^db:sqlite://x:?\@/path/to/registry\.db$}, + 'Registry target should be configured registry_uri without password'; + + # Try a registry with an absolute path. diff --git a/debian/upstream/metadata b/debian/upstream/metadata index 7d43cb6a..4f5ed86a 100644 --- a/debian/upstream/metadata +++ b/debian/upstream/metadata @@ -1,6 +1,6 @@ --- Archive: CPAN -Bug-Database: https://github.com/sqitchers/sqitch/issues/ -Bug-Submit: https://github.com/sqitchers/sqitch/issues//new +Bug-Database: https://github.com/sqitchers/sqitch/issues +Bug-Submit: https://github.com/sqitchers/sqitch/issues/new Repository: https://github.com/sqitchers/sqitch.git Repository-Browse: https://github.com/sqitchers/sqitch @@ -135,14 +135,14 @@ ok $mysql = $CLASS->new(sqitch => $sqitch, target => $target), is $mysql->client, '/path/to/mysql', 'client should be as configured'; is $mysql->uri->as_string, 'db:mysql://me:pwd@foo.com/widgets', 'URI should be as configured'; -is $mysql->target->name, 'db:mysql://me:@foo.com/widgets', +like $mysql->target->name, qr{^db:mysql://me:?\@foo\.com/widgets$}, 'target name should be the URI without the password'; -is $mysql->destination, 'db:mysql://me:@foo.com/widgets', +like $mysql->destination, qr{^db:mysql://me:?\@foo\.com/widgets$}, 'destination should be the URI without the password'; is $mysql->registry, 'meta', 'registry should be as configured'; is $mysql->registry_uri->as_string, 'db:mysql://me:pwd@foo.com/meta', 'Sqitch DB URI should be the same as uri but with DB name "meta"'; -is $mysql->registry_destination, 'db:mysql://me:@foo.com/meta', +like $mysql->registry_destination, qr{^db:mysql://me:?\@foo\.com/meta$}, 'registry_destination should be the sqitch DB URL without the password'; is_deeply [$mysql->mysql], [ '/path/to/mysql', @@ -243,7 +243,7 @@ $target = App::Sqitch::Target->new( sqitch => $sqitch, uri => URI::db->new('db:oracle:secure_user_tns.tpg'), ); -is $target->uri->dbi_dsn, 'dbi:Oracle:secure_user_tns.tpg', +like $target->uri->dbi_dsn, qr{^dbi:Oracle:(?:service_name=)?secure_user_tns\.tpg$}, 'Database-only URI should produce proper DSN'; isa_ok $ora = $CLASS->new( sqitch => $sqitch, @@ -263,7 +263,7 @@ $target = App::Sqitch::Target->new( sqitch => $sqitch, uri => URI::db->new('db:oracle://:@/wallet_tns_name'), ); -is $target->uri->dbi_dsn, 'dbi:Oracle:wallet_tns_name', +like $target->uri->dbi_dsn, qr{dbi:Oracle:(?:service_name=)?wallet_tns_name$}, 'Database and double-slash URI should produce proper DSN'; isa_ok $ora = $CLASS->new( sqitch => $sqitch, diff --git a/t/snowflake.t b/t/snowflake.t index bec9e42e..3dc34e2c 100644 --- a/t/snowflake.t +++ b/t/snowflake.t @@ -322,8 +322,8 @@ is $snow->registry, 'meta', 'registry should be as configured'; is $snow->uri->as_string, 'db:snowflake://fred:hi@foo.snowflakecomputing.com/try?warehouse=foo;role=yup', 'URI should be as configured with full domain name'; -is $snow->destination, - 'db:snowflake://fred:@foo.snowflakecomputing.com/try?warehouse=foo;role=yup', +like $snow->destination, + qr{^db:snowflake://fred:?\@foo\.snowflakecomputing\.com/try\?warehouse=foo;role=yup$}, 'Destination should omit password'; is $snow->client, '/path/to/snowsql', 'client should be as configured'; @@ -157,7 +157,7 @@ is $sqlite->destination, 'noext', 'Destination should be configured target name'; is $sqlite->registry_uri->as_string, 'db:sqlite://x:foo@/path/to/registry.db', 'registry_uri should fall back on config wth extension'; -is $sqlite->registry_destination, 'db:sqlite://x:@/path/to/registry.db', +like $sqlite->registry_destination, qr{^db:sqlite://x:?\@/path/to/registry\.db$}, 'Registry target should be configured registry_uri without password'; # Try a registry with an absolute path. |