This change addresses an issue where runtime dependencies were not
being correctly deduplicated, leading to multiple instances of the
same runtime being included in the application environment. This was
happening because the `reference` field of `runtime` and `base` was
directly assigned with `*localRuntime` or `*localBase`, which did not
include repo information. The fix involves wrapping `localRuntime` and
`localBase` with `ReferenceWithRepo` and adding repo information. This
ensures that the package manager can accurately identify and reuse
existing runtimes. The `semanticMatching = true` option is added to
`getSatisfiedPackage` to ensure the version matching works.
Influence:
1. Test installing an application with shared runtime dependencies.
2. Verify that only one instance of each runtime is present in the
environment.
3. Check that the application functions correctly with the deduplicated
runtimes.
4. Ensure semantic version matching works as expected.
fix: 修复重复的运行时依赖
此更改解决了运行时依赖项未被正确去重的问题,导致应用程序环境中包含同一
运行时的多个实例。发生这种情况是因为 `runtime` 和 `base` 的 `reference`
字段直接使用 `*localRuntime` 或 `*localBase` 进行赋值,未包含仓库信息。
此修复包括使用 `ReferenceWithRepo` 包装 `localRuntime` 和 `localBase`
并添加仓库信息。这确保了包管理器可以准确地识别和重用现有的运行时。
`semanticMatching = true` 选项已添加到 `getSatisfiedPackage`,以确保版本
匹配正常工作。
Influence:
1. 测试安装具有共享运行时依赖项的应用程序。
2. 验证环境中仅存在每个运行时的单个实例。
3. 检查应用程序在使用去重后的运行时时是否正常运行。
4. 确保语义版本匹配按预期工作。
This commit addresses a critical issue where dependency pulling would
fail in offline or unreliable network conditions. The `pullDependency`
function in `PackageManager` was solely relying on remote repositories
to fetch runtime and base dependencies. This change introduces a
fallback mechanism: if fetching from the remote repository fails, the
function now attempts to locate the dependency in the local repository
before failing. This ensures that if the required dependency is already
present locally (e.g., from a previous successful pull), it can be used
even when offline or experiencing network issues.
Influence:
1. Test dependency pulling in offline mode after successfully pulling
dependencies online.
2. Simulate network issues during dependency pulling to verify the
fallback mechanism.
3. Test cases where dependencies are only available locally.
fix: 修复离线场景下依赖拉取失败的问题
此提交修复了一个在离线或网络不可靠的情况下依赖拉取会失败的关键问题。
`PackageManager` 中的 `pullDependency` 函数之前仅依赖于远程仓库来获取
runtime 和 base 依赖。此更改引入了一个回退机制:如果从远程仓库获取失败,
该函数现在会尝试在本地仓库中查找依赖项,然后再失败。这确保了如果所需的依
赖项已在本地存在(例如,从先前成功的拉取中获得),即使在离线或遇到网络问
题时也可以使用。
Influence:
1. 在成功在线拉取依赖后,测试离线模式下的依赖拉取。
2. 在依赖拉取期间模拟网络问题,以验证回退机制。
3. 测试仅在本地可用的依赖项的情况。
1. Update the installation instructions for multiple distributions.
2. Replace `linglong-builder`, `linglong-box` with `linglong-installer`
or `linyaps-web-store-installer` for supported distributions to align
with the current installation packages.
3. Add installation instruction of Linyaps Web Store Installer.
4. Add seperate build tool installation section.
5. These changes ensure users can easily install the Linyaps package and
relevant components.
Influence:
1. Verify the installation steps for each distribution: Arch/Manjaro/
Parabola, deepin 25/23, Fedora 41/42, Ubuntu 24.04, Debian 12/13,
openEuler 23.09/24.03, UOS 1070, AnolisOS 8, and openkylin 2.0.
2. Confirm that `linglong-installer` and `linyaps-web-store-installer`
are correctly installed where specified.
3. Test the functionality of the Linyaps Web Store Installer after
installation.
4. Verify the build tool installation using `linglong-builder` on Debian
and RPM-based systems.
5. Ensure the AUR repository installation instructions work as expected.
docs: 更新安装说明
1. 更新多个发行版的安装说明
2. 对于支持的发行版,使用 `linglong-installer` 或 `linyaps-web-store-
installer` 替换 `linglong-builder`、`linglong-box`,以与当前的安装包保持
一致。
3. 添加 Linyaps Web Store Installer 的安装说明。
4. 添加单独的构建工具安装章节。
5. 这些更改确保用户可以轻松安装 Linyaps 包和相关组件。
Influence:
1. 验证每个发行版的安装步骤:Arch/Manjaro/Parabola、deepin 25/23、Fedora
41/42、Ubuntu 24.04、Debian 12/13、openEuler 23.09/24.03、UOS 1070、
AnolisOS 8 和 openkylin 2.0。
2. 确认在指定位置正确安装了 `linglong-installer` 和 `linyaps-web-store-
installer`。
3. 测试安装后 Linyaps Web Store Installer 的功能。
4. 验证 Debian 和基于 RPM 的系统上使用 `linglong-builder` 的构建工具
安装。
5. 确保 AUR 仓库安装说明按预期工作。
Update installation paths for shell scripts to use
`CMAKE_INSTALL_FULL_SYSCONFDIR` instead of `CMAKE_INSTALL_SYSCONFDIR`.
This ensures that the scripts are installed in the correct location,
even when the installation prefix is not the root directory. This fixes
issues where linglong related scripts were not correctly installed in
non-standard installation paths.
Influence:
1. Verify that linglong.sh is installed to the correct path, both when
installing to /usr and to a non-standard prefix.
2. Check that the environment variables set in the script are correctly
sourced when a new session starts.
1. Replace hardcoded /etc paths with CMAKE_INSTALL_SYSCONFDIR variable
2. Fix two installation destinations in the CMakeLists.txt file:
- Changed /etc/profile.d to ${CMAKE_INSTALL_SYSCONFDIR}/profile.d
- Changed /etc/X11/Xsession.d to ${CMAKE_INSTALL_SYSCONFDIR}/X11/
Xsession.d
3. This makes the installation paths configurable through CMake rather
than hardcoded
4. The change ensures better compatibility across different Linux
distributions and packaging systems
Influence:
1. Test installation on target system to verify script placement
2. Check that environment variables are properly set in both profile.d
and Xsession.d locations
3. Verify package builds work correctly with custom
CMAKE_INSTALL_SYSCONFDIR values
fix: 使用 CMAKE_INSTALL_SYSCONFDIR 变量替代配置路径中的硬编码值
1. 将原有的硬编码路径 /etc 替换为 CMAKE_INSTALL_SYSCONFDIR 变量
2. 修改了 CMakeLists.txt 中的两个安装路径:
- 将 /etc/profile.d 替换为 ${CMAKE_INSTALL_SYSCONFDIR}/profile.d
- 将 /etc/X11/Xsession.d 替换为 ${CMAKE_INSTALL_SYSCONFDIR}/X11/
Xsession.d
3. 这使得安装路径可以通过 CMake 配置而非固定写死
4. 此修改提升了不同 Linux 发行版和打包系统的兼容性
Influence:
1. 在目标系统上测试安装以验证脚本位置的正确性
2. 检查 profile.d 和 Xsession.d 中的环境变量是否正确设置
3. 验证使用自定义 CMAKE_INSTALL_SYSCONFDIR 值时的包构建过程
1. Changed LayerPackager to use std::filesystem::path instead of QDir
for workDir
2. Added defensive programming in initWorkDir to handle multiple calls
3. Implemented proper cleanup in UABFile destructor for mount points and
unpacked files
4. Added support for both erofsfuse and fsck.erofs unpack methods
5. Improved error handling and added new utility methods in UABFile
6. Added comprehensive unit tests for UAB file operations
refactor: 改进UAB文件处理和清理
1. 将LayerPackager中的workDir从QDir改为std::filesystem::path
2. 在initWorkDir中添加防御性编程以处理多次调用
3. 在UABFile析构函数中实现挂载点和解压文件的正确清理
4. 添加对erofsfuse和fsck.erofs两种解压方法的支持
5. 改进错误处理并在UABFile中添加新的实用方法
6. 为UAB文件操作添加全面的单元测试
This commit adds a new application icon for Linyaps and integrates it
into the desktop entry.
The `linyaps.svg` file contains the vector graphic for the icon. The
CMakeLists.txt file is updated to install the icon to the correct
location in the file system (`/usr/share/icons/hicolor/scalable/apps`).
The `linyaps.desktop` file is modified to use the new icon by setting
the `Icon` field to "linyaps".
This change improves the visual presentation of the Linyaps application
in the desktop environment.
Log: Added application icon for Linyaps
Influence:
1. Verify that the Linyaps icon is displayed correctly in application
launchers and desktop environments.
2. Check that the icon is visually appealing and consistent with the
application's branding.
3. Test the icon at different sizes to ensure it remains clear and
recognizable.
4. Confirm that the icon is correctly installed to the system's icon
directory.
Refines the command execution tests to improve accuracy and reliability.
Specifically, the test for the "id" command now includes the "-u"
flag to directly retrieve the user ID, and the assertion checks if
the returned user ID matches the current user's UID obtained from
`getuid()`. This change eliminates the dependency on the "USER"
environment variable, which may not always be reliable, and provides
a more deterministic and accurate test. The previous test relied on
pattern matching to find the username within the output of `id`, which
was fragile.
Influence:
1. Execute the tests to verify that the `command::Cmd` class correctly
executes commands and returns their output.
2. Ensure that the updated test using `id -u` correctly retrieves and
validates the user ID.
3. Verify that the test case for non-existent commands still behaves as
expected, returning an empty `std::optional`.
test: 优化命令执行测试
优化命令执行测试,以提高准确性和可靠性。 具体来说,"id" 命令的测试
现在包含 "-u" 标志以直接检索用户ID,并且断言检查返回的用户ID是否与从
`getuid()` 获取的当前用户的UID匹配。 此更改消除了对 "USER" 环境变量的依
赖,该变量可能并不总是可靠的,并提供了更具确定性和准确性的测试。 之前的
测试依赖于模式匹配以在 `id` 的输出中查找用户名,这很不稳定。
Influence:
1. 执行测试以验证 `command::Cmd` 类是否正确执行命令并返回其输出。
2. 确保使用 `id -u` 的更新测试正确检索并验证用户 ID。
3. 验证不存在命令的测试用例是否仍然按预期运行,返回一个空的
`std::optional`。
1. Updated the demo documentation to use the `linglong-builder-demo`
repository. This provides a more straightforward and up-to-date example
for users to follow.
2. Modified installation instructions to include Fedora 42, Debian
13 and openEuler 24.03. This ensures broader OS support for users
installing `linglong-bin`
Influence:
1. Verify that the demo application builds and runs successfully using
the updated instructions.
2. Ensure that the installation instructions for Fedora 42, Debian 13
and openEuler 24.03 are accurate and complete.
docs: 更新演示和安装文档
1. 更新了演示文档,使用 `linglong-builder-demo` 仓库。这为用户提供了一个
更简单且最新的示例供参考。
2. 修改了安装说明,添加了 Fedora 42、Debian 13 和 openEuler 24.03 的安装
方法。这确保了用户安装 `linglong-bin` 时具有更广泛的操作系统支持
Influence:
1. 验证演示应用程序是否使用更新后的说明成功构建和运行。
2. 确保 Fedora 42、Debian 13 和 openEuler 24.03 的安装说明准确且完整。
This change hides the `linyaps.desktop` file by setting `Hidden=true`.
This is necessary because the application is not intended to be launched
directly by the user through the desktop environment. The intended
use is via command line invocation through `ll-cli install`. Preventing
direct launching reduces potential user confusion, as it requires
specific arguments only provided via the command line interface.
Influence:
1. Verify that the application is not visible in the desktop environment
application launcher or file manager.
2. Confirm that the application can still be invoked through the command
line using `ll-cli install`.
chore: 隐藏如意玲珑桌面文件
此更改通过设置 `Hidden=true` 来隐藏 `linyaps.desktop` 文件。 这是必要
的,因为该应用程序不打算由用户通过桌面环境直接启动。 预期用途是通过 `ll-
cli install` 的命令行调用。 阻止直接启动可减少潜在的用户困惑,因为它需要
仅通过命令行界面提供的特定参数。
Influence:
1. 验证该应用程序在桌面环境应用程序启动器或文件管理器中不可见。
2. 确认仍然可以使用 `ll-cli install` 通过命令行调用该应用程序。
* i18n: Translate po/en_US.po in fr
58% of minimum 50% translated source file: 'po/en_US.po'
on 'fr'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* i18n: Translate po/en_US.po in fr
75% of minimum 50% translated source file: 'po/en_US.po'
on 'fr'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* i18n: Translate po/en_US.po in fr
98% of minimum 50% translated source file: 'po/en_US.po'
on 'fr'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* i18n: Translate po/en_US.po in fr
100% translated source file: 'po/en_US.po'
on 'fr'.
* i18n: Translate po/en_US.po in uk
100% translated source file: 'po/en_US.po'
on 'uk'.
* i18n: Translate po/en_US.po in pt_BR
99% of minimum 50% translated source file: 'po/en_US.po'
on 'pt_BR'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* i18n: Translate po/en_US.po in pt_BR
100% translated source file: 'po/en_US.po'
on 'pt_BR'.
* i18n: Translate po/en_US.po in fi
100% translated source file: 'po/en_US.po'
on 'fi'.
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Remove "rshared" option from media mount configuration,
keeping only "rbind" for better compatibility and simpler mount behavior.
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
Introduces a new fmt based logging system to replace the previous
Qt-based logging mechanism.
Key features:
- Logging macros (LogD, LogI, LogW, LogE, LogF) for different levels.
- Configurable log levels and backends (Console, Journal).
- Configuration via environment variables (LINYAPS_LOG_LEVEL,
LINYAPS_LOG_BACKEND) for flexible control.
- Integration with systemd-journal for structured logging, including
code location (file, line, function).
- Custom `fmt` formatters for `QString`, `QStringList`, and
`linglong::utils::error::Error`.
- New string utility functions (`stringEqual`, `splitString`) are added.
The `qdebug_helper.h` is removed as part of this transition.
Signed-off-by: reddevillg <reddevillg@gmail.com>
1. Refactor LayerPackager to handle work directory creation more
robustly with fallback to /var/tmp or system temp dir
2. Add proper cleanup in destructor including unmounting if mounted
3. Implement file permission checking and manual file copying for cases
where direct FD access fails
4. Support both erofsfuse and fsck.erofs for unpacking with appropriate
fallback logic
5. Add comprehensive unit tests covering various unpack scenarios and
work dir initialization
6. Replace utils::command::Exec with utils::command::Cmd for better
command execution handling
7. Add proper error handling and logging throughout the implementation
The changes improve reliability when dealing with file permissions and
different system configurations, while making the code more testable
through mockable interfaces. The new unit tests verify behavior under
various conditions including:
- Normal fuse mounting
- Fuse mounting with offset
- Fallback to fsck.erofs when fuse isn't available
- Work directory initialization failures
refactor: 提升layer packager的可靠性和测试覆盖率
1. 重构 LayerPackager 以更健壮地处理工作目录创建,支持回退到/var/tmp或系
统临时目录
2. 在析构函数中添加适当的清理逻辑,包括卸载已挂载的文件系统
3. 实现文件权限检查和手动文件复制,处理直接文件描述符访问失败的情况
4. 支持使用erofsfuse和fsck.erofs两种方式进行解包,并实现适当的回退逻辑
5. 添加全面的单元测试,覆盖各种解包场景和工作目录初始化
6. 使用utils::command::Cmd替换utils::command::Exec以获得更好的命令执行
处理
7. 在整个实现中添加适当的错误处理和日志记录
这些改动提高了处理文件权限和不同系统配置时的可靠性,同时通过可模拟接口使
代码更易于测试。新的单元测试验证了各种条件下的行为,包括:
- 正常的fuse挂载
- 带偏移量的fuse挂载
- 当fuse不可用时回退到fsck.erofs
- 工作目录初始化失败的情况
1. Added erofs-utils package to the list of dependencies in both
build.yaml and codecov.yaml workflows
2. This package is required for EROFS filesystem support in the build
process
3. Ensures consistent development environment across different workflows
chore: 添加 erofs-utils 到构建依赖项
1. 在 build.yaml 和 codecov.yaml 工作流中添加了 erofs-utils 包到依赖项
列表
2. 该包是构建过程中 EROFS 文件系统支持所必需的
3. 确保不同工作流之间开发环境的一致性
1. Don't bind host statics in build statics, because build script may
write to those directories.
2. add /sbin to merge list.
Signed-off-by: reddevillg <reddevillg@gmail.com>
Adding a '--env' option to the ll-cli run command,
allowing users to set environment variables when running applications.
This feature supports multiple environment variables in KEY=VALUE format with
input validation to ensure proper formatting.
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
Use this annotation with ll-box to configure ns_last_pid in new pid
namespace to avoid pid collisions.
Signed-off-by: reddevillg <reddevillg@gmail.com>
1. Removed DesktopEntry class implementation and its header file
2. Removed corresponding test cases from ll-tests
3. Updated CMakeLists.txt to reflect these removals
4. The functionality appears to be unused in the project
5. Cleanup helps reduce maintenance burden and code complexity
chore: 移除桌面入口工具类和测试
1. 移除了 DesktopEntry 类的实现和头文件
2. 从 ll-tests 中移除了对应的测试用例
3. 更新了 CMakeLists.txt 以反映这些移除
4. 该功能在项目中似乎未被使用
5. 清理有助于减少维护负担和代码复杂度
Extracted the common OSTree pull options initialization code into a
separate method initOStreePullOptions to avoid code duplication. The
method handles:
1. Creating GVariantBuilder with common options
2. Setting refs and user agent
3. Disabling static deltas by default
This change makes the pull operation code cleaner and more maintainable
by centralizing the options configuration logic.
refactor: 提取 OSTree 拉取选项初始化代码
将 OSTree 拉取选项的初始化代码提取到单独的 initOStreePullOptions 方法中
以避免重复代码。该方法处理:
1. 创建带有通用选项的 GVariantBuilder
2. 设置refs和user-agent
3. 默认禁用静态增量
通过集中管理选项配置逻辑,使拉取操作代码更清晰且更易于维护。
1. Changed output check behavior to always run main-check.sh for UAB
export statistics
2. Separated skip conditions for non-app packages and output check
skipping
3. Improved message clarity with "skipped" vs "ignored" states
4. Maintained existing error handling for failed checks
The modification ensures main-check.sh always runs for app packages
since its output is needed for UAB export statistics, even when output
checks are skipped. The logic is now clearer with distinct handling for
non-app packages (skipped) vs skipped output checks (ignored).
fix: 修改ldd检查逻辑以支持UAB导出
1. 修改ldd检查行为,为UAB导出功能, 无论是否跳过output skip都执行main-check.sh
2. 分离非应用包和跳过输出检查的不同跳过条件
3. 使用"skipped"和"ignored"提高消息清晰度
4. 保留对检查失败的现有错误处理
此修改确保对于应用包始终运行main-check.sh,因为其输出用于UAB导出统计,即
使跳过输出检查。现在逻辑更清晰,区分了非应用包(跳过)和跳过输出检查(忽略)
的不同处理情况。
- Adds global exclusion patterns to ignore specific directories and files.
- Enables and configures the C++, Shell, Secrets, and Test Coverage analyzers.
- Configures the clang-format and prettier transformers for code formatting,
including specifying include and exclude patterns.