commit 3b09c9dcb47d5c4b04291e0c1e88b94967616f82 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:12:55 2019 -0400 Package init diff --git a/Mozilla-CA-20180117-Redirect-to-ca-certificates-bundle.patch b/Mozilla-CA-20180117-Redirect-to-ca-certificates-bundle.patch new file mode 100644 index 0000000..4526784 --- /dev/null +++ b/Mozilla-CA-20180117-Redirect-to-ca-certificates-bundle.patch @@ -0,0 +1,73 @@ +From 96ff151cf584ccfcc31e37a83ba30a793b5922e9 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 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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. + +Signed-off-by: Petr Písař +--- + 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 9faf720..a491813 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 c2f35b5..46a1912 100644 +--- a/lib/Mozilla/CA.pm ++++ b/lib/Mozilla/CA.pm +@@ -3,16 +3,10 @@ package Mozilla::CA; + use strict; + our $VERSION = '20180117'; + +-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; +-- +2.13.6 + diff --git a/Mozilla-CA-20180117.tar.gz b/Mozilla-CA-20180117.tar.gz new file mode 100644 index 0000000..a3f0768 Binary files /dev/null and b/Mozilla-CA-20180117.tar.gz differ diff --git a/perl-Mozilla-CA.spec b/perl-Mozilla-CA.spec new file mode 100644 index 0000000..ede3228 --- /dev/null +++ b/perl-Mozilla-CA.spec @@ -0,0 +1,59 @@ +Name: perl-Mozilla-CA +Epoch: 1 +Version: 20180117 +Release: 3 +Summary: Mozilla's CA cert bundle in PEM format +License: MPLv2.0 +URL: https://metacpan.org/release/Mozilla-CA +Source0: https://cpan.metacpan.org/authors/id/A/AB/ABH/Mozilla-CA-%{version}.tar.gz +# See for more +Patch6000: Mozilla-CA-20180117-Redirect-to-ca-certificates-bundle.patch +BuildArch: noarch +BuildRequires: make coreutils perl perl-generators perl-PathTools perl-ExtUtils-MakeMaker +Requires: perl perl-PathTools ca-certificates + +%description +Mozilla::CA provides a copy of Mozilla's bundle of Certificate +Authority certificates in a form that can be consumed by modules +and libraries based on OpenSSL. + +%package help +Summary: Man page for Mozilla::CA +BuildArch: noarch + +%description help +This package provide %{summary}. + +%prep +%autosetup -n Mozilla-CA-%{version} -p1 +rm -vf lib/Mozilla/CA/cacert.pem mk-ca-bundle.pl +sed -i '/^mk-ca-bundle.pl$/d' MANIFEST + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 +%make_build + +%install +%make_install + +%check +make test + +%files +%defattr(-,root,root) +%doc Changes README +%{perl_vendorlib}/* + +%files help +%{_mandir}/man3/* + + +%changelog +* Tue Sep 24 2019 openEuler Buildteam - 1:20180117-3 +- Adjust requires + +* Fri Sep 20 2019 openEuler Buildteam - 1:20180117-2 +- Delete redundant information + +* Fri Aug 30 2019 openEuler Buildteam - 1:20180117-1 +- Package init