|
|
|
@ -1,30 +1,40 @@
|
|
|
|
|
# Run time expensive tests
|
|
|
|
|
%bcond_without long_tests
|
|
|
|
|
# Run optional test
|
|
|
|
|
%if ! (0%{?rhel})
|
|
|
|
|
%bcond_without perl_IO_Compress_enables_optional_test
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with perl_IO_Compress_enables_optional_test
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Dependency version if different to this package version
|
|
|
|
|
%global depver 2.101
|
|
|
|
|
|
|
|
|
|
%{?perl_default_filter}
|
|
|
|
|
|
|
|
|
|
Name: perl-IO-Compress
|
|
|
|
|
Version: 2.074
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Version: 2.102
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Summary: Read and write compressed data
|
|
|
|
|
License: GPL+ or Artistic
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
URL: http://search.cpan.org/dist/IO-Compress/
|
|
|
|
|
Source0: http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/IO-Compress-%{version}.tar.gz
|
|
|
|
|
URL: https://metacpan.org/release/IO-Compress
|
|
|
|
|
Source0: https://cpan.metacpan.org/modules/by-module/IO/IO-Compress-%{version}.tar.gz
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# Module Build
|
|
|
|
|
BuildRequires: coreutils
|
|
|
|
|
BuildRequires: findutils
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: perl
|
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 5.16
|
|
|
|
|
BuildRequires: perl-interpreter
|
|
|
|
|
BuildRequires: perl(Config)
|
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
|
|
|
|
BuildRequires: perl(File::Copy)
|
|
|
|
|
BuildRequires: perl(File::Spec::Functions)
|
|
|
|
|
# Module Runtime
|
|
|
|
|
BuildRequires: perl(bytes)
|
|
|
|
|
BuildRequires: perl(Carp)
|
|
|
|
|
BuildRequires: perl(Compress::Raw::Bzip2) >= %{version}
|
|
|
|
|
BuildRequires: perl(Compress::Raw::Zlib) >= %{version}
|
|
|
|
|
BuildRequires: perl(Config)
|
|
|
|
|
BuildRequires: perl(Compress::Raw::Bzip2) >= %{?depver}%{!?depver:%{version}}
|
|
|
|
|
BuildRequires: perl(Compress::Raw::Zlib) >= %{?depver}%{!?depver:%{version}}
|
|
|
|
|
BuildRequires: perl(constant)
|
|
|
|
|
BuildRequires: perl(Encode)
|
|
|
|
|
BuildRequires: perl(Exporter)
|
|
|
|
@ -42,15 +52,22 @@ BuildRequires: perl(utf8)
|
|
|
|
|
BuildRequires: perl(warnings)
|
|
|
|
|
# Test Suite
|
|
|
|
|
BuildRequires: perl(File::Path)
|
|
|
|
|
BuildRequires: perl(File::Temp)
|
|
|
|
|
BuildRequires: perl(lib)
|
|
|
|
|
BuildRequires: perl(threads::shared)
|
|
|
|
|
%if !%{defined perl_bootstrap}
|
|
|
|
|
BuildRequires: perl(Test::More)
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with perl_IO_Compress_enables_optional_test}
|
|
|
|
|
# Optional Tests
|
|
|
|
|
BuildRequires: perl(bytes)
|
|
|
|
|
BuildRequires: perl(Data::Dumper)
|
|
|
|
|
BuildRequires: perl(File::Temp)
|
|
|
|
|
BuildRequires: perl(overload)
|
|
|
|
|
# Dual-lived module needs building early in the boot process
|
|
|
|
|
%if !%{defined perl_bootstrap}
|
|
|
|
|
BuildRequires: perl(Test::NoWarnings)
|
|
|
|
|
BuildRequires: perl(Test::Pod) >= 1.00
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: perl(threads::shared)
|
|
|
|
|
%endif
|
|
|
|
|
# Runtime
|
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
|
|
Requires: perl(File::Glob)
|
|
|
|
@ -65,6 +82,16 @@ Provides: perl-IO-Compress-Bzip2 = %{version}-%{release}
|
|
|
|
|
Obsoletes: perl-IO-Compress-Zlib < %{version}-%{release}
|
|
|
|
|
Provides: perl-IO-Compress-Zlib = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
# Filter modules bundled for tests
|
|
|
|
|
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(CompTestUtils\\)
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(.*\.pl)\s*$
|
|
|
|
|
%if %{defined perl_bootstrap}
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(Test::Builder)\s*$
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(Test::More)\s*$
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(Test::Simple)\s*$
|
|
|
|
|
%endif
|
|
|
|
|
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This distribution provides a Perl interface to allow reading and writing of
|
|
|
|
|
compressed data created with the zlib and bzip2 libraries.
|
|
|
|
@ -79,6 +106,15 @@ included with the IO-Compress distribution:
|
|
|
|
|
* IO-Compress-Bzip2
|
|
|
|
|
* IO-Compress-Base
|
|
|
|
|
|
|
|
|
|
%package tests
|
|
|
|
|
Summary: Tests for %{name}
|
|
|
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
Requires: perl-Test-Harness
|
|
|
|
|
|
|
|
|
|
%description tests
|
|
|
|
|
Tests from %{name}-%{version}. Execute them
|
|
|
|
|
with "%{_libexecdir}/%{name}/test".
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n IO-Compress-%{version}
|
|
|
|
|
|
|
|
|
@ -86,26 +122,69 @@ included with the IO-Compress distribution:
|
|
|
|
|
chmod -c -x lib/IO/Uncompress/{Adapter/Identity,RawInflate}.pm
|
|
|
|
|
find examples -type f -exec chmod -c -x {} \;
|
|
|
|
|
|
|
|
|
|
%if ! %{defined perl_bootstrap}
|
|
|
|
|
# Remove bundled Test::* modules
|
|
|
|
|
rm -rf t/Test
|
|
|
|
|
perl -i -ne 'print $_ unless m{^t/Test/}' MANIFEST
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Fix shellbangs in examples
|
|
|
|
|
perl -pi -e 's|^#!/usr/local/bin/perl\b|#!%{__perl}|' examples/io/anycat \
|
|
|
|
|
perl -MConfig -pi -e 's|^#!/usr/local/bin/perl\b|$Config{startperl}|' examples/io/anycat \
|
|
|
|
|
examples/io/bzip2/* examples/io/gzip/* examples/compress-zlib/*
|
|
|
|
|
|
|
|
|
|
# Help file to recognise the Perl scripts and normalize shebangs
|
|
|
|
|
for F in `find t -name *.t` `find t -name *.pl`; do
|
|
|
|
|
if head -1 "$F" | grep -q -e '^#!.*perl' ; then
|
|
|
|
|
perl -MConfig -pi -e 's|^#!.*perl\b|$Config{startperl}|' "$F"
|
|
|
|
|
else
|
|
|
|
|
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F"
|
|
|
|
|
fi
|
|
|
|
|
chmod +x "$F"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Remove release tests
|
|
|
|
|
rm t/999pod.t t/999meta-*.t
|
|
|
|
|
perl -i -ne 'print $_ unless m{^t/999pod\.t}' MANIFEST
|
|
|
|
|
perl -i -ne 'print $_ unless m{^t/999meta-.*\.t}' MANIFEST
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
perl Makefile.PL
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
perl Makefile.PL NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
|
|
|
%{make_build}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
make pure_install DESTDIR=%{buildroot} INSTALLDIRS=perl
|
|
|
|
|
find %{buildroot} -type f -name .packlist -delete
|
|
|
|
|
%{make_install} INSTALLDIRS=perl
|
|
|
|
|
|
|
|
|
|
# Install tests
|
|
|
|
|
mkdir -p %{buildroot}/%{_libexecdir}/%{name}
|
|
|
|
|
cp -a examples t %{buildroot}/%{_libexecdir}/%{name}
|
|
|
|
|
perl -i -pe "s{\"./bin/\"}{\"%{_bindir}\"}" %{buildroot}/%{_libexecdir}/%{name}/t/011-streamzip.t
|
|
|
|
|
cat > %{buildroot}/%{_libexecdir}/%{name}/test << 'EOF'
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
set -e
|
|
|
|
|
# Lots of 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}/* ./
|
|
|
|
|
unset PERL_CORE
|
|
|
|
|
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
|
|
|
|
popd
|
|
|
|
|
rm -rf "$DIR"
|
|
|
|
|
EOF
|
|
|
|
|
chmod +x %{buildroot}/%{_libexecdir}/%{name}/test
|
|
|
|
|
|
|
|
|
|
%{_fixperms} -c %{buildroot}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
unset PERL_CORE
|
|
|
|
|
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
|
|
|
|
# Build using "--without long_tests" to avoid very long tests
|
|
|
|
|
# (full suite can take nearly an hour on an i7 920)
|
|
|
|
|
make test COMPRESS_ZLIB_RUN_%{?with_long_tests:ALL}%{!?with_long_tests:MOST}=1
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc Changes README examples/*
|
|
|
|
|
%{_bindir}/streamzip
|
|
|
|
|
%{_bindir}/zipdetails
|
|
|
|
|
%{perl_privlib}/Compress/
|
|
|
|
|
%{perl_privlib}/File/
|
|
|
|
@ -124,15 +203,135 @@ make test COMPRESS_ZLIB_RUN_%{?with_long_tests:ALL}%{!?with_long_tests:MOST}=1
|
|
|
|
|
%{perl_privlib}/IO/Compress/Zip.pm
|
|
|
|
|
%{perl_privlib}/IO/Compress/Zlib/
|
|
|
|
|
%{perl_privlib}/IO/Uncompress/
|
|
|
|
|
%{_mandir}/man1/streamzip.1*
|
|
|
|
|
%{_mandir}/man1/zipdetails.1*
|
|
|
|
|
%{_mandir}/man3/Compress::Zlib.3*
|
|
|
|
|
%{_mandir}/man3/File::GlobMapper.3*
|
|
|
|
|
%{_mandir}/man3/IO::Compress::*.3*
|
|
|
|
|
%{_mandir}/man3/IO::Uncompress::*.3*
|
|
|
|
|
|
|
|
|
|
%files tests
|
|
|
|
|
%{_libexecdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sun Dec 10 2023 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 2.074-1
|
|
|
|
|
- Rebuilt for MSVSphere 8.8
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.102-4
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.102-3
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Mon Mar 01 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.102-2
|
|
|
|
|
- Package tests
|
|
|
|
|
|
|
|
|
|
* Sun Feb 28 2021 Paul Howarth <paul@city-fan.org> - 2.102-1
|
|
|
|
|
- 2.102 bump
|
|
|
|
|
|
|
|
|
|
* Sat Feb 20 2021 Paul Howarth <paul@city-fan.org> - 2.101-1
|
|
|
|
|
- 2.101 bump
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.100-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 7 2021 Paul Howarth <paul@city-fan.org> - 2.100-1
|
|
|
|
|
- 2.100 bump
|
|
|
|
|
- Use %%{make_build} and %%{make_install}
|
|
|
|
|
|
|
|
|
|
* Sat Aug 1 2020 Paul Howarth <paul@city-fan.org> - 2.096-1
|
|
|
|
|
- 2.096 bump
|
|
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.095-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jul 21 2020 Petr Pisar <ppisar@redhat.com> - 2.095-1
|
|
|
|
|
- 2.095 bump
|
|
|
|
|
|
|
|
|
|
* Tue Jul 14 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.094-1
|
|
|
|
|
- 2.094 bump
|
|
|
|
|
|
|
|
|
|
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.093-457
|
|
|
|
|
- Perl 5.32 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.093-456
|
|
|
|
|
- Increase release to favour standalone package
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.093-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Dec 8 2019 Paul Howarth <paul@city-fan.org> - 2.093-1
|
|
|
|
|
- 2.093 bump
|
|
|
|
|
|
|
|
|
|
* Thu Dec 05 2019 Jitka Plesnikova <jplesnik@redhat.com> - 2.092-1
|
|
|
|
|
- 2.092 bump
|
|
|
|
|
|
|
|
|
|
* Sun Nov 24 2019 Paul Howarth <paul@city-fan.org> - 2.091-1
|
|
|
|
|
- 2.091 bump
|
|
|
|
|
|
|
|
|
|
* Sun Nov 10 2019 Paul Howarth <paul@city-fan.org> - 2.090-1
|
|
|
|
|
- 2.090 bump
|
|
|
|
|
|
|
|
|
|
* Sun Nov 3 2019 Paul Howarth <paul@city-fan.org> - 2.089-1
|
|
|
|
|
- 2.089 bump
|
|
|
|
|
|
|
|
|
|
* Sun Nov 3 2019 Paul Howarth <paul@city-fan.org> - 2.088-1
|
|
|
|
|
- 2.088 bump
|
|
|
|
|
|
|
|
|
|
* Mon Aug 12 2019 Jitka Plesnikova <jplesnik@redhat.com> - 2.087-1
|
|
|
|
|
- 2.087 bump
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.086-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jun 02 2019 Jitka Plesnikova <jplesnik@redhat.com> - 2.086-3
|
|
|
|
|
- Perl 5.30 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 2.086-2
|
|
|
|
|
- Perl 5.30 rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Apr 01 2019 Jitka Plesnikova <jplesnik@redhat.com> - 2.086-1
|
|
|
|
|
- 2.086 bump
|
|
|
|
|
|
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.084-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 7 2019 Paul Howarth <paul@city-fan.org> - 2.084-1
|
|
|
|
|
- 2.084 bump
|
|
|
|
|
|
|
|
|
|
* Wed Jan 02 2019 Jitka Plesnikova <jplesnik@redhat.com> - 2.083-1
|
|
|
|
|
- 2.083 bump
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.081-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Jun 30 2018 Jitka Plesnikova <jplesnik@redhat.com> - 2.081-4
|
|
|
|
|
- Perl 5.28 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Sat Jun 30 2018 Jitka Plesnikova <jplesnik@redhat.com> - 2.081-3
|
|
|
|
|
- Perl 5.28 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Wed Jun 27 2018 Jitka Plesnikova <jplesnik@redhat.com> - 2.081-2
|
|
|
|
|
- Perl 5.28 rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Apr 09 2018 Jitka Plesnikova <jplesnik@redhat.com> - 2.081-1
|
|
|
|
|
- 2.081 bump
|
|
|
|
|
|
|
|
|
|
* Wed Apr 4 2018 Paul Howarth <paul@city-fan.org> - 2.080-1
|
|
|
|
|
- 2.080 bump
|
|
|
|
|
|
|
|
|
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.074-397
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Dec 18 2017 Petr Pisar <ppisar@redhat.com> - 2.074-396
|
|
|
|
|
- Rewrite shell bangs using running perl
|
|
|
|
|
|
|
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.074-395
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 2.074-394
|
|
|
|
|
- Perl 5.26 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Sat Jun 03 2017 Jitka Plesnikova <jplesnik@redhat.com> - 2.074-393
|
|
|
|
|
- Perl 5.26 rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Feb 20 2017 Jitka Plesnikova <jplesnik@redhat.com> - 2.074-1
|
|
|
|
|
- 2.074 bump
|
|
|
|
|