diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2d5795 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Mozilla-CA-20130114.tar.gz diff --git a/.perl-Mozilla-CA.metadata b/.perl-Mozilla-CA.metadata new file mode 100644 index 0000000..641102f --- /dev/null +++ b/.perl-Mozilla-CA.metadata @@ -0,0 +1 @@ +6ea49b4e29655f629212caa3f9d5a4d3a9733e0b SOURCES/Mozilla-CA-20130114.tar.gz diff --git a/SOURCES/Mozilla-CA-20130114-Redirect-to-ca-certificates-bundle.patch b/SOURCES/Mozilla-CA-20130114-Redirect-to-ca-certificates-bundle.patch new file mode 100644 index 0000000..45d622c --- /dev/null +++ b/SOURCES/Mozilla-CA-20130114-Redirect-to-ca-certificates-bundle.patch @@ -0,0 +1,68 @@ +From 02db836ecf68b7554c7e3f496dbfa9ef1b432d76 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 16 Sep 2011 10:33:54 +0200 +Subject: [PATCH] Redirect to ca-certificates bundle + +This patch replaces Mozilla-CA certificate bundle with bundle +delivered by ca-certificates RPM package used as single source of +Mozilla certificate bundle. + +See for more +details. +--- + MANIFEST | 1 - + Makefile.PL | 8 ++++++++ + lib/Mozilla/CA.pm | 8 +------- + 3 files changed, 9 insertions(+), 8 deletions(-) + +diff --git a/MANIFEST b/MANIFEST +index a88847b..6577ede 100644 +--- a/MANIFEST ++++ b/MANIFEST +@@ -1,5 +1,4 @@ + lib/Mozilla/CA.pm +-lib/Mozilla/CA/cacert.pem + Makefile.PL + MANIFEST This list of files + README +diff --git a/Makefile.PL b/Makefile.PL +index 2b10474..57f2f07 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -40,3 +40,11 @@ BEGIN { + ExtUtils::MakeMaker::WriteMakefile(%arg); + }; + } ++ ++package MY; ++sub MY::libscan { ++ my $name = shift->SUPER::libscan(@_); ++ # Remove private certificate bundle ++ if ($name =~ /cacert.pem\z/) { $name = '' }; ++ return $name; ++} +diff --git a/lib/Mozilla/CA.pm b/lib/Mozilla/CA.pm +index 95fc86d..71e4f91 100644 +--- a/lib/Mozilla/CA.pm ++++ b/lib/Mozilla/CA.pm +@@ -3,16 +3,10 @@ package Mozilla::CA; + use strict; + our $VERSION = '20130114'; + +-use Cwd (); + use File::Spec (); +-use File::Basename qw(dirname); + + sub SSL_ca_file { +- my $file = File::Spec->catfile(dirname(__FILE__), "CA", "cacert.pem"); +- if (!File::Spec->file_name_is_absolute($file)) { +- $file = File::Spec->catfile(Cwd::cwd(), $file); +- } +- return $file; ++ return File::Spec->catfile('/etc/pki/tls/certs/ca-bundle.crt'); + } + + 1; +-- +1.7.11.4 + diff --git a/SPECS/perl-Mozilla-CA.spec b/SPECS/perl-Mozilla-CA.spec new file mode 100644 index 0000000..61afc49 --- /dev/null +++ b/SPECS/perl-Mozilla-CA.spec @@ -0,0 +1,114 @@ +Name: perl-Mozilla-CA +# You do not need to back-port new version for list of certificates solely. +# They are taken from ca-certificates package instead per bug #738383. +Version: 20130114 +Release: 5%{?dist} +Summary: Mozilla's CA cert bundle in PEM format +License: MPLv1.1 or LGPLv2+ or GPLv2+ +Group: Development/Libraries +URL: http://search.cpan.org/dist/Mozilla-CA/ +Source0: http://www.cpan.org/authors/id/A/AB/ABH/Mozilla-CA-%{version}.tar.gz +# Bug #738383 +Patch0: Mozilla-CA-20130114-Redirect-to-ca-certificates-bundle.patch +BuildArch: noarch +BuildRequires: perl +BuildRequires: perl(ExtUtils::MakeMaker) +# Run-time: +BuildRequires: ca-certificates +BuildRequires: perl(strict) +BuildRequires: perl(File::Spec) +# Tests: +BuildRequires: perl(Test) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: ca-certificates + +%description +Mozilla::CA provides a path to ca-certificates copy of Mozilla's bundle of +certificate authority certificates in a form that can be consumed by modules +and libraries based on OpenSSL. + +%prep +%setup -q -n Mozilla-CA-%{version} +%patch0 -p1 +# Do not distribute Mozilla downloader, we take certificates from +# ca-certificates package +rm mk-ca-bundle.pl +sed -i '/^mk-ca-bundle.pl$/d' MANIFEST + +%build +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%doc Changes README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Thu Jan 16 2014 Petr Pisar - 20130114-5 +- Specify all dependencies + +* Sat Aug 03 2013 Fedora Release Engineering - 20130114-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 17 2013 Petr Pisar - 20130114-3 +- Perl 5.18 rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 20130114-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Jan 15 2013 Petr Pisar - 20130114-1 +- 20130114 bump + +* Thu Aug 23 2012 Petr Pisar - 20120823-1 +- 20120823 bump + +* Wed Aug 22 2012 Petr Pisar - 20120822-1 +- 20120822 bump + +* Fri Jul 20 2012 Fedora Release Engineering - 20120309-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jun 08 2012 Petr Pisar - 20120309-2 +- Perl 5.16 rebuild + +* Wed Mar 14 2012 Petr Pisar - 20120309-1 +- 20120309 bump + +* Wed Jan 18 2012 Petr Pisar - 20120118-1 +- 20120118 bump + +* Fri Jan 13 2012 Fedora Release Engineering - 20111025-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Oct 25 2011 Petr Pisar - 20111025-1 +- 20111025 bump +- Remove defattr from spec code + +* Fri Sep 16 2011 Petr Pisar - 20110914-2 +- Redirect to ca-certificates bundle (bug #738383) + +* Thu Sep 15 2011 Petr Pisar - 20110914-1 +- 20110914 bump + +* Mon Sep 05 2011 Petr Pisar - 20110904-1 +- 20110904 bump + +* Fri Jun 17 2011 Marcela Mašláňová - 20110409-2 +- Perl mass rebuild + +* Mon Apr 11 2011 Petr Pisar - 20110409-1 +- 20110409 bump + +* Mon Mar 28 2011 Petr Pisar 20110301-1 +- Specfile autogenerated by cpanspec 1.78. +- Correct License tag +- Remove BuildRoot stuff