Skip to content

chore: migrate linglong deps to declarative buildext.apt - #642

Merged
pengfeixx merged 1 commit into
linuxdeepin:release/snipefrom
pengfeixx:chore/pick-buildext-apt
Oct 10, 2026
Merged

pengfeixx merged 1 commit into
linuxdeepin:release/snipefrom
pengfeixx:chore/pick-buildext-apt

Conversation

@pengfeixx

@pengfeixx pengfeixx commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

变更说明

将 master 上的提交 6e6b6107(PR #626)cherry-pick 到 release/snipe 分支。

  • 移除 linglong.yaml build: 中手动 apt 下载/解包(install_dep、deploy_dep)的依赖处理逻辑,并删除这两个死脚本
  • 新增 声明式 buildext.apt 的 build_depends/depends,基于 base(org.deepin.base/25.2.2)/runtime(org.deepin.runtime.webengine/6.7.0)层实际包列表核对
  • 剔除 陈旧/测试专用依赖(libpolkit-qt6-1-dev、libgtest-dev、libgmock-dev)
  • 修复 qt6-base-dev 装入 /usr 后抢占 find_package(Qt6):cmake 增加 -DCMAKE_PREFIX_PATH=/runtime

验证

  • cherry-pick 无冲突,git diff --check 通过
  • 与 master 上已合入内容一致(仅同一提交的干净 pick)

关联

Summary by Sourcery

Migrate Linglong dependency handling to declarative buildext.apt configuration and simplify the application build.

Bug Fixes:

  • Declare runtime and build dependencies through buildext.apt so Linglong can resolve and install the required dependency closure.
  • Ensure CMake prefers runtime Qt6 and DTK6 packages to prevent build-time packages from taking precedence.

Enhancements:

  • Remove the legacy manual dependency download, installation, and deployment scripts and simplify the build process.
  • Remove obsolete and test-only dependency declarations.

1. Replace manual apt download/unpack and generated .install logic in build:
2. Declare buildext.apt build_depends/depends from base/runtime layer contents
3. Drop stale or test-only deps (polkit-qt6, gtest, gmock) and dead scripts
4. Set CMAKE_PREFIX_PATH=/runtime so Qt6 resolves from the runtime layer

Log: Linglong build now resolves deps via buildext; event-log lib ships at runtime

Influence:
1. Run ll-builder build and confirm it completes without manual dep scripts
2. Launch the app and verify encoding detection works (chardet/uchardet/ICU)
3. Open source files and check syntax highlighting renders (KF6)
4. Check event logging loads libdeepin-event-log.so without errors

chore: 玲珑依赖迁移为声明式 buildext.apt

1. 移除 build 中手动 apt 下载解包与 .install 生成逻辑
2. 依据 base/runtime 层内容声明 buildext.apt 构建与运行依赖
3. 剔除陈旧及测试专用依赖(polkit-qt6、gtest、gmock)与死脚本
4. 设置 CMAKE_PREFIX_PATH=/runtime,Qt6 从 runtime 层解析

Log: 玲珑构建改为声明式装依赖;运行层随包携带 libdeepin-event-log.so

Influence:
1. 执行 ll-builder build 验证无需手动依赖脚本即可构建通过
2. 启动应用验证编码识别(chardet/uchardet/ICU)功能正常
3. 打开源文件检查语法高亮(KF6)渲染正常
4. 触发埋点日志确认 libdeepin-event-log.so 加载无报错
@sourcery-ai

sourcery-ai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Migrates Linglong dependency management from custom apt download/deployment scripts to declarative buildext.apt build and runtime dependencies, while configuring CMake to prefer the runtime layer so installed development packages do not override the intended Qt6/DTK6 toolchain.

File-Level Changes

Change Details Files
Replace custom dependency downloading, installation, and runtime dependency packaging with declarative Linglong APT dependency metadata.
  • Delete the install_dep and deploy_dep helper scripts.
  • Remove manual apt archive download/unpack and generated .install handling from the build script.
  • Declare required build-time development packages and runtime library packages under buildext.apt.
  • Drop obsolete and test-only dependencies from the dependency set.
deploy_dep
install_dep
linglong.yaml
Ensure CMake resolves Qt6 and DTK6 from the runtime layer before buildext-installed packages.
  • Add -DCMAKE_PREFIX_PATH=/runtime to the CMake configuration.
  • Retain direct CMake installation without the removed deployment step.
linglong.yaml

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="linglong.yaml" line_range="43" />
<code_context>
-  LDD_FILES=(
-    deepin-editor
-    libdeepin-event-log.so
-    libzpdcallback.so
-  )
-
</code_context>
<issue_to_address>
**ZPD restrictions are bypassed**

When a ZPD-enabled build’s base/runtime layers do not provide `libzpdcallback.so`, `libzpdcallback.so` is dynamically loaded and is not captured by normal link dependency resolution. With the library removed from the explicit deployment list and absent from runtime dependencies, `loadCustomDLL()` leaves the callbacks null, so ZPD access-control hooks do not run and configured clipboard restrictions are bypassed.

Include `libzpdcallback.so` in the packaged app by restoring it to the explicit deployment list or declaring it as a runtime dependency.

Also at `linglong.yaml:35`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread linglong.yaml
LDD_FILES=(
deepin-editor
libdeepin-event-log.so
libzpdcallback.so

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High · ZPD restrictions are bypassed

When a ZPD-enabled build’s base/runtime layers do not provide libzpdcallback.so, libzpdcallback.so is dynamically loaded and is not captured by normal link dependency resolution. With the library removed from the explicit deployment list and absent from runtime dependencies, loadCustomDLL() leaves the callbacks null, so ZPD access-control hooks do not run and configured clipboard restrictions are bypassed.

Include libzpdcallback.so in the packaged app by restoring it to the explicit deployment list or declaring it as a runtime dependency.

Also at linglong.yaml:35.

Prompt for AI agents
In `linglong.yaml` at line 43:

**ZPD restrictions are bypassed**

When a ZPD-enabled build’s base/runtime layers do not provide `libzpdcallback.so`, `libzpdcallback.so` is dynamically loaded and is not captured by normal link dependency resolution. With the library removed from the explicit deployment list and absent from runtime dependencies, `loadCustomDLL()` leaves the callbacks null, so ZPD access-control hooks do not run and configured clipboard restrictions are bypassed.

Include `libzpdcallback.so` in the packaged app by restoring it to the explicit deployment list or declaring it as a runtime dependency.

Also at `linglong.yaml:35`.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@pengfeixx
pengfeixx merged commit 0fa1ed5 into linuxdeepin:release/snipe Oct 10, 2026
16 of 17 checks passed
@pengfeixx
pengfeixx deleted the chore/pick-buildext-apt branch October 10, 2026 06:57
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