From b850d72ed51a3e63b2f9e50970ff93e053d8ac77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 9 Jan 2017 16:24:12 +0100 Subject: [PATCH] Fix logging fatal errors --- CPAN-2.14-logger-die-does-not-exist.patch | 38 +++++++++++++++++++++++ perl-CPAN.spec | 5 +++ 2 files changed, 43 insertions(+) create mode 100644 CPAN-2.14-logger-die-does-not-exist.patch diff --git a/CPAN-2.14-logger-die-does-not-exist.patch b/CPAN-2.14-logger-die-does-not-exist.patch new file mode 100644 index 0000000..7354f03 --- /dev/null +++ b/CPAN-2.14-logger-die-does-not-exist.patch @@ -0,0 +1,38 @@ +From f7fc39436aa91c783142fef58853abdb30a5d2bc Mon Sep 17 00:00:00 2001 +From: Simon Legner +Date: Tue, 11 Oct 2016 12:47:56 +0200 +Subject: [PATCH] $logger->die does not exist +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + lib/App/Cpan.pm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/App/Cpan.pm b/lib/App/Cpan.pm +index c654c2c..742cbd2 100644 +--- a/lib/App/Cpan.pm ++++ b/lib/App/Cpan.pm +@@ -1033,7 +1033,7 @@ sub _load_local_lib # -I + + my $rc = _safe_load_module("local::lib"); + unless( $rc ) { +- $logger->die( "Could not load local::lib" ); ++ $logger->logdie( "Could not load local::lib" ); + } + + local::lib->import; +@@ -1045,7 +1045,7 @@ sub _use_these_mirrors # -M + { + $logger->debug( "Setting per session mirrors" ); + unless( $_[0] ) { +- $logger->die( "The -M switch requires a comma-separated list of mirrors" ); ++ $logger->logdie( "The -M switch requires a comma-separated list of mirrors" ); + } + + $CPAN::Config->{urllist} = [ split /,/, $_[0] ]; +-- +2.7.4 + diff --git a/perl-CPAN.spec b/perl-CPAN.spec index 2af394b..ca5598d 100644 --- a/perl-CPAN.spec +++ b/perl-CPAN.spec @@ -23,6 +23,9 @@ Patch4: CPAN-2.14-Fix-CVE-2016-1238-completely.patch # Fix-CVE-2016-1238-completely.patch, CPAN RT#116507, proposed in # Patch5: CPAN-2.14-For-cpan-j-make-the-file-an-absolute-path.patch +# Fix logging fatal errors, fixed after 2.14, +# +Patch6: CPAN-2.14-logger-die-does-not-exist.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: findutils @@ -199,6 +202,7 @@ external download clients to fetch distributions from the net. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # Change configuration name find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \; # Remove bundled modules @@ -228,6 +232,7 @@ make test * Mon Jan 09 2017 Petr Pisar - 2.11-367 - Fix CVE-2016-1238 (loading optional modules from current working directory) - Do not search cpan -j file in @INC (CPAN RT#116507) +- Fix logging fatal errors (https://github.com/andk/cpanpm/pull/104) * Wed May 18 2016 Jitka Plesnikova - 2.11-366 - Perl 5.24 re-rebuild of bootstrapped packages