public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python3.6] rawhide: When built with bundled pip.whl, patch bundled certifi within to use ca-certificates
Date: Thu, 12 Nov 2026 11:48:35 GMT	[thread overview]
Message-ID: <179448411511.1.8633117408177487250.rpms-python3.6-6e35d0f93186@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python3.6
            Branch : rawhide
            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=rawhide

            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/
 

                 reply	other threads:[~2026-11-12 11:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179448411511.1.8633117408177487250.rpms-python3.6-6e35d0f93186@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox