feat: add reproducible build parameter#677
Merged
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds the CMAKE_SKIP_BUILD_RPATH CMake flag to the Debian packaging rules so that dh_auto_configure is invoked with reproducible-build settings, preventing build-specific RPATHs from being embedded in generated binaries. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Consider scoping
CMAKE_SKIP_BUILD_RPATHso it only affects the relevant build types or packages (e.g., release builds), to avoid unexpectedly changing RPATH behavior for local or debug builds that might rely on build-time RPATHs. - If the project uses installed RPATHs, double-check whether you also need to control
CMAKE_SKIP_RPATH/CMAKE_SKIP_INSTALL_RPATHor related flags inDEB_CMAKE_EXTRA_FLAGSto keep reproducibility consistent between build and installed binaries.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider scoping `CMAKE_SKIP_BUILD_RPATH` so it only affects the relevant build types or packages (e.g., release builds), to avoid unexpectedly changing RPATH behavior for local or debug builds that might rely on build-time RPATHs.
- If the project uses installed RPATHs, double-check whether you also need to control `CMAKE_SKIP_RPATH` / `CMAKE_SKIP_INSTALL_RPATH` or related flags in `DEB_CMAKE_EXTRA_FLAGS` to keep reproducibility consistent between build and installed binaries.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
BLumia
previously approved these changes
Dec 16, 2025
Added CMAKE_SKIP_BUILD_RPATH flag to enable reproducible builds This change ensures that builds are reproducible by preventing the inclusion of build-specific paths in the binary The flag is added to DEB_CMAKE_EXTRA_FLAGS and passed to dh_auto_configure command This is important for package verification and security auditing Influence: 1. Test building the package multiple times to verify reproducibility 2. Compare binary checksums from different builds 3. Verify that the package still installs and runs correctly 4. Check that no build paths are embedded in the final binaries 5. Test cross-compilation scenarios if applicable feat: 添加可重复编译参数 添加 CMAKE_SKIP_BUILD_RPATH 标志以启用可重复编译 此更改通过防止在二进制文件中包含特定于构建的路径来确保构建的可重复性 该标志被添加到 DEB_CMAKE_EXTRA_FLAGS 并传递给 dh_auto_configure 命令 这对于软件包验证和安全审计非常重要 Influence: 1. 多次测试构建软件包以验证可重复性 2. 比较不同构建的二进制文件校验和 3. 验证软件包仍能正确安装和运行 4. 检查最终二进制文件中是否嵌入了构建路径 5. 测试交叉编译场景(如果适用)
deepin pr auto review我来对这个git diff进行审查:
改进建议:
# reproducible编译参数
# 禁用构建时RPATH,避免硬编码路径,提高安全性和可移植性
DEB_CMAKE_EXTRA_FLAGS += -DCMAKE_SKIP_BUILD_RPATH=ON
DEB_CMAKE_EXTRA_FLAGS += -DCMAKE_SKIP_BUILD_RPATH=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON总体来说,这是一个好的修改,提高了构建的安全性和可移植性,符合reproducible builds的最佳实践。 |
mhduiy
approved these changes
Dec 16, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy 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 |
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.
Added CMAKE_SKIP_BUILD_RPATH flag to enable reproducible builds
This change ensures that builds are reproducible by preventing the
inclusion of build-specific paths in the binary
The flag is added to DEB_CMAKE_EXTRA_FLAGS and passed to
dh_auto_configure command
This is important for package verification and security auditing
Influence:
feat: 添加可重复编译参数
添加 CMAKE_SKIP_BUILD_RPATH 标志以启用可重复编译
此更改通过防止在二进制文件中包含特定于构建的路径来确保构建的可重复性
该标志被添加到 DEB_CMAKE_EXTRA_FLAGS 并传递给 dh_auto_configure 命令
这对于软件包验证和安全审计非常重要
Influence:
Summary by Sourcery
Add support for reproducible Debian package builds by configuring CMake to skip embedding build-specific RPATHs in binaries.
New Features:
Build: