From e64b726dd9c143473745c5402478838d2b28a90b Mon Sep 17 00:00:00 2001 From: tigro Date: Tue, 26 Sep 2023 18:00:36 +0300 Subject: [PATCH] import perl-DBD-SQLite-1.72-2.el9 --- .gitignore | 2 +- .perl-DBD-SQLite.metadata | 2 +- SPECS/perl-DBD-SQLite.spec | 93 ++++++++++++++++++++++++++++++++------ 3 files changed, 82 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 8fee424..ff2414b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/DBD-SQLite-1.66.tar.gz +SOURCES/DBD-SQLite-1.72.tar.gz diff --git a/.perl-DBD-SQLite.metadata b/.perl-DBD-SQLite.metadata index edbe2cc..79c43de 100644 --- a/.perl-DBD-SQLite.metadata +++ b/.perl-DBD-SQLite.metadata @@ -1 +1 @@ -524dc89cc330ee7372fe04de4a6048881cc543e4 SOURCES/DBD-SQLite-1.66.tar.gz +b178636b5c8f1dbf611a381bf2e3f8edf298db38 SOURCES/DBD-SQLite-1.72.tar.gz diff --git a/SPECS/perl-DBD-SQLite.spec b/SPECS/perl-DBD-SQLite.spec index 71e94f3..d911e39 100644 --- a/SPECS/perl-DBD-SQLite.spec +++ b/SPECS/perl-DBD-SQLite.spec @@ -2,17 +2,17 @@ %bcond_without perl_DBD_SQLite_enables_optional_test Name: perl-DBD-SQLite -Version: 1.66 -Release: 5%{?dist} +Version: 1.72 +Release: 2%{?dist} Summary: SQLite DBI Driver -# lib/DBD/SQLite.pm: GPL+ or Artistic -# LICENSE: GPL+ or Artistic +# lib/DBD/SQLite.pm: GPL-1.0-or-later OR Artistic-1.0-Perl +# LICENSE: GPL-1.0-or-later OR Artistic-1.0-Perl ## unbundled -# inc/Test/FailWarnings.pm: ASL 2.0 +# inc/Test/FailWarnings.pm: Apache-2.0 # sqlite3.c: Public Domain (copied from sqlite) # sqlite3.h: Public Domain (copied from sqlite) # sqlite3ext.h: Public Domain (copied from sqlite) -License: (GPL+ or Artistic) and Public Domain +License: ( GPL-1.0-or-later OR Artistic-1.0-Perl ) AND LicenseRef-Fedora-Public-Domain URL: https://metacpan.org/release/DBD-SQLite Source0: https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/DBD-SQLite-%{version}.tar.gz # Use system sqlite if it is available @@ -45,12 +45,12 @@ BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(File::Spec) >= 0.82 BuildRequires: perl(strict) # Run-time: -BuildRequires: perl(DynaLoader) # File::Basename not used BuildRequires: perl(locale) BuildRequires: perl(Scalar::Util) BuildRequires: perl(Tie::Hash) BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) # Tests only BuildRequires: perl(bytes) BuildRequires: perl(Carp) @@ -66,20 +66,33 @@ BuildRequires: perl(lib) # POSIX not used BuildRequires: perl(Test::More) # Test::FailWarnings not used +BuildRequires: perl(Time::HiRes) # Win32 not used %if %{with perl_DBD_SQLite_enables_optional_test} # Optional tests BuildRequires: perl(Unicode::UCD) %endif -Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %{?perl_default_filter} +# Filter modules bundled for tests +%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir} +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(SQLiteTest\\) + %description SQLite is a public domain, file-based, relational database engine that you can find at . This package provides a Perl DBI driver for SQLite. +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + %prep %setup -q -n DBD-SQLite-%{version} %patch0 -p1 @@ -98,6 +111,12 @@ rm t/virtual_table/21_perldata_charinfo.t perl -i -ne 'print $_ unless m{^t/virtual_table/21_perldata_charinfo\.t}' MANIFEST %endif +# Help generators to recognize Perl scripts +for F in `find t -name *.t`; do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F" + chmod +x "$F" +done + %build CFLAGS="%{optflags}" perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %{make_build} OPTIMIZE="%{optflags}" @@ -107,7 +126,25 @@ CFLAGS="%{optflags}" perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLO find %{buildroot} -type f -name '*.bs' -size 0 -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 +# Some tests write into temporary files/directories. The easiest solution +# is to copy the tests into a writable directory and execute them from there. +DIR=$(mktemp -d) +pushd "$DIR" +cp -a %{_libexecdir}/%{name}/* ./ +prove -I . -j "$(getconf _NPROCESSORS_ONLN)" +popd +rm -rf "$DIR" +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test + %check +export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') make test %files @@ -117,13 +154,43 @@ make test %{perl_vendorarch}/DBD/ %{_mandir}/man3/*.3pm* +%files tests +%{_libexecdir}/%{name} + %changelog -* Mon Aug 09 2021 Mohan Boddu - 1.66-5 -- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Related: rhbz#1991688 +* Tue Sep 26 2023 Arkady L. Shane - 1.72-2 +- Rebuilt for MSVSphere 9.2 + +* Fri Jan 20 2023 Fedora Release Engineering - 1.72-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Nov 04 2022 Jitka Plesnikova - 1.72-1 +- 1.72 bump +- Package tests + +* Fri Jul 22 2022 Fedora Release Engineering - 1.70-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue May 31 2022 Jitka Plesnikova - 1.70-4 +- Perl 5.36 rebuild + +* Fri Mar 18 2022 Petr Pisar - 1.70-3 +- Adapt to SQLite-3.38.0 (bug #2065567) + +* Fri Jan 21 2022 Fedora Release Engineering - 1.70-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Aug 02 2021 Jitka Plesnikova - 1.70-1 +- 1.70 bump + +* Thu Jul 29 2021 Adam Williamson - 1.68-2 +- (backport) disable sqlite_unicode deprecation warning as it's widely used + +* Thu Jul 22 2021 Jitka Plesnikova - 1.68-1 +- 1.68 bump -* Fri Apr 16 2021 Mohan Boddu - 1.66-4 -- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 +* Fri May 21 2021 Jitka Plesnikova - 1.66-4 +- Perl 5.34 rebuild * Wed Jan 27 2021 Fedora Release Engineering - 1.66-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild