37da45
# Don not run gnupg1 tests by default, they need network access
37da45
# (Socket::inet_aton('pool.sks-keyservers.net')).
37da45
%bcond_with perl_CPAN_enables_gnupg_test
37da45
# Run optional test
37da45
%if ! (0%{?rhel})
37da45
%bcond_without perl_CPAN_enables_optional_test
37da45
%else
37da45
%bcond_with perl_CPAN_enables_optional_test
37da45
%endif
37da45
37da45
Name:           perl-CPAN
37da45
Version:        2.28
37da45
Release:        5%{?dist}
37da45
Summary:        Query, download and build perl modules from CPAN sites
37da45
License:        GPL+ or Artistic
37da45
URL:            https://metacpan.org/release/CPAN
37da45
Source0:        https://cpan.metacpan.org/authors/id/A/AN/ANDK/CPAN-%{version}.tar.gz
37da45
# Create site paths for the first time, bug #1158873, CPAN RT#99905
37da45
Patch0:         CPAN-2.18-Attemp-to-create-site-library-directories-on-first-t.patch
37da45
# Change configuration directory name
37da45
Patch1:         CPAN-2.18-Replace-configuration-directory-string-with-a-marke.patch
37da45
BuildArch:      noarch
37da45
BuildRequires:  coreutils
37da45
BuildRequires:  findutils
37da45
BuildRequires:  make
37da45
BuildRequires:  perl-generators
37da45
BuildRequires:  perl-interpreter
37da45
BuildRequires:  perl(Config)
37da45
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
37da45
BuildRequires:  perl(File::Basename)
37da45
BuildRequires:  perl(File::Path)
37da45
# Module::Signature not used
37da45
BuildRequires:  perl(strict)
37da45
BuildRequires:  perl(vars)
37da45
# Optional:
37da45
BuildRequires:  perl(File::Spec)
37da45
# YAML::Syck is not used because @ST_PREFS is empty in Makefile.PL
37da45
37da45
# Run-time:
37da45
# Prefer Archive::Tar and Compress::Zlib over tar and gzip
37da45
BuildRequires:  perl(Archive::Tar) >= 1.50
37da45
%if !%{defined perl_bootstrap}
37da45
# Prefer Archive::Zip over unzip
37da45
BuildRequires:  perl(Archive::Zip)
37da45
%endif
37da45
BuildRequires:  perl(autouse)
37da45
BuildRequires:  perl(base)
37da45
BuildRequires:  perl(Carp)
37da45
BuildRequires:  perl(constant)
37da45
BuildRequires:  perl(Compress::Zlib)
37da45
BuildRequires:  perl(CPAN::Meta::Requirements) >= 2.121
37da45
BuildRequires:  perl(Cwd)
37da45
BuildRequires:  perl(Data::Dumper)
37da45
# Devel::Size not used at tests
37da45
BuildRequires:  perl(DirHandle)
37da45
BuildRequires:  perl(Dumpvalue)
37da45
BuildRequires:  perl(Errno)
37da45
BuildRequires:  perl(Exporter)
37da45
# ExtUtils::Manifest not used at tests
37da45
BuildRequires:  perl(Fcntl)
37da45
BuildRequires:  perl(File::Copy)
37da45
BuildRequires:  perl(File::Find)
37da45
# File::HomeDir 0.65 not used at tests
37da45
BuildRequires:  perl(File::Spec::Functions)
37da45
BuildRequires:  perl(File::Temp) >= 0.16
37da45
BuildRequires:  perl(FileHandle)
37da45
BuildRequires:  perl(Getopt::Std)
37da45
# HTTP::Date is optional, prefer in-core Time::Local
37da45
# HTTP::Request is optional
37da45
BuildRequires:  perl(HTTP::Tiny) >= 0.005
37da45
BuildRequires:  perl(if)
37da45
# YAML::XS or YAML::Syck or JSON::PP, we already use YAML::Syck at a different
37da45
# place, keep JSON::PP optional
37da45
BuildRequires:  perl(lib)
37da45
# local::lib is optional
37da45
# LWP is optional, prefer HTTP::Tiny and Net::FTP
37da45
# LWP::UserAgent is optional
37da45
# Mac::BuildTools not needed
37da45
# Mac::Files not needed
37da45
# Module::Signature is optional
37da45
# Net::Config not used at tests
37da45
# Net::FTP not used at tests
37da45
# Net::Ping is required but >= 2.13 version is a soft dependency
37da45
BuildRequires:  perl(Net::Ping)
37da45
BuildRequires:  perl(overload)
37da45
# Pod::Perldoc is optional
37da45
BuildRequires:  perl(POSIX)
37da45
BuildRequires:  perl(Safe)
37da45
BuildRequires:  perl(Sys::Hostname)
37da45
BuildRequires:  perl(Term::ReadLine)
37da45
BuildRequires:  perl(Text::ParseWords)
37da45
BuildRequires:  perl(Text::Wrap)
37da45
# Time::Local not used at tests
37da45
# URI not used at tests
37da45
# URI::Escape not used at tests
37da45
# URI::URL 0.08 is optional 
37da45
# User::pwent not used at tests
37da45
BuildRequires:  perl(warnings)
37da45
# Optional:
37da45
#%%if !%%{defined perl_bootstrap}
37da45
# CPAN::DistnameInfo not used at tests
37da45
#%%endif
37da45
BuildRequires:  perl(CPAN::Meta) >= 2.110350
37da45
# Crypt::OpenPGP not used at tests
37da45
# Digest::MD5 not used at tests
37da45
BuildRequires:  perl(Digest::SHA)
37da45
# Keep Log::Log4perl optional
37da45
# Keep MIME::Base64 optional
37da45
%if !%{defined perl_bootstrap}
37da45
BuildRequires:  perl(Module::Build)
37da45
%endif
37da45
37da45
# Tests:
37da45
BuildRequires:  perl(blib)
37da45
# CPAN::Checksums not used
37da45
BuildRequires:  perl(FindBin)
37da45
BuildRequires:  perl(Pod::Usage)
37da45
BuildRequires:  perl(Test::More)
37da45
BuildRequires:  perl(version)
37da45
37da45
%if %{with perl_CPAN_enables_optional_test}
37da45
# Optional tests:
37da45
%if %{with perl_CPAN_enables_gnupg_test}
37da45
BuildRequires:  %{_bindir}/gpg
37da45
# CPAN::Perl::Releases is helpfull only on RC or TRIAL Perl interpreters
37da45
# Digest::SHA1 not needed if Digest::SHA is available
37da45
# Digest::SHA::PurePerl not needed if Digest::SHA is available
37da45
%endif
37da45
%if !%{defined perl_bootstrap}
37da45
BuildRequires:  perl(Expect)
37da45
%endif
37da45
BuildRequires:  perl(Hash::Util)
37da45
%if !%{defined perl_bootstrap}
37da45
# Kwalify not yet packaged
37da45
%if %{with perl_CPAN_enables_gnupg_test}
37da45
BuildRequires:  perl(Module::Signature) >= 0.66
37da45
%endif
37da45
BuildRequires:  perl(Perl::Version)
37da45
%endif
37da45
BuildRequires:  perl(Pod::Perldoc::ToMan)
37da45
%if %{with perl_CPAN_enables_gnupg_test}
37da45
BuildRequires:  perl(Socket)
37da45
%endif
37da45
%if !%{defined perl_bootstrap}
37da45
BuildRequires:  perl(Sort::Versions)
37da45
# Test::MinimumVersion not used
37da45
# Test::Perl::Critic not used
37da45
BuildRequires:  perl(Test::Pod) >= 1.00
37da45
BuildRequires:  perl(Test::Pod::Coverage) >= 0.18
37da45
BuildRequires:  perl(YAML) >= 0.60
37da45
%endif
37da45
%endif
37da45
37da45
Requires:       make
37da45
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
37da45
# Some subpackages modules are not dual-lived. E.g. "open". If a distribution
37da45
# on CPAN declares a dependency on such a module, CPAN client will fail
37da45
# because the only provider is perl distribution.
37da45
# Another issue is with dual-lived modules whose distribution actually does
37da45
# not declare all needed core dependencies and the installation would also
37da45
# fail.
37da45
# As a result, any CPAN client must run-require the complete perl.
37da45
Requires:       perl
37da45
Requires:       perl(Archive::Tar) >= 1.50
37da45
%if !%{defined perl_bootstrap}
37da45
Recommends:     perl(CPAN::DistnameInfo)
37da45
%endif
37da45
Requires:       perl(CPAN::Meta::Requirements) >= 2.121
37da45
Requires:       perl(Data::Dumper)
37da45
%if !%{defined perl_bootstrap}
37da45
Requires:       perl(Devel::Size)
37da45
%endif
37da45
Requires:       perl(ExtUtils::Manifest)
37da45
%if !%{defined perl_bootstrap}
37da45
Requires:       perl(File::HomeDir) >= 0.65
37da45
%endif
37da45
Requires:       perl(File::Temp) >= 0.16
37da45
# YAML::XS or YAML::Syck or JSON::PP, we already use YAML::Syck at a different
37da45
# place, keep JSON::PP optional
37da45
Requires:       perl(lib)
37da45
%if !%{defined perl_bootstrap}
37da45
Suggests:       perl(Log::Log4perl)
37da45
%endif
37da45
Requires:       perl(Net::Config)
37da45
Requires:       perl(Net::FTP)
37da45
Requires:       perl(POSIX)
37da45
Requires:       perl(Term::ReadLine)
37da45
Requires:       perl(Time::Local)
37da45
%if !%{defined perl_bootstrap}
37da45
Requires:       perl(URI)
37da45
Requires:       perl(URI::Escape)
37da45
%endif
37da45
Requires:       perl(User::pwent)
37da45
# Optional but highly recommended:
37da45
%if !%{defined perl_bootstrap}
37da45
# Prefer Archive::Zip over unzip
37da45
Requires:       perl(Archive::Zip)
37da45
Requires:       perl(Compress::Bzip2)
37da45
Requires:       perl(CPAN::Meta) >= 2.110350
37da45
%endif
37da45
Requires:       perl(Compress::Zlib)
37da45
Requires:       perl(Digest::MD5)
37da45
# CPAN encourages Digest::SHA strongly because of integrity checks
37da45
Requires:       perl(Digest::SHA)
37da45
Requires:       perl(Dumpvalue)
37da45
Requires:       perl(ExtUtils::CBuilder)
37da45
%if ! %{defined perl_bootstrap}
37da45
# Avoid circular deps local::lib -> Module::Install -> CPAN when bootstraping
37da45
# local::lib recommended by CPAN::FirstTime default choice, bug #1122498
37da45
Requires:       perl(local::lib)
37da45
%endif
37da45
%if ! %{defined perl_bootstrap}
37da45
Requires:       perl(Module::Build)
37da45
%endif
37da45
Recommends:     perl(Pod::Perldoc)
37da45
%if ! %{defined perl_bootstrap}
37da45
Recommends:     perl(Term::ReadKey)
37da45
Requires:       perl(Text::Glob)
37da45
# Text::Levenshtein::XS or Text::Levenshtein::Damerau::XS or Text::Levenshtein
37da45
# or Text::Levenshtein::Damerau::PP
37da45
Suggests:       perl(Text::Levenshtein::Damerau::XS)
37da45
# YAML::Syck or YAML or Data::Dumper or overload
37da45
Suggests:       perl(YAML::Syck)
37da45
%endif
37da45
Provides:       cpan = %{version}
37da45
37da45
# Filter non-Linux dependencies
37da45
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Mac::BuildTools\\)
37da45
# Filter under-specified dependencies
37da45
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(CPAN::Meta::Requirements\\)
37da45
37da45
37da45
%description
37da45
The CPAN module automates or at least simplifies the make and install of
37da45
perl modules and extensions. It includes some primitive searching
37da45
capabilities and knows how to use LWP, HTTP::Tiny, Net::FTP and certain
37da45
external download clients to fetch distributions from the net.
37da45
37da45
%prep
37da45
%setup -q -n CPAN-%{version}
37da45
%patch0 -p1
37da45
%patch1 -p1
37da45
# Change configuration name
37da45
find -type f -exec perl -i -pe 's/XCPANCONFIGNAMEX/cpan/g' {} \;
37da45
# Remove bundled modules
37da45
rm -r ./inc/*
37da45
perl -i -ne 'print $_ unless m{^inc/}' MANIFEST
37da45
37da45
%build
37da45
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
37da45
%{make_build}
37da45
37da45
%install
37da45
%{make_install}
37da45
%{_fixperms} $RPM_BUILD_ROOT/*
37da45
37da45
%check
37da45
unset AUTHOR_TEST CPAN_EXPECT_TIMEOUT CPAN_RUN_SHELL_TEST_WITHOUT_EXPECT \
37da45
    ftp_proxy http_proxy no_proxy \
37da45
    PERL5_CPAN_IS_RUNNING PERL5_CPAN_IS_RUNNING_IN_RECURSION PERL_CORE VERBOSE
37da45
make test
37da45
37da45
%files
37da45
%doc Changes PAUSE*.pub README Todo
37da45
%{_bindir}/*
37da45
%{perl_vendorlib}/*
37da45
%{_mandir}/man1/*
37da45
%{_mandir}/man3/*
37da45
37da45
%changelog
37da45
* Wed Sep 23 2020 Petr Pisar <ppisar@redhat.com> - 2.28-5
37da45
- Run-require complete perl
37da45
37da45
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.28-4
37da45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
37da45
37da45
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.28-3
37da45
- Perl 5.32 re-rebuild of bootstrapped packages
37da45
37da45
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.28-2
37da45
- Perl 5.32 rebuild
37da45
37da45
* Mon Jun 15 2020 Petr Pisar <ppisar@redhat.com> - 2.28-1
37da45
- 2.28 bump
37da45
37da45
* Fri Jan 31 2020 Petr Pisar <ppisar@redhat.com> - 2.27-4
37da45
- Enable loading objects from session YAML files (CPAN RT#131615)
37da45
37da45
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.27-3
37da45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
37da45
37da45
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.27-2
37da45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
37da45
37da45
* Thu Jul 04 2019 Petr Pisar <ppisar@redhat.com> - 2.27-1
37da45
- 2.27 bump
37da45
37da45
* Sun Jun 02 2019 Jitka Plesnikova <jplesnik@redhat.com> - 2.26-3
37da45
- Perl 5.30 re-rebuild of bootstrapped packages
37da45
37da45
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 2.26-2
37da45
- Perl 5.30 rebuild
37da45
37da45
* Tue Mar 19 2019 Petr Pisar <ppisar@redhat.com> - 2.26-1
37da45
- 2.26 bump
37da45
37da45
* Mon Mar 04 2019 Petr Pisar <ppisar@redhat.com> - 2.25-1
37da45
- 2.25 bump
37da45
37da45
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.22-2
37da45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
37da45
37da45
* Wed Jan 02 2019 Petr Pisar <ppisar@redhat.com> - 2.22-1
37da45
- 2.22 bump
37da45
37da45
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.20-418
37da45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
37da45
37da45
* Sun Jul 01 2018 Jitka Plesnikova <jplesnik@redhat.com> - 2.20-417
37da45
- Perl 5.28 re-rebuild of bootstrapped packages
37da45
37da45
* Tue Jun 26 2018 Jitka Plesnikova <jplesnik@redhat.com> - 2.20-416
37da45
- Increase release to favour standalone package
37da45
37da45
* Wed May 23 2018 Jitka Plesnikova <jplesnik@redhat.com> - 2.20-1
37da45
- Upgrade to 2.20 as provided in perl-5.28.0
37da45
37da45
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.18-397
37da45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
37da45
37da45
* Tue Dec 19 2017 Petr Pisar <ppisar@redhat.com> - 2.18-396
37da45
- Rebase patches to prevent from installing back-up files
37da45
37da45
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.18-395
37da45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
37da45
37da45
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 2.18-394
37da45
- Perl 5.26 re-rebuild of bootstrapped packages
37da45
37da45
* Sat Jun 03 2017 Jitka Plesnikova <jplesnik@redhat.com> - 2.18-393
37da45
- Perl 5.26 rebuild
37da45
37da45
* Fri May 12 2017 Jitka Plesnikova <jplesnik@redhat.com> - 2.18-2
37da45
- Don't BR: perl(Module::Build) when bootstrapping
37da45
37da45
* Wed May 10 2017 Petr Pisar <ppisar@redhat.com> - 2.18-1
37da45
- Upgrade to CPAN-2.18 as provided in perl-5.25.12
37da45
37da45
* Wed Feb 15 2017 Petr Pisar <ppisar@redhat.com> - 2.16-1
37da45
- 2.16 bump
37da45
37da45
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-5
37da45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
37da45
37da45
* Mon Jan 09 2017 Petr Pisar <ppisar@redhat.com> - 2.14-4
37da45
- Use Perl porter's fix for searching cpan -j file (CPAN RT#116507)
37da45
- Fix logging fatal errors (https://github.com/andk/cpanpm/pull/104)
37da45
37da45
* Tue Oct 18 2016 Petr Pisar <ppisar@redhat.com> - 2.14-3
37da45
- Apply remains of CVE-2016-1238 fix from perl (CPAN RT#116507)
37da45
- Do not search cpan -j file in @INC (CPAN RT#116507)
37da45
37da45
* Wed Oct 12 2016 Petr Pisar <ppisar@redhat.com> - 2.14-2
37da45
- Fix CVE-2016-1238 properly (CPAN RT#116507)
37da45
37da45
* Mon Jun 27 2016 Petr Pisar <ppisar@redhat.com> - 2.14-1
37da45
- 2.14 bump
37da45
- Fix installation from a working directory (CPAN RT#115734)
37da45
- Fix "cpan -O" invocation (CPAN RT#115786)
37da45
- Do not use Net::FTP if ftp_proxy variable points to an HTTP server
37da45
  (CPAN RT#110833)
37da45
- Recognize URL schemata disregarding the case
37da45
- Fix CVE-2016-1238 (loading optional modules from current working directory)
37da45
- Recognize exact version dependency operator (CPAN RT#47934)
37da45
- Cope with non-digit version strings
37da45
37da45
* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 2.11-366
37da45
- Perl 5.24 re-rebuild of bootstrapped packages
37da45
37da45
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 2.11-365
37da45
- Increase release to favour standalone package
37da45
37da45
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.11-349
37da45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
37da45
37da45
* Tue Dec 15 2015 Petr Pisar <ppisar@redhat.com> - 2.11-348
37da45
- Require make package
37da45
37da45
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.11-347
37da45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
37da45
37da45
* Wed Jun 10 2015 Jitka Plesnikova <jplesnik@redhat.com> - 2.11-346
37da45
- Perl 5.22 re-rebuild of bootstrapped packages
37da45
37da45
* Thu Jun 04 2015 Jitka Plesnikova <jplesnik@redhat.com> - 2.11-345
37da45
- Increase release to favour standalone package
37da45
37da45
* Thu Jun 04 2015 Jitka Plesnikova <jplesnik@redhat.com> - 2.11-2
37da45
- Perl 5.22 rebuild
37da45
37da45
* Wed May 06 2015 Petr Pisar <ppisar@redhat.com> - 2.11-1
37da45
- 2.11 bump in order to dual-live with perl 5.22
37da45
37da45
* Fri Mar 13 2015 Petr Pisar <ppisar@redhat.com> - 2.10-1
37da45
- 2.10 bump
37da45
37da45
* Wed Jan 28 2015 Petr Pisar <ppisar@redhat.com> - 2.05-309
37da45
- Allow changing the configuration directory name
37da45
37da45
* Thu Oct 30 2014 Petr Pisar <ppisar@redhat.com> - 2.05-308
37da45
- Create site paths for the first time (bug #1158873)
37da45
37da45
* Wed Sep 10 2014 Petr Pisar <ppisar@redhat.com> 2.05-307
37da45
- Synchronize to perl.spec modifications
37da45
- Disable non-core modules when bootstrapping
37da45
37da45
* Tue Apr 22 2014 Petr Pisar <ppisar@redhat.com> 2.05-1
37da45
- Specfile autogenerated by cpanspec 1.78.