Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/perl-Compress-Raw-Zlib.git#aa223acd62eba759b52fa79d6157145444a7c854
This commit is contained in:
parent
00b0fb043d
commit
d79c467c7f
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
@ -5,9 +5,10 @@
|
||||
%bcond_with perl_Compress_Raw_Zlib_enables_optional_test
|
||||
%endif
|
||||
|
||||
|
||||
Name: perl-Compress-Raw-Zlib
|
||||
Version: 2.101
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Low-level interface to the zlib compression library
|
||||
# Zlib.xs: (GPL+ or Artistic) and zlib
|
||||
# Others: GPL+ or Artistic
|
||||
@ -32,7 +33,6 @@ BuildRequires: perl(File::Copy)
|
||||
BuildRequires: perl(File::Spec::Functions)
|
||||
BuildRequires: perl(lib)
|
||||
BuildRequires: perl(vars)
|
||||
BuildRequires: sed
|
||||
BuildRequires: zlib-devel >= 1.2.1
|
||||
# Module Runtime
|
||||
BuildRequires: perl(bytes)
|
||||
@ -52,11 +52,9 @@ BuildRequires: perl(lib)
|
||||
BuildRequires: perl(overload)
|
||||
# Dual-lived module needs rebuilding early in the boot process
|
||||
%if !%{defined perl_bootstrap}
|
||||
BuildRequires: perl(Test::CPAN::Meta)
|
||||
BuildRequires: perl(Test::CPAN::Meta::JSON)
|
||||
# Release tests are deleted
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(Test::NoWarnings)
|
||||
BuildRequires: perl(Test::Pod) >= 1.00
|
||||
%endif
|
||||
%endif
|
||||
# Runtime
|
||||
@ -66,15 +64,60 @@ Requires: perl(XSLoader)
|
||||
# Don't "provide" private Perl libs
|
||||
%{?perl_default_filter}
|
||||
|
||||
# Filter modules bundled for tests
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(CompTestUtils\\)
|
||||
%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
|
||||
The Compress::Raw::Zlib module provides a Perl interface to the zlib
|
||||
compression library, which is used by IO::Compress::Zlib.
|
||||
|
||||
%package tests
|
||||
Summary: Tests for %{name}
|
||||
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: perl-Test-Harness
|
||||
%if %{with perl_Compress_Raw_Zlib_enables_optional_test}
|
||||
# Optional Tests
|
||||
Requires: perl(File::Temp)
|
||||
Requires: perl(overload)
|
||||
# Dual-lived module needs rebuilding early in the boot process
|
||||
%if !%{defined perl_bootstrap}
|
||||
Requires: perl(Test::NoWarnings)
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%description tests
|
||||
Tests from %{name}-%{version}. Execute them
|
||||
with "%{_libexecdir}/%{name}/test".
|
||||
|
||||
%prep
|
||||
%setup -q -n Compress-Raw-Zlib-%{version}
|
||||
# Remove bundled zlib
|
||||
rm -rf zlib-src
|
||||
sed -i -e '/^zlib-src\//d' MANIFEST
|
||||
perl -i -ne 'print $_ unless m{^zlib-src/}' MANIFEST
|
||||
|
||||
%if ! %{defined perl_bootstrap}
|
||||
# Remove bundled Test::* modules
|
||||
rm -rf t/Test
|
||||
perl -i -ne 'print $_ unless m{^t/Test/}' MANIFEST
|
||||
%endif
|
||||
|
||||
# Help file to recognise the Perl scripts
|
||||
for F in t/*.t; do
|
||||
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F"
|
||||
chmod +x "$F"
|
||||
done
|
||||
|
||||
# Remove release tests
|
||||
rm t/99pod.t t/meta-*.t
|
||||
perl -i -ne 'print $_ unless m{^t/99pod\.t}' MANIFEST
|
||||
perl -i -ne 'print $_ unless m{^t/meta-.*\.t}' MANIFEST
|
||||
|
||||
%build
|
||||
OLD_ZLIB=False
|
||||
@ -88,9 +131,23 @@ perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERL
|
||||
%install
|
||||
%{make_install}
|
||||
find %{buildroot} -type f -name '*.bs' -empty -delete
|
||||
|
||||
# Install tests
|
||||
mkdir -p %{buildroot}/%{_libexecdir}/%{name}
|
||||
cp -a t %{buildroot}/%{_libexecdir}/%{name}
|
||||
perl -i -pe "s{DIR => '.'}{DIR => '/tmp'}" %{buildroot}/%{_libexecdir}/%{name}/t/compress/CompTestUtils.pm
|
||||
cat > %{buildroot}/%{_libexecdir}/%{name}/test << 'EOF'
|
||||
#!/bin/sh
|
||||
unset PERL_CORE
|
||||
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
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}')
|
||||
make test COMPRESS_ZLIB_RUN_MOST=1
|
||||
|
||||
%files
|
||||
@ -99,7 +156,13 @@ make test COMPRESS_ZLIB_RUN_MOST=1
|
||||
%{perl_vendorarch}/Compress/
|
||||
%{_mandir}/man3/Compress::Raw::Zlib.3*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Feb 22 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.101-2
|
||||
- Package tests
|
||||
|
||||
* Sat Feb 20 2021 Paul Howarth <paul@city-fan.org> - 2.101-1
|
||||
- 2.101 bump
|
||||
|
||||
|
5
plans/sanity.fmf
Normal file
5
plans/sanity.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Sanity tests
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
4
tests/upstream-tests.fmf
Normal file
4
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,4 @@
|
||||
summary: Upstream tests
|
||||
component: perl-Compress-Raw-Zlib
|
||||
require: perl-Compress-Raw-Zlib-tests
|
||||
test: /usr/libexec/perl-Compress-Raw-Zlib/test
|
Loading…
Reference in New Issue
Block a user