Skip to content

Conversation

@dengbo11
Copy link
Contributor

  1. Add a new linglong.yaml file to the sw64 directory. This file contains the configuration for building the deepin-album application using the Linglong packaging system.
  2. The configuration specifies the package ID, name, version, kind (app), and description.
  3. It defines the base and runtime dependencies, and build instructions, including extracting dependent libraries from .deb files, moving BLAS and LAPACK libraries, preparing plugins, and updating ld.so.cache.
  4. The build process uses CMake to build and install the application.
  5. The configuration generates .install file to set LIBHEIF_PLUGIN_PATH env
  6. A list of .deb files are provided as sources for dependencies, ensuring all necessary components for compiling and running deepin- album are included.

Influence:

  1. Build deepin-album by linglong
  2. Verify that the album can be launched and used normally.
  3. Check if all dependent libraries are correctly linked and loaded.
  4. Test the image formats that the album supports.

feat: 为deepin-album添加linglong.yaml文件

  1. sw64 目录下新增一个 linglong.yaml 文件。该文件包含使用 Linglong 软件包管理系统构建 deepin-album 应用程序的配置。
  2. 配置指定了软件包 ID、名称、版本、类型(应用)和描述。
  3. 它定义了基础和运行时依赖项,以及构建指令,包括从 .deb 文件中提取依赖 库、移动 BLAS 和 LAPACK 库、准备插件和更新 ld.so.cache
  4. 构建过程使用 CMake 来构建和安装应用程序。
  5. 配置生成.install文件用于设置LIBHEIF_PLUGIN_PATH环境变量
  6. 提供了一个 .deb 文件列表作为依赖项的来源,确保包含编译和运行 deepin-album 所需的所有组件。

Influence:

  1. 通过 linglong 构建 deepin-album
  2. 验证相册是否可以正常启动和使用。
  3. 检查所有依赖库是否已正确链接和加载。
  4. 测试相册支持的图像格式。

1.  Add a new `linglong.yaml` file to the `sw64` directory. This file
contains the configuration for building the `deepin-album` application
using the Linglong packaging system.
2.  The configuration specifies the package ID, name, version, kind
(app), and description.
3.  It defines the base and runtime dependencies, and build
instructions, including extracting dependent libraries from .deb files,
moving BLAS and LAPACK libraries, preparing plugins, and updating
`ld.so.cache`.
4.  The build process uses CMake to build and install the application.
5.  The configuration generates `.install` file to set
`LIBHEIF_PLUGIN_PATH` env
6.  A list of .deb files are provided as sources for dependencies,
ensuring all necessary components for compiling and running `deepin-
album` are included.

Influence:
1. Build deepin-album by linglong
2. Verify that the album can be launched and used normally.
3. Check if all dependent libraries are correctly linked and loaded.
4. Test the image formats that the album supports.

feat: 为deepin-album添加linglong.yaml文件

1.  在 `sw64` 目录下新增一个 `linglong.yaml` 文件。该文件包含使用
Linglong 软件包管理系统构建 `deepin-album` 应用程序的配置。
2.  配置指定了软件包 ID、名称、版本、类型(应用)和描述。
3.  它定义了基础和运行时依赖项,以及构建指令,包括从 .deb 文件中提取依赖
库、移动 BLAS 和 LAPACK 库、准备插件和更新 `ld.so.cache`。
4.  构建过程使用 CMake 来构建和安装应用程序。
5.  配置生成`.install`文件用于设置`LIBHEIF_PLUGIN_PATH`环境变量
6.  提供了一个 .deb 文件列表作为依赖项的来源,确保包含编译和运行
`deepin-album` 所需的所有组件。

Influence:
1. 通过 linglong 构建 deepin-album
2. 验证相册是否可以正常启动和使用。
3. 检查所有依赖库是否已正确链接和加载。
4. 测试相册支持的图像格式。
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.

Sorry @dengbo11, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot
Copy link

deepin pr auto review

这是一个 Linglong 应用包的配置文件 (linglong.yaml),用于定义和构建 deepin-album 应用。让我对文件内容进行分析和审查:

1. 语法逻辑分析

  1. 版本和基础配置

    • 使用了正确的 YAML 语法
    • version: '1' 符合规范
    • package 部分定义了应用的基本信息
  2. 构建脚本(build)

    • 包含了依赖安装、文件移动、插件准备等步骤
    • 使用了 cmake 进行构建,配置合理
    • 包含了 ldconfig 更新,用于动态链接库缓存
    • 正确处理了版本号获取和安装
  3. 依赖源(sources)

    • 列出了大量必需的 deb 包依赖
    • 每个包都有完整的 URL 和 digest 校验

2. 代码质量评估

  1. 结构组织

    • 文件结构清晰,各部分职责分明
    • 注释充分,特别是对 SPDX 许可证和构建步骤的说明
  2. 可维护性

    • 依赖列表非常长,可以考虑拆分或使用更模块化的方式管理
    • 硬编码的版本号可能需要更好的版本管理策略

3. 性能考虑

  1. 构建优化

    • 使用了 nproc 进行并行编译,这是好的实践
    • 但可以考虑添加构建缓存机制
  2. 依赖管理

    • 依赖项较多,可能导致较大的安装包体积
    • 可以考虑将一些可选功能作为可选依赖

4. 安全性评估

  1. 依赖完整性

    • 所有依赖包都有 digest 校验,确保下载完整性
    • 使用了可信的源地址 (pools.uniontech.com)
  2. 构建安全

    • 没有发现明显的安全漏洞
    • 但建议定期更新依赖以修复已知安全问题

改进建议

  1. 依赖管理优化

    # 建议将依赖分类管理
    dependencies:
      required:
        - qt6-base
        - dtk6-core
      optional:
        - ffmpegthumbnailer
  2. 构建优化

    build: |
      # 添加构建缓存
      if [ -d "build-cache" ]; then
          cp -r build-cache/* build/
      fi
      # ... 其他构建步骤 ...
      # 保存缓存
      mkdir -p build-cache
      cp -r build/* build-cache/
  3. 版本管理改进

    package:
      version: ${VERSION:-6.0.46.1}  # 支持环境变量覆盖
  4. 错误处理增强

    build: |
      set -e  # 遇到错误立即退出
      # ... 构建步骤 ...
      if [ $? -ne 0 ]; then
          echo "Build failed" >&2
          exit 1
      fi
  5. 资源清理

    build: |
      # ... 构建步骤 ...
      # 清理不必要的文件
      rm -rf build-cache

总结

这是一个相对完善的 Linglong 应用配置文件,主要问题在于:

  1. 依赖列表过于庞大,可以考虑优化和分类
  2. 缺少错误处理和资源清理机制
  3. 版本管理可以更加灵活
  4. 可以考虑添加构建缓存机制

建议按照上述建议进行改进,以提高配置文件的可维护性、性能和安全性。

@lzwind lzwind merged commit e22f215 into linuxdeepin:master Oct 16, 2025
17 checks passed
@deepin-ci-robot
Copy link

[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.

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

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