From 6d4f136acea0d730882bc08124b32778ab3fcfa0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 07 2019 11:57:04 +0000 Subject: import perl-CPAN-2.18-397.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..18ccbc1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/CPAN-2.16.tar.gz diff --git a/.perl-CPAN.metadata b/.perl-CPAN.metadata new file mode 100644 index 0000000..ba193d5 --- /dev/null +++ b/.perl-CPAN.metadata @@ -0,0 +1 @@ +353f0d6590743bcd113fd39050f6182c96449e43 SOURCES/CPAN-2.16.tar.gz diff --git a/SOURCES/CPAN-2.16-Rebase-to-2.18-from-perl-5.25.12.patch b/SOURCES/CPAN-2.16-Rebase-to-2.18-from-perl-5.25.12.patch new file mode 100644 index 0000000..404a47a --- /dev/null +++ b/SOURCES/CPAN-2.16-Rebase-to-2.18-from-perl-5.25.12.patch @@ -0,0 +1,117 @@ +From 582ed99d657fb10750e31e942f88b6ddc0259e01 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 10 May 2017 16:44:06 +0200 +Subject: [PATCH] Rebase to 2.18 from perl-5.25.12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + lib/CPAN.pm | 2 +- + lib/CPAN/Bundle.pm | 7 ++++++- + lib/CPAN/Distribution.pm | 8 +++++++- + 3 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/lib/CPAN.pm b/lib/CPAN.pm +index 1fba5c1..4f02850 100644 +--- a/lib/CPAN.pm ++++ b/lib/CPAN.pm +@@ -2,7 +2,7 @@ + # vim: ts=4 sts=4 sw=4: + use strict; + package CPAN; +-$CPAN::VERSION = '2.16'; ++$CPAN::VERSION = '2.18'; + $CPAN::VERSION =~ s/_//; + + # we need to run chdir all over and we would get at wrong libraries +diff --git a/lib/CPAN/Bundle.pm b/lib/CPAN/Bundle.pm +index 3f17b54..3b4e93d 100644 +--- a/lib/CPAN/Bundle.pm ++++ b/lib/CPAN/Bundle.pm +@@ -8,7 +8,7 @@ use CPAN::Module; + use vars qw( + $VERSION + ); +-$VERSION = "5.5002"; ++$VERSION = "5.5003"; + + sub look { + my $self = shift; +@@ -21,6 +21,11 @@ sub undelay { + delete $self->{later}; + for my $c ( $self->contains ) { + my $obj = CPAN::Shell->expandany($c) or next; ++ if ($obj->id eq $self->id){ ++ my $id = $obj->id; ++ $CPAN::Frontend->mywarn("$id seems to contain itself, skipping\n"); ++ next; ++ } + $obj->undelay; + } + } +diff --git a/lib/CPAN/Distribution.pm b/lib/CPAN/Distribution.pm +index b5744fd..64976eb 100644 +--- a/lib/CPAN/Distribution.pm ++++ b/lib/CPAN/Distribution.pm +@@ -8,7 +8,7 @@ use CPAN::InfoObj; + use File::Path (); + @CPAN::Distribution::ISA = qw(CPAN::InfoObj); + use vars qw($VERSION); +-$VERSION = "2.16"; ++$VERSION = "2.18"; + + # no prepare, because prepare is not a command on the shell command line + # TODO: clear instance cache on reload +@@ -377,6 +377,7 @@ sub get { + ? $ENV{PERL5LIB} + : ($ENV{PERLLIB} || ""); + local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : ""; ++ # local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # get + $CPAN::META->set_perl5lib; + local $ENV{MAKEFLAGS}; # protect us from outer make calls + +@@ -1302,6 +1303,7 @@ Could not determine which directory to use for looking at $dist. + : ($ENV{PERLLIB} || ""); + + local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : ""; ++ # local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # look + $CPAN::META->set_perl5lib; + local $ENV{MAKEFLAGS}; # protect us from outer make calls + +@@ -1821,6 +1823,7 @@ sub prepare { + ? $ENV{PERL5LIB} + : ($ENV{PERLLIB} || ""); + local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : ""; ++ local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # prepare + $CPAN::META->set_perl5lib; + local $ENV{MAKEFLAGS}; # protect us from outer make calls + +@@ -2115,6 +2118,7 @@ is part of the perl-%s distribution. To install that, you need to run + ? $ENV{PERL5LIB} + : ($ENV{PERLLIB} || ""); + local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : ""; ++ local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # make + $CPAN::META->set_perl5lib; + local $ENV{MAKEFLAGS}; # protect us from outer make calls + +@@ -3482,6 +3486,7 @@ sub test { + : ($ENV{PERLLIB} || ""); + + local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : ""; ++ local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # test + $CPAN::META->set_perl5lib; + local $ENV{MAKEFLAGS}; # protect us from outer make calls + local $ENV{PERL_MM_USE_DEFAULT} = 1 if $CPAN::Config->{use_prompt_default}; +@@ -3955,6 +3960,7 @@ sub install { + : ($ENV{PERLLIB} || ""); + + local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : ""; ++ local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # install + $CPAN::META->set_perl5lib; + local $ENV{PERL_MM_USE_DEFAULT} = 1 if $CPAN::Config->{use_prompt_default}; + local $ENV{NONINTERACTIVE_TESTING} = 1 if $CPAN::Config->{use_prompt_default}; +-- +2.9.3 + diff --git a/SOURCES/CPAN-2.18-Attemp-to-create-site-library-directories-on-first-t.patch b/SOURCES/CPAN-2.18-Attemp-to-create-site-library-directories-on-first-t.patch new file mode 100644 index 0000000..cdf099d --- /dev/null +++ b/SOURCES/CPAN-2.18-Attemp-to-create-site-library-directories-on-first-t.patch @@ -0,0 +1,54 @@ +From 5f0215694664fe0dc78ef59a7c8ca0af83896187 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 30 Oct 2014 13:19:16 +0100 +Subject: [PATCH] Attemp to create site library directories on first time +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some vendors configures site library directories into /usr/local, but +they do not provide the directory on their systems because an +administrator can have a read-only network-mounted file system there. + +When running CPAN for the first time, CPAN cannot find the site +directories and falls back to local::lib. To restore the user +expectations with writable /usr/local, this patch tries to create the +missing directories before checking for their presents. + +Signed-off-by: Petr Písař +--- + lib/CPAN/FirstTime.pm | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/lib/CPAN/FirstTime.pm b/lib/CPAN/FirstTime.pm +index 531c115..8d82795 100644 +--- a/lib/CPAN/FirstTime.pm ++++ b/lib/CPAN/FirstTime.pm +@@ -2068,6 +2068,24 @@ sub _print_urllist { + } + + sub _can_write_to_libdirs { ++ for ($Config{installsitelib}, $Config{installsitearch}) { ++ if (!-d $_) { ++ $CPAN::Frontend->mywarn(sprintf( ++ qq{Perl site library directory "%s" does not exist.\n}, ++ $_)); ++ File::Path::make_path($_, { error => \my $failure }); ++ if (@$failure) { ++ $CPAN::Frontend->mywarn(sprintf( ++ qq{Perl site library directory "%s" } . ++ qq{could not been created: %s.\n}, ++ $_, ${$$failure[0]}{$_})); ++ } else { ++ $CPAN::Frontend->mywarn(sprintf( ++ qq{Perl site library directory "%s" created.\n}, ++ $_)); ++ } ++ } ++ } + return -w $Config{installprivlib} + && -w $Config{installarchlib} + && -w $Config{installsitelib} +-- +2.13.6 + diff --git a/SOURCES/CPAN-2.18-For-cpan-j-make-the-file-an-absolute-path.patch b/SOURCES/CPAN-2.18-For-cpan-j-make-the-file-an-absolute-path.patch new file mode 100644 index 0000000..161e1a9 --- /dev/null +++ b/SOURCES/CPAN-2.18-For-cpan-j-make-the-file-an-absolute-path.patch @@ -0,0 +1,52 @@ +From be1fa8db08d1995779592880cfe156f4351a89d5 Mon Sep 17 00:00:00 2001 +From: brian d foy +Date: Tue, 18 Oct 2016 16:02:51 -0400 +Subject: [PATCH] For cpan -j, make the file an absolute path +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is an additional fix for rt.cpan.org #116507. +Since . will not be in @INC, we can't assume we are +loading from the current directory (although that's +a very likely situation for -j). Take whatever +argument we get and expand it to an absolute path. + +Signed-off-by: Petr Písař +--- + lib/App/Cpan.pm | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/lib/App/Cpan.pm b/lib/App/Cpan.pm +index 3ddcbe8..bc22cbc 100644 +--- a/lib/App/Cpan.pm ++++ b/lib/App/Cpan.pm +@@ -289,7 +289,7 @@ use CPAN 1.80 (); # needs no test + use Config; + use autouse Cwd => qw(cwd); + use autouse 'Data::Dumper' => qw(Dumper); +-use File::Spec::Functions; ++use File::Spec::Functions qw(catfile file_name_is_absolute rel2abs); + use File::Basename; + use Getopt::Std; + +@@ -1093,12 +1093,14 @@ sub _shell + + sub _load_config # -j + { +- my $file = shift || ''; ++ my $argument = shift; ++ ++ my $file = file_name_is_absolute( $argument ) ? $argument : rel2abs( $argument ); ++ croak( "cpan config file [$file] for -j does not exist!\n" ) unless -e $file; + + # should I clear out any existing config here? + $CPAN::Config = {}; + delete $INC{'CPAN/Config.pm'}; +- croak( "Config file [$file] does not exist!\n" ) unless -e $file; + + my $rc = eval "require '$file'"; + +-- +2.13.6 + diff --git a/SOURCES/CPAN-2.18-Replace-configuration-directory-string-with-a-marke.patch b/SOURCES/CPAN-2.18-Replace-configuration-directory-string-with-a-marke.patch new file mode 100644 index 0000000..b4fb089 --- /dev/null +++ b/SOURCES/CPAN-2.18-Replace-configuration-directory-string-with-a-marke.patch @@ -0,0 +1,164 @@ +From c6f460b4bb60352e40e25efe72acd3c2bd14f216 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 28 Jan 2015 13:21:10 +0100 +Subject: [PATCH] Replace configuration directory string with a marker +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This allows to redefine the configuration directory name at build +time. + +Signed-off-by: Petr Písař +--- + Makefile.PL | 10 +++++----- + README | 10 +++++----- + lib/CPAN.pm | 10 +++++----- + lib/CPAN/HandleConfig.pm | 2 +- + scripts/cpan-mirrors | 2 +- + 5 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index 2cd2f82..3b826cf 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -339,21 +339,21 @@ record-session : + $(PERL) -Ilib -MCPAN -e '$$CPAN::Suppress_readline=$$CPAN::Echo_readline=1;shell' | tee ttt.out + + run-with-sqlite : +- $(PERL) -I$$HOME/.cpan -Ilib -MCPAN::SQLite -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{use_sqlite}++; $$CPAN::Config->{sqlite_dbname}="cpandb-sqlite"; shell' ++ $(PERL) -I$$HOME/.XCPANCONFIGNAMEX -Ilib -MCPAN::SQLite -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{use_sqlite}++; $$CPAN::Config->{sqlite_dbname}="cpandb-sqlite"; shell' + + testrun_very_offline : rm_mirrored_by run_emu_offline + + testrun_emu_offline : +- $(PERL) -I$$HOME/.cpan -Ilib -MCPAN::MyConfig -MCPAN -e '@CPAN::Defaultsites = qw(file:///dev/null); $$CPAN::Config->{urllist} = []; shell' ++ $(PERL) -I$$HOME/.XCPANCONFIGNAMEX -Ilib -MCPAN::MyConfig -MCPAN -e '@CPAN::Defaultsites = qw(file:///dev/null); $$CPAN::Config->{urllist} = []; shell' + + rm_mirrored_by : +- rm -f $$HOME/.cpan/sources/MIRRORED.BY* ++ rm -f $$HOME/.XCPANCONFIGNAMEX/sources/MIRRORED.BY* + + testrun_http_only : +- $(PERL) -I$$HOME/.cpan -Ilib -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{urllist} = [qw(http://www.planet-elektronik.de/CPAN/)]; shell' ++ $(PERL) -I$$HOME/.XCPANCONFIGNAMEX -Ilib -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{urllist} = [qw(http://www.planet-elektronik.de/CPAN/)]; shell' + + urllist : +- $(PERL) -Ilib -MCPAN -MCPAN::FirstTime -e 'CPAN::FirstTime::init("$$ENV{HOME}/.cpan/CPAN/MyConfig", args => [qw(urllist)])' ++ $(PERL) -Ilib -MCPAN -MCPAN::FirstTime -e 'CPAN::FirstTime::init("$$ENV{HOME}/.XCPANCONFIGNAMEX/CPAN/MyConfig", args => [qw(urllist)])' + + runadmin : + $(PERL) -Ilib -MCPAN::Admin -eshell +diff --git a/README b/README +index aaf3101..2618d71 100644 +--- a/README ++++ b/README +@@ -269,7 +269,7 @@ DESCRIPTION + restarting the whole get/make/test/install procedure from scratch. + + Lockfile +- Interactive sessions maintain a lockfile, by default "~/.cpan/.lock". ++ Interactive sessions maintain a lockfile, by default "~/.XCPANCONFIGNAMEX/.lock". + Batch jobs can run without a lockfile and not disturb each other. + + The shell offers to run in *downgraded mode* when another process is +@@ -329,7 +329,7 @@ DESCRIPTION + "install_tested". + + mkmyconfig +- mkmyconfig() writes your own CPAN::MyConfig file into your "~/.cpan/" ++ mkmyconfig() writes your own CPAN::MyConfig file into your "~/.XCPANCONFIGNAMEX/" + directory so that you can save your own preferences instead of the + system-wide ones. + +@@ -530,7 +530,7 @@ CONFIGURATION + + Default values defined in the CPAN/Config.pm file can be overridden in a + user specific file: CPAN/MyConfig.pm. Such a file is best placed in +- "$HOME/.cpan/CPAN/MyConfig.pm", because "$HOME/.cpan" is added to the ++ "$HOME/.XCPANCONFIGNAMEX/CPAN/MyConfig.pm", because "$HOME/.XCPANCONFIGNAMEX" is added to the + search path of the CPAN module before the use() or require() statements. + The mkmyconfig command writes this file for you. + +@@ -1996,8 +1996,8 @@ FAQ + + You may want to configure something like + +- o conf make_arg "| tee -ai /root/.cpan/logs/make.out" +- o conf make_install_arg "| tee -ai /root/.cpan/logs/make_install.out" ++ o conf make_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make.out" ++ o conf make_install_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make_install.out" + + so that STDOUT is captured in a file for later inspection. + +diff --git a/lib/CPAN.pm b/lib/CPAN.pm +index 4f02850..2c117b4 100644 +--- a/lib/CPAN.pm ++++ b/lib/CPAN.pm +@@ -1736,7 +1736,7 @@ restarting the whole get/make/test/install procedure from scratch. + + =item Lockfile + +-Interactive sessions maintain a lockfile, by default C<~/.cpan/.lock>. ++Interactive sessions maintain a lockfile, by default C<~/.XCPANCONFIGNAMEX/.lock>. + Batch jobs can run without a lockfile and not disturb each other. + + The shell offers to run in I when another process is +@@ -1810,7 +1810,7 @@ C. + + =head2 mkmyconfig + +-mkmyconfig() writes your own CPAN::MyConfig file into your C<~/.cpan/> ++mkmyconfig() writes your own CPAN::MyConfig file into your C<~/.XCPANCONFIGNAMEX/> + directory so that you can save your own preferences instead of the + system-wide ones. + +@@ -2025,7 +2025,7 @@ in a file CPAN/Config.pm. + + Default values defined in the CPAN/Config.pm file can be + overridden in a user specific file: CPAN/MyConfig.pm. Such a file is +-best placed in C<$HOME/.cpan/CPAN/MyConfig.pm>, because C<$HOME/.cpan> is ++best placed in C<$HOME/.XCPANCONFIGNAMEX/CPAN/MyConfig.pm>, because C<$HOME/.XCPANCONFIGNAMEX> is + added to the search path of the CPAN module before the use() or + require() statements. The mkmyconfig command writes this file for you. + +@@ -3720,8 +3720,8 @@ there is too much output to keep track of. + + You may want to configure something like + +- o conf make_arg "| tee -ai /root/.cpan/logs/make.out" +- o conf make_install_arg "| tee -ai /root/.cpan/logs/make_install.out" ++ o conf make_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make.out" ++ o conf make_install_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make_install.out" + + so that STDOUT is captured in a file for later inspection. + +diff --git a/lib/CPAN/HandleConfig.pm b/lib/CPAN/HandleConfig.pm +index c72439f..a6b92e8 100644 +--- a/lib/CPAN/HandleConfig.pm ++++ b/lib/CPAN/HandleConfig.pm +@@ -538,7 +538,7 @@ sub cpan_home_dir_candidates { + push @dirs, $ENV{USERPROFILE} if $ENV{USERPROFILE}; + + $CPAN::Config->{load_module_verbosity} = $old_v; +- my $dotcpan = $^O eq 'VMS' ? '_cpan' : '.cpan'; ++ my $dotcpan = $^O eq 'VMS' ? '_XCPANCONFIGNAMEX' : '.XCPANCONFIGNAMEX'; + @dirs = map { File::Spec->catdir($_, $dotcpan) } grep { defined } @dirs; + return wantarray ? @dirs : $dirs[0]; + } +diff --git a/scripts/cpan-mirrors b/scripts/cpan-mirrors +index fe0e29c..493c140 100644 +--- a/scripts/cpan-mirrors ++++ b/scripts/cpan-mirrors +@@ -143,7 +143,7 @@ to your configuration. + + If you don't have a F file, this program will download one + for you. It looks through your existing C configuration and +-then default locations. It stores it in C<~/.cpan> (or your configured ++then default locations. It stores it in C<~/.XCPANCONFIGNAMEX> (or your configured + location to store files). + + =head1 TO DO +-- +2.13.6 + diff --git a/SPECS/perl-CPAN.spec b/SPECS/perl-CPAN.spec new file mode 100644 index 0000000..6a3d82d --- /dev/null +++ b/SPECS/perl-CPAN.spec @@ -0,0 +1,337 @@ +# Don not run gnupg1 tests by default, they need network access +# (Socket::inet_aton('pool.sks-keyservers.net')). +%bcond_with perl_CPAN_enables_gnupg_test +# Run optional test +%if ! (0%{?rhel}) +%bcond_without perl_CPAN_enables_optional_test +%else +%bcond_with perl_CPAN_enables_optional_test +%endif + +%global cpan_version 2.16 + +Name: perl-CPAN +Version: 2.18 +Release: 397%{?dist} +Summary: Query, download and build perl modules from CPAN sites +License: GPL+ or Artistic +URL: http://search.cpan.org/dist/CPAN/ +Source0: http://www.cpan.org/authors/id/A/AN/ANDK/CPAN-%{cpan_version}.tar.gz +# Upgrade to CPAN-2.18 as provided in perl-5.25.12 to properly dual-live after +# upgrading perl to 5.26 +Patch0: CPAN-2.16-Rebase-to-2.18-from-perl-5.25.12.patch +# Create site paths for the first time, bug #1158873, CPAN RT#99905 +Patch1: CPAN-2.18-Attemp-to-create-site-library-directories-on-first-t.patch +# Change configuration directory name +Patch2: CPAN-2.18-Replace-configuration-directory-string-with-a-marke.patch +# Do not search cpan -j file in @INC, CPAN RT#116507, proposed in +# +Patch3: CPAN-2.18-For-cpan-j-make-the-file-an-absolute-path.patch +BuildArch: noarch +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: make +BuildRequires: perl-interpreter +BuildRequires: perl-generators +BuildRequires: perl(Config) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Path) +BuildRequires: perl(strict) +BuildRequires: perl(vars) +BuildRequires: sed +# Optional: +BuildRequires: perl(File::Spec) +# YAML::Syck is not not used because @ST_PREFS is empty in Makefile.PL + +# Run-time: +# Prefer Archive::Tar and Compress::Zlib over tar and gzip +BuildRequires: perl(Archive::Tar) >= 1.50 +%if !%{defined perl_bootstrap} +# Prefer Archive::Zip over unzip +BuildRequires: perl(Archive::Zip) +%endif +BuildRequires: perl(autouse) +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Compress::Zlib) +BuildRequires: perl(CPAN::Meta::Requirements) >= 2.121 +BuildRequires: perl(Cwd) +BuildRequires: perl(Data::Dumper) +# Devel::Size not used at tests +BuildRequires: perl(DirHandle) +BuildRequires: perl(Dumpvalue) +BuildRequires: perl(Exporter) +# ExtUtils::Manifest not used at tests +BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find) +# File::HomeDir 0.65 not used at tests +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) >= 0.16 +BuildRequires: perl(FileHandle) +BuildRequires: perl(Getopt::Std) +# HTTP::Date is optional, prefer in-core Time::Local +# HTTP::Request is optional +BuildRequires: perl(HTTP::Tiny) >= 0.005 +BuildRequires: perl(if) +BuildRequires: perl(lib) +# local::lib is optional +# LWP is optional, prefer HTTP::Tiny and Net::FTP +# LWP::UserAgent is optional +# Mac::BuildTools not needed +# Mac::Files not needed +# Module::Signature is optional +# Net::Config not used at tests +# Net::FTP not used at tests +BuildRequires: perl(Net::Ping) +BuildRequires: perl(overload) +BuildRequires: perl(POSIX) +BuildRequires: perl(Safe) +BuildRequires: perl(Sys::Hostname) +BuildRequires: perl(Term::ReadLine) +BuildRequires: perl(Text::ParseWords) +BuildRequires: perl(Text::Wrap) +# Time::Local not used at tests +# URI not used at tests +# URI::Escape not used at tests +# URI::URL 0.08 is optional +# User::pwent not used at tests +BuildRequires: perl(warnings) +# Optional: +BuildRequires: perl(CPAN::Meta) >= 2.110350 +# Crypt::OpenPGP not used at tests +# Digest::MD5 not used at tests +BuildRequires: perl(Digest::SHA) +# Keep MIME::Base64 optional +%if !%{defined perl_bootstrap} +BuildRequires: perl(Module::Build) +%endif + +# Tests: +# CPAN::Checksums not used +BuildRequires: perl(FindBin) +BuildRequires: perl(Pod::Usage) +BuildRequires: perl(Test::More) + +%if %{with perl_CPAN_enables_optional_test} +# Optional tests: +%if %{with perl_CPAN_enables_gnupg_test} +BuildRequires: %{_bindir}/gpg +# Digest::SHA1 not needed if Digest::SHA is available +# Digest::SHA::PurePerl not needed if Digest::SHA is available +%endif +%if !%{defined perl_bootstrap} +BuildRequires: perl(Expect) +%endif +BuildRequires: perl(Hash::Util) +%if !%{defined perl_bootstrap} +# Kwalify not yet packaged +%if %{with perl_CPAN_enables_gnupg_test} +BuildRequires: perl(Module::Signature) >= 0.66 +%endif +BuildRequires: perl(Perl::Version) +%endif +%if %{with perl_CPAN_enables_gnupg_test} +BuildRequires: perl(Socket) +%endif +%if !%{defined perl_bootstrap} +BuildRequires: perl(Sort::Versions) +# Test::MinimumVersion not used +# Test::Perl::Critic not used +BuildRequires: perl(Test::Pod) >= 1.00 +BuildRequires: perl(Test::Pod::Coverage) >= 0.18 +BuildRequires: perl(YAML) >= 0.60 +%endif +%endif + +Requires: make +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Archive::Tar) >= 1.50 +Requires: perl(CPAN::Meta::Requirements) >= 2.121 +Requires: perl(Data::Dumper) +%if !%{defined perl_bootstrap} +Requires: perl(Devel::Size) +%endif +Requires: perl(ExtUtils::Manifest) +%if !%{defined perl_bootstrap} +Requires: perl(File::HomeDir) >= 0.65 +%endif +Requires: perl(File::Temp) >= 0.16 +Requires: perl(lib) +Requires: perl(Net::Config) +Requires: perl(Net::FTP) +Requires: perl(POSIX) +Requires: perl(Term::ReadLine) +Requires: perl(Time::Local) +%if !%{defined perl_bootstrap} +Requires: perl(URI) +Requires: perl(URI::Escape) +%endif +Requires: perl(User::pwent) +# Optional but highly recommended: +%if !%{defined perl_bootstrap} +# Prefer Archive::Zip over unzip +Requires: perl(Archive::Zip) +Requires: perl(Compress::Bzip2) +Requires: perl(CPAN::Meta) >= 2.110350 +%endif +Requires: perl(Compress::Zlib) +Requires: perl(Digest::MD5) +# CPAN encourages Digest::SHA strongly because of integrity checks +Requires: perl(Digest::SHA) +Requires: perl(Dumpvalue) +Requires: perl(ExtUtils::CBuilder) +%if ! %{defined perl_bootstrap} +# Avoid circular deps local::lib -> Module::Install -> CPAN when bootstraping +# local::lib recommended by CPAN::FirstTime default choice, bug #1122498 +Requires: perl(local::lib) +%endif +%if ! %{defined perl_bootstrap} +Requires: perl(Module::Build) +Recommends: perl(Term::ReadKey) +Requires: perl(Text::Glob) +# Text::Levenshtein::XS or Text::Levenshtein::Damerau::XS or Text::Levenshtein +# or Text::Levenshtein::Damerau::PP +Suggests: perl(Text::Levenshtein::Damerau::XS) +# YAML::Syck or YAML or Data::Dumper +Suggests: perl(YAML::Syck) +%endif +Provides: cpan = %{version} + +# Filter non-Linux dependencies +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Mac::BuildTools\\) +# Filter under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(CPAN::Meta::Requirements\\) + + +%description +The CPAN module automates or at least simplifies the make and install of +perl modules and extensions. It includes some primitive searching +capabilities and knows how to use LWP, HTTP::Tiny, Net::FTP and certain +external download clients to fetch distributions from the net. + +%prep +%setup -q -n CPAN-%{cpan_version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +# Change configuration name +find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \; +# Remove bundled modules +rm -r ./inc/* +sed -i -e '/inc\//d' MANIFEST + +%build +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -delete +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%doc Changes PAUSE*.pub README Todo +%{_bindir}/* +%{perl_vendorlib}/* +%{_mandir}/man1/* +%{_mandir}/man3/* + +%changelog +* Thu Feb 08 2018 Fedora Release Engineering - 2.18-397 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Dec 19 2017 Petr Pisar - 2.18-396 +- Rebase patches to prevent from installing back-up files + +* Thu Jul 27 2017 Fedora Release Engineering - 2.18-395 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jun 07 2017 Jitka Plesnikova - 2.18-394 +- Perl 5.26 re-rebuild of bootstrapped packages + +* Sat Jun 03 2017 Jitka Plesnikova - 2.18-393 +- Perl 5.26 rebuild + +* Fri May 12 2017 Jitka Plesnikova - 2.18-2 +- Don't BR: perl(Module::Build) when bootstrapping + +* Wed May 10 2017 Petr Pisar - 2.18-1 +- Upgrade to CPAN-2.18 as provided in perl-5.25.12 + +* Wed Feb 15 2017 Petr Pisar - 2.16-1 +- 2.16 bump + +* Sat Feb 11 2017 Fedora Release Engineering - 2.14-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Jan 09 2017 Petr Pisar - 2.14-4 +- Use Perl porter's fix for searching cpan -j file (CPAN RT#116507) +- Fix logging fatal errors (https://github.com/andk/cpanpm/pull/104) + +* Tue Oct 18 2016 Petr Pisar - 2.14-3 +- Apply remains of CVE-2016-1238 fix from perl (CPAN RT#116507) +- Do not search cpan -j file in @INC (CPAN RT#116507) + +* Wed Oct 12 2016 Petr Pisar - 2.14-2 +- Fix CVE-2016-1238 properly (CPAN RT#116507) + +* Mon Jun 27 2016 Petr Pisar - 2.14-1 +- 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) +- Recognize URL schemata disregarding the case +- Fix CVE-2016-1238 (loading optional modules from current working directory) +- Recognize exact version dependency operator (CPAN RT#47934) +- Cope with non-digit version strings + +* Wed May 18 2016 Jitka Plesnikova - 2.11-366 +- Perl 5.24 re-rebuild of bootstrapped packages + +* Sat May 14 2016 Jitka Plesnikova - 2.11-365 +- Increase release to favour standalone package + +* Thu Feb 04 2016 Fedora Release Engineering - 2.11-349 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Dec 15 2015 Petr Pisar - 2.11-348 +- Require make package + +* Thu Jun 18 2015 Fedora Release Engineering - 2.11-347 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Jun 10 2015 Jitka Plesnikova - 2.11-346 +- Perl 5.22 re-rebuild of bootstrapped packages + +* Thu Jun 04 2015 Jitka Plesnikova - 2.11-345 +- Increase release to favour standalone package + +* Thu Jun 04 2015 Jitka Plesnikova - 2.11-2 +- Perl 5.22 rebuild + +* Wed May 06 2015 Petr Pisar - 2.11-1 +- 2.11 bump in order to dual-live with perl 5.22 + +* Fri Mar 13 2015 Petr Pisar - 2.10-1 +- 2.10 bump + +* Wed Jan 28 2015 Petr Pisar - 2.05-309 +- Allow changing the configuration directory name + +* Thu Oct 30 2014 Petr Pisar - 2.05-308 +- Create site paths for the first time (bug #1158873) + +* Wed Sep 10 2014 Petr Pisar 2.05-307 +- Synchronize to perl.spec modifications +- Disable non-core modules when bootstrapping + +* Tue Apr 22 2014 Petr Pisar 2.05-1 +- Specfile autogenerated by cpanspec 1.78.