Skip to content

Conversation

@18202781743
Copy link
Contributor

  1. Added CMAKE_SKIP_BUILD_RPATH=ON flag to DEB_CMAKE_EXTRA_FLAGS
  2. Modified dh_auto_configure to include DEB_CMAKE_EXTRA_FLAGS
  3. This ensures reproducible builds by skipping build-time RPATH
  4. Improves package consistency across different build environments

Influence:

  1. Verify that builds are reproducible across different systems
  2. Test package installation and runtime behavior remains unchanged
  3. Confirm that RPATH is not embedded in binaries during build
  4. Validate that the build process completes successfully with new flags

feat: 添加可重复编译配置

  1. 向 DEB_CMAKE_EXTRA_FLAGS 添加 CMAKE_SKIP_BUILD_RPATH=ON 标志
  2. 修改 dh_auto_configure 以包含 DEB_CMAKE_EXTRA_FLAGS
  3. 通过跳过构建时 RPATH 确保可重复编译
  4. 提高不同构建环境下软件包的一致性

Influence:

  1. 验证在不同系统上的构建是否可重复
  2. 测试软件包安装和运行时行为保持不变
  3. 确认构建过程中二进制文件未嵌入 RPATH
  4. 验证使用新标志后构建过程成功完成

@18202781743 18202781743 requested review from BLumia and mhduiy November 11, 2025 05:04
@github-actions
Copy link
Contributor

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

1. Added CMAKE_SKIP_BUILD_RPATH=ON flag to DEB_CMAKE_EXTRA_FLAGS
2. Modified dh_auto_configure to include DEB_CMAKE_EXTRA_FLAGS
3. This ensures reproducible builds by skipping build-time RPATH
4. Improves package consistency across different build environments

Influence:
1. Verify that builds are reproducible across different systems
2. Test package installation and runtime behavior remains unchanged
3. Confirm that RPATH is not embedded in binaries during build
4. Validate that the build process completes successfully with new flags

feat: 添加可重复编译配置

1. 向 DEB_CMAKE_EXTRA_FLAGS 添加 CMAKE_SKIP_BUILD_RPATH=ON 标志
2. 修改 dh_auto_configure 以包含 DEB_CMAKE_EXTRA_FLAGS
3. 通过跳过构建时 RPATH 确保可重复编译
4. 提高不同构建环境下软件包的一致性

Influence:
1. 验证在不同系统上的构建是否可重复
2. 测试软件包安装和运行时行为保持不变
3. 确认构建过程中二进制文件未嵌入 RPATH
4. 验证使用新标志后构建过程成功完成
@github-actions
Copy link
Contributor

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

@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

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

  1. 语法逻辑审查:
  • 语法正确,符合 debian/rules 文件的格式要求
  • 变量赋值和命令调用都使用了正确的语法
  1. 代码质量改进建议:
  • 建议在 DEB_CMAKE_EXTRA_FLAGS 变量定义时添加注释说明其用途
  • 考虑将 CMAKE 配置参数组织得更结构化,比如:
# 基础构建配置
DEB_CMAKE_EXTRA_FLAGS += -DCMAKE_SKIP_BUILD_RPATH=ON

# 其他配置选项
CONFIG_FLAGS = -DBUILD_TESTING=OFF -DBUILD_DOCS=ON -DDTK_VERSION=$(_PACK_VER)

override_dh_auto_configure:
    dh_auto_configure -- $(DEB_CMAKE_EXTRA_FLAGS) $(CONFIG_FLAGS)
  1. 代码性能方面:
  • 添加的 -DCMAKE_SKIP_BUILD_RPATH=ON 参数可以减少运行时依赖路径的查找,有助于提升性能
  • 建议评估是否需要添加其他编译优化参数,如 -O2 或 -O3
  1. 代码安全方面:
  • -DCMAKE_SKIP_BUILD_RPATH=ON 是一个很好的安全实践,可以防止 RPATH 攻击
  • 建议考虑添加以下安全相关的编译选项:
DEB_CMAKE_EXTRA_FLAGS += \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
    -DWITH_HARDENING=ON
  1. 其他建议:
  • 考虑在文件开头添加一个变更日志注释,说明这次修改的目的
  • 建议添加对 DEB_CMAKE_EXTRA_FLAGS 变量的初始化检查,确保它已定义:
DEB_CMAKE_EXTRA_FLAGS ?= 

总体来说,这个修改是为了实现可重现编译(reproducible builds),这是一个很好的实践。修改本身是合理的,但可以通过上述建议进一步改进代码的质量和安全性。

@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 613f205 into linuxdeepin:master Nov 14, 2025
20 of 22 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