chore: add linglong.yaml for deepin-manual#573
Merged
lzwind merged 1 commit intolinuxdeepin:masterfrom Oct 16, 2025
Merged
Conversation
This change adds a `linglong.yaml` file for the `deepin-manual` application. This file defines the configuration for building and packaging the application within the Linglong ecosystem. It includes package metadata, dependencies, build instructions, and source URLs for the application. Adding this file allows for the application to be built and distributed using the Linglong package manager, enabling users to easily install and manage the application. The `linglong.yaml` includes deb packages for dependencies required to build deepin-manual. 影响: 为 `deepin-manual` 应用程序添加 `linglong.yaml` 文件。 此文件定义了在灵珑生态系统中构建和打包应用程序的配置。 它包括应用程序的包元数据、依赖项、构建说明和源 URL。 添加此文件允许使用灵珑软件包管理器构建和分发应用程序,从而使用户能够轻松 安装和管理该应用程序。 `linglong.yaml` 包括构建 deepin-manual 所需依赖的 deb 软件包。
deepin pr auto review这是一个 Linglong 应用打包配置文件(linglong.yaml),用于定义 deepin-manual 应用的构建和打包过程。我来对它进行详细分析:
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_FILES=(
dman
dmanHelper
)
# 生成.install 文件
bash ./deploy_dep "${LDD_FILES[@]}"改进建议:
具体改进示例: version: "1"
package:
id: org.deepin.manual
name: "deepin-manual"
version: 6.5.40.1
kind: app
description: |
manual for deepin os.
# 添加更多元数据
vendor: "UnionTech Software Technology Co., Ltd."
homepage: "https://www.deepin.org"
license: "GPL-3.0-or-later"
base: org.deepin.base/25.2.1/sw64
runtime: org.deepin.runtime.webengine/25.2.1/sw64
command:
- dman
build: |
# 设置错误处理
set -e
# 检查构建环境
if [ ! -d "linglong/sources" ]; then
echo "Error: Build environment not properly set up"
exit 1
fi
# 安装依赖
bash ./install_dep linglong/sources "${PREFIX}"
# 验证关键依赖
if ! command -v cmake &> /dev/null; then
echo "Error: cmake is required but not installed"
exit 1
fi
# 修改路径
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}
# 编译并记录日志
if ! cmake --build build -j`nproc`; then
echo "Build failed, check build.log for details"
exit 1
fi
# 安装并记录日志
if ! cmake --build build --target install >install.log 2>&1; then
echo "Install failed, check install.log for details"
exit 1
fi
# 验证安装结果
if [ ! -f "${PREFIX}/bin/dman" ]; then
echo "Error: Installation verification failed"
exit 1
fi
# 生成依赖关系
LDD_FILES=(
dman
dmanHelper
)
# 生成安装文件
bash ./deploy_dep "${LDD_FILES[@]}"
# 清理临时文件
rm -rf build
# 添加构建超时控制
timeout: 3600 # 1小时超时
# 添加构建缓存
cache:
- .cache
- build这些改进可以提高构建过程的安全性、可靠性和可维护性,同时减少构建失败的风险。建议根据实际需求选择合适的改进方案。 |
lzwind
approved these changes
Oct 16, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengbo11, 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds a
linglong.yamlfile for thedeepin-manualapplication.This file defines the configuration for building and packaging the application within the Linglong ecosystem.
It includes package metadata, dependencies, build instructions, and source URLs for the application.
Adding this file allows for the application to be built and distributed using the Linglong package manager, enabling users to easily install and manage the application.
The
linglong.yamlincludes deb packages for dependencies required to build deepin-manual.影响:
为
deepin-manual应用程序添加linglong.yaml文件。此文件定义了在灵珑生态系统中构建和打包应用程序的配置。
它包括应用程序的包元数据、依赖项、构建说明和源 URL。
添加此文件允许使用灵珑软件包管理器构建和分发应用程序,从而使用户能够轻松
安装和管理该应用程序。
linglong.yaml包括构建 deepin-manual 所需依赖的 deb 软件包。