|
|
|
@ -2,10 +2,10 @@
|
|
|
|
|
%bcond_without perl_autodie_enables_optional_test
|
|
|
|
|
|
|
|
|
|
Name: perl-autodie
|
|
|
|
|
Version: 2.34
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Version: 2.37
|
|
|
|
|
Release: 511%{?dist}
|
|
|
|
|
Summary: Replace functions with ones that succeed or die
|
|
|
|
|
License: GPL+ or Artistic
|
|
|
|
|
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
|
|
|
|
URL: https://metacpan.org/release/autodie
|
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/T/TO/TODDR/autodie-%{version}.tar.gz
|
|
|
|
|
BuildArch: noarch
|
|
|
|
@ -53,7 +53,6 @@ BuildRequires: perl(Test::More)
|
|
|
|
|
BuildRequires: perl(BSD::Resource)
|
|
|
|
|
BuildRequires: perl(Import::Into) >= 1.002004
|
|
|
|
|
%endif
|
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
|
|
Requires: perl(B)
|
|
|
|
|
Requires: perl(Fcntl)
|
|
|
|
|
Requires: perl(POSIX)
|
|
|
|
@ -66,6 +65,31 @@ Requires: perl(IPC::System::Simple) >= 0.12
|
|
|
|
|
# Remove falsely detected perl(lib)
|
|
|
|
|
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(lib\\)$
|
|
|
|
|
|
|
|
|
|
# Filter modules bundled for tests
|
|
|
|
|
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(autodie::test.*\\)
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(autodie_.*\\)
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(Caller_helper\\)
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(Hints_.*\\)
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(lethal\\)
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(my::.*\\)
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(pujHa::ghach\\)
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(Some::Module\\)
|
|
|
|
|
|
|
|
|
|
%package tests
|
|
|
|
|
Summary: Tests for %{name}
|
|
|
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
Requires: perl-Test-Harness
|
|
|
|
|
Requires: perl(lib)
|
|
|
|
|
%if %{with perl_autodie_enables_optional_test} && !%{defined perl_bootstrap}
|
|
|
|
|
Requires: perl(BSD::Resource)
|
|
|
|
|
Requires: perl(Import::Into) >= 1.002004
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description tests
|
|
|
|
|
Tests from %{name}. Execute them
|
|
|
|
|
with "%{_libexecdir}/%{name}/test".
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
The "autodie" and "Fatal" pragma provides a convenient way to replace
|
|
|
|
|
functions that normally return false on failure with equivalents that throw an
|
|
|
|
@ -78,31 +102,116 @@ autodie in preference to "Fatal".
|
|
|
|
|
%setup -q -n autodie-%{version}
|
|
|
|
|
find -type f -exec chmod -x {} +
|
|
|
|
|
|
|
|
|
|
# Help generators to recognize Perl scripts
|
|
|
|
|
for F in t/*.t; do
|
|
|
|
|
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
|
|
|
|
|
chmod +x "$F"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
|
|
|
%{make_build}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{make_install}
|
|
|
|
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
|
|
|
|
%{_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
|
|
|
|
|
unset AUTHOR_TESTING AUTOMATED_TESTING PERL_CORE RELEASE_TESTING
|
|
|
|
|
# Some tests write into temporary files/directories. The 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
|
|
|
|
|
unset AUTHOR_TESTING AUTOMATED_TESTING PERL_CORE RELEASE_TESTING
|
|
|
|
|
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
|
|
|
|
make test
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc AUTHORS Changes README.md
|
|
|
|
|
%{perl_vendorlib}/*
|
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
|
%{perl_vendorlib}/autodie*
|
|
|
|
|
%{perl_vendorlib}/Fatal*
|
|
|
|
|
%{_mandir}/man3/autodie*
|
|
|
|
|
%{_mandir}/man3/Fatal*
|
|
|
|
|
|
|
|
|
|
%files tests
|
|
|
|
|
%{_libexecdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.34-4
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 2.37-511
|
|
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
|
|
|
|
|
|
* Fri Aug 09 2024 Jitka Plesnikova <jplesnik@redhat.com> - 2.37-511
|
|
|
|
|
- Perl 5.40 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Thu Jul 18 2024 Jitka Plesnikova <jplesnik@redhat.com> - 2.37-510
|
|
|
|
|
- Increase release to favour standalone package
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.37-4
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.37-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.37-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jan 02 2024 Jitka Plesnikova <jplesnik@redhat.com> - 2.37-1
|
|
|
|
|
- 2.37 bump (rhbz#2256130)
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.36-501
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.34-3
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
* Wed Jul 12 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.36-500
|
|
|
|
|
- Perl 5.38 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.36-499
|
|
|
|
|
- Increase release to favour standalone package
|
|
|
|
|
|
|
|
|
|
* Mon Jan 30 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.36-1
|
|
|
|
|
- 2.36 bump
|
|
|
|
|
|
|
|
|
|
* Mon Jan 30 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.35-1
|
|
|
|
|
- 2.35 bump
|
|
|
|
|
- Package tests
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.34-491
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.34-490
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 03 2022 Jitka Plesnikova <jplesnik@redhat.com> - 2.34-489
|
|
|
|
|
- Perl 5.36 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 2.34-488
|
|
|
|
|
- Increase release to favour standalone package
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.34-480
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.34-479
|
|
|
|
|
- Second attempt - Rebuilt for
|
|
|
|
|
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon May 24 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.34-478
|
|
|
|
|
- Perl 5.34 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.34-477
|
|
|
|
|
- Increase release to favour standalone package
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.34-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|