Repository navigation
fix(debian): keep *.a files in the generated source tarball - #8
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds Debian source-package filtering configuration so generated tarballs retain the Cargo-validated vendored static library required for offline OBS builds, while omitting unused Windows static libraries; verification confirms successful builds from the unpacked tarball. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
/integrate |
|
/integrate |
… builds
OBS generates the source tarball through obs_gbp (gbp buildpackage), whose
export + dpkg-source chain strips *.a files from the tarball regardless of
debian/source/options (the options file is read, but the stripping happens
during the service's tarball generation). As a result
vendor/system-deps/src/tests/lib/libteststatic.a
(a zero-byte fixture inside the vendored system-deps crate) is absent from
the BUILD tree, yet vendor/system-deps/.cargo-checksum.json lists it, so
cargo aborts every offline build with
error: failed to calculate checksum of:
vendor/system-deps/src/tests/lib/libteststatic.a
Caused by: No such file or directory (os error 2)
The file is a 0-byte test fixture (its recorded checksum is the empty-file
SHA-256) and is never linked or read during the build, so removing its
entry from the vendored crate's .cargo-checksum.json is safe: cargo then
no longer requires the file to exist, and the same OBS tarball builds
cleanly. Verified locally on the exact OBS-generated tarball: cargo build
--release --offline --locked completes in ~57s with all packages produced.
Log: 移除 vendored 空 .a 的 checksum 条目修复 OBS 构建
Influence: 本地工作树内 dpkg-buildpackage 依旧正常(该空文件仍在树中)
81403cb to
392f376
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 语法正确,逻辑清晰。JSON 格式在移除条目后仍然有效,libteststatic.a 是0字节测试夹具文件,OBS 构建时会被剥离,移除其 checksum 条目后 cargo 不再检查该文件,逻辑合理。 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 代码结构清晰,注释完整。变更最小化,仅移除一个 JSON 条目,目标明确。文件本身包含 $comment 字段说明文件用途。 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 性能良好,资源使用合理。这是构建配置文件变更,对运行时性能无影响。 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 无安全风险。文件本身声明不是安全机制(This file only protects against accidental modifications. It is not a security mechanism),移除0字节测试文件的 checksum 条目不引入任何安全风险。 💡 改进建议代码示例// 本次变更无需改进代码示例
// 变更内容:从 vendor/system-deps/.cargo-checksum.json 的 files 对象中
// 移除 "src/tests/lib/libteststatic.a" 条目
// 该文件是0字节测试夹具,OBS构建时被剥离,移除checksum条目可修复cargo离线构建本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, Zeno-sole The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
fix(debian): drop libteststatic.a from vendored checksums so OBS builds
OBS generates the source tarball through obs_gbp (gbp buildpackage), whose
export + dpkg-source chain strips *.a files from the tarball regardless of
debian/source/options (the options file is read, but the stripping happens
during the service's tarball generation). As a result
vendor/system-deps/src/tests/lib/libteststatic.a
(a zero-byte fixture inside the vendored system-deps crate) is absent from
the BUILD tree, yet vendor/system-deps/.cargo-checksum.json lists it, so
cargo aborts every offline build with
error: failed to calculate checksum of:
vendor/system-deps/src/tests/lib/libteststatic.a
Caused by: No such file or directory (os error 2)
The file is a 0-byte test fixture (its recorded checksum is the empty-file
SHA-256) and is never linked or read during the build, so removing its
entry from the vendored crate's .cargo-checksum.json is safe: cargo then
no longer requires the file to exist, and the same OBS tarball builds
cleanly. Verified locally on the exact OBS-generated tarball: cargo build
--release --offline --locked completes in ~57s with all packages produced.
Log: 移除 vendored 空 .a 的 checksum 条目修复 OBS 构建
Influence: 本地工作树内 dpkg-buildpackage 依旧正常(该空文件仍在树中)