Skip to content

Conversation

@18202781743
Copy link
Contributor

@18202781743 18202781743 commented Nov 12, 2025

  • feat: add reproducible build parameters
  • fix: optimize plugin installation to avoid redundant files

Summary by Sourcery

Add reproducible build parameters and streamline plugin installation to include only necessary file types

New Features:

  • Add reproducible build parameters to the Debian packaging rules

Enhancements:

  • Filter installed plugin files to only qmldir, .qmltypes, .qml, and .js in CMakeLists to avoid redundant files

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 12, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR ensures deterministic Debian builds by introducing reproducible build parameters and streamlines plugin deployment by restricting install targets to QML-relevant files only.

Flow diagram for reproducible build parameters in Debian packaging

flowchart TD
  A["Debian build process"] --> B["Apply reproducible build parameters"]
  B --> C["Deterministic output"]
Loading

File-Level Changes

Change Details Files
Optimize plugin installation to avoid redundant files
  • Replaced bare install(DIRECTORY) calls with FILES_MATCHING filters
  • Added patterns for qmldir, *.qmltypes, *.qml and *.js to the install rules
panels/dock/CMakeLists.txt
panels/notification/center/CMakeLists.txt
panels/notification/plugin/CMakeLists.txt
Add parameters for reproducible builds in debian/rules
  • Injected environment variables and compiler flags to standardize timestamps
  • Enabled stripping of build paths and metadata
debian/rules

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • The PR description mentions adding reproducible build parameters, but I don’t see those changes in the diff—please include the intended build flag definitions.
  • The FILES_MATCHING patterns only include qmldir, *.qmltypes, *.qml, and *.js; confirm that this doesn’t omit other runtime assets (e.g., images or translations) needed by the plugins.
  • Since the install() invocations are duplicated across multiple CMakeLists, consider extracting them into a common macro or function to reduce repetition.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The PR description mentions adding reproducible build parameters, but I don’t see those changes in the diff—please include the intended build flag definitions.
- The FILES_MATCHING patterns only include qmldir, *.qmltypes, *.qml, and *.js; confirm that this doesn’t omit other runtime assets (e.g., images or translations) needed by the plugins.
- Since the install() invocations are duplicated across multiple CMakeLists, consider extracting them into a common macro or function to reduce repetition.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

BLumia
BLumia previously approved these changes Nov 13, 2025
@deepin-bot
Copy link

deepin-bot bot commented Nov 13, 2025

TAG Bot

New tag: 2.0.18
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #1349

@deepin-bot
Copy link

deepin-bot bot commented Nov 14, 2025

TAG Bot

New tag: 2.0.19
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #1350

@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.

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

1. Added CMAKE_SKIP_BUILD_RPATH=ON flag to enable reproducible builds
2. This flag prevents embedding build machine specific paths in binaries
3. Modified dh_auto_configure to include DEB_CMAKE_EXTRA_FLAGS
4. Ensures consistent binary output across different build environments

Influence:
1. Test building the package on different machines to verify
reproducibility
2. Compare binary checksums from different build environments
3. Verify that RPATH is not embedded in the compiled binaries
4. Test package installation and functionality after the change
5. Ensure build process completes successfully with the new flag

feat: 添加可重复编译参数

1. 添加 CMAKE_SKIP_BUILD_RPATH=ON 标志以启用可重复构建
2. 该标志防止在二进制文件中嵌入特定于构建机器的路径
3. 修改 dh_auto_configure 以包含 DEB_CMAKE_EXTRA_FLAGS
4. 确保在不同构建环境中获得一致的二进制输出

Influence:
1. 在不同机器上测试软件包构建以验证可重复性
2. 比较来自不同构建环境的二进制校验和
3. 验证编译后的二进制文件中未嵌入 RPATH
4. 测试更改后的软件包安装和功能
5. 确保构建过程使用新标志后能成功完成
Changed the CMake installation directives for dock, notification center,
and notification plugin modules to use FILES_MATCHING with specific
patterns instead of installing entire directories. This prevents
redundant files from being installed during repeated builds, which was
causing compilation issues.

The modification specifies that only QML-related files (qmldir,
*.qmltypes, *.qml, *.js) should be installed from the build
directories, rather than copying all files. This resolves the problem
where unnecessary files were being repeatedly installed, leading to
compilation conflicts and build inconsistencies.

Influence:
1. Verify that dock panel still loads and functions correctly
2. Test notification center display and interaction
3. Check notification plugin behavior
4. Ensure all QML components are properly installed and accessible
5. Test repeated builds to confirm no installation conflicts occur

fix: 优化插件安装以避免冗余文件

修改了dock、通知中心和通知插件模块的CMake安装指令,使用FILES_MATCHING和
特定模式替代安装整个目录。这防止了在重复构建期间安装冗余文件,该问题曾导
致编译问题。

此修改指定仅应从构建目录安装QML相关文件(qmldir、*.qmltypes、*.qml、
*.js),而不是复制所有文件。这解决了因重复安装不必要文件而导致的编译冲突
和构建不一致问题。

Influence:
1. 验证dock面板仍能正确加载和运行
2. 测试通知中心的显示和交互
3. 检查通知插件行为
4. 确保所有QML组件正确安装并可访问
5. 测试重复构建以确认没有安装冲突发生
@18202781743
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Nov 14, 2025

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit 33f2d93 into linuxdeepin:master Nov 14, 2025
6 of 10 checks passed
@deepin-ci-robot
Copy link

deepin pr auto review

我来分析一下这个git diff的内容,主要涉及构建系统的改进。以下是我的审查意见:

  1. debian/rules改进:
  • 添加了-DCMAKE_SKIP_BUILD_RPATH=ON参数,这是一个好的实践,可以避免构建时RPATH的干扰
  • DEB_CMAKE_EXTRA_FLAGS添加到dh_auto_configure中,使配置更加规范
  • 建议考虑添加更多的安全编译选项,如-fstack-protector-strong-D_FORTIFY_SOURCE=2
  1. CMakeLists.txt文件改进:
  • 在各个模块中添加了更精确的文件安装规则,使用FILES_MATCHING模式来只安装特定类型的文件
  • 移除了引号的使用,这在CMake中是可以接受的,但建议保持一致性
  • 建议在install命令中添加PERMISSIONS选项来明确设置文件权限
  1. 安全性改进:
  • 使用FILES_MATCHING可以防止意外安装不必要的文件,这是一个很好的安全实践
  • 建议在install规则中添加COMPONENT标记,以便更好地管理安装包
  1. 性能优化:
  • 通过精确控制安装的文件类型,可以减少不必要的文件安装,降低安装包大小
  • 建议考虑使用CMAKE_INSTALL_DEBUG_LIBRARIES选项来分离调试信息
  1. 建议的其他改进:
  • 考虑在CMakeLists.txt中添加CMAKE_INSTALL_MESSAGE选项来控制安装过程的输出详细程度
  • 可以考虑添加CMAKE_INSTALL_DEFAULT_COMPONENT_NAME来设置默认组件名
  • 建议在install命令中添加OPTIONAL标记,使安装过程更加健壮

总体来说,这些改进是积极的,主要提高了构建系统的精确性和安全性。建议继续完善构建系统的文档,并考虑添加更多的错误检查和验证步骤。

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