Skip to content

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

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
LiHua000:master
Jan 29, 2026
Merged

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

Conversation

@LiHua000
Copy link
Contributor

@LiHua000 LiHua000 commented Jan 29, 2026

Log: as title

Summary by Sourcery

Build:

  • Add a new debian/control.1 file defining build dependencies and package metadata for a Qt5-based deepin-camera build.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 29, 2026

Reviewer's Guide

Adds an alternative Debian control file (control.1) defining a Qt5-based build configuration for deepin-camera, likely to support V20 alongside an existing Qt6-based configuration.

File-Level Changes

Change Details Files
Introduce a separate Debian packaging control file with Qt5 build dependencies for deepin-camera.
  • Add Source/package metadata for deepin-camera to the new control.1 file
  • Declare full Build-Depends list including multimedia, gstreamer, and explicit Qt5/DTK development packages
  • Define binary package stanza for deepin-camera with architecture, library dependencies, recommends, and description tuned for UOS
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

@deepin-ci-robot
Copy link

deepin pr auto review

这份 git diff 主要涉及 debian/control 文件的修改,这是 Debian/Ubuntu 系统中用于定义软件包源码包和二进制包元数据(如依赖关系、构建依赖、维护者等)的关键文件。

以下是对该变更的详细审查意见,分为语法逻辑代码质量代码性能(此处主要指包管理效率)和代码安全四个方面。

1. 语法逻辑审查

  • Build-Depends 的变更逻辑

    • 变更内容:将 Build-Depends 中的 Qt 和 DTK 相关依赖从“或”关系(|)改为单一依赖。例如,将 qt6-base-dev | qtbase5-dev 改为仅 qt6-base-dev
    • 分析:这意味着该项目正在进行一次技术栈的迁移,从 Qt5 完全切换到 Qt6。从逻辑上讲,如果代码库已经完全迁移到 Qt6 API,移除 Qt5 的构建依赖是合理的,可以防止构建系统在同时存在两个版本时产生混淆或链接错误的库。
    • 潜在风险:需要确认上游代码是否已经完全移除了对 Qt5 的引用。如果代码中仍包含 Qt5 的头文件或 API 调用,构建将会失败。
  • 新增文件 debian/control.1

    • 分析:diff 中显示创建了一个新文件 debian/control.1。其内容看起来是修改前的 debian/control 的副本(或者是 Qt5 版本的备份)。
    • 问题:在标准的 Debian 打包工作流中,debian/control.1 不是一个标准文件。这通常被视为一种“临时文件”或“备份文件”。
    • 建议强烈建议debian/control.1 添加到 .gitignore 中,或者如果它是误提交的,应该从代码库中删除。保留两个控制文件容易造成混淆,让人不知道哪个才是当前生效的构建配置。
  • Standards-Version

    • 文件中显示 Standards-Version: 4.1.2。这是一个较旧的版本(当前最新通常在 4.6.x 以上)。虽然不影响构建,但建议在迁移 Qt6 的同时也更新策略标准版本,以符合最新的 Debian 打包规范。

2. 代码质量审查

  • 依赖管理的清晰度

    • 移除“或”依赖后,依赖关系变得单一且明确,这提高了构建的可预测性。构建者不再需要担心环境变量或默认安装版本导致的构建差异。
    • 建议:确保 debian/rules 中的 cmakeqmake 调用参数也明确指定了 Qt6 的路径(如 cmake -DQT_MAJOR_VERSION=6),以匹配 control 文件的变更。
  • 描述字段(Description)

    • debian/control.1 中,Description 字段内容为:this package software for UOS
    • 问题:这行描述存在严重的语法错误和格式问题。
      1. Description 的第一行是短描述,不应包含 "this package software" 这种冗余且语法不通的词汇。
      2. UOS 是特定操作系统名称,如果是通用 Debian 包,通常不应在描述中硬编码特定 OS 名称,除非该包专门为 UOS 定制且无法在其他系统运行。
      3. 格式上,长描述(第二行及以后)前面缺少一个空格。
    • 建议:应修改为标准的 Debian 描述格式,例如:
      Description: camera tool for Deepin/UOS
       deepin-camera is a tool to view camera, and also a smart tool
       to take photos and videos in daily life.
      

3. 代码性能(包管理效率)审查

  • 构建依赖的精简

    • 移除 Qt5 依赖可以略微减少构建环境检查的时间,并减小构建基础镜像的体积(如果使用容器构建)。这对于 CI/CD 流水线是有益的。
  • 二进制依赖(Depends)的兼容性

    • debian/control.1Depends 字段中,出现了大量的版本号“或”依赖,例如 libavcodec58 (>= 7:4.0) | libavcodec60
    • 分析:这是为了处理不同发行版(如 Debian Buster/Bullseye vs Bookworm)之间 FFmpeg 库版本号不同的问题。这种写法保证了兼容性。
    • 建议:既然主 control 文件已经升级到 Qt6,这意味着目标系统可能是较新的发行版(如 Debian 12+ 或 Deepin V23+)。新系统通常默认携带更新的 FFmpeg 库。建议检查是否可以简化这些依赖,直接依赖新版本(如 libavcodec60),从而简化依赖解析过程。

4. 代码安全审查

  • 库版本的安全性

    • Qt6 相比 Qt5 包含了许多安全修复和现代化的内存管理机制。强制使用 Qt6 (qt6-base-dev 等) 从长远来看有助于提高软件的安全性,因为旧版本的 Qt5 可能不再接收安全更新。
  • 依赖库的审查

    • control 文件中依赖了 libavutil-dev, libavformat-dev 等库。这些是 FFmpeg 的组件。
    • 建议:确保构建依赖中指定的这些库版本是受支持的稳定版本或 LTS 版本,避免使用包含已知漏洞的开发版。

总结与改进建议

  1. 删除多余文件:请确认 debian/control.1 是否需要提交。如果只是备份,请将其从 Git 中移除并加入 .gitignore
  2. 完善描述:修正 Description 字段中的语法错误,使其符合 Debian 打包规范,避免出现非标准的英文表达。
  3. 同步构建脚本:检查 debian/rulesCMakeLists.txt,确保构建逻辑确实已经切换到 Qt6,不会因为找不到 Qt5 而报错,也不会意外链接到系统中的 Qt5 库。
  4. 更新策略版本:建议将 Standards-Version 更新至当前最新的稳定版本,并检查是否需要相应的变更(如 debian/changelog)。
  5. 验证兼容性:由于去掉了 Qt5 的备选方案,请确保该软件包不会在只提供 Qt5 的旧系统上尝试构建,或者在 debian/controlArchitecture 或其他字段中做好限制,避免构建失败。

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 found 2 issues, and left some high level feedback:

  • The new debian/control.1 file appears to largely duplicate debian/control; consider clarifying the intent (e.g., version-specific naming or using a single control file with conditionals) to avoid configuration drift between the two.
  • The Depends: line in debian/control.1 is very long and hard to maintain; splitting it across multiple lines with standard Debian continuation formatting would improve readability and reduce the chance of merge errors.
  • In debian/control.1, the Description: field formatting is slightly off (missing a space after Description: and double space in for UOS); aligning it with standard Debian control file formatting will help tooling and consistency.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new `debian/control.1` file appears to largely duplicate `debian/control`; consider clarifying the intent (e.g., version-specific naming or using a single control file with conditionals) to avoid configuration drift between the two.
- The `Depends:` line in `debian/control.1` is very long and hard to maintain; splitting it across multiple lines with standard Debian continuation formatting would improve readability and reduce the chance of merge errors.
- In `debian/control.1`, the `Description:` field formatting is slightly off (missing a space after `Description:` and double space in `for  UOS`); aligning it with standard Debian control file formatting will help tooling and consistency.

## Individual Comments

### Comment 1
<location> `debian/control.1:50-51` </location>
<code_context>
+ ${misc:Depends},
+ libavcodec58 (>= 7:4.0) | libavcodec60, libavformat58 (>= 7:4.1) | libavformat60, libavutil56 (>= 7:4.0) | libavutil58, libswresample3 (>= 7:4.0) | libswresample4, libswscale5 (>= 7:4.0) | libswscale7, libffmpegthumbnailer4v5, libgl1, libpng16-16 (>= 1.6.2-1), libportaudio2 (>= 19+svn20101113), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.4.0)
+Recommends: libimageeditor6 | libimageeditor, uos-reporter, deepin-event-log
+Description:this package software for  UOS
+ deepin-camera is a tool to view camera, and also a smart take photo and video in life.
</code_context>

<issue_to_address>
**issue:** Tighten and fix the Description fields to follow Debian policy and improve clarity.

The short description should be a concise noun phrase and must include a space after `Description:`. The current text (`"this package software for  UOS"`) is ungrammatical and has a double space before `UOS`. For example:

```text
Description: camera and video capture tool for UOS
 deepin-camera is a tool to view camera output and to take photos and videos.
```
</issue_to_address>

### Comment 2
<location> `debian/control.1:41` </location>
<code_context>
+    qt6-tools-dev-tools,
+    qt6-svg-dev
 Standards-Version: 4.1.2
 Homepage: http://www.deepin.org

</code_context>

<issue_to_address>
**🚨 suggestion (security):** Consider using HTTPS for the Homepage field.

If the site supports it, updating this to `https://www.deepin.org` will prevent mixed-content/tooling warnings and align with current security best practices.

```suggestion
Homepage: https://www.deepin.org
```
</issue_to_address>

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.

Comment on lines +50 to +51
Description:this package software for UOS
deepin-camera is a tool to view camera, and also a smart take photo and video in life.
Copy link

Choose a reason for hiding this comment

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

issue: Tighten and fix the Description fields to follow Debian policy and improve clarity.

The short description should be a concise noun phrase and must include a space after Description:. The current text ("this package software for UOS") is ungrammatical and has a double space before UOS. For example:

Description: camera and video capture tool for UOS
 deepin-camera is a tool to view camera output and to take photos and videos.

qttools5-dev-tools,
libqt5svg5-dev
Standards-Version: 4.1.2
Homepage: http://www.deepin.org
Copy link

Choose a reason for hiding this comment

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

🚨 suggestion (security): Consider using HTTPS for the Homepage field.

If the site supports it, updating this to https://www.deepin.org will prevent mixed-content/tooling warnings and align with current security best practices.

Suggested change
Homepage: http://www.deepin.org
Homepage: https://www.deepin.org

@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
Copy link
Contributor

deepin-bot bot commented Jan 29, 2026

This pr cannot be merged! (status: unstable)

@LiHua000
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 29, 2026

This pr force merged! (status: unstable)

@deepin-bot deepin-bot bot merged commit 36b2a4f into linuxdeepin:master Jan 29, 2026
16 of 18 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