|
|
79c577 |
# Disable leak tests
|
|
|
79c577 |
%bcond_with perl_DBD_MariaDB_enables_leak_test
|
|
|
79c577 |
# Perform optional net_ssleay tests
|
|
|
79c577 |
%if 0%{?rhel}
|
|
|
79c577 |
%bcond_with perl_DBD_MariaDB_enables_net_ssleay_test
|
|
|
79c577 |
%else
|
|
|
79c577 |
%bcond_without perl_DBD_MariaDB_enables_net_ssleay_test
|
|
|
79c577 |
%endif
|
|
|
79c577 |
|
|
|
79c577 |
Name: perl-DBD-MariaDB
|
|
|
79c577 |
Version: 1.21
|
|
|
79c577 |
Release: 16%{?dist}
|
|
|
79c577 |
Summary: MariaDB and MySQL driver for the Perl5 Database Interface (DBI)
|
|
|
79c577 |
License: GPL+ or Artistic
|
|
|
79c577 |
URL: https://metacpan.org/release/DBD-MariaDB/
|
|
|
79c577 |
Source0: https://cpan.metacpan.org/authors/id/P/PA/PALI/DBD-MariaDB-%{version}.tar.gz
|
|
|
79c577 |
Source1: test-setup.t
|
|
|
79c577 |
Source2: test-clean.t
|
|
|
79c577 |
Source3: test-env.sh
|
|
|
79c577 |
Patch0: DBD-MariaDB-1.21-Run-test-setup-and-clean.patch
|
|
|
79c577 |
# Fix test for changed value of mariadb_clientversion
|
|
|
79c577 |
# mariadb-connector-c 3.2.x version number changed mariadb_clientversion to 3020x
|
|
|
79c577 |
Patch1: DBD-MariaDB-fix-mariadb-connector-c-32x-test.patch
|
|
|
79c577 |
BuildRequires: findutils
|
|
|
79c577 |
BuildRequires: gcc
|
|
|
79c577 |
BuildRequires: make
|
|
|
79c577 |
BuildRequires: mariadb-connector-c
|
|
|
79c577 |
BuildRequires: mariadb-connector-c-devel
|
|
|
79c577 |
BuildRequires: openssl-devel
|
|
|
79c577 |
BuildRequires: perl-devel
|
|
|
79c577 |
BuildRequires: perl-generators
|
|
|
79c577 |
BuildRequires: perl-interpreter
|
|
|
79c577 |
BuildRequires: perl(:VERSION) >= 5.8.1
|
|
|
79c577 |
BuildRequires: perl(Config)
|
|
|
79c577 |
BuildRequires: perl(Data::Dumper)
|
|
|
79c577 |
BuildRequires: perl(DBI) >= 1.608
|
|
|
79c577 |
BuildRequires: perl(DBI::DBD)
|
|
|
79c577 |
BuildRequires: perl(Devel::CheckLib) >= 1.12
|
|
|
79c577 |
BuildRequires: perl(DynaLoader)
|
|
|
79c577 |
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
|
|
79c577 |
BuildRequires: perl(File::Spec)
|
|
|
79c577 |
BuildRequires: perl(Getopt::Long)
|
|
|
79c577 |
BuildRequires: perl(strict)
|
|
|
79c577 |
BuildRequires: perl(utf8)
|
|
|
79c577 |
BuildRequires: perl(warnings)
|
|
|
79c577 |
# Tests
|
|
|
79c577 |
BuildRequires: hostname
|
|
|
79c577 |
BuildRequires: mariadb
|
|
|
79c577 |
BuildRequires: mariadb-server
|
|
|
79c577 |
BuildRequires: perl(B)
|
|
|
79c577 |
BuildRequires: perl(bigint)
|
|
|
79c577 |
BuildRequires: perl(constant)
|
|
|
79c577 |
# Required to process t/testrules.yml
|
|
|
79c577 |
BuildRequires: perl(CPAN::Meta::YAML)
|
|
|
79c577 |
BuildRequires: perl(DBI::Const::GetInfoType)
|
|
|
79c577 |
BuildRequires: perl(Encode)
|
|
|
79c577 |
BuildRequires: perl(File::Path)
|
|
|
79c577 |
BuildRequires: perl(File::Temp)
|
|
|
79c577 |
BuildRequires: perl(FindBin)
|
|
|
79c577 |
BuildRequires: perl(lib)
|
|
|
79c577 |
BuildRequires: perl(Test::Deep)
|
|
|
79c577 |
BuildRequires: perl(Test::More) >= 0.90
|
|
|
79c577 |
BuildRequires: perl(Time::HiRes)
|
|
|
79c577 |
BuildRequires: perl(vars)
|
|
|
79c577 |
# Optional tests
|
|
|
79c577 |
%if %{with perl_DBD_MariaDB_enables_net_ssleay_test}
|
|
|
79c577 |
BuildRequires: perl(Net::SSLeay)
|
|
|
79c577 |
%endif
|
|
|
79c577 |
%if %{with perl_DBD_MariaDB_enables_leak_test}
|
|
|
79c577 |
BuildRequires: perl(Proc::ProcessTable)
|
|
|
79c577 |
BuildRequires: perl(Storable)
|
|
|
79c577 |
%endif
|
|
|
79c577 |
|
|
|
79c577 |
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
79c577 |
|
|
|
79c577 |
# Filter private modules for tests
|
|
|
79c577 |
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(lib.pl\\)
|
|
|
79c577 |
|
|
|
79c577 |
%description
|
|
|
79c577 |
DBD::MariaDB is the Perl5 Database Interface driver for MariaDB and MySQL
|
|
|
79c577 |
databases. In other words: DBD::MariaDB is an interface between the Perl
|
|
|
79c577 |
programming language and the MariaDB/MySQL programming API that comes with
|
|
|
79c577 |
the MariaDB/MySQL relational database management system. Most functions
|
|
|
79c577 |
provided by this programming API are supported. Some rarely used functions
|
|
|
79c577 |
are missing, mainly because no-one ever requested them.
|
|
|
79c577 |
|
|
|
79c577 |
%package tests
|
|
|
79c577 |
Summary: Tests for %{name}
|
|
|
79c577 |
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
79c577 |
Requires: perl-Test-Harness
|
|
|
79c577 |
Requires: hostname
|
|
|
79c577 |
Requires: mariadb
|
|
|
79c577 |
Requires: mariadb-server
|
|
|
79c577 |
# Required to process t/testrules.yml
|
|
|
79c577 |
Requires: perl(CPAN::Meta::YAML)
|
|
|
79c577 |
# Optional tests
|
|
|
79c577 |
%if %{with perl_DBD_MariaDB_enables_net_ssleay_test}
|
|
|
79c577 |
Requires: perl(Net::SSLeay)
|
|
|
79c577 |
%endif
|
|
|
79c577 |
%if %{with perl_DBD_MariaDB_enables_leak_test}
|
|
|
79c577 |
Requires: perl(Proc::ProcessTable)
|
|
|
79c577 |
Requires: perl(Storable)
|
|
|
79c577 |
%endif
|
|
|
79c577 |
|
|
|
79c577 |
%description tests
|
|
|
79c577 |
Tests from %{name}. Execute them
|
|
|
79c577 |
with "%{_libexecdir}/%{name}/test".
|
|
|
79c577 |
|
|
|
79c577 |
%prep
|
|
|
79c577 |
%setup -q -n DBD-MariaDB-%{version}
|
|
|
79c577 |
%patch0 -p1
|
|
|
79c577 |
%patch1 -p1
|
|
|
79c577 |
cp %{SOURCE1} %{SOURCE2} t/
|
|
|
79c577 |
|
|
|
79c577 |
# Help file to recognise the Perl scripts and normalize shebangs
|
|
|
79c577 |
for F in t/*.t t/*.pl; do
|
|
|
79c577 |
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
|
|
|
79c577 |
chmod +x "$F"
|
|
|
79c577 |
done
|
|
|
79c577 |
|
|
|
79c577 |
# Remove release tests
|
|
|
79c577 |
for F in t/pod.t t/manifest.t; do
|
|
|
79c577 |
rm "$F"
|
|
|
79c577 |
perl -i -ne 'print $_ unless m{^\Q'"$F"'\E}' MANIFEST
|
|
|
79c577 |
perl -i -ne 'print $_ unless m{\Q'"$F"'\E}' t/testrules.yml
|
|
|
79c577 |
done
|
|
|
79c577 |
|
|
|
79c577 |
%if %{without perl_DBD_MariaDB_enables_leak_test}
|
|
|
79c577 |
# Remove unused tests
|
|
|
79c577 |
for F in t/60leaks.t t/rt86153-reconnect-fail-memory.t; do
|
|
|
79c577 |
rm "$F"
|
|
|
79c577 |
perl -i -ne 'print $_ unless m{^\Q'"$F"'\E}' MANIFEST
|
|
|
79c577 |
perl -i -ne 'print $_ unless m{\Q'"$F"'\E}' t/testrules.yml
|
|
|
79c577 |
done
|
|
|
79c577 |
%endif
|
|
|
79c577 |
|
|
|
79c577 |
%build
|
|
|
79c577 |
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
|
79c577 |
%{make_build}
|
|
|
79c577 |
|
|
|
79c577 |
%install
|
|
|
79c577 |
%{make_install}
|
|
|
79c577 |
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
|
|
|
79c577 |
|
|
|
79c577 |
# Install tests
|
|
|
79c577 |
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
|
|
79c577 |
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
|
|
79c577 |
cp %{SOURCE3} %{buildroot}%{_libexecdir}/%{name}
|
|
|
79c577 |
cat > %{buildroot}%{_libexecdir}/%{name}/test << EOF
|
|
|
79c577 |
#!/bin/sh
|
|
|
79c577 |
unset RELEASE_TESTING
|
|
|
79c577 |
. %{_libexecdir}/%{name}/$(basename %{SOURCE3})
|
|
|
79c577 |
cd %{_libexecdir}/%{name} && exec prove -I .
|
|
|
79c577 |
EOF
|
|
|
79c577 |
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
|
|
79c577 |
|
|
|
79c577 |
%{_fixperms} $RPM_BUILD_ROOT/*
|
|
|
79c577 |
|
|
|
79c577 |
%check
|
|
|
79c577 |
# Set MariaDB and DBD::MariaDB test environment
|
|
|
79c577 |
. %{SOURCE3}
|
|
|
79c577 |
|
|
|
79c577 |
unset RELEASE_TESTING
|
|
|
79c577 |
make test %{?with_perl_DBD_MariaDB_enables_leak_test:EXTENDED_TESTING=1}
|
|
|
79c577 |
|
|
|
79c577 |
%files
|
|
|
79c577 |
%license LICENSE
|
|
|
79c577 |
%doc Changes Changes.historic
|
|
|
79c577 |
%{perl_vendorarch}/auto/*
|
|
|
79c577 |
%{perl_vendorarch}/DBD*
|
|
|
79c577 |
%{_mandir}/man3/*
|
|
|
79c577 |
|
|
|
79c577 |
%files tests
|
|
|
79c577 |
%{_libexecdir}/%{name}
|
|
|
79c577 |
|
|
|
79c577 |
%changelog
|
|
|
79c577 |
* Thu Feb 17 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-16
|
|
|
79c577 |
- Fix test for mariadb-connector-c 3.2.x
|
|
|
79c577 |
|
|
|
79c577 |
* Tue Aug 17 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-15
|
|
|
79c577 |
- Related: rhbz#1960259 - Enable gating
|
|
|
79c577 |
|
|
|
79c577 |
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.21-14
|
|
|
79c577 |
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
79c577 |
Related: rhbz#1991688
|
|
|
79c577 |
|
|
|
79c577 |
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 1.21-13
|
|
|
79c577 |
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
|
|
79c577 |
Related: rhbz#1971065
|
|
|
79c577 |
|
|
|
79c577 |
* Tue May 04 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-12
|
|
|
79c577 |
- Update tests
|
|
|
79c577 |
|
|
|
79c577 |
* Fri Mar 12 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-11
|
|
|
79c577 |
- Package tests
|
|
|
79c577 |
|
|
|
79c577 |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-10
|
|
|
79c577 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
79c577 |
|
|
|
79c577 |
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-9
|
|
|
79c577 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
79c577 |
|
|
|
79c577 |
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-8
|
|
|
79c577 |
- Perl 5.32 rebuild
|
|
|
79c577 |
|
|
|
79c577 |
* Fri Apr 17 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-7
|
|
|
79c577 |
- Update setup script due to Pali's comments
|
|
|
79c577 |
|
|
|
79c577 |
* Tue Feb 04 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-6
|
|
|
79c577 |
- Update setup script to work with MariaDB 10.4
|
|
|
79c577 |
|
|
|
79c577 |
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-5
|
|
|
79c577 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
79c577 |
|
|
|
79c577 |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-4
|
|
|
79c577 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
79c577 |
|
|
|
79c577 |
* Wed Jul 10 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-3
|
|
|
79c577 |
- Run setup as part of tests
|
|
|
79c577 |
|
|
|
79c577 |
* Wed Jun 26 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-2
|
|
|
79c577 |
- Enable tests
|
|
|
79c577 |
|
|
|
79c577 |
* Thu Jun 13 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-1
|
|
|
79c577 |
- Specfile autogenerated by cpanspec 1.78.
|