commit 0c06d11be56fbc3de83f8cd45bfd0bffb7df7de8 Author: Petr Písař <ppisar@xxxxxxxxxx> Date: Thu Oct 30 15:31:16 2014 +0100 Create site paths by cpan for the first time ...reate-site-library-directories-on-first-t.patch | 51 ++++++++++++++++++++ perl.spec | 10 ++++- 2 files changed, 60 insertions(+), 1 deletions(-) --- diff --git a/perl-5.18.4-CPAN-Attemp-to-create-site-library-directories-on-first-t.patch b/perl-5.18.4-CPAN-Attemp-to-create-site-library-directories-on-first-t.patch new file mode 100644 index 0000000..5856777 --- /dev/null +++ b/perl-5.18.4-CPAN-Attemp-to-create-site-library-directories-on-first-t.patch @@ -0,0 +1,51 @@ +From 1f6def664f288efbab2b3027ce56d5bbf795fdc6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx> +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ř <ppisar@xxxxxxxxxx> + +diff --git a/cpan/CPAN/lib/CPAN/FirstTime.pm b/cpan/CPAN/lib/CPAN/FirstTime.pm +index b099b04..3475368 100644 +--- a/cpan/CPAN/lib/CPAN/FirstTime.pm ++++ b/cpan/CPAN/lib/CPAN/FirstTime.pm +@@ -2010,6 +2010,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} +-- +1.9.3 + diff --git a/perl.spec b/perl.spec index ba09a53..630b198 100644 --- a/perl.spec +++ b/perl.spec @@ -31,7 +31,7 @@ Name: perl Version: %{perl_version} # release number must be even higher, because dual-lived modules will be broken otherwise -Release: 290%{?dist} +Release: 291%{?dist} Epoch: %{perl_epoch} Summary: Practical Extraction and Report Language Group: Development/Languages @@ -114,6 +114,9 @@ Patch20: perl-5.19.3-Reap-child-in-case-where-exception-has-been-thrown.p # Update the upstream patch to work for Perl 5.18.1 Patch21: perl-5.19.2-Fix-using-regexes-with-multiple-code-blocks.patch +# Create site paths by cpan for the first time, bug #1132321, CPAN RT#99905 +Patch22: perl-5.18.4-CPAN-Attemp-to-create-site-library-directories-on-first-t.patch + # Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048 Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -1905,6 +1908,7 @@ tarball from perl.org. %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 %patch200 -p1 %patch201 -p1 @@ -1930,6 +1934,7 @@ perl -x patchlevel.h \ 'Fedora Patch19: Fix coreamp.t rand test (RT#118237)' \ 'Fedora Patch20: Reap child in case where exception has been thrown (RT#114722)' \ 'Fedora Patch21: Fix using regular expressions containing multiple code blocks (RT#117917)' \ + 'Fedora Patch22: Create site paths by cpan for the first time (CPAN RT#99905)' \ 'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \ 'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \ %{nil} @@ -3616,6 +3621,9 @@ sed \ # Old changelog entries are preserved in CVS. %changelog +* Thu Oct 30 2014 Petr Pisar <ppisar@xxxxxxxxxx> - 4:5.18.4-291 +- Create site paths by cpan for the first time (bug #1132321) + * Fri Oct 03 2014 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 4:5.18.4-290 - 5.18.4 bump (see <http://search.cpan.org/dist/perl-5.18.4/pod/perldelta.pod> for release notes) -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel