diff --git a/SOURCES/CPAN-2.18-Add-notes-about-first-configuration.patch b/SOURCES/CPAN-2.18-Add-notes-about-first-configuration.patch new file mode 100644 index 0000000..e8ce1e2 --- /dev/null +++ b/SOURCES/CPAN-2.18-Add-notes-about-first-configuration.patch @@ -0,0 +1,22 @@ +Add notes about the first configuration and about creating site repository +which is specific for Fedora/RHEL. + +diff -up CPAN-2.16/scripts/cpan.orig CPAN-2.16/scripts/cpan +--- CPAN-2.16/scripts/cpan.orig 2025-02-28 10:03:24.046432731 +0100 ++++ CPAN-2.16/scripts/cpan 2025-02-28 10:51:34.442369826 +0100 +@@ -297,6 +297,15 @@ not control. For now, the exit codes are + + 8 A module failed to install + ++=head1 NOTES ++ ++If the configuration is not defined when C is used for the first ++time, CPAN::Config initialization is triggered using L. ++This step is skipped only when using the C<-h> option. ++ ++If the user has write permissions to /usr/local, site library repositories ++may also be created. ++ + =head1 TO DO + + * one shot configuration values from the command line 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 index cdf099d..7c15598 100644 --- 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 @@ -33,7 +33,7 @@ index 531c115..8d82795 100644 + $CPAN::Frontend->mywarn(sprintf( + qq{Perl site library directory "%s" does not exist.\n}, + $_)); -+ File::Path::make_path($_, { error => \my $failure }); ++ File::Path::make_path($_, { error => \my $failure, chmod => 0755 }); + if (@$failure) { + $CPAN::Frontend->mywarn(sprintf( + qq{Perl site library directory "%s" } . diff --git a/SOURCES/CPAN-2.25-Fix-option-h-really-ignores-all-other-options-and-arguments.patch b/SOURCES/CPAN-2.25-Fix-option-h-really-ignores-all-other-options-and-arguments.patch new file mode 100644 index 0000000..ec8b757 --- /dev/null +++ b/SOURCES/CPAN-2.25-Fix-option-h-really-ignores-all-other-options-and-arguments.patch @@ -0,0 +1,12 @@ +diff -up CPAN-2.16/lib/App/Cpan.pm.orig CPAN-2.16/lib/App/Cpan.pm +--- CPAN-2.16/lib/App/Cpan.pm.orig 2025-02-03 13:29:33.472958227 +0100 ++++ CPAN-2.16/lib/App/Cpan.pm 2025-02-03 13:31:58.261873354 +0100 +@@ -429,7 +429,7 @@ sub _process_setup_options + $Method_table{j}[ $Method_table_index{code} ]->( $options->{j} ); + delete $options->{j}; + } +- else ++ elsif ( ! $options->{h} ) # h "ignores all of the other options and arguments" + { + # this is what CPAN.pm would do otherwise + local $CPAN::Be_Silent = 1; diff --git a/SPECS/perl-CPAN.spec b/SPECS/perl-CPAN.spec index 3b7d0f0..a85adaa 100644 --- a/SPECS/perl-CPAN.spec +++ b/SPECS/perl-CPAN.spec @@ -12,7 +12,7 @@ Name: perl-CPAN Version: 2.18 -Release: 399%{?dist} +Release: 401%{?dist} Summary: Query, download and build perl modules from CPAN sites License: GPL+ or Artistic URL: http://search.cpan.org/dist/CPAN/ @@ -29,6 +29,11 @@ Patch2: CPAN-2.18-Replace-configuration-directory-string-with-a-marke.pa Patch3: CPAN-2.18-For-cpan-j-make-the-file-an-absolute-path.patch # CVE-2023-31484 - Add verify_SSL => 1 Patch4: CPAN-2.35-Add-verify-SSL.patch +# Fix the option h now really ignores all other options and arguments +# in upstream since 2.25 +Patch5: CPAN-2.25-Fix-option-h-really-ignores-all-other-options-and-arguments.patch +# Update man page to provide notes about first run +Patch6: CPAN-2.18-Add-notes-about-first-configuration.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: findutils @@ -44,7 +49,7 @@ BuildRequires: perl(vars) BuildRequires: sed # Optional: BuildRequires: perl(File::Spec) -# YAML::Syck is not not used because @ST_PREFS is empty in Makefile.PL +# YAML::Syck is not used because @ST_PREFS is empty in Makefile.PL # Run-time: # Prefer Archive::Tar and Compress::Zlib over tar and gzip @@ -243,6 +248,8 @@ with "%{_libexecdir}/%{name}/test". %patch -P2 -p1 %patch -P3 -p1 %patch -P4 -p1 +%patch -P5 -p1 +%patch -P6 -p1 # Change configuration name find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \; # Remove bundled modules @@ -313,6 +320,13 @@ make test %{_libexecdir}/%{name} %changelog +* Fri Feb 28 2025 Jitka Plesnikova - 2.18-401 +- Resolves: RHEL-77186 - Update man page + +* Tue Feb 18 2025 Jitka Plesnikova - 2.18-400 +- Resolves: RHEL-77186 +- Fix permission for creating site directories + * Mon Feb 05 2024 Jitka Plesnikova - 2.18-399 - Fix tests to run in correct order