From a6ff73c1e88b6a19f0eeb8e3506a720003f22872 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Mon, 15 Mar 2021 13:35:16 +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-App-cpanminus.git#9d99b985b0ad13f46e0cf1b6ee2b91abccfc2345 --- .fmf/version | 1 + ...-1.7044-SHA1-SHA256-in-checksum-chat.patch | 32 ++++++++++++ gating.yaml | 7 +++ perl-App-cpanminus.rpmlintrc | 2 + perl-App-cpanminus.spec | 49 ++++++++++++++++--- plans/sanity.fmf | 5 ++ tests/upstream-tests.fmf | 4 ++ 7 files changed, 92 insertions(+), 8 deletions(-) create mode 100644 .fmf/version create mode 100644 App-cpanminus-1.7044-SHA1-SHA256-in-checksum-chat.patch create mode 100644 gating.yaml create mode 100644 perl-App-cpanminus.rpmlintrc 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/App-cpanminus-1.7044-SHA1-SHA256-in-checksum-chat.patch b/App-cpanminus-1.7044-SHA1-SHA256-in-checksum-chat.patch new file mode 100644 index 0000000..008fd72 --- /dev/null +++ b/App-cpanminus-1.7044-SHA1-SHA256-in-checksum-chat.patch @@ -0,0 +1,32 @@ +From 215c69b180f8de546c5965c37950d67c6cd8dc33 Mon Sep 17 00:00:00 2001 +From: Stig Palmquist +Date: Tue, 9 Mar 2021 09:29:43 +0100 +Subject: [PATCH] SHA1 -> SHA256 in checksum chat() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Petr Pisar: Ported from 2c24e534bbd1b843233dda3d66650645883f70a2 +commit in upstream devel branch. + +Signed-off-by: Petr Písař +--- + lib/App/cpanminus/script.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/App/cpanminus/script.pm b/lib/App/cpanminus/script.pm +index 1b26b5d..af44442 100644 +--- a/lib/App/cpanminus/script.pm ++++ b/lib/App/cpanminus/script.pm +@@ -1637,7 +1637,7 @@ sub verify_archive { + sub verify_checksum { + my($self, $file, $chk_file) = @_; + +- $self->chat("Verifying the SHA1 for $file\n"); ++ $self->chat("Verifying the SHA256 for $file\n"); + + open my $fh, "<$chk_file" or die "$chk_file: $!"; + my $data = join '', <$fh>; +-- +2.26.2 + diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..282e16b --- /dev/null +++ b/gating.yaml @@ -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} diff --git a/perl-App-cpanminus.rpmlintrc b/perl-App-cpanminus.rpmlintrc new file mode 100644 index 0000000..3c67f8c --- /dev/null +++ b/perl-App-cpanminus.rpmlintrc @@ -0,0 +1,2 @@ +from Config import * +addFilter("-tests.noarch: W: no-documentation"); diff --git a/perl-App-cpanminus.spec b/perl-App-cpanminus.spec index 6252e5d..4d4db23 100644 --- a/perl-App-cpanminus.spec +++ b/perl-App-cpanminus.spec @@ -1,6 +1,6 @@ Name: perl-App-cpanminus Version: 1.7044 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Get, unpack, build and install CPAN modules # Other files: GPL+ or Artistic ## unbundled @@ -11,14 +11,16 @@ License: GPL+ or Artistic URL: https://metacpan.org/release/App-cpanminus Source0: https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-%{version}.tar.gz Source1: fatunpack +# Correct an SHA version in a message, in upstream's devel branch, +# +Patch0: App-cpanminus-1.7044-SHA1-SHA256-in-checksum-chat.patch BuildArch: noarch BuildRequires: %{_bindir}/podselect BuildRequires: coreutils -BuildRequires: findutils BuildRequires: make -BuildRequires: perl-interpreter BuildRequires: perl-generators -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30 +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(File::Path) BuildRequires: perl(File::Spec) BuildRequires: perl(Getopt::Long) @@ -117,6 +119,15 @@ Why? It's dependency free, requires zero configuration, and stands alone but it's maintainable and extensible with plug-ins and friendly to shell scripting. When running, it requires only 10 MB of RAM. +%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 App-cpanminus-%{version} # Unbundle fat-packed modules @@ -128,14 +139,29 @@ for F in bin/cpanm lib/App/cpanminus/fatscript.pm; do mv "${F}.stripped" "$F" done +%patch0 -p1 + +# Help generators to recognize Perl scripts +for F in t/*.t; do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F" + chmod +x "$F" +done + %build -perl Makefile.PL INSTALLDIRS=vendor -make %{?_smp_mflags} +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 +%{make_build} %install -make pure_install DESTDIR=%{buildroot} -find %{buildroot} -type f -name .packlist -delete +%{make_install} %{_fixperms} %{buildroot}/* +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' +#!/bin/bash +cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test %check make test @@ -148,7 +174,14 @@ make test %{_mandir}/man1/* %{_bindir}/cpanm +%files tests +%{_libexecdir}/%{name} + %changelog +* Tue Mar 09 2021 Petr Pisar - 1.7044-12 +- Correct an SHA version in a message +- Package tests + * Tue Jan 26 2021 Fedora Release Engineering - 1.7044-11 - 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/tests/upstream-tests.fmf b/tests/upstream-tests.fmf new file mode 100644 index 0000000..bd8df17 --- /dev/null +++ b/tests/upstream-tests.fmf @@ -0,0 +1,4 @@ +summary: Upstream tests +component: perl-App-cpanminus +require: perl-App-cpanminus-tests +test: /usr/libexec/perl-App-cpanminus/test