Repository navigation
test(scripts): 独立检查 Linux 发布包的 glibc 版本要求 - #61
Conversation
背景:发布包可能在构建机上可用,却因某个后端要求更高版本的 glibc 而无法在目标系统启动。 解决手段:增加本地可运行的 GNU readelf 检查脚本、合成 ELF 回归和发布文档,让调用者明确传入要验证的 glibc 版本上限。 收益:维护者能定位是哪个已打包程序超出指定上限,并区分工具缺失、包损坏等原因。
Reviewer's GuideAPIDefine the checker’s command-line contract, including the required glibc ceiling and the distinct missing-tool result.
ImplementationImplement ELF version-need parsing, bundle validation, ceiling comparison, and remaining command execution and error handling.
DocumentationDocument how to run the checker locally, interpret its exit codes, and understand the reported release comparison.
TestsExercise the checker with synthetic ELF files and cover version comparisons, malformed bundles, missing tools, and invalid arguments.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
拆分依据与实测原 #49 留下的证据。 原 Linux 实包 12 个 ELF 中有两个后端要求 GLIBC_2.43,Debian 13 的 2.41 无法直接启动。当前 main 已固定 Ubuntu 24.04 构建;本稿给维护者一个额外的成品检查入口,不改 CI。 原 PR 说明 · Debian 实包失败、重建及前后核对 本次独立分支验证( 七个分支都直接基于同一个 main 提交,21 对分支试合并均无冲突,正序和逆序七项合并得到相同文件树。组合后重新构建,18 个 MCP 单测通过,并核对握手、14 个工具的接口及相关的真实 stdio 场景。 |
|
Sorry @SXP-Simon, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 2 days and 20 hours by commenting |
场景与改动
发布包可能在构建机上可用,却因某个后端要求更高版本的 glibc 而无法在目标系统启动。
增加本地可运行的 GNU readelf 检查脚本、合成 ELF 回归和发布文档,让调用者明确传入要验证的 glibc 版本上限。
维护者能定位是哪个已打包程序超出指定上限,并区分工具缺失、包损坏等原因。
独立验证
在有 C 编译器和 GNU readelf 的 Linux 上执行
python3 scripts/tests/test_linux_glibc.py -v。对实际解包目录执行python3 scripts/check-linux-glibc.py <bundle> --max-glibc <version>。从 #49 拆出,直接基于
main@06cfd43,可以独立审查。来源提交为 8f9eb02。Summary by Sourcery
Add independent Linux release validation for detecting ELF files that require a newer glibc version than the target system supports.
New Features:
Enhancements:
Documentation:
Tests: