Commit Graph

2321 Commits

Author SHA1 Message Date
dengbo b54fd561aa feat: add hooks features
Add hooks features for app install.
2025-06-06 17:33:22 +08:00
reddevillg a77322acc9 fix: preserve set-default compatibility
The set-default command ensures compatibility by setting the priority.
However, its modification to the priority is unidirectional and
one-time, subsequent set-priority invokes will not alter the default
state.

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-06-05 10:20:14 +08:00
reddevillg c6386bdfe5 feat: modify the way container patches work
1. provide application level patches
2. application level patches will apply after global patches

move configure.h.in to src root, becasue lib utils depends on QT,
we don't want to introduce QT in certain scenarios.

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-06-04 14:45:07 +08:00
reddevillg 975aa956f8 chore: Development cycle for version 1.9.0
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-06-04 14:45:07 +08:00
dengbo 286d413070 fix: export desktop to a invalid export path
1. The custom desktop exported directory(CUSTOM_DATA_DIR) should only be in the share dir, not in the subdirectory;
2. LINGLONG_DATA_DIR should be exported;
3. need to update LINGLONG_EXPORT_VERSION to fix export.
2025-06-04 14:10:12 +08:00
ComixHe 881f0d5b1e refactor: move gvfs envs to OstreeRepo ctor
ensure that gvfs module wouldn't be loaded

Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-06-04 10:14:31 +08:00
myml ec9011598f docs: add instructions for download debug symbolsy
Included detailed steps for accessing the container, locating the repository, and downloading the necessary debug symbol packages for system dependencies. This enhances the debugging process for applications relying on external libraries.
2025-06-03 21:16:27 +08:00
dengbo 4ed2ad9216 feat: add /etc/hosts to old generators
Bind /etc/hosts to the container to facilitate network debugging.
2025-06-03 09:34:08 +08:00
dengbo 59fbf35dea feat: bind /etc/hosts to container
Bind /etc/hosts to the container to facilitate network debugging.
2025-06-03 09:34:08 +08:00
reddevillg 6e99856fd4 fix: ensure bundle directory is clean
Containers may fail to start if the bundle directory contains residual
files or conflicts from previous run.

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-29 11:37:38 +08:00
reddevillg 5916132cbf doc: update ll-builder multiarch build
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-29 11:19:54 +08:00
reddevillg 01455c39f2 feat: support architecture specfied linglong.yaml
1. ll-builder use current directory as project directory.
2. Project yaml file(aka linglong.yaml) must reside within project
   directory or its subdirectories.
