public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/python] main: Add a test that verifies fresh venvs don't bundle certificates from certifi
@ 2026-10-27 10:24
0 siblings, 0 replies; only message in thread
From: @ 2026-10-27 10:24 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-27 10:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27 10:24 [tests/python] main: Add a test that verifies fresh venvs don't bundle certificates from certifi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox