From ef3bb27cc26ca27ee82e62fdba534e947fe0d8f4 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sun, 28 Apr 2024 14:02:04 +0200 Subject: [PATCH] - updated to 20240313 --- perl-Mozilla-CA.spec | 6 +-- system-ca-certificates.patch | 99 ++++++++++++------------------------ 2 files changed, 36 insertions(+), 69 deletions(-) diff --git a/perl-Mozilla-CA.spec b/perl-Mozilla-CA.spec index 05e79b7..4ae7ce1 100644 --- a/perl-Mozilla-CA.spec +++ b/perl-Mozilla-CA.spec @@ -9,12 +9,12 @@ Summary(pl.UTF-8): Mozilla::CA - pakiet certyfikatów CA Mozilli w formacie PEM Name: perl-Mozilla-CA # although upsream has new releases, there is no benefit of that other than # feeling library is fresh, as we do not use certs provided by this module. -Version: 20200520 +Version: 20240313 Release: 1 License: MPL v2.0 Group: Development/Languages/Perl Source0: http://www.cpan.org/modules/by-module/Mozilla/%{pdir}-%{pnam}-%{version}.tar.gz -# Source0-md5: 8ac3fe1a83c45da3f468f78ab8133ea6 +# Source0-md5: e4b76277c8a93ed894814e00db6d59ca Patch0: system-ca-certificates.patch URL: http://search.cpan.org/dist/Mozilla-CA/ BuildRequires: perl-devel >= 1:5.8.0 @@ -38,7 +38,7 @@ biblioteki oparte na OpenSSL. %patch0 -p1 # Do not distribute Mozilla downloader, we take certificates from ca-certificates package -%{__rm} mk-ca-bundle.pl +%{__rm} maint/mk-ca-bundle.pl sed -i '/^mk-ca-bundle.pl$/d' MANIFEST %build diff --git a/system-ca-certificates.patch b/system-ca-certificates.patch index cdf6d1c..c4d8bdc 100644 --- a/system-ca-certificates.patch +++ b/system-ca-certificates.patch @@ -1,76 +1,43 @@ -PLD Linux change (Elan Ruusamäe ): -use /etc/certs/ca-certificates.crt instead of /etc/pki/tls/certs/ca-bundle.crt - -From ae8af24d6d935b2824ad955aa9ea8cc557089c77 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 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 050a494..c9f7dc8 100644 ---- a/lib/Mozilla/CA.pm -+++ b/lib/Mozilla/CA.pm -@@ -3,16 +3,10 @@ package Mozilla::CA; - use strict; - our $VERSION = '20141217'; +diff -ur Mozilla-CA-20240313.orig/lib/Mozilla/CA.pm Mozilla-CA-20240313/lib/Mozilla/CA.pm +--- Mozilla-CA-20240313.orig/lib/Mozilla/CA.pm 2024-03-13 16:18:29.000000000 +0100 ++++ Mozilla-CA-20240313/lib/Mozilla/CA.pm 2024-04-28 13:58:14.003894710 +0200 +@@ -5,11 +5,9 @@ + our $VERSION = '20240313'; --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->rel2abs($file); + return File::Spec->catfile('/etc/certs/ca-certificates.crt'); } 1; --- -1.9.3 - +diff -ur Mozilla-CA-20240313.orig/Makefile.PL Mozilla-CA-20240313/Makefile.PL +--- Mozilla-CA-20240313.orig/Makefile.PL 2024-03-13 16:18:29.000000000 +0100 ++++ Mozilla-CA-20240313/Makefile.PL 2024-04-28 13:59:39.417034408 +0200 +@@ -89,4 +89,12 @@ + if $eumm_version < 6.51_03; + + ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); ++ ++package MY; ++sub MY::libscan { ++ my $name = shift->SUPER::libscan(@_); ++ # Remove private certificate bundle ++ if ($name =~ /cacert.pem\z/) { $name = '' }; ++ return $name; ++} + ## END BOILERPLATE ########################################################### +diff -ur Mozilla-CA-20240313.orig/MANIFEST Mozilla-CA-20240313/MANIFEST +--- Mozilla-CA-20240313.orig/MANIFEST 2024-03-13 16:18:29.000000000 +0100 ++++ Mozilla-CA-20240313/MANIFEST 2024-04-28 13:57:03.726956967 +0200 +@@ -1,7 +1,6 @@ + .editorconfig + Changes + lib/Mozilla/CA.pm +-lib/Mozilla/CA/cacert.pem + maint/cacert-diff + maint/get-tarball-name + maint/make-tarball -- 2.44.0