3. User can use -f option to specfy a project yaml file.
4. ll-builder will attempt to load project yaml file in the following
   order from the project root directory:
     - linglong.<arch>.yaml (architecture-specific)
     - linglong.yaml (generic)

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-29 11:19:54 +08:00
reddevillg 1fc517735b fix: remove unused code
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-29 11:19:54 +08:00
reddevillg 3e9f0b8902 fix: enable self adjust mount in builder run
If the current RunContext contains innerBinds, self-adjust mount must be
enabled; otherwise, execution may fail due to missing mount points.

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-27 17:55:22 +08:00
reddevillg a8127f77de feat: prune support extension
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-27 17:50:05 +08:00
reddevillg c5f2665f12 feat: Support extension environment variables
1. apply extension environment
2. apply app and extension permission binds
3. run ldconfig with -X option in cache generate phase
4. introduce dummy extension which is enabled by default

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-27 17:32:58 +08:00
dengbo a2f07ca8fc fix: uninstall application exception output log
update-desktop-database and update-mime-database will generate system files in
specify a directory. these files do not belong to the applications and should not be
printed in the log.
2025-05-26 13:38:49 +08:00
myml 4056c534f0 docs: add multi-architecture build guide
添加架构支持列表
多架构项目结构指导
龙芯新旧世界迁移
2025-05-26 13:38:25 +08:00
ComixHe e7814c3cd3 refactor: add getBundlePath
make basePath and bundlePath to be required field

Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-05-22 21:01:09 +08:00
ComixHe 3c85b1ef53 refactor: forwardEnv will forward all envs by default
fix typo

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-05-22 20:25:45 +08:00
reddevillg c32d5d0e7f fix: fix crash when no runtime provided
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-22 19:39:16 +08:00
dengbo 3f19ae56ef fix: update task ends abnormally when there is an application running
Should not terminate the update task when the sub-state is PackageManagerDone.
2025-05-22 16:43:23 +08:00
reddevillg d442ea6ba5 fix: fix export test command
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-22 13:10:41 +08:00
myml fc16401fa5 feat: handle missing refs gracefully in removeOstreeRef
在删除ref时, 如果ostree不存在对应的ref, 不需要报错,
避免因缓存不一致导致无法卸载应用
2025-05-22 13:08:29 +08:00
reddevillg 62a34749ec feat: support build extension
Introduce RunContext to unify runtime layer resolution, requiring
changes across the builder, CLI, and PM.

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-20 17:18:42 +08:00
reddevillg 6ee4e1f45d feat: add extension interface
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-20 17:18:42 +08:00
reddevillg 49c6660326 feat: add extension schema
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-20 17:18:42 +08:00
ComixHe 642f64365e fix: returns only if creating directories failed
std::filesystem::creat_directories does not treated this as an error

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-05-15 22:08:27 +08:00
dengbo fa65a7be3c fix: layer file can not install in uos v20
Do not support lzma compressor in uos v20.
2025-05-15 19:05:28 +08:00
dengbo 5249e61543 fix: ll-cli failed to start app
Improve error handling for filesystem existence checks.
2025-05-15 15:48:39 +08:00
ice909 ca321628aa feat: add support for installing packages from specific repositories
1. Added a new --repo option to the install command to specify a
repository for installation
2. Enhanced repository management with priority-based package resolution
3. Implemented methods to get, promote and recover repository priorities
4. Updated package installation logic to respect repository selection
5. Improved error handling for module not found cases
6. Added ReferenceWithRepo struct to track package references with their
source repositories
2025-05-15 12:23:25 +08:00
ice909 0d5c60c13f feat: implement printMessage method for JSONPrinter
Added implementation for JSONPrinter::printMessage method to output
messages
in JSON format. The method serializes the message as a JSON object with
a
"message" property. This enhances the JSON output capability by properly
handling messages alongside other data types.
2025-05-14 13:14:31 +08:00
ComixHe dbe988add5 style: format whole project
based on clang-format 19.1.7

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-05-14 11:35:50 +08:00
ComixHe 414cb36a25 chore: update .clang-format
* strict standard to c++17
* use template < with space

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-05-14 11:35:50 +08:00
ice909 eac643f380 feat: sort search results
Sort results of ll-cli search and list.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-05-14 10:42:11 +08:00
ice909 92bd730be8 fix: improve package version filtering logic
This change optimizes the version filtering process by:
1. Replacing QString::fromStdString() with direct c_str() calls to
eliminate unnecessary string conversions
2. Directly updating existing entries instead of creating temporary maps
3. Adding proper checks when updating package repositories to prevent
overwriting existing entries
2025-05-13 16:24:21 +08:00
ice909 db3a9dc4ce feat: improve shell completions to show only apps when appropriate
This change enhances both bash and zsh completions for the ll-cli tool
by:
1. Adding a new function to specifically list installed applications
2. Updating the run, uninstall, and content commands to show only apps
   in their tab completion suggestions instead of all installed
components
3. Making the completion more contextually relevant for these commands
2025-05-13 11:34:59 +08:00
ice909 ef42541df1 refactor: search no longer supports specifying a version
Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-05-12 15:31:56 +08:00
dengbo 8b2d49a6f1 refactor: adjust the default display type
The default display type is changed from app to all.
2025-05-12 10:27:23 +08:00
ice909 bb3624da8e feat: enhance package search with multi-repository support
1. Added repository field to search parameters requiring specifying
repos to search
2. Modified search implementation to support searching in multiple
repositories
3. Restructured search results to group packages by repository source
4. Added --repo option to the CLI search command
5. Updated display format to show repository information in search
results
6. Improved filtering logic to work with the repository-grouped package
structure
7. Added PackageManager1PruneResult type to separate it from search
results
2025-05-09 17:05:28 +08:00
ComixHe a784389854 refactor: improve installing from uab/layer
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-05-08 21:08:45 +08:00
ice909 2628ef3873 refactor: simplify repository priority management
1. Remove automatic priority calculation when adding new repos
2. Remove automatic priority adjustment when setting default repo
3. Allow multiple repositories to have the same priority value
4. Use stable sort when displaying repositories to maintain order for
equal priorities
5. Set new repositories' default priority to 0 instead of calculated
value

