Skip to content

build(debian): separate Qt5/Qt6 build configurations for V25/V20 support#359

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:develop/snipefrom
LiHua000:master
Jan 30, 2026
Merged

build(debian): separate Qt5/Qt6 build configurations for V25/V20 support#359
deepin-bot[bot] merged 1 commit intolinuxdeepin:develop/snipefrom
LiHua000:master

Conversation

@LiHua000
Copy link
Contributor

@LiHua000 LiHua000 commented Jan 30, 2026

Log: as title

Summary by Sourcery

Build:

  • Introduce debian/control.1 with Qt5-oriented build dependencies and package metadata to enable distinct Debian build configurations.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 30, 2026

Reviewer's Guide

Introduces a separate Debian packaging control file with Qt5-based build dependencies and runtime dependencies for the deepin-compressor package, laying groundwork to distinguish Qt5/Qt6 build configurations for different V25/V20 targets.

File-Level Changes

Change Details Files
Add a dedicated Debian control file defining Qt5-based build and runtime dependencies for deepin-compressor.
  • Declare the deepin-compressor source package metadata including maintainer, section, priority, and standards version.
  • Specify Qt5- and DTK-based build dependencies along with supporting libraries and tools needed to build and test the application.
  • Define the binary package stanza for deepin-compressor, including architecture, dependency substitution variables, explicit runtime tools (archivers/compressors), and recommended auxiliary packages.
  • Document the package as an archive manager capable of handling multiple compression formats and encrypted archives in its Description fields.
debian/control.1

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 - I've left some high level feedback:

  • The dependency qualifiers unar[i386 amd64] and unrar[i386 amd64] are missing the required space before the architecture list and should be written as unar [i386 amd64] and unrar [i386 amd64] to be valid Debian control syntax.
  • Introducing debian/control.1 alongside debian/control is unusual in Debian packaging; consider clarifying or adjusting how this alternative control file is selected/used so tools like dpkg-buildpackage and sbuild consistently pick the intended configuration.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The dependency qualifiers `unar[i386 amd64]` and `unrar[i386 amd64]` are missing the required space before the architecture list and should be written as `unar [i386 amd64]` and `unrar [i386 amd64]` to be valid Debian control syntax.
- Introducing `debian/control.1` alongside `debian/control` is unusual in Debian packaging; consider clarifying or adjusting how this alternative control file is selected/used so tools like `dpkg-buildpackage` and `sbuild` consistently pick the intended configuration.

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.

@deepin-ci-robot
Copy link

deepin pr auto review

这段 git diff 显示了对 Debian 软件包控制文件 debian/control 的修改,主要涉及构建依赖关系的变更,以及新增了一个名为 debian/control.1 的文件。

以下是对该变更的审查意见,涵盖语法逻辑、代码质量、代码性能和代码安全四个方面:

1. 语法逻辑

  • 构建依赖移除备选项

    • 变更:原 debian/control 文件中的 Build-Depends 字段使用了 OR 逻辑(|)来兼容 Qt5 和 Qt6 版本的库(例如 qt6-base-dev | qtbase5-dev)。修改后的版本移除了 Qt5 的备选项,仅保留了 Qt6 版本的依赖(例如仅保留 qt6-base-dev)。
    • 分析:这表明该项目正在进行从 Qt5 向 Qt6 的迁移,且不再支持 Qt5 环境。
    • 潜在逻辑问题:需要确认当前代码库是否已经完全移除了对 Qt5 的依赖。如果代码中仍有大量 Qt5 的遗留代码或未更新的 API 调用,构建将会失败。此外,需要确认目标发行版(如 Debian Stable)的软件源中是否已包含这些 Qt6 开发包,否则会导致无法构建。
  • 新增文件 debian/control.1

    • 内容:该文件看起来像是一个备份或旧版本的 control 文件,因为它包含的是 Qt5 的依赖。
    • 语法逻辑:该文件本身语法是正确的,符合 Debian 控制文件规范。
    • 存在性逻辑:通常在版本控制中,不应将临时备份文件(如 .bak, .orig, .1)提交到仓库中。这可能是误操作,或者是为了对比而暂存的。如果是为了保留 Qt5 的构建配置以便回退,建议使用 Git 分支而不是在当前分支保留一个重命名的文件。

2. 代码质量

  • 依赖管理的清晰度

    • 改进点:移除 OR 依赖后,构建环境的要求变得更加明确和单一,减少了因环境差异导致的潜在构建问题,提高了构建的一致性。
    • 建议:既然决定全面转向 Qt6,建议在 debian/changelog 中明确记录这一重大变更(Breaking Change),告知用户和打包者。
  • 文件管理

    • 问题debian/control.1 文件的存在会污染源代码目录。
    • 建议:如果不需要该文件,请将其删除。如果需要保留 Qt5 的支持,应该将其维护在一个独立的分支(如 debian/sidqt5)中,而不是作为同名文件的不同版本共存。

3. 代码性能

  • 影响debian/control 文件本身不涉及运行时代码,因此对软件运行时的性能没有直接影响
  • 构建性能:Qt6 通常比 Qt5 引入了更多的元数据和模块,理论上编译时间可能会略有增加,但这属于依赖库本身的特性,与 control 文件的写法无关。

4. 代码安全

  • 依赖版本的安全性

    • 建议:Qt6 作为较新的版本,通常包含比 Qt5 更多的安全修复和补丁。强制使用 Qt6 依赖有助于确保软件链接到更安全的底层库。
    • 注意:请确保 libdtk6* 等 DTK(Deepin Tool Kit)库也是最新且安全的版本,因为它们是 Deepin 桌面环境的核心依赖。
  • debian/control.1 中的依赖问题

    • 审查:在 debian/control.1 文件的 Depends 字段中,出现了 unar[i386 amd64]unrar[i386 amd64] 这样的架构限定写法。
    • 安全与兼容性风险:这种写法虽然在 dpkg 语法上是允许的,但比较生僻。它强制要求包仅安装在 i386 或 amd64 架构上。如果该软件包打算支持 ARM 架构(如 deepin v23 for ARM),这种写法会导致在 ARM 架构上安装依赖时出错,从而影响软件的可用性。
    • 建议:如果这些包在所有架构上都可用,建议移除架构限制;如果不可用,应确保软件包声明了正确的 Architecture 字段,并处理缺失依赖的情况。

总结与改进建议

  1. 确认 Qt6 迁移完整性:确保源代码已完全适配 Qt6,没有遗留的 Qt5 调用,否则会导致构建失败。
  2. 处理 debian/control.1
    • 如果是误提交,请立即删除该文件。
    • 如果是为了保留 Qt5 版本,请使用 Git 分支管理,不要在主目录保留备份文件。
  3. 检查架构限制:审查 debian/control.1(如果它代表了未来的依赖配置)中的架构限定依赖(如 [i386 amd64]),确保不会阻碍对 ARM 等其他架构的支持。
  4. 更新变更日志:在 debian/changelog 中详细记录此次从 Qt5 到 Qt6 的依赖变更,以便追踪和维护。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LiHua000, lzwind

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

@LiHua000
Copy link
Contributor Author

/merge

@deepin-bot deepin-bot bot merged commit 3f25437 into linuxdeepin:develop/snipe Jan 30, 2026
15 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