diff --git a/.gitignore b/.gitignore index 8bcb7f5..c67ea1a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ ORLite-1.44.tar.gz /ORLite-1.96.tar.gz /ORLite-1.97.tar.gz /ORLite-1.98.tar.gz +/ORLite-1.99.tar.gz diff --git a/ORLite-1.98-Remove-using-of-MI-DSL.patch b/ORLite-1.98-Remove-using-of-MI-DSL.patch deleted file mode 100644 index c9752c8..0000000 --- a/ORLite-1.98-Remove-using-of-MI-DSL.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up ORLite-1.98/Makefile.PL.dsl ORLite-1.98/Makefile.PL ---- ORLite-1.98/Makefile.PL.dsl 2023-05-04 16:59:31.597953511 +0200 -+++ ORLite-1.98/Makefile.PL 2023-05-04 17:00:11.431275383 +0200 -@@ -1,9 +1,11 @@ --use inc::Module::Install::DSL 1.06; -+use inc::Module::Install; - --all_from lib/ORLite.pm --requires_from lib/ORLite.pm --requires File::Temp 0.20 --requires File::Spec 3.2701 if winlike --requires File::Remove 1.40 --test_requires Test::More 0.47 --test_requires Test::Script 1.06 -+all_from 'lib/ORLite.pm'; -+requires_from 'lib/ORLite.pm'; -+requires 'File::Temp' => '0.20'; -+requires 'File::Spec' => '3.2701' if winlike; -+requires 'File::Remove' => '1.40'; -+test_requires 'Test::More' => '0.47'; -+test_requires 'Test::Script' => '1.06'; -+ -+WriteAll; diff --git a/ORLite-1.98-sqlite-case-insensitive.patch b/ORLite-1.98-sqlite-case-insensitive.patch deleted file mode 100644 index 9a753e3..0000000 --- a/ORLite-1.98-sqlite-case-insensitive.patch +++ /dev/null @@ -1,95 +0,0 @@ -Description: Fix test failure with SQLite 3.37.0 - # Failed test '->table_info ok' - # at t/21_normalize.t line 62. - # Structures begin differing at: - # $got->[0]{type} = 'INTEGER' - # $expected->[0]{type} = 'integer' - . - Use Test::Deep to check against case-insensitve regexp. -Origin: vendor -Author: gregor herrmann -Last-Update: 2022-01-17 -Forwarded: https://rt.cpan.org/Ticket/Display.html?id=140748 -Bug: https://rt.cpan.org/Ticket/Display.html?id=140748 - ---- a/t/02_basics.t -+++ b/t/02_basics.t -@@ -10,6 +10,7 @@ - } - - use Test::More tests => 74; -+use Test::Deep; - use File::Spec::Functions ':ALL'; - use t::lib::Test; - -@@ -57,14 +58,14 @@ - is( Foo::Bar::TableOne->base, 'Foo::Bar', '->base ok' ); - is( Foo::Bar::TableOne->table, 'table_one', '->table ok' ); - my $columns = Foo::Bar::TableOne->table_info; --is_deeply( $columns, [ -+cmp_deeply( $columns, [ - { - cid => 0, - dflt_value => undef, - name => 'col1', - notnull => 1, - pk => 1, -- type => 'integer', -+ type => re(qr/^integer$/i), - }, - { - cid => 1, ---- a/t/19_view.t -+++ b/t/19_view.t -@@ -10,6 +10,7 @@ - } - - use Test::More tests => 81; -+use Test::Deep; - use File::Spec::Functions ':ALL'; - use t::lib::Test; - -@@ -46,14 +47,14 @@ - is( Foo::Bar::ViewOne->base, 'Foo::Bar', '->base ok' ); - is( Foo::Bar::ViewOne->table, 'view_one', '->table ok' ); - my $columns = Foo::Bar::ViewOne->table_info; --is_deeply( $columns, [ -+cmp_deeply( $columns, [ - { - cid => 0, - dflt_value => undef, - name => 'col1', - notnull => 0, - pk => 0, -- type => 'integer', -+ type => re(qr/^integer$/i), - }, - { - cid => 1, ---- a/t/21_normalize.t -+++ b/t/21_normalize.t -@@ -10,6 +10,7 @@ - } - - use Test::More tests => 78; -+use Test::Deep; - use File::Spec::Functions ':ALL'; - use t::lib::Test; - -@@ -59,14 +60,14 @@ - is( Foo::Bar::TableOne->base, 'Foo::Bar', '->base ok' ); - is( Foo::Bar::TableOne->table, 'tableOne', '->table ok' ); - my $columns = Foo::Bar::TableOne->table_info; --is_deeply( $columns, [ -+cmp_deeply( $columns, [ - { - cid => 0, - dflt_value => undef, - name => 'columnID', - notnull => 1, - pk => 1, -- type => 'integer', -+ type => re(qr/^integer$/i), - }, - { - cid => 1, diff --git a/ORLite-1.98-sqlite-vacuum.patch b/ORLite-1.98-sqlite-vacuum.patch deleted file mode 100644 index 25b819c..0000000 --- a/ORLite-1.98-sqlite-vacuum.patch +++ /dev/null @@ -1,44 +0,0 @@ -Description: Fix cleanup in tests. - Since SQLite 3.15, VACUUM either needs no arguments, or the name of an - attached database. - . - From https://sqlite.org/lang_vacuum.html : - Compatibility Warning: The ability to vacuum attached databases was added - in version 3.15.0 (2016-10-14). Prior to that, a schema-name added to the - VACUUM statement would be silently ignored and the "main" schema would be - vacuumed. - . - That means that 'VACUUM ANALYZE' never did what it was probably supposed to - do. - . - Maybe 'VACUUM; ANALYZE' works as well. -- And besides this change in the - testsuite, the documentation for cleanup() in the POD would need to be - updated as well. - . -Origin: vendor -Bug-Debian: https://bugs.debian.org/841545 -Author: gregor herrmann -Last-Update: 2016-10-21 - ---- a/t/10_cleanup.t -+++ b/t/10_cleanup.t -@@ -29,7 +29,7 @@ - use strict; - use ORLite { - file => '$file', -- cleanup => 'VACUUM ANALYZE', -+ cleanup => 'VACUUM', - }; - - 1; ---- a/t/11_cleanup.t -+++ b/t/11_cleanup.t -@@ -29,7 +29,7 @@ - use strict; - use ORLite { - file => '$file', -- cleanup => 'VACUUM ANALYZE', -+ cleanup => 'VACUUM', - }; - - 1; diff --git a/ORLite-1.99-Fix-various-tests-regression-in-1.99.patch b/ORLite-1.99-Fix-various-tests-regression-in-1.99.patch new file mode 100644 index 0000000..acd7d27 --- /dev/null +++ b/ORLite-1.99-Fix-various-tests-regression-in-1.99.patch @@ -0,0 +1,103 @@ +From e68a8671557c3591b8f60494e38cc592b6d78095 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 14 Aug 2023 13:15:46 +0200 +Subject: [PATCH] Fix various tests regression in 1.99 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +ORLite-1.99 reworked t::lib::Test module in t/lib/Test.pm file into +LocalTest module in t/lib/LocalTest.pm file. However, not all tests +were adapted to the new name space. As a result many tests failed: + + # Failed test '->orlite ok' + # at t/04_readonly.t line 51. + # got: '1.99' + # expected: undef + # Looks like you failed 1 test of 13. + t/04_readonly.t ........ Dubious, test returned 1 (wstat 256, 0x100) + + # Failed test '08_prune.pl with prune ran ok' + # at t/08_prune.t line 35. + # 255 - Failed to load correct ORLite version at t/08_prune.pl line 10. + # Looks like you failed 2 tests of 7. + t/08_prune.t ........... Dubious, test returned 2 (wstat 512, 0x200) + + Use of uninitialized value $orlite_version in substitution (s///) at t/17_cache.t line 19. + Use of uninitialized value $orlite_version in concatenation (.) or string at t/17_cache.t line 20. + t/17_cache.t ........... 1/9 + # Failed test 'Cache file t/Foo-Bar-1-23-ORLite--user_version-2.pm created' + # at t/17_cache.t line 59. + # Looks like you failed 1 test of 9. + t/17_cache.t ........... Dubious, test returned 1 (wstat 256, 0x100) + + 1/7 Can't locate object method "dummy" via package "t::lib::TableOne" at t/22_overlay.t line 74. + # Looks like your test exited with 2 just after 6. + t/22_overlay.t ......... Dubious, test returned 2 (wstat 512, 0x200) + Failed 1/7 subtests + +This patch fixes the tests to the bar minmum to pass them again. + +Signed-off-by: Petr Písař +--- + t/04_readonly.t | 2 +- + t/08_prune.pl | 2 +- + t/17_cache.t | 2 +- + t/22_overlay.t | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/t/04_readonly.t b/t/04_readonly.t +index 8d4a963..2cba309 100644 +--- a/t/04_readonly.t ++++ b/t/04_readonly.t +@@ -48,7 +48,7 @@ use ORLite { + END_PERL + + # Check standard methods exist +-is( Foo::Bar->orlite, $t::lib::Test::VERSION, '->orlite ok' ); ++is( Foo::Bar->orlite, $LocalTest::VERSION, '->orlite ok' ); + ok( Foo::Bar->can('sqlite'), '->sqlite method exists' ); + ok( Foo::Bar::TableOne->can('load'), '->load method exists' ); + ok( Foo::Bar::TableOne->can('select'), '->select method exists' ); +diff --git a/t/08_prune.pl b/t/08_prune.pl +index d5c5488..f474d83 100644 +--- a/t/08_prune.pl ++++ b/t/08_prune.pl +@@ -4,7 +4,7 @@ + + use strict; + +-our $VERSION = '1.98'; ++our $VERSION = '1.99'; + + unless ( $ORLite::VERSION eq $VERSION ) { + die('Failed to load correct ORLite version'); +diff --git a/t/17_cache.t b/t/17_cache.t +index 450bbdc..e21d7d9 100644 +--- a/t/17_cache.t ++++ b/t/17_cache.t +@@ -15,7 +15,7 @@ use lib 't/lib'; + use LocalTest; + + # Where will the cache file be written to +-my $orlite_version = $t::lib::Test::VERSION; ++my $orlite_version = $LocalTest::VERSION; + $orlite_version =~ s/[\._]/-/g; + my $cached = catfile( + "t", +diff --git a/t/22_overlay.t b/t/22_overlay.t +index 049faf3..bc12fdc 100644 +--- a/t/22_overlay.t ++++ b/t/22_overlay.t +@@ -9,7 +9,7 @@ BEGIN { + + use Test::More tests => 7; + use File::Spec::Functions ':ALL'; +-use lib 't/lib'; ++use lib 't/lib', '.'; + use LocalTest; + + +-- +2.41.0 + diff --git a/ORLite-1.99-sqlite-case-insensitive.patch b/ORLite-1.99-sqlite-case-insensitive.patch new file mode 100644 index 0000000..7476241 --- /dev/null +++ b/ORLite-1.99-sqlite-case-insensitive.patch @@ -0,0 +1,114 @@ +From 2b55309d6dbf2dee7b2ae57ef3e43fdb6573be30 Mon Sep 17 00:00:00 2001 +From: gregor herrmann +Date: Mon, 14 Aug 2023 12:14:54 +0200 +Subject: [PATCH] Fix test failure with SQLite 3.37.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + # Failed test '->table_info ok' + # at t/21_normalize.t line 62. + # Structures begin differing at: + # $got->[0]{type} = 'INTEGER' + # $expected->[0]{type} = 'integer' + +Use Test::Deep to check against case-insensitve regexp. + +https://rt.cpan.org/Ticket/Display.html?id=140748 +Signed-off-by: Petr Písař +--- + t/02_basics.t | 5 +++-- + t/19_view.t | 5 +++-- + t/21_normalize.t | 5 +++-- + 3 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/t/02_basics.t b/t/02_basics.t +index 13973a2..703a486 100644 +--- a/t/02_basics.t ++++ b/t/02_basics.t +@@ -10,6 +10,7 @@ BEGIN { + } + + use Test::More tests => 74; ++use Test::Deep; + use File::Spec::Functions ':ALL'; + use lib 't/lib'; + use LocalTest; +@@ -58,14 +59,14 @@ is( Foo::Bar->pragma('user_version'), 0, '->user_version ok' ); + is( Foo::Bar::TableOne->base, 'Foo::Bar', '->base ok' ); + is( Foo::Bar::TableOne->table, 'table_one', '->table ok' ); + my $columns = Foo::Bar::TableOne->table_info; +-is_deeply( $columns, [ ++cmp_deeply( $columns, [ + { + cid => 0, + dflt_value => undef, + name => 'col1', + notnull => 1, + pk => 1, +- type => 'integer', ++ type => re(qr/^integer$/i), + }, + { + cid => 1, +diff --git a/t/19_view.t b/t/19_view.t +index 5b49f9c..5707d9a 100644 +--- a/t/19_view.t ++++ b/t/19_view.t +@@ -10,6 +10,7 @@ BEGIN { + } + + use Test::More tests => 81; ++use Test::Deep; + use File::Spec::Functions ':ALL'; + use lib 't/lib'; + use LocalTest; +@@ -47,14 +48,14 @@ is( Foo::Bar->pragma('user_version'), 0, '->user_version ok' ); + is( Foo::Bar::ViewOne->base, 'Foo::Bar', '->base ok' ); + is( Foo::Bar::ViewOne->table, 'view_one', '->table ok' ); + my $columns = Foo::Bar::ViewOne->table_info; +-is_deeply( $columns, [ ++cmp_deeply( $columns, [ + { + cid => 0, + dflt_value => undef, + name => 'col1', + notnull => 0, + pk => 0, +- type => 'integer', ++ type => re(qr/^integer$/i), + }, + { + cid => 1, +diff --git a/t/21_normalize.t b/t/21_normalize.t +index 143f24e..b0ed24b 100644 +--- a/t/21_normalize.t ++++ b/t/21_normalize.t +@@ -10,6 +10,7 @@ BEGIN { + } + + use Test::More tests => 78; ++use Test::Deep; + use File::Spec::Functions ':ALL'; + use lib 't/lib'; + use LocalTest; +@@ -60,14 +61,14 @@ is( Foo::Bar->pragma('user_version'), 0, '->user_version ok' ); + is( Foo::Bar::TableOne->base, 'Foo::Bar', '->base ok' ); + is( Foo::Bar::TableOne->table, 'tableOne', '->table ok' ); + my $columns = Foo::Bar::TableOne->table_info; +-is_deeply( $columns, [ ++cmp_deeply( $columns, [ + { + cid => 0, + dflt_value => undef, + name => 'columnID', + notnull => 1, + pk => 1, +- type => 'integer', ++ type => re(qr/^integer$/i), + }, + { + cid => 1, +-- +2.41.0 + diff --git a/perl-ORLite.spec b/perl-ORLite.spec index 09fb56c..d94b92f 100644 --- a/perl-ORLite.spec +++ b/perl-ORLite.spec @@ -1,50 +1,50 @@ Name: perl-ORLite Summary: Extremely light weight SQLite-specific ORM -Version: 1.98 -Release: 33%{?dist} +Version: 1.99 +Release: 1%{?dist} License: GPL-1.0-or-later OR Artistic-1.0-Perl -Source0: https://cpan.metacpan.org/authors/id/A/AD/ADAMK/ORLite-%{version}.tar.gz -URL: https://metacpan.org/release/ORLite -# Update tests to work for SQLite 3.15 and later CPAN RT#118460 -Patch0: ORLite-1.98-sqlite-vacuum.patch +Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/ORLite-%{version}.tar.gz # Update tests to work for SQLite 3.38 and later CPAN RT#140748 -Patch1: ORLite-1.98-sqlite-case-insensitive.patch -# Update Makefile.PL to not use Module::Install::DSL CPAN RT#148290 -Patch2: ORLite-1.98-Remove-using-of-MI-DSL.patch +Patch0: ORLite-1.99-sqlite-case-insensitive.patch +# Fix various test regressions in ORLite-1.99, CPAN RT#149414, +# proposed to an upstream +Patch1: ORLite-1.99-Fix-various-tests-regression-in-1.99.patch +URL: https://metacpan.org/release/ORLite BuildArch: noarch BuildRequires: coreutils -BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter -BuildRequires: perl(inc::Module::Install) -BuildRequires: perl(Module::Install::Metadata) -BuildRequires: perl(Module::Install::With) -BuildRequires: perl(Module::Install::WriteAll) +BuildRequires: perl(:VERSION) >= 5.14 +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(strict) +BuildRequires: perl(warnings) # Run-time BuildRequires: perl(Carp) BuildRequires: perl(DBD::SQLite) >= 1.27 BuildRequires: perl(DBI) >= 1.607 BuildRequires: perl(File::Basename) BuildRequires: perl(File::Path) >= 2.08 -BuildRequires: perl(File::Remove) >= 1.40 +BuildRequires: perl(File::Remove) BuildRequires: perl(File::Spec) >= 0.80 -BuildRequires: perl(File::Temp) >= 0.20 +BuildRequires: perl(File::Temp) BuildRequires: perl(Params::Util) >= 1.00 -BuildRequires: perl(strict) -BuildRequires: perl(vars) -# Optional, test it while building +# Optional run-time, test it while building BuildRequires: perl(Class::XSAccessor) >= 1.05 BuildRequires: perl(Class::XSAccessor::Array) >= 1.05 # Tests BuildRequires: perl(Exporter) BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(lib) BuildRequires: perl(Test::Deep) -BuildRequires: perl(Test::More) >= 0.47 -BuildRequires: perl(Test::Script) >= 1.06 +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Script) BuildRequires: perl(utf8) -Requires: perl(File::Remove) >= 1.40 -Requires: perl(File::Temp) >= 0.20 +BuildRequires: perl(vars) +# Optional tests +# CPAN::Meta and CPAN::Meta::Prereqs are not helpful +Requires: perl(File::Remove) +Requires: perl(File::Temp) %{?perl_default_filter} @@ -67,14 +67,7 @@ series of modules and has a design that aligns directly to the capabilities of SQLite. %prep -%setup -q -n ORLite-%{version} -%patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 -# Remove bundled installation scripts -rm -rf inc -perl -i -ne 'print $_ unless m{^inc/}' MANIFEST -find -type f -exec chmod -x {} + +%autosetup -p1 -n ORLite-%{version} %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 @@ -85,15 +78,19 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %{_fixperms} %{buildroot}/* %check +# Not parallel safe make test %files %license LICENSE -%doc Changes README -%{perl_vendorlib}/* -%{_mandir}/man3/* +%doc Changes CONTRIBUTING README +%{perl_vendorlib}/ORLite.pm +%{_mandir}/man3/ORLite.* %changelog +* Mon Aug 14 2023 Petr Pisar - 1.99-1 +- 1.99 bump + * Fri Jul 21 2023 Fedora Release Engineering - 1.98-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index cb87a94..4b9618d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ORLite-1.98.tar.gz) = 1cc2f8352efe2867806611746d78cf8aa9788e2f38eeb9231ab7b4168a3befeecdb1773360a13578758f9172d08f55261e952698a3e8c5a5b8ad5e63939349f9 +SHA512 (ORLite-1.99.tar.gz) = bc6717424aa44fc9ac17c29e61937b29425c969271b458cba7007a10df6fe0c0346a85818d49debb28c62b1564216800739c6ca1dc56b70a8f88391971ed1f50