Commit Graph

378 Commits

Author SHA1 Message Date
ComixHe 67aff2635e fix: correct the way of exporting only-app UAB
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-06-11 16:37:05 +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
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
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
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
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
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
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
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
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 71a8e8041d feat: support semver sepc
Supports semver specification version numbers.
2025-05-08 15:05:32 +08:00
reddevillg 3e0a9d8ca5 feat: use ll-box in ll-builder-utils when export UAB
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-04-28 15:13:11 +08:00
ComixHe 1840243f59 refactor: fix compiling warnings
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-24 13:53:45 +08:00
ice909 b70df3c967 fix: builder build crash when parsing version number
When writing a version number incorrectly, it should return an error and exit instead of crashing directly.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-22 16:42:47 +08:00
reddevillg 06cdb32115 refactor: refactor ll-builder main function
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-04-21 16:00:57 +08:00
ComixHe ec5352d860 fix: correct container's hook
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-16 16:50:29 +08:00
ice909 fb09ada313 feat: optimization error message
Define error codes to identify different errors.
The cli displays error information to users based on error codes.
Add -v,--verbose option to display detailed error information.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-16 10:56:11 +08:00
reddevillg f32ba2cfb2 feat: add ll-builder-utils to build uab header and loader
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-04-15 10:14:35 +08:00
reddevillg b8705353a6 feat: Add output file option and improve compressor handling
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-04-15 10:14:35 +08:00
reddevillg 71fb063e1c fix: clear project working directory
Set the directory containing the YAML file as the project working
directory

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-04-14 15:21:07 +08:00
ice 5821e5c4ef
chore: update translate (#1114)
add ca、fi、pl、pt_BR、uk translates.
fix some typo.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-14 14:44:09 +08:00
ComixHe 963e00d928 feat: vendoring 'dumb-init' as container init
project source: https://github.com/Yelp/dumb-init

We need an init process to forwarding signal and cleaning orphaned zombie processes.
In above cases, it is more convenent that replacing bash with dumb-init

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-10 16:52:23 +08:00
ComixHe c5271dd5fe refactor: remove vendoring ll-box
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-10 16:52:23 +08:00
reddevillg b67fc5c348 feat: add isolate network option for build
use --isolate-network to build in an isolated network environment
2025-04-08 10:08:43 +08:00
reddevillg 761d44f5ad refactor: make builder and pm use ContainerCfgBuiler
Make builder and pm use ContainerCfgBuiler
2025-04-08 10:08:43 +08:00
ComixHe 64277c75d0 feat(ll-box): waiting for all process within the container
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-07 17:34:51 +08:00
reddevillg eb1da48ae6 fix: avoid gio start thread before unshare
set GVFS_REMOTE_VOLUME_MONITOR_IGNORE to 1
2025-04-07 17:13:46 +08:00
ice909 337e42022f feat: support don't export the develop module
When exporting layer, add --no-develop to avoid exporting the develop module.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-02 14:28:22 +08:00
reddevillg d6a36355a3 fix: fix unshare error
tryMigrate may use ostree repo, put GIO_USE_VFS=local before it
2025-03-26 13:32:39 +08:00
myml 0450a2726c feat: supports selecting compression algorithm
在导出时传递参数自选压缩算法
layer默认使用lzma有更高压缩率
uab默认使用lz4可以更快解压速度,避免影响应用自运行
2025-03-18 15:16:36 +08:00
dengbo11 4c66ed5a85 feat(cli): ll-cli add dir sub command
ll-cli add dir sub command to support get layer director by appid.
2025-03-04 09:59:10 +08:00
ComixHe d7cea3443a refactor: optimize starting container
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-27 19:42:27 +08:00
reddevillg 60c5ba8740 feat: Introduce export UAB option --loader
Option --loader=<app_loader> can be used to run app without container
involved. With custom loader, only app's layer will be exported. When
custom loader get started, environment variable LINGLONG_UAB_APPROOT
is the app directory.
2025-02-27 14:28:19 +08:00
ice909 895a590848 chore: fix some compile warning
Fix some compile warning.
2025-02-26 11:42:58 +08:00
ice909 c8d3330c9c feat: add priority to the repo config
The default priority for the stable repository is 0.
When adding a new repository, its priority will be set to the current minimum priority minus 100.
If the new repository is set as the default repository, its priority will be set to the current maximum priority plus 100.
Added the set-priority subcommand to allow manual specification of priorities (duplicates are not allowed).
2025-02-25 14:23:22 +08:00
reddevillg f26e6e5046 feat: ll-builder support install package via apt
Provide "build depends" and "depends" for apt build extension, build
phase seperate into build phase and prepare phase. "build depends"
to be installed in build environment before build phase starting, and
preserve in overlayfs. "depends" to be installed in prepare phase, and
will be merged to apps output.
2025-02-24 20:28:37 +08:00
ComixHe 959ce460c9 fix: add marco to test SIGSTKFLT
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-21 17:52:24 +08:00
reddevillg e4531af995 fix: Fix missing header
Fix compiler error on deepin v20 from source:
error: ‘bindtextdomain’ was not declared in this scope
error: ‘textdomain’ was not declared in this scope
2025-02-20 14:59:36 +08:00
ice909 0283ea34f4 fix: ll-cli outputs --help info instead of --help-all
This commit ensures that `ll-cli` now outputs the standard `--help` information when no arguments are provided, aligning with common CLI conventions.
The `--help-all` option remains available for users who need expanded details.
2025-02-20 14:09:12 +08:00
ice909 fa51411213 feat: add translations for all titles
ll-cli list and search remove arch field.
2025-02-19 16:51:54 +08:00
ComixHe f2610f9f9c refactor: use onlyapp to export uab by default
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-18 21:12:20 +08:00
ice909 1148261f8c fix: can't search after adding repo using alias
OSTree still uses defaultRepo, but defaultRepo has now become an alias.
2025-02-18 11:42:53 +08:00
ComixHe e8b8a7037b fix: correct the logic of finding repo
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-18 11:01:57 +08:00
ice909 990b690d93 fix: missing environment variables for uab run
This commit allows uab to run directly without detecting linglong.
2025-02-18 09:16:55 +08:00
ice909 ae7beb907f feat: filter search results to show only latest versions by default
Added a new `--all` flag to the search command to display all versions of packages.
By default, search results will only show the latest version of each package.
2025-02-13 20:56:31 +08:00
ice909 4b3fed1f00 feat: add --alias option for repo add
Add the --alias option to set aliases for the 'll-cli repo add' and 'll-builder repo add' commands.

So update, remove, and set-default also need to pass alias instead of name.
2025-02-13 20:29:24 +08:00
ComixHe a233980823 feat: support kill container by specific signal
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-12 16:23:05 +08:00
ComixHe d393cf3ed5 fix: make option accepts empty container
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-07 18:14:50 +08:00
ComixHe bef4a49985 feat(ll-cli): add subcommand 'inspect'
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-20 05:41:29 +00:00