public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [tests/python] main: Add a test that verifies fresh venvs don't bundle certificates from certifi
Date: Tue, 27 Oct 2026 10:24:55 GMT [thread overview]
Message-ID: <179309669553.1.17539127068668497910.tests-python-f0ec5dedf974@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/python
Branch : main
Commit : f0ec5dedf9740d41cac978dbce30d7d2c354aab3
Author : Miro Hrončok <miro@hroncok.cz>
Date : 2026-10-27T11:23:39+01:00
Stats : +39/-0 in 2 file(s)
URL : https://src.fedoraproject.org/tests/python/c/f0ec5dedf9740d41cac978dbce30d7d2c354aab3?branch=main
Log:
Add a test that verifies fresh venvs don't bundle certificates from certifi
Assisted-By: Claude Sonnet 5
---
diff --git a/certifi/certifi.fmf b/certifi/certifi.fmf
new file mode 100644
index 0000000..347cb77
--- /dev/null
+++ b/certifi/certifi.fmf
@@ -0,0 +1,20 @@
+summary: Verify that pip's bundled certifi uses the system CA trust store
+description: |
+ Fedora patches the certifi module vendored into the pip wheel bundled
+ with ensurepip so it always points to the system-wide CA trust store
+ instead of shipping (and using) its own CA bundle.
+
+ This test creates a fresh virtual environment and checks that the
+ vendored pip._vendor.certifi.where() returns
+ /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem.
+
+path: /certifi
+test: ./certifi.sh
+
+tier: 1
+tag: [certifi]
+
+environment:
+ VERSION: 3
+
+duration: 5m
diff --git a/certifi/certifi.sh b/certifi/certifi.sh
new file mode 100755
index 0000000..d318b71
--- /dev/null
+++ b/certifi/certifi.sh
@@ -0,0 +1,19 @@
+#!/bin/bash -eux
+VERSION=${VERSION:-3}
+PYTHON=${PYTHON:-python$VERSION}
+EXPECTED=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
+
+# Work from a custom directory
+workdir="$(mktemp --directory)"
+cd "$workdir"
+
+$PYTHON -m venv venv
+actual="$(venv/bin/python -c 'from pip._vendor.certifi import where; print(where())')"
+
+cd -
+rm -rf "$workdir"
+
+if [ "$actual" != "$EXPECTED" ]; then
+ echo "FAIL: expected pip's bundled certifi to use '$EXPECTED', got '$actual'" >&2
+ exit 1
+fi
reply other threads:[~2026-10-27 10:24 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=179309669553.1.17539127068668497910.tests-python-f0ec5dedf974@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