import UBI perl-CPAN-2.18-401.el8_10

This commit is contained in:
eabdullin 2025-03-11 08:34:31 +00:00
parent afb865f794
commit bdfe8214ea
4 changed files with 51 additions and 3 deletions

View File

@ -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<cpan> is used for the first
+time, CPAN::Config initialization is triggered using L<CPAN::FirstTime>.
+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

View File

@ -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" } .

View File

@ -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;

View File

@ -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 <jplesnik@redhat.com> - 2.18-401
- Resolves: RHEL-77186 - Update man page
* Tue Feb 18 2025 Jitka Plesnikova <jplesnik@redhat.com> - 2.18-400
- Resolves: RHEL-77186
- Fix permission for creating site directories
* Mon Feb 05 2024 Jitka Plesnikova <jplesnik@redhat.com> - 2.18-399
- Fix tests to run in correct order