CI: build Linux binaries for older CPUs/glibc on ubuntu-24.04 - #10344
Merged
ThomasWaldmann merged 1 commit intoSep 9, 2026
Merged
Conversation
ThomasWaldmann
force-pushed
the
ci-linux-oldglibc-binary
branch
from
September 9, 2026 15:39
be52d46 to
ee74e88
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10344 +/- ##
=======================================
Coverage 87.87% 87.88%
=======================================
Files 103 103
Lines 18878 18878
Branches 2916 2916
=======================================
+ Hits 16589 16590 +1
+ Misses 1589 1586 -3
- Partials 700 702 +2 ☔ View full report in Codecov by Harness. |
The Linux binaries from native_tests are built on ubuntu-26.04 and thus
need glibc 2.43, and the x86_64 one does not run on CPUs below x86-64-v3
("Illegal instruction"). The new oldglibc_binary job builds on
ubuntu-24.04 and ubuntu-24.04-arm (glibc 2.39, the oldest GitHub-hosted
Ubuntu image, with its baseline x86-64 toolchain and packages) and
produces borg-linux-glibc239-{x86_64,arm64}-gh.
Fixes borgbackup#10342.
Ubuntu 24.04 only has OpenSSL 3.0 and Python 3.12 (and setup-python's
3.14 for it links the system OpenSSL 3.0), so the job builds OpenSSL
3.5.8 (no-tests, no-docs - the OpenSSL test suite is very slow and is
never run) and Python 3.14.7 from source, pinned by version and sha256,
links Python and borg's crypto extension against that OpenSSL, and
PyInstaller bundles those libraries. OpenSSL is built with an rpath to
its prefix, so that its libssl and the openssl program do not pick up
the system's OpenSSL 3.0 libraries, which have the same SONAMEs. Python
is a PGO build like the setup-python ones; its PGO training run (a
subset of python's test suite) runs in parallel worker processes. The
job checks that the ssl module, borg's crypto extension and the frozen
binary really use the OpenSSL and Python built there and that no
bundled ELF file needs a newer glibc than the binary's name promises.
The binary is built on every run of the job and the test suite runs
against it. On tags, the binaries get a provenance attestation and the
release job (which now depends on this job) attaches them and their
sigstore bundles to the GitHub release.
Also: scripts/glibc_check.py no longer crashes on an ELF file without
versioned glibc symbols.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ThomasWaldmann
force-pushed
the
ci-linux-oldglibc-binary
branch
from
September 9, 2026 16:03
33a5414 to
7ae795e
Compare
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.
Fixes #10342.
The Linux binaries from
native_testsare built on ubuntu-26.04 and thus need glibc 2.43, and the x86_64 one does not run on CPUs below x86-64-v3 ("Illegal instruction", #10342). This adds theoldglibc_binaryjob, which builds onubuntu-24.04andubuntu-24.04-arm(glibc 2.39, the oldest GitHub-hosted Ubuntu image, with its baseline x86-64 toolchain and packages) and producesborg-linux-glibc239-{x86_64,arm64}-gh(plus the.tgzsingle-directory variants) for users of older systems and older CPUs.Ubuntu 24.04 only ships OpenSSL 3.0 and Python 3.12, and the 3.14 from actions/setup-python for it links against that OpenSSL 3.0. So the job:
no-tests no-docs, onlymake+make install_sw- the OpenSSL test suite is very slow and is never run), with an rpath to its prefix, so that its libssl and theopensslprogram do not pick up the system's OpenSSL 3.0 libraries with the same SONAMEs,--enable-shared --enable-optimizations --with-openssl=... --with-openssl-rpath=auto, like the setup-python builds the other Linux binaries use; the PGO training run, a subset of python's test suite, runs in parallel worker processes),BORG_OPENSSL_PREFIX+ rpath), then the PyInstaller binary,sslmodule reports OpenSSL 3.5.8, borg's crypto extension links libcrypto from the prefix, the frozenborg-dirbundle contains byte-identical copies of the built libcrypto/libssl/libpython,borg.exe debug inforeports CPython 3.14.7, andscripts/glibc_check.pyasserts that no bundled ELF file needs more than glibc 2.39,borg.exeinPATH, so the binary-parametrized tests exercise the binary,The sources are pinned by version and sha256 (bump both together). The checksums were verified against the
.sha256file published with the OpenSSL release and against the python.org sigstore bundle of the Python tarball.Other changes:
releasejob now also requires this job,release.ymlexpects the four new assets and the release notes mention the two Linux flavours,scripts/glibc_check.pyno longer crashes on an ELF file without versioned glibc symbols (it is used by the new job),00_README.txt, changelog, and the testsuite comment about whenborg.exegets built.Notes for review:
if: github.event_name != 'pull_request'if that is too much.native_testscovers them.🤖 Generated with Claude Code