Resolves: rhbz#2039361 - Added perl-Module-Signature

This commit is contained in:
Jitka Plesnikova 2022-01-19 20:13:59 +01:00
parent 67abc23b96
commit 50dccd7184
6 changed files with 69 additions and 6 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -2,8 +2,8 @@
%global gnupghome %(mktemp --directory)
Name: perl-Module-Signature
Version: 0.87
Release: 2%{?dist}
Version: 0.88
Release: 1%{?dist}
Summary: CPAN signature management utilities and modules
License: CC0
URL: https://metacpan.org/release/Module-Signature
@ -58,6 +58,15 @@ Suggests: perl(PAR::Dist)
This package contains a command line tool and module for checking and creating
SIGNATURE files for Perl CPAN distributions.
%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 Module-Signature-%{version}
@ -65,6 +74,12 @@ SIGNATURE files for Perl CPAN distributions.
rm -r ./inc/*
sed -i -e '/^inc\//d' MANIFEST
# Help generators to recognize Perl scripts
for F in t/*.t t/*.pl; do
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
chmod +x "$F"
done
%build
export GNUPGHOME=%{gnupghome}
perl Makefile.PL INSTALLDIRS=vendor --skipdeps </dev/null
@ -75,13 +90,29 @@ make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -delete
%{_fixperms} -c %{buildroot}
# Install tests - copy tests to tmp
mkdir -p %{buildroot}/%{_libexecdir}/%{name}
cp -a t %{buildroot}/%{_libexecdir}/%{name}
# Use module and script installed on system
perl -i -pe 's{"-I../../lib/", "../../script/cpansign", }{}' %{buildroot}%{_libexecdir}/%{name}/t/3-verify.t
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 GNUPGHOME=%{gnupghome}
make test
%clean
rm -rf %{buildroot} %{gnupghome}
%files
%doc AUTHORS Changes README *.pub
%{_bindir}/cpansign
@ -89,7 +120,23 @@ rm -rf %{buildroot} %{gnupghome}
%{_mandir}/man1/cpansign.1*
%{_mandir}/man3/Module::Signature.3*
%files tests
%{_libexecdir}/%{name}
%changelog
* Sat Dec 18 2021 Paul Howarth <paul@city-fan.org> - 0.88-1
- Update to 0.88
- Update PAUSE keys to 2022
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.87-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.87-4
- Perl 5.34 rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.87-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.87-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

5
plans/sanity.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Sanity tests
discover:
how: fmf
execute:
how: tmt

View File

@ -1 +1 @@
SHA512 (Module-Signature-0.87.tar.gz) = d0afeab528d0b8a46b8a6a1f9714ab7efefb386f5b93113e733fa18b23b38c98c6a13f10e9091c0cbf392956cd02484d09482d31cd9146ed6de11adb7cd81124
SHA512 (Module-Signature-0.88.tar.gz) = 624d7508b7854e05c50915b9192552fddd17e22043f2b330c02c34ad44dd01cb0ffd657fcd4e5333324b2ce9a05e044772e80c3ae061608f91d8101d00b3666c

4
tests/upstream-tests.fmf Normal file
View File

@ -0,0 +1,4 @@
summary: Upstream tests
component: perl-Module-Signature
require: perl-Module-Signature-tests
test: /usr/libexec/perl-Module-Signature/test