Upgrade libexpat in base stage to avoid stale symbol relocation (8.3-cli, 8.4-cli) - #6
Upgrade libexpat in base stage to avoid stale symbol relocation (8.3-cli, 8.4-cli)#6jelen07 wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThis PR upgrades the Changeslibexpat Alpine repository alignment
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
16e3a3d to
69adf51
Compare
- Add `apk upgrade --no-cache libexpat` to the base stage of 8.3-cli and 8.4-cli - These images freeze an older libexpat (2.6.3 on alpine 3.20, 2.7.0 on 3.21) whose soname is still satisfied, so a downstream `apk add python3/supervisor` pulls a newer pyexpat that fails to relocate (missing symbol) at runtime - The upgrade resyncs libexpat to the branch-current 2.7.5 (has the symbol) - 8.1-cli (alpine 3.18) is not affected: apk already upgrades libexpat to the branch-newest 2.7.0 during the supervisor install and its python matches Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
69adf51 to
1238cbe
Compare
|
WIP |
Problem
The 68publishers php images bake in whatever
libexpatwas current in the Alpine branch at image build time, and that library does not get re-synced afterwards. Meanwhile the Alpine release branch keeps publishing libexpat patch updates. The frozenlibexpat.so.1soname still satisfies apk's dependency check, so a downstreamapk add python3/supervisorpulls a newerpyexpat(built against the branch-current libexpat) without upgrading the stale library. At runtime pyexpat then fails to relocate:(
XML_SetAllocTrackerActivationThresholdwas added in libexpat 2.7.2.) This crash-loops anything importingpyexpat— notablysupervisord, breaking worker containers built on these images.Verified per image (
apk add supervisoron the published-cli-devtag, thenimport pyexpat)Fix
Add
apk upgrade --no-cache libexpatto thebasestage of 8.3-cli and 8.4-cli. This resyncs libexpat to the branch-current2.7.5(which has the symbol). It adds no new packages — it only bumps one shared library — and becausedev/prod/prod-imagickderive frombase, every published tag inherits the fix.Scope and why not the others
Constraint to be aware of
apk upgradecan only reach the newest version in the image's pinned Alpine branch. It works here because 3.20 and 3.21 both moved to 2.7.5. If a future need requires a version only available inedge(e.g. 2.8.x), the base image would have to be bumped to a newer Alpine (or the package pulled from another repo) rather than relying on this upgrade.🤖 Generated with Claude Code