public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python3.6] f43: When built with bundled pip.whl, patch bundled certifi within to use ca-certificates
@ 2026-11-12 11:49
0 siblings, 0 replies; only message in thread
From: @ 2026-11-12 11:49 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python3.6
Branch : f43
Commit : 6e35d0f9318666d0a46024bc791d61204bf8bbdb
Author : Miro Hrončok <miro@hroncok.cz>
Date : 2026-11-03T12:46:33+01:00
Stats : +32/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/python3.6/c/6e35d0f9318666d0a46024bc791d61204bf8bbdb?branch=f43
Log:
When built with bundled pip.whl, patch bundled certifi within to use ca-certificates
(cherry picked from python3.16 commit c873d21a83d107d0d2ae9a7be5fb302b92165ccf)
The patch is taken from python-pip @ bbe9e6d297c264f1049b0614fb174be0e6786359,
adjusted the certificate path only.
---
diff --git a/pip-dummy-certifi.patch b/pip-dummy-certifi.patch
new file mode 100644
index 0000000..9f50ec0
--- /dev/null
+++ b/pip-dummy-certifi.patch
@@ -0,0 +1,15 @@
+diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py
+index 2d02ea4..b1e4975 100644
+--- a/src/pip/_vendor/certifi/core.py
++++ b/src/pip/_vendor/certifi/core.py
+@@ -11,9 +11,7 @@ import os
+
+
+ def where():
+- f = os.path.dirname(__file__)
+-
+- return os.path.join(f, 'cacert.pem')
++ return '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem'
+
+
+ if __name__ == '__main__':
diff --git a/plan.fmf b/plan.fmf
index 8639a8d..19db03b 100644
--- a/plan.fmf
+++ b/plan.fmf
@@ -18,6 +18,9 @@ discover:
- name: marshalparser
path: /marshalparser
test: "VERSION=${pybasever} SAMPLE=10 ./test_marshalparser_compatibility.sh"
+ - name: certifi
+ path: /certifi
+ test: "VERSION=${pybasever} ./certifi.sh"
prepare:
- name: Install dependencies
diff --git a/python3.6.spec b/python3.6.spec
index 22d8ab6..e646af5 100644
--- a/python3.6.spec
+++ b/python3.6.spec
@@ -314,6 +314,7 @@ BuildRequires: /usr/sbin/ifconfig
BuildRequires: python-setuptools-wheel
BuildRequires: python-pip-wheel
%else
+BuildRequires: ca-certificates
# For %%python_wheel_inject_sbom
BuildRequires: python-rpm-macros
%endif
@@ -338,7 +339,7 @@ Source10: idle3.desktop
# AppData file for idle3
Source11: idle3.appdata.xml
-# Patches for bundled wheels
+# Patches for bundled wheels (declared as Sources, applied manually in %%prep):
# Patch for the bundled pip wheel for CVE-2007-4559
Source101: pip-CVE-2007-4559.patch
@@ -350,6 +351,14 @@ Source101: pip-CVE-2007-4559.patch
# Patch simplified because upstream doesn't support SVN anymore.
Source102: setuptools-CVE-2024-6345.patch
+# Use the system level root certificate instead of the one bundled in certifi
+# in the pip wheel bundled in ensurepip.
+# https://bugzilla.redhat.com/1655253
+# The same patch is a part of the RPM-packaged python-pip and python-certifi.
+Source103: pip-dummy-certifi.patch
+
+# Patches for Python
+#
# (Patches taken from github.com/fedora-python/cpython)
# 00001 # d06a8853cf4bae9e115f45e1d531d2dc152c5cc8
@@ -1099,6 +1108,8 @@ Provides: bundled(python3dist(packaging)) = 16.8
Provides: bundled(python3dist(pyparsing)) = 2.2.1
Provides: bundled(python3dist(six)) = 1.10
Provides: bundled(python3dist(appdirs)) = 1.4.3
+
+Requires: ca-certificates
%endif
# Provides for the bundled libmpdec
@@ -1336,6 +1347,8 @@ rm Lib/ensurepip/_bundled/*.whl
# Patch the bundled pip wheel for CVE-2007-4559
unzip -qq Lib/ensurepip/_bundled/pip-%{pip_version}-py2.py3-none-any.whl
patch -p1 < %{SOURCE101}
+# And for using ca-certificates, -p2 to compensate src/ prefix
+patch -p2 < %{SOURCE103}
zip -rq Lib/ensurepip/_bundled/pip-%{pip_version}-py2.py3-none-any.whl pip pip-%{pip_version}.dist-info
rm -rf pip/ pip-%{pip_version}.dist-info/
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-12 11:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 11:49 [rpms/python3.6] f43: When built with bundled pip.whl, patch bundled certifi within to use ca-certificates
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox