|
|
|
|
@ -9,16 +9,18 @@
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: perl-CPAN
|
|
|
|
|
Version: 2.27
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Version: 2.36
|
|
|
|
|
Release: 514%{?dist}
|
|
|
|
|
Summary: Query, download and build perl modules from CPAN sites
|
|
|
|
|
License: GPL+ or Artistic
|
|
|
|
|
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
|
|
|
|
URL: https://metacpan.org/release/CPAN
|
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/A/AN/ANDK/CPAN-%{version}.tar.gz
|
|
|
|
|
# Create site paths for the first time, bug #1158873, CPAN RT#99905
|
|
|
|
|
Patch0: CPAN-2.18-Attemp-to-create-site-library-directories-on-first-t.patch
|
|
|
|
|
# Change configuration directory name
|
|
|
|
|
Patch1: CPAN-2.18-Replace-configuration-directory-string-with-a-marke.patch
|
|
|
|
|
# Update man page to provide notes about first run
|
|
|
|
|
Patch2: CPAN-2.36-Add-notes-about-first-configuration.patch
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: coreutils
|
|
|
|
|
BuildRequires: findutils
|
|
|
|
|
@ -32,7 +34,6 @@ BuildRequires: perl(File::Path)
|
|
|
|
|
# Module::Signature not used
|
|
|
|
|
BuildRequires: perl(strict)
|
|
|
|
|
BuildRequires: perl(vars)
|
|
|
|
|
BuildRequires: sed
|
|
|
|
|
# Optional:
|
|
|
|
|
BuildRequires: perl(File::Spec)
|
|
|
|
|
# YAML::Syck is not used because @ST_PREFS is empty in Makefile.PL
|
|
|
|
|
@ -70,6 +71,7 @@ BuildRequires: perl(Getopt::Std)
|
|
|
|
|
# HTTP::Request is optional
|
|
|
|
|
BuildRequires: perl(HTTP::Tiny) >= 0.005
|
|
|
|
|
BuildRequires: perl(if)
|
|
|
|
|
# IO::Socket::SSL 1.56 is optional
|
|
|
|
|
# YAML::XS or YAML::Syck or JSON::PP, we already use YAML::Syck at a different
|
|
|
|
|
# place, keep JSON::PP optional
|
|
|
|
|
BuildRequires: perl(lib)
|
|
|
|
|
@ -82,6 +84,7 @@ BuildRequires: perl(lib)
|
|
|
|
|
# Net::Config not used at tests
|
|
|
|
|
# Net::FTP not used at tests
|
|
|
|
|
# Net::Ping is required but >= 2.13 version is a soft dependency
|
|
|
|
|
# Net::SSLeay 1.49 is optional
|
|
|
|
|
BuildRequires: perl(Net::Ping)
|
|
|
|
|
BuildRequires: perl(overload)
|
|
|
|
|
# Pod::Perldoc is optional
|
|
|
|
|
@ -114,6 +117,7 @@ BuildRequires: perl(Module::Build)
|
|
|
|
|
# Tests:
|
|
|
|
|
BuildRequires: perl(blib)
|
|
|
|
|
# CPAN::Checksums not used
|
|
|
|
|
BuildRequires: perl(File::Which)
|
|
|
|
|
BuildRequires: perl(FindBin)
|
|
|
|
|
BuildRequires: perl(Pod::Usage)
|
|
|
|
|
BuildRequires: perl(Test::More)
|
|
|
|
|
@ -153,7 +157,14 @@ BuildRequires: perl(YAML) >= 0.60
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Requires: make
|
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
|
|
# Some subpackages modules are not dual-lived. E.g. "open". If a distribution
|
|
|
|
|
# on CPAN declares a dependency on such a module, CPAN client will fail
|
|
|
|
|
# because the only provider is perl distribution.
|
|
|
|
|
# Another issue is with dual-lived modules whose distribution actually does
|
|
|
|
|
# not declare all needed core dependencies and the installation would also
|
|
|
|
|
# fail.
|
|
|
|
|
# As a result, any CPAN client must run-require the complete perl.
|
|
|
|
|
Requires: perl
|
|
|
|
|
Requires: perl(Archive::Tar) >= 1.50
|
|
|
|
|
%if !%{defined perl_bootstrap}
|
|
|
|
|
Recommends: perl(CPAN::DistnameInfo)
|
|
|
|
|
@ -197,6 +208,10 @@ Requires: perl(Digest::MD5)
|
|
|
|
|
Requires: perl(Digest::SHA)
|
|
|
|
|
Requires: perl(Dumpvalue)
|
|
|
|
|
Requires: perl(ExtUtils::CBuilder)
|
|
|
|
|
# Optional for signature verification CVE-2020-16156
|
|
|
|
|
%if ! %{defined perl_bootstrap}
|
|
|
|
|
Requires: perl(Module::Signature)
|
|
|
|
|
%endif
|
|
|
|
|
%if ! %{defined perl_bootstrap}
|
|
|
|
|
# Avoid circular deps local::lib -> Module::Install -> CPAN when bootstraping
|
|
|
|
|
# local::lib recommended by CPAN::FirstTime default choice, bug #1122498
|
|
|
|
|
@ -221,7 +236,10 @@ Provides: cpan = %{version}
|
|
|
|
|
%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\\)
|
|
|
|
|
|
|
|
|
|
# Filter modules bundled for tests
|
|
|
|
|
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(CPAN::MyConfig\\)
|
|
|
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(local_utils\\)
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
The CPAN module automates or at least simplifies the make and install of
|
|
|
|
|
@ -229,15 +247,31 @@ 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.
|
|
|
|
|
|
|
|
|
|
%package tests
|
|
|
|
|
Summary: Tests for %{name}
|
|
|
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
Requires: perl-Test-Harness
|
|
|
|
|
|
|
|
|
|
%description tests
|
|
|
|
|
Tests from %{name}. Execute them
|
|
|
|
|
with "%{_libexecdir}/%{name}/test".
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n CPAN-%{version}
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch -P0 -p1
|
|
|
|
|
%patch -P1 -p1
|
|
|
|
|
%patch -P2 -p1
|
|
|
|
|
# Change configuration name
|
|
|
|
|
find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \;
|
|
|
|
|
find -type f -exec perl -i -pe 's/XCPANCONFIGNAMEX/cpan/g' {} \;
|
|
|
|
|
# Remove bundled modules
|
|
|
|
|
rm -r ./inc/*
|
|
|
|
|
sed -i -e '/inc\//d' MANIFEST
|
|
|
|
|
perl -i -ne 'print $_ unless m{^inc/}' MANIFEST
|
|
|
|
|
|
|
|
|
|
# Help generators to recognize Perl scripts
|
|
|
|
|
for F in t/*.t; do
|
|
|
|
|
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
|
|
|
|
|
chmod +x "$F"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
|
|
|
@ -247,6 +281,38 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
|
|
|
%{make_install}
|
|
|
|
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
|
|
|
|
|
|
|
|
|
# Install tests
|
|
|
|
|
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
|
|
|
|
cp -a t distroprefs %{buildroot}%{_libexecdir}/%{name}
|
|
|
|
|
# Does not work with system module
|
|
|
|
|
rm %{buildroot}%{_libexecdir}/%{name}/t/51pod.t
|
|
|
|
|
# Remove the tests which need ./lib and ./blib
|
|
|
|
|
rm %{buildroot}%{_libexecdir}/%{name}/t/03pkgs.t
|
|
|
|
|
rm %{buildroot}%{_libexecdir}/%{name}/t/04clean_load.t
|
|
|
|
|
# Needed internet connection
|
|
|
|
|
rm %{buildroot}%{_libexecdir}/%{name}/t/31sessions.t
|
|
|
|
|
# Use system modules for tests
|
|
|
|
|
perl -i -ple 's{-Mblib}{}' %{buildroot}%{_libexecdir}/%{name}/t/97-run.t
|
|
|
|
|
perl -i -ple 's{-Mblib}{}' %{buildroot}%{_libexecdir}/%{name}/t/97-return_values.t
|
|
|
|
|
mkdir -p %{buildroot}%{_libexecdir}/%{name}/blib/script
|
|
|
|
|
ln -s %{_bindir}/cpan %{buildroot}%{_libexecdir}/%{name}/blib/script
|
|
|
|
|
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
set -e
|
|
|
|
|
unset AUTHOR_TEST CPAN_EXPECT_TIMEOUT CPAN_RUN_SHELL_TEST_WITHOUT_EXPECT \
|
|
|
|
|
ftp_proxy http_proxy no_proxy \
|
|
|
|
|
PERL5_CPAN_IS_RUNNING PERL5_CPAN_IS_RUNNING_IN_RECURSION PERL_CORE VERBOSE
|
|
|
|
|
# Some tests write into temporary files/directories. The easiest solution
|
|
|
|
|
# is to copy the tests into a writable directory and execute them from there.
|
|
|
|
|
DIR=$(mktemp -d)
|
|
|
|
|
pushd "$DIR"
|
|
|
|
|
cp -a %{_libexecdir}/%{name}/* ./
|
|
|
|
|
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
|
|
|
|
popd
|
|
|
|
|
rm -rf "$DIR"
|
|
|
|
|
EOF
|
|
|
|
|
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
unset AUTHOR_TEST CPAN_EXPECT_TIMEOUT CPAN_RUN_SHELL_TEST_WITHOUT_EXPECT \
|
|
|
|
|
ftp_proxy http_proxy no_proxy \
|
|
|
|
|
@ -255,12 +321,118 @@ make test
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc Changes PAUSE*.pub README Todo
|
|
|
|
|
%{_bindir}/*
|
|
|
|
|
%{perl_vendorlib}/*
|
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
|
%{_bindir}/cpan*
|
|
|
|
|
%{perl_vendorlib}/App*
|
|
|
|
|
%{perl_vendorlib}/CPAN*
|
|
|
|
|
%{_mandir}/man1/cpan*
|
|
|
|
|
%{_mandir}/man3/App*
|
|
|
|
|
%{_mandir}/man3/CPAN*
|
|
|
|
|
|
|
|
|
|
%files tests
|
|
|
|
|
%{_libexecdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Mar 03 2025 Jitka Plesnikova <jplesnik@redhat.com> - 2.36-514
|
|
|
|
|
- Resolves: RHEL-79491 - Update man page
|
|
|
|
|
|
|
|
|
|
* Tue Feb 18 2025 Jitka Plesnikova <jplesnik@redhat.com> - 2.36-513
|
|
|
|
|
- Resolves: RHEL-79491
|
|
|
|
|
- Fix permission for creating site directories
|
|
|
|
|
|
|
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.36-512
|
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
|
Resolves: RHEL-64018
|
|
|
|
|
|
|
|
|
|
* Fri Aug 09 2024 Jitka Plesnikova <jplesnik@redhat.com> - 2.36-511
|
|
|
|
|
- Perl 5.40 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Thu Jul 18 2024 Jitka Plesnikova <jplesnik@redhat.com> - 2.36-510
|
|
|
|
|
- Increase release to favour standalone package
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.36-504
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.36-503
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.36-502
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.36-501
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jul 12 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.36-500
|
|
|
|
|
- Perl 5.38 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.36-499
|
|
|
|
|
- Increase release to favour standalone package
|
|
|
|
|
|
|
|
|
|
* Mon May 15 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.36-1
|
|
|
|
|
- 2.36 bump
|
|
|
|
|
|
|
|
|
|
* Tue May 02 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.35-1
|
|
|
|
|
- 2.35 bump
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.34-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.34-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 03 2022 Jitka Plesnikova <jplesnik@redhat.com> - 2.34-3
|
|
|
|
|
- Perl 5.36 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 2.34-2
|
|
|
|
|
- Perl 5.36 rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Apr 20 2022 Jitka Plesnikova <jplesnik@redhat.com> - 2.34-1
|
|
|
|
|
- 2.34 bump
|
|
|
|
|
|
|
|
|
|
* Mon Apr 04 2022 Jitka Plesnikova <jplesnik@redhat.com> - 2.33-1
|
|
|
|
|
- 2.33 bump
|
|
|
|
|
|
|
|
|
|
* Wed Feb 09 2022 Jitka Plesnikova <jplesnik@redhat.com> - 2.29-3
|
|
|
|
|
- Package tests
|
|
|
|
|
|
|
|
|
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.29-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Dec 16 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.29-1
|
|
|
|
|
- 2.29 bump
|
|
|
|
|
|
|
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.28-479
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon May 24 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.28-478
|
|
|
|
|
- Perl 5.34 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.28-477
|
|
|
|
|
- Increase release to favour standalone package
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.28-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Sep 23 2020 Petr Pisar <ppisar@redhat.com> - 2.28-5
|
|
|
|
|
- Run-require complete perl
|
|
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.28-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.28-3
|
|
|
|
|
- Perl 5.32 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.28-2
|
|
|
|
|
- Perl 5.32 rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 15 2020 Petr Pisar <ppisar@redhat.com> - 2.28-1
|
|
|
|
|
- 2.28 bump
|
|
|
|
|
|
|
|
|
|
* Fri Jan 31 2020 Petr Pisar <ppisar@redhat.com> - 2.27-4
|
|
|
|
|
- Enable loading objects from session YAML files (CPAN RT#131615)
|
|
|
|
|
|
|
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.27-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.27-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|