refactor: 简化仓库优先级管理

1. 移除添加新仓库时的自动优先级计算
2. 移除设置默认仓库时的自动优先级调整
3. 允许多个仓库具有相同的优先级值
4. 使用稳定排序显示仓库,以维持优先级相同时的原始顺序
5. 设置新仓库的默认优先级为0,取代之前的计算值
2025-05-08 17:44:27 +08:00
ice909 b90a8abd53 style: improve repository information display formatting
Enhance CLI repository information display with dynamic column widths
and URL truncation:
1. Calculate maximum lengths for name, URL, and alias columns
dynamically
2. Limit URL display length to 100 characters with ellipsis for longer
URLs
3. Use calculated widths instead of fixed column widths for better
alignment
4. Truncate long URLs with "..." to improve readability

style: 改进仓库信息显示格式

增强命令行界面仓库信息显示,使用动态列宽和 URL 截断:
1. 动态计算名称、URL 和别名列的最大长度
2. 限制 URL 显示长度为 100 个字符,超长时添加省略号
3. 使用计算出的宽度而非固定列宽,以获得更好的对齐效果
4. 为长 URL 添加"..."截断,提高可读性
2025-05-08 17:44:27 +08:00
ComixHe 34a5d847f3 refactor(semver): remove C++20 code
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-05-08 16:34:39 +08:00
ice909 0d6f12c49e chore: format semver_increment_test.cpp
Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-05-08 16:11:03 +08:00
ice909 f7415b9341 fix: improve base and runtime version validation
The code now parses base and runtime fields using FuzzyReference::parse
before validating their versions, adding proper error handling for
parsing failures. This ensures that complex reference formats are
correctly handled before version validation is performed, making
the validation process more robust.
2025-05-08 16:11:03 +08:00
reddevillg 9946fa8d54 fix: make /sys, /proc, /dev and /tmp default
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-05-08 16:07:03 +08:00
ice909 9785d14127 refactor: remove unused VersionRange class and related code
This change removes the VersionRange class which was marked with a TODO
comment
as "currently not used". Also removes the unused PreRelease struct from
version.cpp that was marked as having "no practical use". Deleted
associated
test files and updated CMake configuration files to reflect these
removals.

refactor: 移除未使用的 VersionRange 类及相关代码

此更改移除了标记为"当前未使用"的 VersionRange 类。同时删除了 version.cpp
中被标记为"无实际用途"的未使用 PreRelease 结构体。删除了相关的测试文件,
并更新了 CMake 配置文件以反映这些移除。
2025-05-08 15:05:32 +08:00
ice909 a9c83dbef8 refactor: implement semantic version matching
1. Added semanticMatch functionality to VersionV1, VersionV2, and
FallbackVersion classes
2. Added semanticMatching flag to clearReferenceOption struct
3. Updated clearReference implementations to use semantic version
matching
4. Modified package filtering to support semantic versioning
5. Replaced version tweak handling with more robust semantic matching
6. Enabled semantic matching in Builder, PackageManager and CLI
components

refactor: 实现语义化版本匹配

1. 为 VersionV1、VersionV2 和 FallbackVersion 类添加 semanticMatch 功能
2. 在 clearReferenceOption 结构体中添加 semanticMatching 标志
3. 更新 clearReference 实现以使用语义化版本匹配
4. 修改包过滤功能以支持语义化版本控制
5. 用更健壮的语义匹配替代版本补丁处理
6. 在 Builder、PackageManager 和 CLI 组件中启用语义化匹配
2025-05-08 15:05:32 +08:00
ice909 349230d544 feat: add a fallback parsing solution for version
Ensure that when the version number changes in the future, the old client will not throw an exception.
2025-05-08 15:05:32 +08:00