Skip to content

Conversation

@18202781743
Copy link
Contributor

  1. Added CMAKE_SKIP_BUILD_RPATH=ON flag to DEB_CMAKE_EXTRA_FLAGS for reproducible builds
  2. Modified dh_auto_configure to include DEB_CMAKE_EXTRA_FLAGS in the CMake configuration
  3. This ensures consistent build outputs across different build environments by skipping RPATH embedding
  4. Improves package reproducibility which is important for Debian packaging standards

Influence:

  1. Verify that builds produce identical binaries when built in different environments
  2. Test that the application still functions correctly without embedded RPATH
  3. Check that dynamic linking works properly with system library paths
  4. Validate that the package builds successfully with the new CMake flags

feat: 添加可重复编译参数

  1. 在DEB_CMAKE_EXTRA_FLAGS中添加CMAKE_SKIP_BUILD_RPATH=ON标志以实现可重 复编译
  2. 修改dh_auto_configure以在CMake配置中包含DEB_CMAKE_EXTRA_FLAGS
  3. 通过跳过RPATH嵌入确保在不同构建环境中产生一致的构建输出
  4. 提高包的可重复性,这对Debian打包标准很重要

Influence:

  1. 验证在不同构建环境中构建是否产生相同的二进制文件
  2. 测试应用程序在没有嵌入RPATH的情况下是否仍能正常工作
  3. 检查动态链接是否与系统库路径正常配合工作
  4. 验证包是否能够使用新的CMake标志成功构建

1. Added CMAKE_SKIP_BUILD_RPATH=ON flag to DEB_CMAKE_EXTRA_FLAGS for
reproducible builds
2. Modified dh_auto_configure to include DEB_CMAKE_EXTRA_FLAGS in the
CMake configuration
3. This ensures consistent build outputs across different build
environments by skipping RPATH embedding
4. Improves package reproducibility which is important for Debian
packaging standards

Influence:
1. Verify that builds produce identical binaries when built in different
environments
2. Test that the application still functions correctly without embedded
RPATH
3. Check that dynamic linking works properly with system library paths
4. Validate that the package builds successfully with the new CMake
flags

feat: 添加可重复编译参数

1. 在DEB_CMAKE_EXTRA_FLAGS中添加CMAKE_SKIP_BUILD_RPATH=ON标志以实现可重
复编译
2. 修改dh_auto_configure以在CMake配置中包含DEB_CMAKE_EXTRA_FLAGS
3. 通过跳过RPATH嵌入确保在不同构建环境中产生一致的构建输出
4. 提高包的可重复性,这对Debian打包标准很重要

Influence:
1. 验证在不同构建环境中构建是否产生相同的二进制文件
2. 测试应用程序在没有嵌入RPATH的情况下是否仍能正常工作
3. 检查动态链接是否与系统库路径正常配合工作
4. 验证包是否能够使用新的CMake标志成功构建
@github-actions
Copy link
Contributor

  • 检测到debian目录文件有变更: debian/rules

@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

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

  1. 语法逻辑:
  • 语法正确,新增的DEB_CMAKE_EXTRA_FLAGS += -DCMAKE_SKIP_BUILD_RPATH=ON符合makefile语法规范
  • 变量引用位置正确,在dh_auto_configure命令中正确使用了$(DEB_CMAKE_EXTRA_FLAGS)
  1. 代码质量:
  • 代码结构清晰,变量定义和使用分离
  • 添加了注释说明新增参数的目的,提高了代码可读性
  • 修改保持了原有的代码风格和格式
  1. 代码性能:
  • -DCMAKE_SKIP_BUILD_RPATH=ON参数可以跳过构建时的RPATH设置,这实际上可能会略微提高构建性能
  • 这个修改主要影响构建过程,对运行时性能没有直接影响
  1. 代码安全:
  • -DCMAKE_SKIP_BUILD_RPATH=ON参数有助于提高安全性,因为它可以:
    • 避免在构建过程中使用可能不安全的RPATH
    • 减少运行时动态库搜索路径的复杂性
    • 有助于防止RPATH相关的安全漏洞

改进建议:

  1. 可以考虑在注释中添加更详细的说明,解释为什么需要这个参数以及它的影响
  2. 建议添加一个空行在注释和变量定义之间,以提高可读性:
# reproducible编译参数
# 跳过构建时的RPATH设置以提高安全性
#
DEB_CMAKE_EXTRA_FLAGS += -DCMAKE_SKIP_BUILD_RPATH=ON
  1. 考虑将DEB_CMAKE_EXTRA_FLAGS的定义移到文件开头与其他导出变量放在一起,保持变量定义的集中管理

总体来说,这个修改是合理的,它提高了构建过程的安全性,并且保持了良好的代码质量。

@deepin-ci-robot
Copy link
Contributor

[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 3089d88 into linuxdeepin:master Nov 14, 2025
11 of 13 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