Repository navigation
fix(build): lower the Linux binary glibc floor to 2.28 - #3553
Daniel Meppiel (danielmeppiel) merged 9 commits into
Conversation
PyInstaller bundles the build interpreter's libpython and stdlib extension modules. The setup-python build for ubuntu-24.04 needs GLIBC_2.38, so the released Linux binaries failed to start on RHEL, Rocky and Alma Linux 8 and 9, Debian 12 and Ubuntu 22.04. Linux release builds use uv-managed python-build-standalone, which targets glibc 2.17. build-binary.sh fails the build when APM_MAX_GLIBC is set and any bundled ELF file needs a newer GLIBC symbol version. build-release.yml sets it to 2.28 and runs apm --version, apm init and apm install of microsoft/apm-sample-package in a rockylinux:8 container on x86_64 and arm64. The non-required PR binary smoke job builds the same way. install.sh routes only hosts below glibc 2.28 to the pip fallback. The installation guide, apm-usage guide, devcontainer README, installer tests and CHANGELOG state the new floor. Windows and macOS builds are unchanged. Closes microsoft#3399 Co-Authored-By: Claude Opus 5.5 <[email protected]>
fadd92a to
96b602a
Compare
|
@microsoft-github-policy-service agree company="Internet Initiative Japan Inc." |
There was a problem hiding this comment.
🟡 Changes recommended
The compatibility gate can accept an uninspectable library because the pipeline masks objdump failures with tail’s successful exit status.
2 open issues
What changed in this PR
This PR addresses #3399 by lowering the prebuilt Linux binary glibc requirement from 2.38 to 2.28, extending compatibility to older enterprise Linux distributions without changing Windows or macOS builds.
Changes:
- Use uv-managed Python for Linux release and PR smoke builds.
- Add a bundled-library glibc check and Rocky Linux 8 release smoke tests.
- Align the installer threshold, regression tests, and documentation with glibc 2.28.
| File | Description |
|---|---|
tests/unit/install/test_unix_install_ownership.py |
Updates boundary tests and recovery-message assertions for glibc 2.28. |
scripts/build-binary.sh |
Adds an opt-in bundled ELF glibc compatibility check. |
packages/apm-guide/.apm/skills/apm-usage/commands.md |
Updates bootstrap and self-update compatibility guidance. |
install.sh |
Lowers the prebuilt Linux glibc threshold to 2.28. |
docs/src/content/docs/getting-started/installation.md |
Documents the lower requirement and compatible distributions. |
devcontainer/README.md |
Updates the documented Linux binary requirement. |
CHANGELOG.md |
Records the compatibility expansion and build safeguards. |
.github/workflows/ci.yml |
Aligns PR binary smoke builds with the Linux release configuration. |
.github/workflows/build-release.yml |
Selects managed Python on Linux and adds Rocky Linux 8 smoke tests. |
Review effort: Balanced
The pipeline dropped objdump's exit status, so a file that objdump could not read counted as checked with no GLIBC requirement. Check the exit status before parsing and stop the build with the objdump error. Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Replace the check and cross glyphs in the three new messages with [x] and [+], following encoding.instructions.md.
…compat # Conflicts: # .github/workflows/build-release.yml # .github/workflows/ci.yml # CHANGELOG.md
The Rocky Linux 8 smoke step pulled rockylinux:8 by mutable tag and passed the long-lived GH_CLI_PAT into the container. Pin the multi-arch image index by digest and hand the container only the job-scoped github.token (contents: read); the sample package is public. Also group the GITHUB_ENV writes in the two uv-managed Python steps (actionlint SC2129). Addresses panel follow-ups from supply-chain-security-expert (digest pin, least-privilege token) on PR microsoft#3553. Co-authored-by: Copilot App <[email protected]>
The merge with main dropped the blank line before the Fixed heading, the entry described release-build internals instead of the user-facing change, and the installation troubleshooting heading still named devcontainers and Debian-based images as failing hosts, which was only true under the old 2.38 floor. Addresses panel follow-ups from doc-writer on PR microsoft#3553. Co-authored-by: Copilot App <[email protected]>
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Supply Chain Security Expert | 0 | 0 | 0 | Both folds verified: image pinned by multi-arch digest, PAT replaced with job-scoped read token. No new supply-chain surface introduced. |
| Doc Writer | 0 | 0 | 0 | All three prior findings resolved: CHANGELOG spacing fixed, entry trimmed to user-facing change, heading names the 2.28 floor. No new doc issues. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 1 follow-ups
- [Supply Chain Security Expert] Watch the first post-merge
build-release.ymlrun on main for the arm64 binary and Rocky 8 container smoke results. --build-release.ymlis not PR-triggered, so that run is the first proof point for arm64 and the container step.
Recommendation
All five lean-pass follow-ups are folded and verified by the personas that raised them, and CI is fully green. The local test evidence is mutation-confirmed. The only residual is watching the first post-merge build-release.yml run for the arm64 and Rocky 8 container results; if either regresses, the build fails before any artifact is published.
Folded in this run
- (panel) Pin
rockylinux:8by its multi-arch image digest in the Rocky 8 smoke step. Resolved in f7e6b94. - (panel) Give the container the job-scoped
github.token(contents: read) instead ofGH_CLI_PAT; the sample package is public. Resolved in f7e6b94. - (panel) Group the
GITHUB_ENVwrites in both uv-managed Python steps (actionlint SC2129). Resolved in f7e6b94. - (panel) CHANGELOG: restore the blank line before
### Fixedand trim the entry to the user-facing change. Resolved in 5f36ea8. - (panel) installation.md: retitle the troubleshooting heading to "glibc below 2.28". No incoming links to the old anchor. Resolved in 5f36ea8.
- Merged current
origin/maintwice to clear conflicts (CHANGELOG), with no force-push. Latest merge is 11d3ce6.
Copilot signals reviewed
scripts/build-binary.sh-- LEGIT: the pipeline masked objdump's exit status, so an uninspectable library could pass the gate (resolved by the author in 660473f).scripts/build-binary.sh-- LEGIT: non-ASCII status glyphs in the new messages (resolved by the author in d35ab72).
Regression-trap evidence (mutation-break gate)
tests/unit/install/test_unix_install_ownership.py::test_glibc_floor_routes_to_pip_before_binary_downloadand::test_glibc_recovery_guidance_reports_prebuilt_floor. I setREQUIRED_GLIBC="2.38"ininstall.sh, and 16 tests FAILED with assertion errors as expected. The guard is restored.
Lint contract
Silent at 11d3ce6: ruff check and ruff format --check (src/, tests/, architecture-linter scripts), pylint R0801 (10.00/10), lint-auth-signals.sh, lint-architecture-boundaries.sh and actionlint on both edited workflows.
CI
https://github.com/microsoft/apm/actions/runs/43207849227 (CI) plus the PR gate workflow, CodeQL, Devcontainer, NOTICE Drift and Deploy Docs: all green on 11d3ce6. license/cla passes. No CI fix iterations were needed.
Mergeability status
| PR | head SHA | CEO stance | iters | folds | defers | Copilot rounds | CI | mergeable | mergeStateStatus | notes |
|---|---|---|---|---|---|---|---|---|---|---|
| #3553 | 11d3ce6 |
ship_now | 1 | 5 | 0 | 2 | green | MERGEABLE | BLOCKED | pending required review |
Convergence
1 outer iteration and 2 Copilot rounds (no new Copilot comments). Final panel stance: ship_now. Ready for maintainer review.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors.
b613785
into
microsoft:main
…ils on main since #3553 Co-authored-by: Copilot App <[email protected]>
…ils on main since #3553 Co-authored-by: Copilot App <[email protected]>
…ils on main since #3553 Co-authored-by: Copilot App <[email protected]>
…ils on main since #3553 Co-authored-by: Copilot App <[email protected]>


Description
PyInstaller bundles the build interpreter's libpython and stdlib extension modules. The setup-python build for ubuntu-24.04 needs GLIBC_2.38, so the released Linux binaries fail to start on RHEL/Rocky/Alma Linux 8 and 9, Debian 12 and Ubuntu 22.04.
A correction to the premise in the issue: #2931 only corrected the declared floor in
install.shfrom 2.35 to 2.38 and did not change the release runners. The 2.38 requirement comes from building on ubuntu-24.04 with setup-python 3.12, whose bundled libpython needs GLIBC_2.38.Changes:
build-release.yml: the Linux jobs build with uv-managed python-build-standalone (UV_PYTHON_PREFERENCE=only-managed), which targets glibc 2.17. A Linux-only step sets the variables, so the Windows job gets no new environment and the macOS jobs are untouched.scripts/build-binary.sh: whenAPM_MAX_GLIBCis set, the build reads every bundled ELF file withobjdump -Tand fails if any of them needs a newerGLIBC_*symbol version. Release builds set it to 2.28.build-release.yml: both Linux binaries (x86_64 and arm64) runapm --version,apm initandapm install microsoft/apm-sample-packagein arockylinux:8container. The container installsgit-corefirst because apm imports GitPython at startup.ci.yml: the non-requiredpr-binary-smokejob builds the same way, so PRs build the binary the way releases do and run the glibc check. The approved scope does not list this file. Without the change, PR CI would keep building with setup-python and never exercise the release path. I can drop it if you prefer.install.sh:REQUIRED_GLIBCis 2.28. Hosts below 2.28 still go to the existing pip fallback.installation.md, the apm-usagecommands.md,devcontainer/README.mdand CHANGELOG state 2.28.Issue and approved scope
Issue: Closes #3399
Human scope-approval comment: #3399 (comment)
This PR completes the issue. Against the "Done when" list:
build-binary.shcheck, enabled for both Linux matrix entries.apm --versionandapm installof a sample package in a Rocky Linux 8 container in CI: the smoke step inbuild-release.yml.install.shinstalls the prebuilt binary on glibc 2.28+ hosts and routes older hosts to the pip fallback: covered by the installer unit tests.installation.md,commands.mdand the installer unit tests state 2.28.build-release.ymlruns on push to main, tags, schedule and dispatch, so the first run after merge is the first CI evidence for arm64 and for the Rocky 8 container step. PR CI covers the x86_64 build and the glibc check.Type of change
Testing
Local results on Rocky Linux 8.10 (glibc 2.28, x86_64):
UV_PYTHON_PREFERENCE=only-managed UV_PYTHON=3.12 APM_MAX_GLIBC=2.28 uv run ./scripts/build-binary.shon this branch passes. The check reads 6 ELF files, and the highest symbol version any of them needs is GLIBC_2.17.apm --version,apm init -yandapm install microsoft/apm-sample-package --target claudesucceed, andapm_modules/microsoft/apm-sample-package/apm.ymlexists.libpython3.12.so.1.0,math,_pickle,_decimalandpyexpatneed GLIBC_2.38, and five more extension modules need 2.29 to 2.34.tests/unit/install: 3100 passed. The glibc cases now cover 2.17 to 2.39. WithREQUIRED_GLIBCset back to 2.38, 16 of the 20 glibc cases fail.tests/unit tests/test_console.py): 25532 passed, 7 failed. The same 7 fail on unmodified main in my container. They depend onCODEX_HOMEand proxy settings there and do not touch the files in this PR.tests/unit/policy/test_help_consistency.py(6 passed), ruff, and actionlint 1.7.12 with no findings (shellcheck was not installed, sorun:scripts were not linted).docker runstep itself. I ran the same commands directly on the Rocky 8.10 host.Notes for reviewers:
.so,objdump -Tmay report nothing for that file, and the Rocky 8 smoke step is the backstop.apm --versionexits with a GitPython error when git is not on PATH, althoughinstallation.mdsays it works without Git. This already happens on main and is out of scope here. I can open a separate issue.Spec conformance (OpenAPM v0.1)
If this PR changes behaviour that an OpenAPM v0.1
req-XXXcovers,confirm the three-step ritual in the
development guide:
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.