build / ubuntu_24.04 (push) Has been cancelledDetails
build / ubuntu_22.04 (push) Has been cancelledDetails
coverage / codecov (push) Has been cancelledDetails
Replaces command-based initialization of the logging system with
an explicit backend parameter, simplifying configuration logic
and improving maintainability.
Removes redundant code that inferred the log backend from
command names. Updates all affected components to pass the
appropriate backend directly when initializing the log system.
Refactors the icon packaging process by removing the intermediate
step of creating an "icon.a" archive and directly passing the
icon value to the `addNewSection` method. Improves code
clarity and reduces unnecessary operations.
1. Hook scripts should be executed before exporting and generating caches; otherwise, execution failures may result in the application being removed.
2. Enhances logging for better visibility into hook execution
failures and aligns hook handling across installation, upgrade,
and dependency management workflows.
build / ubuntu_24.04 (push) Has been cancelledDetails
build / ubuntu_22.04 (push) Has been cancelledDetails
coverage / codecov (push) Has been cancelledDetails
- Updated `find_package(Qt6 COMPONENTS Core DBus)` to include `DBusPrivate` to ensure the availability of the `Qt6::DBusPrivate` target.
- This change aligns with Qt6.10 build system requirements, which mandate explicit inclusion of private modules.
https://doc-snapshots.qt.io/qt6-6.10/whatsnew610.html#build-system-changes
Fixed the equality operator for Repo struct to include the newly added
mirrorEnabled field, preventing incorrect comparison results when this
field differs between configurations. Added static assertions to ensure
future structural changes to Repo-related types will trigger compilation
errors if equality operators are not updated accordingly.
Enhanced configuration setting logic with comprehensive debug logging
to improve troubleshooting capabilities. Added logging for configuration
changes, comparison results, and key operations during config updates to
help diagnose issues with repository configuration management.
Log: Improved repository configuration change detection and logging
Influence:
1. Test repository configuration changes with different mirrorEnabled
settings
2. Verify configuration comparison works correctly when only
mirrorEnabled differs
3. Check debug logs appear during configuration updates
4. Test configuration persistence and cache rebuilding after changes
5. Verify no regression in existing configuration management
functionality
fix: 修复仓库配置比较并添加调试日志
修复了 Repo 结构的相等运算符,包含新增的 mirrorEnabled 字段,防止在该字
段不同时产生错误的比较结果。添加了静态断言,确保未来对 Repo 相关类型的结
构更改如果未更新相等运算符实现将触发编译错误。
增强了配置设置逻辑,添加了全面的调试日志以改进故障排除能力。增加了配置变
更、比较结果和配置更新期间关键操作的日志记录,帮助诊断仓库配置管理问题。
Log: 改进仓库配置变更检测和日志记录
Influence:
1. 测试使用不同 mirrorEnabled 设置的仓库配置变更
2. 验证当仅 mirrorEnabled 不同时配置比较正常工作
3. 检查配置更新期间调试日志是否正确出现
4. 测试配置变更后的配置持久化和缓存重建
5. 验证现有配置管理功能无回归问题
1. Introduce `BashCommandHelper` to centralize bash command generation.
2. Refactor container entrypoint script generation for better
readability and maintainability.
3. Remove masking of `~/.bashrc` as it's no longer necessary with the
new entrypoint setup.
The previous method of generating the entrypoint script and default
bash command was scattered and not easily maintainable. This commit
introduces `BashCommandHelper` to encapsulate the logic for generating
default bash commands, exec commands, and the entrypoint script. This
improves code readability and makes it easier to modify these commands
in the future. Also removed the `~/.bashrc` masking, the new entrypoint
creation mechanism has already solved the problem.
Influence:
1. Test container execution with different commands and entrypoints.
2. Verify that environment variables are correctly set up within the
container.
3. Ensure that the default bash shell is correctly initialized when
entering the container without specific commands.
重构: 简化容器入口点生成
1. 引入 `BashCommandHelper` 来集中化 bash 命令的生成。
2. 重构容器入口点脚本的生成,以提高可读性和可维护性。
3. 移除 `~/.bashrc` 的屏蔽,因为使用新的入口点设置后不再需要它。
之前的入口点脚本和默认 bash 命令的生成方法分散且不易于维护。 此提交引入
`BashCommandHelper` 来封装生成默认 bash 命令、exec 命令和入口点脚本的逻
辑。 这提高了代码的可读性,并且更容易在将来修改这些命令。 此外,删除了
`~/.bashrc` 屏蔽,新的入口点创建机制已经解决了该问题。
Influence:
1. 使用不同的命令和入口点测试容器执行。
2. 验证容器内是否正确设置了环境变量。
3. 确保在没有特定命令的情况下进入容器时,正确初始化默认的 bash shell。
1. Add environment variable support to Cmd class for process execution
2. Set GIT_SUBMODULES=true when executing source fetch scripts
3. Conditionally execute git submodule commands based on GIT_SUBMODULES
env var
4. Fix member variable naming in Cmd class (command -> m_command)
5. Pass environment variables to command existence checking process
This change allows git submodules to be fetched only when explicitly
enabled through the GIT_SUBMODULES environment variable, providing
better control over the source fetching process. The environment
variable mechanism was added to the Cmd utility class to support this
feature, and existing command execution logic was updated to use proper
member variable naming conventions.
Log: Added conditional git submodule fetching support in source fetcher
Influence:
1. Test git repository fetching with submodules enabled
2. Verify git repository fetching without submodules (default behavior)
3. Test environment variable passing in command execution
4. Verify command existence checking with environment variables
5. Test source fetching for projects with and without submodules
6. Validate that existing git fetch functionality remains unchanged
feat: 通过环境变量控制启用 git 子模块获取
1. 为 Cmd 类添加环境变量支持以执行进程
2. 在执行源码获取脚本时设置 GIT_SUBMODULES=true
3. 基于 GIT_SUBMODULES 环境变量条件性执行 git 子模块命令
4. 修正 Cmd 类中的成员变量命名(command -> m_command)
5. 将环境变量传递给命令存在性检查进程
此变更允许仅在通过 GIT_SUBMODULES 环境变量明确启用时才获取 git 子模块,
从而更好地控制源码获取过程。为支持此功能,向 Cmd 工具类添加了环境变量机
制,并更新了现有命令执行逻辑以使用正确的成员变量命名约定。
Log: 在源码获取器中添加条件性 git 子模块获取支持
Influence:
1. 测试启用子模块的 git 仓库获取
2. 验证不带子模块的 git 仓库获取(默认行为)
3. 测试命令执行中的环境变量传递
4. 验证带环境变量的命令存在性检查
5. 测试带和不带子模块的项目源码获取
6. 验证现有 git 获取功能保持不变
1. Add new flag --no-clean-objects to remove command options
2. Modify cmdRemoveApp function signature to accept prune parameter
3. Conditionally execute repo.prune() based on prune flag
4. Maintain repo.mergeModules() execution regardless of prune flag
5. Update command line interface to expose the new flag
This change allows users to control whether object files should be
cleaned during app removal. By default, objects are cleaned (previous
behavior), but users can now skip this step using --no-clean-objects
flag for faster removal operations or when they want to preserve objects
for other purposes.
Log: Added --no-clean-objects flag to ll-builder remove command
Influence:
1. Test default remove behavior (should clean objects)
2. Test remove with --no-clean-objects flag (should not clean objects)
3. Verify repo.mergeModules() is always called
4. Test removal of single and multiple apps with both options
5. Verify error handling for invalid app references
6. Test edge cases with empty app list
feat: 为 remove 命令添加 no-clean-objects 选项
1. 为 remove 命令选项添加新的 --no-clean-objects 标志
2. 修改 cmdRemoveApp 函数签名以接受 prune 参数
3. 根据 prune 标志有条件地执行 repo.prune()
4. 无论 prune 标志如何都执行 repo.mergeModules()
5. 更新命令行界面以暴露新标志
此更改允许用户控制在删除应用程序期间是否应清理对象文件。默认情况下,对象
会被清理(之前的行为),但用户现在可以使用 --no-clean-objects 标志跳过此
步骤,以实现更快的删除操作或在他们希望为其他目的保留对象时使用。
Log: 为 ll-builder remove 命令添加 --no-clean-objects 标志
Influence:
1. 测试默认删除行为(应清理对象)
2. 测试使用 --no-clean-objects 标志的删除(不应清理对象)
3. 验证 repo.mergeModules() 是否始终被调用
4. 测试单个和多个应用程序的删除(两种选项)
5. 验证无效应用程序引用的错误处理
6. 测试空应用程序列表的边界情况
The logic for handling the `--no-dbus` flag was inverted. It was
checking `!noDBusFlag` which meant the sudo block was executed when
`--no-dbus` was *not* set. This meant that the application attempted
to use the package manager connection even when the user explicitly
requested to not use dbus (and likely intended to run as root). This
commit corrects the logic by checking `*noDBusFlag`. Now the sudo block
will only execute when `--no-dbus` is actually set.
Influence:
1. Test ll-cli commands with and without the `--no-dbus` flag as a
normal user. Verify that without `--no-dbus`, the commands fail due to
insufficient permissions.
2. Test ll-cli commands with the `--no-dbus` flag as root. Verify that
the commands succeed.
3. Test ll-cli commands without the `--no-dbus` flag as root. Verify
that the commands succeed as they will connect via DBus.
fix: 修正 no-dbus 标志逻辑
`--no-dbus` 标志的处理逻辑被反转了。 它检查的是 `!noDBusFlag`,这意味着
当 *没有* 设置 `--no-dbus` 时,sudo 代码块会被执行。 这意味着即使当用户
明确要求不使用 dbus (并且可能打算以 root 身份运行) 时,应用程序也会尝试
使用包管理器连接。 此提交通过检查 `*noDBusFlag` 来更正逻辑。 现在,只有
在实际设置 `--no-dbus` 时,sudo 代码块才会执行。
Influence:
1. 作为普通用户,使用和不使用 `--no-dbus` 标志测试 ll-cli 命令。 验证在
没有 `--no-dbus` 的情况下,由于权限不足,命令会失败。
2. 作为 root 用户,使用 `--no-dbus` 标志测试 ll-cli 命令。 验证命令是否
成功。
3. 作为 root 用户,在没有 `--no-dbus` 标志的情况下测试 ll-cli 命令。 验
证命令是否成功,因为它们将通过 DBus 连接。
* chore: update translation files
Update translation files with the latest messages from the source code.
This ensures that all user-facing strings are available for translation
and keeps the translations up-to-date with the latest features and
bug fixes. This commit includes the `.tx/config` file which configures
Transifex CLI and also the updated `po/en_US.po` file with the new
strings and updated message locations.
Influence:
1. Verify that all new strings are present in the translation platform
(Transifex).
2. Check for any errors or warnings during the translation update
process.
3. Ensure that the updated `.po` files are correctly generated and
contain the necessary headers and metadata.
4. After translations are updated in Transifex, download the translated
files and verify that the application displays the translated strings
correctly for different languages.
chore: 更新翻译文件
使用源代码中的最新消息更新翻译文件。 这确保了所有面向用户的字符串都
可用于翻译,并使翻译与最新的功能和错误修复保持同步。 此提交包括配置
Transifex CLI 的 `.tx/config` 文件,以及包含新字符串和更新的消息位置的更
新后的 `po/en_US.po` 文件。
Influence:
1. 验证所有新字符串是否都存在于翻译平台(Transifex)中。
2. 检查翻译更新过程中是否有任何错误或警告。
3. 确保正确生成更新后的 `.po` 文件,并且其中包含必要的标头和元数据。
4. 在 Transifex 中更新翻译后,下载翻译后的文件,并验证应用程序是否针对不
同的语言正确显示翻译后的字符串。
* i18n: Translate po/en_US.po in ca
95% of minimum 50% translated source file: 'po/en_US.po'
on 'ca'.
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 es
95% of minimum 50% translated source file: 'po/en_US.po'
on 'es'.
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 zh_CN
92% of minimum 50% translated source file: 'po/en_US.po'
on 'zh_CN'.
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 fi
95% of minimum 50% translated source file: 'po/en_US.po'
on 'fi'.
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 pl
95% of minimum 50% translated source file: 'po/en_US.po'
on 'pl'.
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 en_GB
69% of minimum 50% translated source file: 'po/en_US.po'
on 'en_GB'.
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
95% 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 uk
95% of minimum 50% translated source file: 'po/en_US.po'
on 'uk'.
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
95% 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 sq
71% of minimum 50% translated source file: 'po/en_US.po'
on 'sq'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* chore: Translate po/en_US.po in zh_CN (#1402)
100% translated source file: 'po/en_US.po'
on 'zh_CN'.
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Update the translations template file (.pot) to reflect the latest
changes in the source code. This includes updating existing messages and
adding new ones. This update ensures that all translatable strings are
available for localization. The changes reflect updates to command-line
options, descriptions, and error messages related to application and
runtime management, repository handling, and building.
Influence:
1. No direct functionality change. Verify that the updated .pot file
contains all the latest translatable strings from the source code.
2. Ensure no regressions in the UI or CLI tool.
3. After the update, if language translations are updated based on this
pot file, test the updated language translations.
chore: 更新 .pot 文件中的翻译
更新翻译模板文件 (.pot) 以反映源代码中的最新更改。这包括更新现有消息和添
加新消息。 此更新确保所有可翻译的字符串都可用于本地化。这些更改反映了与
应用程序和运行时管理、存储库处理和构建相关的命令行选项、描述和错误消息的
更新。
Influence:
1. 没有直接的功能变更。验证更新后的 .pot 文件是否包含源代码中的所有最新
可翻译字符串。
2. 确保 UI 或 CLI 工具中没有回归。
3. 更新后,如果语言翻译是基于此 pot 文件更新的,请测试更新后的语言翻译。
1. Fixed inverted logic in list command for showing upgrade list vs
regular package list
2. Added sorting by package ID for both regular list and upgrade list
outputs
3. Replaced Qt logging with linglong's custom logging in ostree
repository
4. Maintained existing filtering functionality by package type
Log: Fixed package list display logic and improved sorting
Influence:
1. Test ll-cli list command without parameters to show installed
packages
2. Test ll-cli list --upgradable to show available upgrades
3. Verify package sorting by ID in both list modes
4. Test package type filtering with --type parameter
5. Verify installation time display in package list
6. Confirm error handling for repository access issues
fix: 修复列表命令逻辑和日志记录
1. 修复了显示升级列表与常规包列表的反向逻辑
2. 为常规列表和升级列表输出添加了按包ID排序功能
3. 在ostree仓库中将Qt日志替换为linglong自定义日志
4. 保持了按包类型过滤的现有功能
Log: 修复包列表显示逻辑并改进排序功能
Influence:
1. 测试不带参数的 ll-cli list 命令以显示已安装的包
2. 测试 ll-cli list --upgradable 以显示可用升级
3. 验证两种列表模式下的包ID排序
4. 测试使用 --type 参数的包类型过滤功能
5. 验证包列表中的安装时间显示
6. 确认仓库访问错误的处理机制
1. Add `--base` option to specify the base layer.
2. Add `--runtime` option to specify the runtime.
3. Modify `RunContext::resolve` to utilize the `--base` and `--runtime`
options.
4. Update builder resolution to pass base and runtime references.
5. Add logging for base and runtime resolution
Log: Added command-line options to specify the base and runtime for
application execution.
Influence:
1. Test application execution with different base layers.
2. Verify that specifying a runtime overrides the default runtime.
3. Ensure that the `--base` and `--runtime` options are respected during
application resolution.
4. Check that the logging accurately reflects the used base and runtime.
feat: 为 ll-cli 添加 base 和 runtime 选项
1. 添加 --base 选项来指定基础层
2. 添加 --runtime 选项来指定运行时环境
3. 修改 RunContext::resolve 以使用 --base 和 --runtime 选项
4. 更新构建器解析以传递基础和运行时引用
5. 添加基础和运行时解析的日志记录
Log: 增加了 ll-cli 的命令行选项,用于指定应用程序执行的基础层和运行时
环境。
Influence:
1. 使用不同的基础层测试应用程序执行
2. 验证指定运行时是否会覆盖默认运行时
3. 确保在应用程序解析期间尊重 --base 和 --runtime 选项
4. 检查日志是否准确地反映所使用的基础和运行时
Clear the `removableStorageMounts` vector before binding removable
storage mounts. This ensures that stale mount points from previous
configurations are not included, preventing potential issues with
incorrect mount configurations. This is crucial for scenarios where the
removable storage setup changes between container runs.
Influence:
1. Test with removable storage devices connected and disconnected
before/after container startup.
2. Verify that only the currently available removable storage devices
are mounted inside the container.
3. Check that stale mount points are correctly removed when a removable
device is disconnected.
fix: 在绑定之前清除 removableStorageMounts
在绑定可移动存储挂载点之前,清除 `removableStorageMounts` 向量。 这样可
以确保不包含来自先前配置的陈旧挂载点,从而避免潜在的错误挂载配置问题。这
对于可移动存储设置在容器运行之间发生变化的场景至关重要。
Influence:
1. 测试在容器启动之前/之后连接和断开可移动存储设备的情况。
2. 验证只有当前可用的可移动存储设备才会在容器内挂载。
3. 检查当可移动设备断开连接时,陈旧的挂载点是否已正确删除。
Refactored the logic for binding removable storage mounts to improve
readability and reduce unnecessary complexity. Previously, the code
used a `do...while(false)` loop that wasn't actually serving a purpose.
The code now directly processes each propagation path (/media, /mnt)
without the unnecessary loop construct. This simplifies the control
flow and makes the code easier to understand and maintain. Also
changed how symlinks are handled in removable storage mounts, adding
the target directory to the mounts vector, so that applications inside
the container can access the target directory, instead of breaking the
symlink.
Influence:
1. Verify removable storage mounts function correctly after the changes.
2. Ensure applications inside the container can access removable storage
devices without errors.
3. Specifically test applications that rely on symbolic links within /
media or /mnt.
fix: 修复可移动存储绑定挂载
简化了绑定可移动存储挂载点的逻辑,以提高可读性并减少不必要的复杂性。 之
前,代码使用了一个 `do...while(false)` 循环,但实际上并没有起到任何作
用。 现在,代码直接处理每个传播路径(/media、/mnt),而无需不必要的循环
结构。 这简化了控制流程,使代码更易于理解和维护。 此外,更改了可移动存储
挂载中符号链接的处理方式,将目标目录添加到挂载向量,以便容器内的应用程序
可以访问目标目录,而不是破坏符号链接。
Influence:
1. 验证更改后可移动存储挂载功能是否正常。
2. 确保容器内的应用程序可以访问可移动存储设备而不会出错。
3. 专门测试依赖于 /media 或 /mnt 中符号链接的应用程序。
1. Replaces the custom `EnvVarGuard` class with the
`command::EnvironmentVariableGuard` class, which is a RAII wrapper for
setting and unsetting environment variables.
2. Changes the `envVarGuards` vector from holding
instances of `EnvVarGuard` to holding `unique_ptr`s to
`command::EnvironmentVariableGuard`. This ensures that the environment
variables are properly cleaned up when the vector goes out of scope,
even if exceptions are thrown.
3. Marks the `stringEqual` and `splitString` functions as inline to
potentially improve performance by allowing the compiler to inline these
functions.
Influence:
1. Verify hook scripts that rely on environment variables are still
functioning correctly after the change.
2. Confirm that environment variables set by hook scripts are properly
cleaned up after the script execution, even in cases where the script
throws an exception.
重构: 在hooks中使用RAII管理环境变量
1. 将自定义的 `EnvVarGuard` 类替换为 `command::EnvironmentVariableGuard`
类,后者是一个 RAII 包装器,用于设置和取消设置环境变量。
2. 将 `envVarGuards` 向量从保存 `EnvVarGuard` 的实例更改为保存指向
`command::EnvironmentVariableGuard` 的 `unique_ptr`。 这确保了即使抛出异
常,环境变量在向量超出范围时也能正确清理。
3. 将 `stringEqual` 和 `splitString` 函数标记为内联,以通过允许编译器内
联这些函数来潜在地提高性能。
Influence:
1. 验证在更改后,依赖环境变量的 hook 脚本仍然可以正常运行。
2. 确认 hook 脚本设置的环境变量在脚本执行后能够正确清理,即使在脚本抛出
异常的情况下。
This refactoring moves the core uninstall logic from the cli to PM.
Key changes:
- Support uninstall extension
- Added robust error handling for uninstalling:
- Returns an error if multiple versions are installed and the user
input is ambiguous.
- Prevents uninstalling 'base' or 'runtime' packages directly.
- Checks if an application or its dependencies are running before
proceeding.
Signed-off-by: reddevillg <reddevillg@gmail.com>
1. Removed the `CMAKE_COLOR_DIAGNOSTICS` variable from all
CMakePresets.json configurations.
2. The intention is to allow the terminal environment to dictate whether
color is used for diagnostic output. Linglong should not enforce a
specific color scheme.
3. This change improves compatibility and avoids potential issues where
color output is undesirable or unsupported in certain environments.
It aligns with best practices for CMake configuration by allowing the
environment to control this aspect.
Log: Removed forced color diagnostics
Influence:
1. Verify build and diagnostic output in environments with and without
color support.
2. Ensure that diagnostic messages are readable regardless of whether
color is enabled.
3. Confirm that the build process is not negatively impacted by the
removal of this variable.
4. Test across a variety of terminals and operating systems.
fix: 移除强制颜色诊断
1. 从所有 CMakePresets.json 配置中删除了 `CMAKE_COLOR_DIAGNOSTICS` 变
量。
2. 意图是允许终端环境决定是否使用颜色显示诊断输出。 Linglong 不应强制执
行特定的颜色方案。
3. 此更改提高了兼容性,并避免了在某些环境(其中颜色输出不受欢迎或不受支
持)中出现潜在问题。 它符合 CMake 配置的最佳实践,允许环境控制此方面。
Log: 移除了强制颜色诊断
Influence:
1. 验证在具有和不具有颜色支持的环境中构建和诊断输出。
2. 确保诊断消息无论是否启用颜色,都能被读取。
3. 确认构建过程不会因为删除此变量而受到负面影响。
4. 在各种终端和操作系统上进行测试。
1. Changed the method for copying cached files to the output file from
`cp` to `cp --remove-destination --link`.
2. This introduces hard links instead of full copies, significantly
improving performance when fetching files from the cache. A fallback
`cp` is included to handle cases where hard linking might fail (e.g.,
due to filesystem limitations).
3. The `--remove-destination` option ensures that if the destination
file already exists, it's removed before creating the hard link,
preventing errors.
Log: Improved file fetching performance by utilizing hard links for
cached files
Influence:
1. Verify that files fetched from the cache are functionally identical
before and after the change.
2. Measure the performance of file fetching (time taken) with and
without the hard link optimization.
3. Test the fallback `cp` mechanism by simulating scenarios where hard
linking might fail (e.g., by mounting a filesystem that doesn’t support
it).
4. Confirm that the fallback `cp` still correctly copies the file in
case of hard link failure.
修复: 使用硬链接优化文件获取
1. 将从缓存复制文件的写入方式从 `cp` 改为 `cp --remove-destination
--link`。
2. 这样可引入硬链接,而不是完整复制,从而显著提高性能,尤其是在从缓存获
取文件时。 包含一个备用 `cp` 以处理硬链接可能失败的场景(例如,由于文件
系统限制)。
3. `--remove-destination` 选项可确保如果目标文件已存在,则在创建硬链接之
前将其删除,从而防止错误。
Log: 通过使用硬链接来改善文件获取性能
Influence:
1. 验证在更改前后,从缓存获取的文件在功能上是否相同。
2. 测量带和不带硬链接优化时文件获取的性能(耗时)。
3. 测试通过模拟无法进行硬链接的场景(例如,挂载不支持它的文件系统)来测
试备用 `cp` 机制。
4. 确认在硬链接失败时,备用 `cp` 仍然可以正确复制文件。
- Only forward signals from non-kernel sources in handle_sigevent
- Handle EINTR in epoll_wait loop to avoid premature exit on signal interruption
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
This commit removes the check that prevented installation of packages
with `packageInfoV2Module` set to anything other than "binary" or
"runtime". This restriction was unnecessary and blocked the installation
of development modules. Removing it allows for greater flexibility in
package definitions and enables the installation of a wider range of
packages.
Influence:
1. Test installation of packages with `packageInfoV2Module` set to
"binary", "runtime", and other valid values.
2. Verify that development modules can now be installed successfully.
3. Ensure no regressions in the installation process of binary and
runtime modules.
重构: 移除开发模块检查
此提交移除了对 `packageInfoV2Module` 设置为 "binary" 或 "runtime" 之外的
值的软件包安装的检查。 此限制是不必要的,并且阻止了开发模块的安装。 删除
它允许软件包定义中更大的灵活性,并支持安装更广泛的软件包。
Influence:
1. 测试将 `packageInfoV2Module` 设置为 "binary"、"runtime" 和其他有效值
的软件包的安装。
2. 验证现在可以成功安装开发模块。
3. 确保二进制和运行时模块的安装过程中没有发生回归。
- Add processProfile function for triplet configuration
- Fix mount options from rbind to bind
- Optimize custom loader handling in packager
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
1. Renamed the `bindMedia` function to `bindRemovableStorageMounts` in
`ContainerCfgBuilder`.
2. Updated the function's implementation to include both `/media` and `/
mnt` mount points. This ensures that removable storage devices mounted
in either location are correctly bound within the container. The logic
now iterates through a vector of propagation paths including `/media`
and `/mnt`, binding them to their respective destinations.
3. This change was made to better reflect the function's purpose, which
is to handle removable storage mounts and also aligns with common Linux
conventions where `/mnt` is also used for mounting removable devices.
The previous name only covered the `/media` mount point.
Influence:
1. Test applications that rely on accessing files on removable storage
devices (USB drives, external hard drives) mounted under both /media
and /mnt.
2. Verify that the correct files and directories are accessible inside
the container when removable storage devices are mounted under /media
and /mnt.
3. Check that the read-only mount option is correctly applied to the /
media and /mnt mounts inside the container, preventing accidental writes
from the container to the host's removable storage.
重构: 将 bindMedia 重命名为 bindRemovableStorageMounts
1. 在 `ContainerCfgBuilder` 中,将 `bindMedia` 函数重命名为
`bindRemovableStorageMounts`。
2. 更新了函数的实现,使其包含 `/media` 和 `/mnt` 挂载点。这确保了在这两
个位置挂载的可移动存储设备都可以在容器内正确绑定。 现在的逻辑是遍历包含
`/media` 和 `/mnt` 的传播路径的向量,并将它们绑定到各自的目标。
3. 做出此更改是为了更好地反映该函数的目标,该目标是处理可移动存储挂载,
并且与常见的 Linux 约定(其中 `/mnt` 也用于挂载可移动设备)保持一致。 之
前的名称仅涵盖 `/media` 挂载点。
Influence:
1. 测试依赖于访问可移动存储设备(U盘、外部硬盘)上的文件的应用程序,这些
设备挂载在 /media 和 /mnt 下。
2. 验证当可移动存储设备挂载在 /media 和 /mnt 下时,容器内可以访问正确的
文件和目录。
3. 检查只读挂载选项是否已正确应用于容器内的 /media 和 /mnt 挂载,从而防
止容器意外写入主机可移动存储。
Add ability to export specific package references from repository using
--ref and --modules parameters, without requiring complete project setup.
This mode is only for distributing.
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
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 仓库安装说明按预期工作。