Accepting request 1197815 from home:tinita:branches:devel:languages:perl

- Add Mozilla-CA-20240730-Redirect-to-ca-certificates-bundle.patch,
  https://bugzilla.suse.com/show_bug.cgi?id=1228762
  boo#1228762

OBS-URL: https://build.opensuse.org/request/show/1197815
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Mozilla-CA?expand=0&rev=23
This commit is contained in:
Tina Müller 2024-08-30 11:09:38 +00:00 committed by Git OBS Bridge
parent 285787461b
commit 2862d6fc33
4 changed files with 82 additions and 5 deletions

View File

@ -0,0 +1,65 @@
From ab01996d4d539cada0013b837b782f27db6b96ff 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 a bundle
delivered by ca-certificates RPM package used as a single source of
the 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>
diff --git a/MANIFEST b/MANIFEST
index a88847b..6577ede 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -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
diff --git a/Makefile.PL b/Makefile.PL
index 9faf720..a491813 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -90,3 +90,11 @@
ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
## END BOILERPLATE ###########################################################
+
+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 e4a6c56..fdb3c75 100644
--- a/lib/Mozilla/CA.pm
+++ b/lib/Mozilla/CA.pm
@@ -5,11 +5,9 @@
our $VERSION = '20240730';
use File::Spec ();
-use File::Basename qw(dirname);
sub SSL_ca_file {
- my $file = File::Spec->catfile(dirname(__FILE__), "CA", "cacert.pem");
- return File::Spec->rel2abs($file);
+ return File::Spec->catfile('/var/lib/ca-certificates/ca-bundle.pem');
}
1;
--
2.25.4

View File

@ -4,11 +4,11 @@
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
patches:
Mozilla-CA-20240730-Redirect-to-ca-certificates-bundle.patch: -p1 PATCH-FIX-OPENSUSE https://bugzilla.suse.com/show_bug.cgi?id=1228762
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
preamble: |-
BuildRequires: ca-certificates-mozilla
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Aug 26 20:29:40 UTC 2024 - Tina Müller <tina.mueller@suse.com>
- Add Mozilla-CA-20240730-Redirect-to-ca-certificates-bundle.patch,
https://bugzilla.suse.com/show_bug.cgi?id=1228762
boo#1228762
-------------------------------------------------------------------
Wed Jul 31 05:28:27 UTC 2024 - Tina Müller <timueller+perl@suse.de>

View File

@ -28,6 +28,8 @@ Summary: Mozilla's CA cert bundle in PEM format
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/L/LW/LWP/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
# PATCH-FIX-OPENSUSE https://bugzilla.suse.com/show_bug.cgi?id=1228762
Patch0: Mozilla-CA-20240730-Redirect-to-ca-certificates-bundle.patch
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
@ -35,6 +37,9 @@ BuildRequires: perl(Test::More) >= 0.94
Provides: perl(Mozilla::CA) = %{version}
%undefine __perllib_provides
%{perl_requires}
# MANUAL BEGIN
BuildRequires: ca-certificates-mozilla
# MANUAL END
%description
Mozilla::CA provides a copy of Mozilla's bundle of Certificate Authority
@ -48,7 +53,7 @@ The module provide a single function:
Returns the absolute path to the Mozilla's CA cert bundle PEM file.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%autosetup -n %{cpan_name}-%{cpan_version} -p1
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644