forked from OpenAtom-Linyaps/linyaps
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: host NVIDIA fallback when extension missing / 未安装扩展时启用宿主 NVIDIA 兜底 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
guanzi008
wants to merge
366
commits into
linglongdev:master
from
guanzi008:feat/host-nvidia-fallback
Closed
feat: host NVIDIA fallback when extension missing / 未安装扩展时启用宿主 NVIDIA 兜底 #1
guanzi008
wants to merge
366
commits into
linglongdev:master
from
guanzi008:feat/host-nvidia-fallback
Conversation
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
添加单元测试覆盖率工作流
1. Update external tl-expected and cli11 to new version. 2. tl-expected and cli11 only import header files.
Removes the `envList` variable as it is no longer used.
Adds environment variables to forward NVIDIA rendering support.
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. 确保不同工作流之间开发环境的一致性
Add release note.
Update docs.
Update ll-builder docs.
This commit fixes the style issues introduced in 047883a according to the output from ClangFormat and Prettier. Details: None
Update deepsource config.
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 - 工作目录初始化失败的情况
This commit fixes the style issues introduced in 59123f5 according to the output from ClangFormat and Prettier. Details: None
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>
Remove "rshared" option from media mount configuration, keeping only "rbind" for better compatibility and simpler mount behavior. Signed-off-by: ComixHe <ComixHe1895@outlook.com>
Signed-off-by: reddevillg <reddevillg@gmail.com>
* 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>
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` 通过命令行调用该应用程序。
This reverts commit c33cf2a.
100% translated source file: 'po/en_US.po' on 'es'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
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 的安装说明准确且完整。
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`。
This commit fixes the style issues introduced in 10187ac according to the output from ClangFormat and Prettier. Details: None
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.
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 fixes the style issues introduced in 31e8d75 according to the output from ClangFormat and Prettier. Details: None
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. Remove unused qcontainerfwd.h header to eliminate dead code 2. Split UUID generation and string conversion for better readability 3. Reformat mkfs.erofs command arguments for improved code style 4. Add missing filesystem header include to fix potential compilation issues refactor: 改进层打包器代码组织 1. 移除未使用的 qcontainerfwd.h 头文件以消除死代码 2. 分离 UUID 生成和字符串转换以提高可读性 3. 重新格式化 mkfs.erofs 命令参数以改善代码风格 4. 添加缺失的 filesystem 头文件包含以修复潜在编译问题
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. Update Arch / Manjaro / Parabola Linux installation of linyaps package 2. Update linyaps package status 3. Update linglong-pica installation docs: 更新 linyaps 和 linyaps-pica 安装文档 1. 更新 Arch / Manjaro / Parabola Linux 安装 linyaps 包 2. 更新 linyaps 软件包状态 3. 更新 linglong-pica 安装
This commit fixes the style issues introduced in 61cd732 according to the output from ClangFormat and Prettier. Details: None
100% translated source file: 'policy.ts' on 'sq'.
更新 文档25.2.1 的运行时版本
去除精选课程的本地图片
Signed-off-by: reddevillg <reddevillg@gmail.com>
Include jmgpu in the list of automatically bound device nodes to support applications that require access to JM GPU devices.
- Use mkdtemp for secure temp directory in tests. - Update fmt::format_to calls to use modern iterator API.
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
This commit refactors the entire upgrade workflow by introducing a dedicated `PackageUpdateAction` class. This class encapsulates all upgrade-related logic, including dependency resolution, version comparison, installation of new packages, and cleanup of old versions. Key changes include: - A new `PackageUpdateAction` class now orchestrates the update process. - `OSTreeRepo` is enhanced with clearer methods like `upgradableApps()` and `listLocalApps()` to simplify package queries. - `PackageManager`'s `Update` method is simplified, delegating all complex work to `PackageUpdateAction`. - A new `--deps-only` command-line flag is added to the upgrade command, allowing users to update only the dependencies of an application. Signed-off-by: reddevillg <reddevillg@gmail.com>
Refactor the task management mechanism, improve the progress reporting method, and streamline the upgrade, installation, and uninstallation workflows. Key changes include: - Introduce `Task` and `TaskReporter` classes to management tasks and report progress. - Remove `SubState` to simplify task management. - Change the method for calculating ostree pull progress Signed-off-by: reddevillg <reddevillg@gmail.com>
Add NixOS installation steps in the guide
- Replace fixed stack allocation with mmap for better memory management - Add automatic memory cleanup using RAII pattern with finally utility - Enhance error handling with EINTR signal retry logic - Improve socket communication using SOCK_SEQPACKET mode - Fix file descriptor leak issues in socket pair handling - Fix pointer initialization and type safety issues - Add comprehensive error logging for better debugging - Optimize user/group ID mapping with exception handling Signed-off-by: ComixHe <ComixHe1895@outlook.com>
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
- Remove unused log header inclusion - Add explicit null pointer checks for better code clarity - Use member initializer list in TaskContainer constructor - Add [[nodiscard]] attributes and explicit constructors - Replace raw references with std::reference_wrapper for safety - Delete copy/move constructors and assignment operators - Remove unnecessary return statements Signed-off-by: ComixHe <ComixHe1895@outlook.com>
- Simplified the instructions to only require enabling the linyaps service
Added installation instructions for NixOS.
1. format CMkaeLists. 2. update MIPS regex pattern.
Remove i386-specific static_assert blocks and retain only the x86_64 size checks, simplifying the helper header while maintaining the existing safety net for 64-bit builds.
Introduce a new command-line tool that automatically detects installed NVIDIA graphics drivers, maps them to the corresponding Linglong driver packages, and notifies users of available updates. The utility supports multiple operation modes (auto, check-only, install-only), configurable notification intervals, and persistent user preferences. Integration includes CMake build rules and updated translation strings.
…ation response Eliminates CPU-intensive polling by connecting notificationClosed and actionInvoked signals to QEventLoop::quit, ensuring prompt exit when the user interacts or the notification expires.
Refactor the PM to replace the JobQueue with PackageTaskQueue. Key changes: - Replace `JobQueue` with `PackageTaskQueue` for search, prune, and generator tasks. - Introduce `Action` class to separate task preparation (DBus context) from execution (Worker thread). - Add `uuid` dependency for unique task ID generation. Note: This refactoring aims to solve DBus blocking issues by moving long-running operations to worker threads. Signed-off-by: reddevillg <reddevillg@gmail.com>
Previously, the deferred uninstall process removed layers based on their Reference string. If a user uninstalled an app and immediately re-installed the same version (or if an update occurred pending deletion), the lazy uninstall logic would wipe the active OSTree reference, breaking the new installation. This commit introduces the following changes: 1. In `PackageManager::deferredUninstall`, remove layers by their specific `RepositoryCacheLayersItem` (commit hash) instead of the generic Reference. 2. In `OSTreeRepo::removeOstreeRef`, add a check to ensure the OSTree ref is only removed if it still points to the commit being deleted. This protects the ref if it has moved to a new commit. 3. Refactor `OSTreeRepo::remove` to handle cleanup steps (unset ref, delete from DB, remove files) more robustly, ensuring DB consistency even if file deletion fails. Signed-off-by: reddevillg <reddevillg@gmail.com>
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
std::exists will follow symlinks, use symlink_status to ensure symlink is re-created. Key changes: - Extract `relinkFileTo` and `ensureDirectory` to utils for better reusability. - simplifying the exportDir logic and error handling. Signed-off-by: reddevillg <reddevillg@gmail.com>
GPU driver extension can use deviceNodes to mount host dev Signed-off-by: reddevillg <reddevillg@gmail.com>
This change enables building linglong packages for a target architecture that is different from the host machine's architecture. Key changes include: - The build process now distinguishes between the host architecture(for executing build tools) and the target architecture (for the output package). - `ensureUtils` is updated to fetch dependencies for a specified architecture, allowing the builder to pull architecture-specific tools and assets. - In the `exportUAB` stage, `builder-utils` is fetched for both the host and target architecture to correctly handle executable tools and static assets during cross-export. - Modify `main-check.sh` to skip `ldd` and configuration checks when the target architecture differs from the host. - The repository cache (`repo_cache`) is now architecture-aware, allowing it to correctly query and manage layers for different architectures. - The ELF file manipulation logic is refactored into a new `ElfHandler` class, which uses libelf(gelf). - Implement `EndianSwapper` to handle cross-endianness file modification. - Manually handle file alignment, string table extension, and SHT relocation to ensure the new section is appended safely to the end of the file. Signed-off-by: reddevillg <reddevillg@gmail.com>
Add a new command-line flag `--no-progress` to allow users to suppress progress info. This is useful for scripting or environments where clean output is required. Signed-off-by: reddevillg <reddevillg@gmail.com>
Author
|
Opened against the wrong upstream, will re-open on OpenAtom-Linyaps/linyaps. |
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.
中文
背景
变更
测试
English
Context
Changes
Testing