Skip to content

feat: add reproducible build parameters#76

Merged
18202781743 merged 1 commit intolinuxdeepin:masterfrom
18202781743:repro
Nov 17, 2025
Merged

feat: add reproducible build parameters#76
18202781743 merged 1 commit intolinuxdeepin:masterfrom
18202781743:repro

Conversation

@18202781743
Copy link
Contributor

  1. Added CMAKE_SKIP_BUILD_RPATH=ON flag to DEB_CMAKE_EXTRA_FLAGS
  2. This flag ensures the build process skips embedding RPATH information
    in binaries
  3. Improves build reproducibility by removing host-specific paths from
    compiled artifacts
  4. The flag is now automatically passed to all CMake configure commands

Influence:

  1. Test that packages build successfully with the new flag
  2. Verify that binaries do not contain host-specific RPATH entries
  3. Check that package functionality remains unchanged
  4. Ensure cross-platform compatibility is maintained
  5. Validate that build outputs are now more reproducible across
    different environments

feat: 添加可重复编译参数

  1. 向 DEB_CMAKE_EXTRA_FLAGS 添加 CMAKE_SKIP_BUILD_RPATH=ON 标志
  2. 该标志确保构建过程跳过在二进制文件中嵌入 RPATH 信息
  3. 通过从编译产物中移除主机特定路径来提高构建可重复性
  4. 该标志现在会自动传递给所有 CMake 配置命令

Influence:

  1. 测试使用新标志后包是否能成功构建
  2. 验证二进制文件不包含主机特定的 RPATH 条目
  3. 检查包功能是否保持不变
  4. 确保跨平台兼容性得以维持
  5. 验证构建输出在不同环境中现在更具可重复性

1. Added CMAKE_SKIP_BUILD_RPATH=ON flag to DEB_CMAKE_EXTRA_FLAGS
2. This flag ensures the build process skips embedding RPATH information
in binaries
3. Improves build reproducibility by removing host-specific paths from
compiled artifacts
4. The flag is now automatically passed to all CMake configure commands

Influence:
1. Test that packages build successfully with the new flag
2. Verify that binaries do not contain host-specific RPATH entries
3. Check that package functionality remains unchanged
4. Ensure cross-platform compatibility is maintained
5. Validate that build outputs are now more reproducible across
different environments

feat: 添加可重复编译参数

1. 向 DEB_CMAKE_EXTRA_FLAGS 添加 CMAKE_SKIP_BUILD_RPATH=ON 标志
2. 该标志确保构建过程跳过在二进制文件中嵌入 RPATH 信息
3. 通过从编译产物中移除主机特定路径来提高构建可重复性
4. 该标志现在会自动传递给所有 CMake 配置命令

Influence:
1. 测试使用新标志后包是否能成功构建
2. 验证二进制文件不包含主机特定的 RPATH 条目
3. 检查包功能是否保持不变
4. 确保跨平台兼容性得以维持
5. 验证构建输出在不同环境中现在更具可重复性
@deepin-ci-robot
Copy link

deepin pr auto review

我来对这个git diff进行审查:

  1. 语法逻辑:
  • 语法正确,符合debian/rules文件的格式要求
  • 变量赋值和命令调用都符合规范
  1. 代码质量:
  • 添加了DEB_CMAKE_EXTRA_FLAGS变量的设置,这是一个好的实践,因为它集中管理了CMake的额外参数
  • 使用了CMAKE_SKIP_BUILD_RPATH=ON参数,这有助于提高构建的可重现性
  • 保留了原有的VERSION参数设置,确保版本信息正确传递
  1. 代码性能:
  • 新增的CMAKE_SKIP_BUILD_RPATH=ON参数实际上可能会略微影响性能,因为它禁用了RPATH,但这对于构建可重现性是必要的权衡
  • 其他编译标志保持不变,不会对性能产生影响
  1. 代码安全:
  • 新增的参数主要是为了构建可重现性,不直接涉及安全性
  • 保留了原有的安全编译标志(-Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack),这是很好的安全实践

改进建议:

  1. 建议在注释中添加更详细的说明,解释为什么需要设置CMAKE_SKIP_BUILD_RPATH=ON
  2. 可以考虑将DEB_CMAKE_EXTRA_FLAGS的定义移到文件顶部的变量定义区域,与其他export变量放在一起,这样更易于维护
  3. 如果还有其他与构建可重现性相关的CMake参数需要设置,可以一并添加到DEB_CMAKE_EXTRA_FLAGS中

总体来说,这是一个合理的改动,主要目的是提高构建的可重现性,代码质量和安全性都得到了保持。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, BLumia

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@18202781743 18202781743 merged commit 21b0fa3 into linuxdeepin:master Nov 17, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants