chore: migrate linglong packaging to declarative buildext apt deps - #408
Conversation
Replace manual apt download, install_dep, deploy_dep and .install generation with buildext.apt build_depends/depends declarations. 以声明式 buildext.apt 替代手动 apt 下载、install_dep/deploy_dep 与 .install 生成逻辑,构建期与运行期统一使用 runtime 层的 Qt。 Log: 迁移 linglong 打包依赖为声明式 buildext.apt Influence: 构建依赖与随包依赖改为 buildext 声明;Qt/DTK 改用 runtime 层 提供,不再捆绑 libqt6waylandclient6;pandoc 数据目录改为构建期显式复制; 已通过 ll-builder build 与运行容器 ldd/pandoc 自测验证。
|
Warning
详情 {
"export": {
"linglong.yaml": {
"a": [
" export PATH=\"$PREFIX/bin:$PATH\""
],
"b": [
" export PKG_CONFIG_PATH=\"${PREFIX}/lib/${TRIPLET}/pkgconfig:/usr/lib/${TRIPLET}/pkgconfig:/usr/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}\""
]
}
}
} |
Reviewer's GuideThe PR converts linglong packaging to declarative buildext.apt build and runtime dependencies, removes fragile manual apt/deploy/.install handling, uses the runtime Qt/DTK stack consistently, and explicitly preserves pandoc’s share data that buildext does not merge. Sequence diagram for declarative build and runtime dependency assemblysequenceDiagram
participant Builder
participant BuildextApt
participant Runtime
participant BuildScript
participant Package
Builder->>BuildextApt: Install build_depends
BuildextApt-->>BuildScript: cargo, rustc, pandoc, development libraries
Runtime->>BuildScript: Provide Qt/DTK through /runtime
BuildScript->>BuildScript: cargo build --release -p rofd-ffi
BuildScript->>BuildScript: cmake .. with CMAKE_PREFIX_PATH=${PREFIX}#59;/runtime
BuildScript->>BuildScript: Copy /usr/share/pandoc to ${PREFIX}/share/pandoc
BuildScript-->>Package: Install application and rofd artifacts
BuildextApt->>Package: Merge depends bin/sbin/lib closure
Package-->>Builder: Declarative package output
Flow diagram for pandoc data preservation during packagingflowchart TD
PandocDependency[Declare pandoc in buildext.apt.depends]
PandocBinary[Merge pandoc bin/lib files]
CheckData{ /usr/share/pandoc/data exists? }
CopyData["cp -a /usr/share/pandoc ${PREFIX}/share/pandoc"]
Fail[Exit with error]
Package[Package pandoc with share data]
PandocDependency --> PandocBinary
PandocBinary --> CheckData
CheckData -->|yes| CopyData
CheckData -->|no| Fail
CopyData --> Package
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✓ (25/25)评价: 语法正确,逻辑清晰 ✓ 潜在问题: 分析说明:
2. 代码质量 ✓ (24/25)评价: 代码结构清晰,注释完整 ✓ 潜在问题:
建议:
分析说明:
3. 代码性能 ✓ (20/20)评价: 性能良好,资源使用合理 ✓ 潜在问题: 分析说明:
4. 代码安全 ✓ (30/30)评价: 存在0个安全漏洞 ✓
安全漏洞详情: 漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个 分析说明:
💡 改进建议代码示例# 建议将未加引号的变量改为加引号形式
# 修改前:
mkdir -p ${PREFIX}/share
cp -a /usr/share/pandoc ${PREFIX}/share/pandoc
# 修改后:
mkdir -p "${PREFIX}/share"
cp -a /usr/share/pandoc "${PREFIX}/share/pandoc"📋 审查信息
本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
变更说明
将 linglong 打包从手动依赖处理迁移为声明式
buildext.apt(build_depends+depends),删除build:中的手动apt --download-only、install_dep、deploy_dep与.install生成逻辑。依赖分类依据(对照 base/runtime 层 packages.list 逐一核对)
/usr/share/pandoc数据目录)、pkg-config 探测的第三方开发库(libdjvulibre/libgxps/cairo/glib/freetype/jpeg/chardet/lcms2/openjp2/jbig2dec、libicu——vendored pdfium 直接包含<unicode/uchar.h>)。CMAKE_PREFIX_PATH=/runtime使用 runtime 层自带的全套 Qt/DTK 开发包,构建期与运行期同一套 Qt,从根上消除 apt Qt 与 runtime waylandclient 私有 ABI 混用导致的链接失败(原注释记录的问题)。特殊处理
bin/sbin/lib,share/会被丢弃,故在构建期从/usr/share/pandoc显式复制随包分发(reader 以--data-dir=${prefix}/share/pandoc/data调用)。自测
ll-builder build(1.14.0)完整构建成功(exit=0)Summary by Sourcery
Migrate Linglong packaging to declarative dependency management and streamline the build artifact flow.
Enhancements:
Chores: