diff --git a/CPAN-2.14-Prevent-trying-Net-FTP-when-an-ftp_proxy-variable-is.patch b/CPAN-2.14-Prevent-trying-Net-FTP-when-an-ftp_proxy-variable-is.patch new file mode 100644 index 0000000..96267cc --- /dev/null +++ b/CPAN-2.14-Prevent-trying-Net-FTP-when-an-ftp_proxy-variable-is.patch @@ -0,0 +1,40 @@ +From e8fd8b3f0fbd20e82ae04035178ce84fcf7cd0f1 Mon Sep 17 00:00:00 2001 +From: Andreas Koenig +Date: Sat, 9 Jul 2016 03:04:25 +0200 +Subject: [PATCH] Prevent trying Net::FTP when an ftp_proxy variable is set to + an http proxy +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- reported in https://rt.cpan.org/Ticket/Display.html?id=110833 + +Signed-off-by: Petr Písař +--- + lib/CPAN.pm | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/lib/CPAN.pm b/lib/CPAN.pm +index ab2d00f..6e460a8 100644 +--- a/lib/CPAN.pm ++++ b/lib/CPAN.pm +@@ -1064,6 +1064,16 @@ sub has_usable { + }, + ], + 'Net::FTP' => [ ++ sub { ++ my $var = $CPAN::Config->{ftp_proxy} || $ENV{ftp_proxy}; ++ if ($var and $var =~ /^http:/) { ++ # rt #110833 ++ for ("Net::FTP cannot handle http proxy") { ++ $CPAN::Frontend->mywarn($_); ++ die $_; ++ } ++ } ++ }, + sub {require Net::FTP}, + sub {require Net::Config}, + ], +-- +2.7.4 + diff --git a/perl-CPAN.spec b/perl-CPAN.spec index ef68069..8fcfe00 100644 --- a/perl-CPAN.spec +++ b/perl-CPAN.spec @@ -14,6 +14,9 @@ Patch1: CPAN-2.14-Replace-configuration-directory-string-with-a-marke.pa Patch2: CPAN-2.14-Emergency-fix-for-bug-https-rt.cpan.org-Ticket-Displ.patch # Fix "cpan -O" invocation, CPAN RT#115786, fixed after 2.14 Patch3: CPAN-2.14-Emergency-fix-for-cpan-o.patch +# Do not use Net::FTP if ftp_proxy variable points to an HTTP server, +# CPAN RT#110833, fixed after 2.14 +Patch4: CPAN-2.14-Prevent-trying-Net-FTP-when-an-ftp_proxy-variable-is.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: findutils @@ -193,6 +196,7 @@ external download clients to fetch distributions from the net. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # Change configuration name find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \; # Remove bundled modules @@ -223,6 +227,8 @@ make test - 2.14 bump - Fix installation from a working directory (CPAN RT#115734) - Fix "cpan -O" invocation (CPAN RT#115786) +- Do not use Net::FTP if ftp_proxy variable points to an HTTP server + (CPAN RT#110833) * Wed May 18 2016 Jitka Plesnikova - 2.11-366 - Perl 5.24 re-rebuild of bootstrapped packages