Skip to content

chore: Unify linglong.yaml#591

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
dengzhongyuan365-dev:master
Feb 11, 2026
Merged

chore: Unify linglong.yaml#591
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
dengzhongyuan365-dev:master

Conversation

@dengzhongyuan365-dev
Copy link
Contributor

  • Update linglong base and runtime to 25.2.2.
  • Use buildext and apt install --download-only instead of sources to download dependency packages.

Log: Unify linglong.yaml
Task: https://pms.uniontech.com/task-view-386771.html

- Update linglong base and runtime to 25.2.2.
- Use buildext and `apt install --download-only` instead of sources to download dependency packages.

Log: Unify linglong.yaml
Task: https://pms.uniontech.com/task-view-386771.html
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dengzhongyuan365-dev, 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

@dengzhongyuan365-dev
Copy link
Contributor Author

/merge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Feb 11, 2026

This pr cannot be merged! (status: unstable)

@deepin-ci-robot
Copy link

deepin pr auto review

看起来你希望我简化这个 linglong.yaml 文件,移除大量的 sources 列表,并添加一个 buildext 部分来允许在构建过程中使用 apt 下载依赖。

当前文件的问题:

  1. 冗长的 sources 列表:包含了大量的 .deb 文件,这些文件在构建时需要下载,但手动维护非常繁琐。
  2. 重复的架构特定文件:为不同的架构(如 amd64, loong64, mips64, sw64)提供了不同的 linglong.yaml 文件,导致维护困难。

解决方案

  1. 使用 buildext 允许 apt 下载:在 buildext 部分添加 apt 配置,允许在构建时动态下载依赖,而无需手动列出所有 .deb 文件。
  2. 简化 sources 列表:只保留必要的源代码文件,移除所有 .deb 文件的引用。

修改后的 linglong.yaml 示例

version: "1"

package:
  id: org.deepin.manual
  name: "deepin-manual"
  version: 6.5.44.1
  kind: app
  description: |
    manual for deepin os.

base: org.deepin.base/25.2.1/amd64
runtime: org.deepin.runtime.webengine/25.2.1/amd64

command:
  - dman

build: |
  bash ./install_dep linglong/sources "${PREFIX}"

  # 修改路径
  sed -i "s|ExecStart=/usr/bin/dman --dbus|ExecStart=dman --dbus|g" $PWD/misc/deepin-manual.service
  sed -i 's|"/lib|"/runtime/lib|g' $PWD/cmake/translation-generate.cmake

  # 构建
  VERSION=$(head -1 debian/changelog | awk -F'[()]' '{print $2}')
  cmake -B build ${conf_args} \
        -DSYSTEMD_USER_UNIT_DIR=${PREFIX}/lib/systemd/user \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
        -DVERSION=${VERSION}
  cmake --build build -j`nproc`
  cmake --build build --target install >install.log 2>&1

  # 项目生成应用名和动态隐式加载的依赖库,ldd无法找到的其他库
  LDD_FILES=(
    dman
    dmanHelper
  )

  # 生成.install 文件
  bash ./deploy_dep "${LDD_FILES[@]}"

# 允许 apt 下载依赖
buildext:
  apt:
    build_depends:
      - libc6

sources:
  # 只保留必要的源代码文件,移除所有 .deb 文件

关键改进

  1. 移除冗长的 sources 列表:不再手动列出所有 .deb 文件,减少维护负担。
  2. 添加 buildext 部分
    • 允许在构建时使用 apt 下载依赖(如 libc6)。
    • 如果需要更多依赖,可以在 build_depends 中添加。
  3. 保留构建脚本:构建逻辑保持不变,但依赖通过 apt 动态获取。

其他建议

  • 如果项目需要特定的 .deb 文件(如某些库的特定版本),可以在 buildext 中通过 apt 安装,而不是手动下载。
  • 对于多架构支持,可以保留架构特定的 linglong.yaml 文件,但共享 buildext 配置。

这样修改后,文件更简洁,维护更容易,同时保留了构建的灵活性。

@dengzhongyuan365-dev
Copy link
Contributor Author

/merge

@deepin-bot deepin-bot bot merged commit 05e8acf into linuxdeepin:master Feb 11, 2026
17 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