Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
a6e6e96ca2
!18 define mod_name to optimize the specfile
From: @wangyuhang27 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2022-10-31 02:47:26 +00:00
wangyuhang27
1b5febd7a6 define mod_name to opitomize the specfile 2022-10-28 17:22:13 +08:00
openeuler-ci-bot
a03e0817d0 !9 Upgrade to version 20211001
Merge pull request !9 from shangyibin/openEuler-22.03-LTS-Next
2021-12-23 10:33:04 +00:00
shangyibin
d8c69a1d8c Upgrade to version 20211001 2021-12-21 14:24:59 +08:00
openeuler-ci-bot
25cd8df0b0 !6 update to 20200520
Merge pull request !6 from 桐小哥/master
2020-07-29 21:11:10 +08:00
sxt1001
087491d160 update to 20200520 2020-07-29 17:34:26 +08:00
openeuler-ci-bot
1da0048288 !4 add yaml file to package
Merge pull request !4 from zhanzhimin/master
2020-06-15 14:12:24 +08:00
zzm_567
404a1c8b75 add yaml file 2020-06-13 14:35:20 +08:00
openeuler-ci-bot
1082fc3d7d !3 perl-Mozilla-CA
Merge pull request !3 from syyhao/dev
2020-02-15 15:27:21 +08:00
openeuler-basic
a26f51969d add patch for check failures 2020-02-11 16:12:00 +08:00
5 changed files with 102 additions and 7 deletions

Binary file not shown.

View File

@ -0,0 +1,73 @@
From 96ff151cf584ccfcc31e37a83ba30a793b5922e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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 <https://bugzilla.redhat.com/show_bug.cgi?id=738383> for more
details.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
MANIFEST | 1 -
Makefile.PL | 8 ++++++++
lib/Mozilla/CA.pm | 8 +-------
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/MANIFEST b/MANIFEST
index 852e312..f10c380 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 1fbe8c3..44290e1 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -53,3 +53,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 dbbc626..4657379 100644
--- a/lib/Mozilla/CA.pm
+++ b/lib/Mozilla/CA.pm
@@ -3,16 +3,10 @@ package Mozilla::CA;
use strict;
our $VERSION = '20211001';
-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.27.0

BIN
Mozilla-CA-20211001.tar.gz Normal file

Binary file not shown.

View File

@ -1,12 +1,18 @@
Name: perl-Mozilla-CA
%define mod_name Mozilla-CA
Name: perl-%{mod_name}
Epoch: 1
Version: 20180117
Release: 5
Version: 20211001
Release: 2
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
URL: https://metacpan.org/release/%{mod_name}
Source0: https://cpan.metacpan.org/authors/id/A/AB/ABH/%{mod_name}-%{version}.tar.gz
BuildArch: noarch
# For check failure
Patch0: Mozilla-CA-20211001-Redirect-to-ca-certificates-bundle.patch
BuildRequires: make coreutils perl perl-generators perl-PathTools perl-ExtUtils-MakeMaker
Requires: perl perl-PathTools ca-certificates
@ -23,7 +29,7 @@ BuildArch: noarch
This package provide %{summary}.
%prep
%autosetup -n Mozilla-CA-%{version} -p1
%autosetup -n %{mod_name}-%{version} -p1
rm -vf lib/Mozilla/CA/cacert.pem mk-ca-bundle.pl
sed -i '/^mk-ca-bundle.pl$/d' MANIFEST
@ -35,7 +41,7 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1
%make_install
%check
#make test
make test
%files
%defattr(-,root,root)
@ -46,6 +52,18 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1
%{_mandir}/man3/*
%changelog
* Wed Oct 26 2022 wangyuhang <wangyuhang27@huawei.com> - 1:20211001-2
- define mod_name to opitomize the specfile
* Tue Dec 21 2021 shangyibin <shangyibin1@huawei.com> - 1:20211001-1
- update to 20211001-1
* Wed Jul 29 2020 shixuantong <shixuantong@huawei.com> - 1:20200520-1
- update to 20200520-1
* Tue Feb 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 1:20180117-6
- add patch for test failure
* Wed Jan 22 2020 openEuler Buildteam <buildteam@openeuler.org> - 1:20180117-5
- cancel make check

4
perl-Mozilla-CA.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: metacpan
src_repo: Mozilla-CA
tag_prefix: ^v
seperator: "."