diff --git a/Test-Mock-LWP-0.08-Disable-autoinstalling-the-dependencies.patch b/Test-Mock-LWP-0.08-Disable-autoinstalling-the-dependencies.patch new file mode 100644 index 0000000..236884a --- /dev/null +++ b/Test-Mock-LWP-0.08-Disable-autoinstalling-the-dependencies.patch @@ -0,0 +1,29 @@ +From 16df1e79cf2f2c2e429529c6ace3a9379922b90d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 12 Mar 2020 15:34:26 +0100 +Subject: [PATCH] Disable autoinstalling the dependencies +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + Makefile.PL | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index 66617a4..d41ac82 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -10,8 +10,5 @@ requires 'Test::MockObject' => '1.08'; + license 'perl'; + version_from 'lib/Test/Mock/LWP.pm'; + +-# Auto-install all dependencies from CPAN +-auto_install; +- + # Generate the Makefile + WriteAll; +-- +2.21.1 + diff --git a/Test-Mock-LWP-0.08-Fix-building-on-Perl-without-.-in-INC.patch b/Test-Mock-LWP-0.08-Fix-building-on-Perl-without-.-in-INC.patch deleted file mode 100644 index a004a40..0000000 --- a/Test-Mock-LWP-0.08-Fix-building-on-Perl-without-.-in-INC.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 8f2f1cd4a2999d6b3b611e64681129b0ce19c9e6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Tue, 16 May 2017 14:36:11 +0200 -Subject: [PATCH] Fix building on Perl without "." in @INC -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Písař ---- - Makefile.PL | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile.PL b/Makefile.PL -index 66617a4..b798bbe 100644 ---- a/Makefile.PL -+++ b/Makefile.PL -@@ -1,6 +1,7 @@ - #!/usr/bin/perl -w - use warnings; - use strict; -+BEGIN { push @INC, '.'; } - use inc::Module::Install; - - name 'Test-Mock-LWP'; --- -2.9.4 - diff --git a/perl-Test-Mock-LWP.spec b/perl-Test-Mock-LWP.spec index 6f28964..cfa68fd 100644 --- a/perl-Test-Mock-LWP.spec +++ b/perl-Test-Mock-LWP.spec @@ -1,27 +1,38 @@ Name: perl-Test-Mock-LWP Version: 0.08 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Easy mocking of LWP packages License: GPL+ or Artistic URL: https://metacpan.org/release/Test-Mock-LWP Source0: https://cpan.metacpan.org/authors/id/L/LU/LUKEC/Test-Mock-LWP-%{version}.tar.gz -# Fix building on Perl without "." in @INC, CPAN RT#121706 -Patch0: Test-Mock-LWP-0.08-Fix-building-on-Perl-without-.-in-INC.patch +# Disable unused features in a build script +Patch0: Test-Mock-LWP-0.08-Disable-autoinstalling-the-dependencies.patch BuildArch: noarch +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: make BuildRequires: perl-generators -BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl-interpreter +BuildRequires: perl(inc::Module::Install) +BuildRequires: perl(Module::Install::Metadata) +BuildRequires: perl(Module::Install::WriteAll) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# Run-time: +BuildRequires: perl(base) +BuildRequires: perl(Exporter) +BuildRequires: perl(strict) BuildRequires: perl(Test::MockObject) >= 1.08 +# Tests: BuildRequires: perl(Test::More) >= 0.42 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(Test::MockObject) >= 1.08 -%define bogusprovs 'perl(HTTP::Request)\ -perl(HTTP::Response)\ -perl(LWP::UserAgent)' -%global provfilt sh -c "%{__perl_provides} | %{__grep} -Fv %{bogusprovs}" -%define __perl_provides %{provfilt} +# Hide private redefinitions +%global __provides_exclude %{?__provides_exclude:%{__provides_exclude}|}^perl\\((HTTP::(Request|Response)|LWP::UserAgent)\\) -# Equivalent filter for rpm 4.9 onwards -%global __provides_exclude ^perl\\((HTTP::(Request|Response)|LWP::UserAgent)\\) +# Remove underspecified dependencies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Test::MockObject\\)$ %description @@ -31,7 +42,9 @@ A mocking library for testing of code based around LWP. %prep %setup -q -n Test-Mock-LWP-%{version} %patch0 -p1 - +# Remove bundled modules +rm -rf ./inc +perl -i -ne 'print $_ unless m{^inc/}' MANIFEST %build %{__perl} Makefile.PL INSTALLDIRS=vendor @@ -58,6 +71,9 @@ make test %changelog +* Thu Mar 12 2020 Petr Pisar - 0.08-19 +- Specify all dependencies and unbundle Module::Install + * Thu Jan 30 2020 Fedora Release Engineering - 0.08-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild