Add system-OpenSSL build variant for the bundled Python 3.10.13 Linux package#376
Open
nickschuetz wants to merge 1 commit into
Open
Add system-OpenSSL build variant for the bundled Python 3.10.13 Linux package#376nickschuetz wants to merge 1 commit into
nickschuetz wants to merge 1 commit into
Conversation
Adds a parallel Linux build variant that links Python's _ssl dynamically against the building distro's system OpenSSL 3.x instead of the bundled OpenSSL-1.1.1t package. Existing linux_x64/ variant stays unchanged. Motivation: OpenSSL 1.1.1t has been end-of-life since 2023-09-11. For downstream distribution packagers (Fedora, Debian, Arch, Alpine) targeting their distribution's review process, the EOL crypto in the bundled Python is a meaningful inclusion blocker. This variant gives those packagers a clean path: configure Python to find OpenSSL 3.x in the system at build time, link dynamically, let the OS handle CVE updates. Changes: - docker_build_linux.sh: env-var (PYTHON_USE_SYSTEM_OPENSSL=1) switches --with-openssl=<bundle> to --with-openssl=/usr --with-openssl-rpath=auto, conditional LICENSE.OPENSSL copy (only for bundled variant). - Dockerfile: add libssl-dev (required for system variant, harmless for bundled). - build-linux.sh: detect variant from docker image name (contains "system_openssl"), pass env through to docker run. - build_config.json: add Linux-system-openssl sub-variant. Default Linux + Linux-aarch64 variants unchanged. Output package: python-3.10.13-rev1-linux-system-openssl Long-term: dynamic variant reduces O3DE maintainers' CVE-response burden (OS handles OpenSSL updates) while the bundled variant remains the floor for portability-sensitive consumers. Filed in coordination with the downstream Fedora packaging effort at github.com/nickschuetz/o3de-rpm; see that repo's upstream-drafts/pr-python-system-openssl.md for the full motivation and validation plan. Signed-off-by: Nick Schuetz <nschuetz@redhat.com>
nickschuetz
added a commit
to nickschuetz/o3de-rpm
that referenced
this pull request
May 28, 2026
PR filed at o3de/3p-package-source#376 on 2026-05-28 per Nick's explicit "submit the PR upstream" approval. DCO signoff present; em-dash audit clean; prior-art sweep clean. Draft status line updated to SUBMITTED with the PR URL. Full motivation + diff + validation evidence preserved in the draft body for ongoing reference. Signed-off-by: Nick Schuetz <nschuetz@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a parallel Linux build variant for the bundled Python 3.10.13 package that links dynamically against the building distro's system OpenSSL 3.x rather than the bundled
OpenSSL-1.1.1t-rev1-linuxstatic dependency.Motivation
The bundled
OpenSSL-1.1.1tis end-of-life since 2023-09-11. For downstream distribution packagers (Fedora, Debian, Arch, Alpine) targeting their distribution's review process, the EOL crypto in the bundled Python is a meaningful inclusion blocker. This variant gives those packagers a clean path: configure Python to find OpenSSL 3.x in the system at build time, link dynamically, let the OS handle CVE updates.What this PR does
The existing
linux_x64/variant is unchanged. A newLinux-system-opensslsub-variant inbuild_config.jsontriggers an env-var (PYTHON_USE_SYSTEM_OPENSSL=1) that the modifieddocker_build_linux.shreads. In that mode:--with-openssl=/usr --with-openssl-rpath=autoreplaces--with-openssl=<bundled path>libssl-devavailable (added to the Dockerfile)_ssl.cpython-310-x86_64-linux-gnu.soends up dynamically linking against the OS'slibssl.so.3+libcrypto.so.3Output package:
python-3.10.13-rev1-linux-system-openssl. Drop-in replacement for downstream consumers whose target OS provides OpenSSL 3.x; Python ABI is 3.10.13 stable.Compatibility
The new variant requires the target system to have OpenSSL 3.x in the base OS at runtime (
libssl.so.3+libcrypto.so.3). Target distros with OpenSSL 3.x in base: Ubuntu 22.04 LTS and newer, Fedora 39 and newer, RHEL 9 and newer, Debian 12 and newer. Existing consumers on older OSes (Ubuntu 20.04 LTS, RHEL 8, Debian 11) ship OpenSSL 1.1.x and would not work with the system-openssl variant; they keep using the existinglinux_x64/variant unchanged. Offline-install scenarios on older targets are unaffected because the default bundled variant is fully self-contained.Validation
Spike validation completed locally before this PR. Net: 78 individual checks across the integration tier suite, 0 failures.
Build: PASS. Full
pull_and_build_from_git.py package-system/python --platform-name Linux-system-openssl --cleanran clean inside an Ubuntu 22.04 container. Configure detected system OpenSSL (checking for openssl/ssl.h in /usr... yes), and theBuilding Python against system OpenSSL (dynamic link)env-var-driven branch executed correctly. FinalPYTHON WAS BUILT FROM SOURCEmarker reached.Artifact:
ldd _ssl.cpython-310-x86_64-linux-gnu.soshowslibssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3+libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3(Ubuntu container). On a Fedora 44 host, resolves to/lib64/libssl.so.3+/lib64/libcrypto.so.3(OpenSSL 3.x stable ABI holds across the build-host / runtime-host boundary).import ssl; print(ssl.OPENSSL_VERSION)returnsOpenSSL 3.0.2 15 Mar 2022(Ubuntu 22.04 container) andOpenSSL 3.5.5 27 Jan 2026(Fedora 44 host).Engine smoke (downstream Fedora packaging effort):
~/.o3de/Python/venvto force re-bootstrap viaget_python.sh, ran the integration tier suite.get_python.sh, manifest registration viao3de-cli register --this-engine): PASS. This is the critical OpenSSL-path canary: pip install runs HTTPS through the rebuilt_sslmodule; manifest setup and registry work correctly.o3de create-project+ cmake configure): PASSCharacterSample): 7/7 PASSThe engine works identically with the rebuilt Python. AssetProcessor's embedded Python interpreter executes builders cleanly. PySide2 (separate bundled package, links against
libpython3.10.so.1.0) loads without ABI issues; Python's stable patch-level ABI held.Open questions for sig-build
build_config.jsonso each variant picks its own (preserves existing artifact-byte-equivalence for the bundled-OpenSSL build), or (b) bump the default base to 22.04 for both variants (simpler maintenance). Happy to refactor either way.python-3.10.13-rev1-linux-system-opensslis verbose. Alternatives:python-3.10.13-rev1-linux-dynamic-ssl,python-3.10.13-system-ssl-rev1-linux, etc. Whatever convention sig-build prefers.apt-get update/dnf updateinstead of requiring a Python rebuild every time OpenSSL ships a CVE). The bundled variant remains useful for environments where system OpenSSL can't be assumed (older containers, embedded targets, build-isolated CI, air-gapped offline-install on older OSes). Suggest both variants coexist long-term.Notes
upstream-drafts/pr-python-system-openssl.mdfor the full motivation and validation evidence.