From 419bc56188496007c9738b7dc4008e79a353164e Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Mon, 22 Feb 2021 09:30:18 +0000 Subject: [PATCH] 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-Module-CoreList.git#8102eaff38a7946afc6d4c247232ac60436d7a9c --- .fmf/version | 1 + .gitignore | 1 + perl-Module-CoreList.spec | 53 ++++++++++++++++++++++++++++++++------- plans/sanity.fmf | 5 ++++ sources | 2 +- tests/upstream-tests.fmf | 4 +++ 6 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/sanity.fmf create mode 100644 tests/upstream-tests.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index b50b876..8122157 100644 --- a/.gitignore +++ b/.gitignore @@ -93,3 +93,4 @@ Module-CoreList-2.13.tar.gz /Module-CoreList-5.20201220.tar.gz /Module-CoreList-5.20210120.tar.gz /Module-CoreList-5.20210123.tar.gz +/Module-CoreList-5.20210220.tar.gz diff --git a/perl-Module-CoreList.spec b/perl-Module-CoreList.spec index 684ab78..405a26e 100644 --- a/perl-Module-CoreList.spec +++ b/perl-Module-CoreList.spec @@ -1,11 +1,8 @@ -# Run optional test -%bcond_without perl_Module_CoreList_enables_optional_test - Name: perl-Module-CoreList # Epoch to compete with perl.spec Epoch: 1 -Version: 5.20210123 -Release: 2%{?dist} +Version: 5.20210220 +Release: 1%{?dist} Summary: What modules are shipped with versions of perl License: GPL+ or Artistic URL: https://metacpan.org/release/Module-CoreList @@ -28,10 +25,6 @@ BuildRequires: perl(List::Util) BuildRequires: perl(version) >= 0.88 # Tests: BuildRequires: perl(Test::More) -# Optional tests: -%if %{with perl_Module_CoreList_enables_optional_test} && !%{defined perl_bootstrap} -BuildRequires: perl(Test::Pod) >= 1.00 -%endif Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(List::Util) Requires: perl(version) >= 0.88 @@ -56,20 +49,55 @@ Conflicts: perl-Module-CoreList < 1:5.20140914 This package provides a corelist(1) tool which can be used to query what modules were shipped with given perl version. +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-tools = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness + +%description tests +Tests from %{name}-%{version}. Execute them +with "%{_libexecdir}/%{name}/test". %prep %setup -q -n Module-CoreList-%{version} +# Help file to recognise the Perl scripts and normalize shebangs +for F in t/*.t; 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/pod.t +perl -i -ne 'print $_ unless m{^t/pod\.t}' MANIFEST + %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %{make_build} %install %{make_install} + +# Install tests +mkdir -p %{buildroot}/%{_libexecdir}/%{name} +cp -a t %{buildroot}/%{_libexecdir}/%{name} +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} $RPM_BUILD_ROOT/* %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 %files @@ -82,7 +110,14 @@ make test %{_bindir}/corelist %{_mandir}/man1/corelist.* +%files tests +%{_libexecdir}/%{name} + %changelog +* Mon Feb 22 2021 Jitka Plesnikova - 1:5.20210220-1 +- 5.20210220 bump +- Package tests + * Wed Jan 27 2021 Fedora Release Engineering - 1:5.20210123-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/plans/sanity.fmf b/plans/sanity.fmf new file mode 100644 index 0000000..a72ded4 --- /dev/null +++ b/plans/sanity.fmf @@ -0,0 +1,5 @@ +summary: Sanity tests +discover: + how: fmf +execute: + how: tmt diff --git a/sources b/sources index 71701df..81c9a94 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Module-CoreList-5.20210123.tar.gz) = 6c47ebc40d231241e60b8c172789bf004819e31aacd645dbc4e04f871ba73a6f75971c2db2b65ae2837631bcbc0ec70a05877ba3025a62959a59bfbcce810cce +SHA512 (Module-CoreList-5.20210220.tar.gz) = 274ec952c83c19c41442381b5b685f1c7a3ef39f3ede15abbbf8760ec6b68e99cea1097708629eca23e09e056738d097aad27b3b02a3396b9808c9034f1e98bd diff --git a/tests/upstream-tests.fmf b/tests/upstream-tests.fmf new file mode 100644 index 0000000..b8522dd --- /dev/null +++ b/tests/upstream-tests.fmf @@ -0,0 +1,4 @@ +summary: Upstream tests +component: perl-Module-CoreList +require: perl-Module-CoreList-tests +test: /usr/libexec/perl-Module-CoreList/test