Commit Graph

649 Commits

Author SHA1 Message Date
ice 5eb436842a
feat: print builder version when building the project (#1131)
Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-17 19:19:14 +08:00
dengbo 9e05fb32d2 fix: unable to start the app normally when switching accounts
Do not use lock file to ensure cache generate, only determine whether the cache directory exists.
2025-04-17 15:10:58 +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
ice909 83507c5b52 feat: optimized error msgs for base and runtime mismatches
Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-15 16:15:10 +08:00
reddevillg f4503384d0 feat: use ll-builder-utils to export UAB
try to use uab-header, uab-loader and mkfs.erofs from ll-builder-utils

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 0f76f9f006 feat: Bind host statics to container config builder
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-04-14 15:21:07 +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
ice909 44e1457705 fix: builder build crash
Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-11 17:16:45 +08:00
ComixHe 306ff229f5 fix: failed to generate ldcache
remove 'RootfsPropagation' which cause to container failed to start

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-11 17:14:58 +08:00
ice909 ab7a147d6a chore: adjust the builder output format
Increase the width of the packge under the builder Processing Dependency.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-11 13:29:19 +08:00
ComixHe efc5f9d331 refactor: bind mount init to container
change the way of starting container

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-10 16:52:23 +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
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 672f23f0d3 refactor: separate build process into several stages
separate build process into several stages
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
reddevillg 4524903d93 refactor: Introduce class ContainerCfgBuiler
Use builder design pattern to generate container config
2025-04-08 10:08:43 +08:00
ice909 4eaac1fe9a chore: change the connection timeout period to 5 seconds
Users can set the timeout period using environment variables `LINGLONG_CONNECT_TIMEOUT`.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-07 17:30:11 +08:00
ice909 33f5913209 feat: extract the export paths as a config file
Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-07 17:14:27 +08:00
reddevillg 5ab119abae fix: merge runtime module also
old runtime module is equal to binary module
2025-04-07 13:14:57 +08:00
ComixHe 6cdc6ca73d fix: failed to compile with qt 6.9
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-03 15:14:47 +08:00
dengbo 2fb12eca32 feat: support Qt6 packaging
Support Qt6 packaging according to the method recommended by the Qt official.
2025-04-02 15:56:22 +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
ComixHe 6bfebe8e0c fix: compatible with qt 5.11
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-02 14:24:07 +08:00
ice909 e8227994de chore: adjust the builder output format
Increase the width of the packge under the builder Processing Dependency.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-02 14:22:22 +08:00
dengbo 9dad8536a6 feat: add share/templates dir to whitelist
Templates file should be exported, add it to whitelist.
2025-03-31 13:19:27 +08:00
dengbo bd5f7ebeee refactor: use the new unmount command to unmount the directory
Use fusermount -u to replace umount.
2025-03-28 13:16:51 +08:00
dengbo c6afc10ee2 fix: failed to umount layer dir
Layer dir has been umount in unpack,
so do not need to umount again in LayerPackager destructor.
2025-03-28 13:16:51 +08:00
ice909 e5010969ac fix: ll-builder build failed
Symbolic should only be created for directories.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-03-28 12:25:40 +08:00
ice909 619a93ea5c fix: version comparison error
Direct string comparisons should not be used.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-03-27 17:56:15 +08:00
myml b332bbd5df fix: exporting systemd service may cause system error
builder不再将systemd service导出到share目录,
避免因share优先级过高影响系统功能
2025-03-26 13:43:30 +08:00
reddevillg a7a8cf5efa fix: skip whiteout files
skip fuse-overlayfs whiteout files which name starts with ".wh."
2025-03-26 13:12:33 +08:00
reddevillg c7ba19a611 fix: fix compiler error
fix compiler error when use nlohmann from CPM
2025-03-26 11:09:08 +08:00
ComixHe 917e7f0977 fix: correct path deduplication while fixmount
only need to skip strictly equivalent path

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-24 14:21:02 +08:00
dengbo 06dc2a06f8 fix: empty directory exists after app uninstall
Delete empty directories after uninstalling the app.
2025-03-20 17:40:25 +08:00
myml a11b66d9e3 fix: no free space when installing dependencies
tmp目录被挂载成tmpfs并且设置了64M大小, 导致安装deb依赖时报错
现在会在宿主机的tmp目录创建新的临时文件夹做为容器的tmp目录
2025-03-18 20:09:59 +08:00
myml 0450a2726c feat: supports selecting compression algorithm
在导出时传递参数自选压缩算法
layer默认使用lzma有更高压缩率
uab默认使用lz4可以更快解压速度,避免影响应用自运行
2025-03-18 15:16:36 +08:00
dengbo 534fb1b0f8 fix: dsg config not effective
DSG_APP_ID should be add to environment.
2025-03-18 14:52:14 +08:00
dengbo 05655fc764 feat: support export dsg config file
Support export dsg config file for self-developed applications.
2025-03-18 14:52:14 +08:00
ice909 4fa4148801 fix: Invalid symbolic links should also be copied
Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-03-14 10:36:27 +08:00
ice909 52479429ae fix: relative symlinks to directories from becoming empty folders
When copying relative symlinks pointing to existing directories, they were incorrectly turned into empty folders.

Issue: https://github.com/OpenAtom-Linyaps/linyaps/issues/1039

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-03-14 10:36:27 +08:00
ice909 f72413cdd3 fix: ostree init failed
Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-03-13 14:07:41 +08:00
ice909 f5cb7a22c0 fix: preserve packages with different modules while filtering by version
Previously, packages with the same id but different module values were incorrectly treated as the same package, causing some to be lost.
This fix ensures that (id, module) is used as the unique key, preserving all distinct packages while still filtering by version.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-03-13 11:37:35 +08:00
ice909 1e9c45de71 fix: ostree repo config is not initialized
Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-03-12 17:27:07 +08:00
dengbo a0f68ba652 refactor: adust the behavior of install UAB
Do not Execute UAB when install UAB.
2025-03-12 16:30:56 +08:00
ice909 cb3a81d50b fix: builder push crash
Push crashes when getting the default repository.
2025-03-10 17:46:17 +08:00
reddevillg 6ffb64124d fix: fix mapping file
fix an unintentional change made by commit d7cea3443a
2025-03-10 16:59:38 +08:00
ComixHe 278bbc63e4 fix: correct mount option for distribution.info
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-10 10:28:02 +08:00
reddevillg abe82f68e2 fix: fix missing environment variable
Merge environment variable if possible
2025-03-06 12:02:53 +08:00
ice909 bbc864d9cd fix: repo output is not aligned
Fix repo's output title and value do not align.
2025-03-05 10:53:40 +08:00
ice909 904e726f12 fix: upgrade progress abnormal
Fix upgrade progress will exceed 100%.
2025-03-05 10:52:59 +08:00
ComixHe caf8886ed4 fix: container root must exist at the declared path
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-03-05 10:52:04 +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
myml 2805551ec7 feat: use getLayerDir when exporting
导出entires时不需要获取modules目录
2025-03-04 09:53:43 +08:00
ice909 6eb10ec317 fix: ostree config doesn't have the correct update
When adding and removing a repository, ostree's repo config isn't updated.
2025-03-03 21:22:37 +08:00
ice909 59d5af4116 feat: optimizing cli output
Optimize ps and list --upgrade's output.
2025-02-28 11:44:00 +08:00
reddevillg 3a08a6f794 fix: Fix export empty app layer
Fix export empty app layer
2025-02-27 20:32:12 +08:00
myml 52720d5fc8 fix: builder does not use the channel field of linglong.yaml
构建工具未使用linglong.yaml的channel字段

Log:
2025-02-27 20:31:33 +08:00
ComixHe d7cea3443a refactor: optimize starting container
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-27 19:42:27 +08:00
reddevillg ba59b2239e fix: Dont't mapping the file under /home
Fix some applications can't write to files or delete files under home
directory
2025-02-27 19:22:08 +08:00
dengbo 34da329288 fix: rewrite file error
Should use complete base name rather than base name.
2025-02-27 16:16:42 +08:00
dengbo cbebd39881 fix: app can not start by laucher
Parameter("-- --") parsing error when exec not have field codes.
2025-02-27 14:29:35 +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 860c7b4813 fix: enter command cannot enter the container
A previous change to ps caused this problem.
2025-02-26 13:34:56 +08:00
ice909 895a590848 chore: fix some compile warning
Fix some compile warning.
2025-02-26 11:42:58 +08:00
ice909 f7d4a15332 fix: upgrade exception when all packages are up to date
When all packages are up to date, the upgrade command does not automatically end

Issue: https://github.com/OpenAtom-Linyaps/linyaps/issues/1024
2025-02-26 11:03:05 +08:00
ice909 3f72c3c879 test: add unit test for repo config
test getRepoMinPriority
test getRepoMaxPriority
test convertToV2
2025-02-25 19:22:32 +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 0ad39c8ac0 refactor: change the way to detect machine architecture
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-21 17:28:40 +08:00
dengbo 4f20d6cd67 fix: can not start app normally when there are extra parameters
add "--" to abort parameter parsing, the first "--" to abort COMMAND
option parsing, the second "--" will abort ll-cli run command parametor
parsing.
2025-02-21 17:11:27 +08:00
ComixHe 98e4db453b fix: resolve the real path of interpreter
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-21 13:34:26 +08:00
dengbo d2b6725953 fix: can not save file to media
/media is symlink(/run/media) in v25, app can not access the dir
so we should mount /media, /run/media to container and keep symlink.
2025-02-21 09:51:50 +08:00
dengbo dff3a32258 feat: add mips64 arch
Add mips64 arch support.
2025-02-20 17:53:12 +08:00
ice909 8e83788ec4 fix: search results show confusion
Unable to calculate the maximum width for each column because some appid and appname are too long, which would cause output to be messy.
2025-02-20 10:53:07 +08:00
ice909 e5c3654583 feat: `ll-cli ps` output to display only AppID in the App field
Previously, the `App` field in the `ll-cli ps` command output displayed the full package name (e.g., `main:org.dde.calendar/5.14.7.3/x86_64`).
This has been updated to display only the AppID portion (e.g., `org.dde.calendar`).
2025-02-19 18:14:46 +08:00
dengbo f02112810a fix: org.deepin.manual can not find documentation for other self-developed applications
Use relative path instead of an absolute path to create symlink.
2025-02-19 18:14:16 +08:00
dengbo b46466af43 fix: ostree repo config permission error
Do not update ostree repo config when open ostree repo,otherwise it will cause repo config permission error
and only supports updating ostree repositories through ll-cli repo command.
2025-02-19 18:13:25 +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
ice909 df0184c02c chore: output Title in uppercase
Adjust the uppercase of the output Title.
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 3eabede8fd fix: use default repo name in pm and migration logic
Because defaultRepo is no longer a repo name.
2025-02-18 17:38:04 +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 8a2f5f57e3 fix: resolve "Invalid cross-device link" error during UAB export
If the project directory and ~/.cache/linglong-builder are not on the same device (file system), exporting the UAB cannot create hard links and can only copy files.

issue: https://github.com/OpenAtom-Linyaps/linyaps/issues/811
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 2338f78008 fix: compiling failed with Qt5
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-13 17:43:15 +08:00
ComixHe 93cc7251ff fix(ll-builder): generating ld config at run/build
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-12 18:11:02 +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 16d2b9f2ce fix(ll-builder): add missing part of code
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-12 13:32:19 +08:00
ComixHe 6450efa749 refactor: improve wait logic
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-12 11:44:02 +08:00
ComixHe f28141f4dd chore: sync upstream
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-12 11:44:02 +08:00
ComixHe 1f92d36d7d fix: memory leak
optimizing some functions

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-11 21:04:58 +08:00
myml 60fdf7b363 fix: no error messages when fetch fails
使用QProcess执行fetch-file-source脚本下载文件时, 如果文件哈希值错误,
脚本会使用echo返回错误信息, 但玲珑打印的stderr, 导致错误信息丢失
本次提交给QProcess设置mergedChannels, 能同时打印process的stdout和stderr
2025-02-11 20:48:58 +08:00
dengbo 26b7b40b6f feat: add sw arch support
Support sw64 arch.
2025-02-11 16:43:16 +08:00
ComixHe abe0b40577 fix: cli crash when information directory doesn't exist
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-11 09:23:40 +08:00
dengbo c293aae85f fix: launcher icon displays abnormally after uninstalling the app
Root entries directory should be symlink, or it can not be remove when uninstall app.
so we can not copy file to root entries directory but copy file in app entries and then modify.
2025-02-10 22:27:52 +08:00
ComixHe 51b08b627b fix: adjust generating ld.so.cache
we need and only need to generate and mount zz_deepin-linglong-app.conf
during generating ld cache

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-10 13:34:14 +08:00
ComixHe 3f99cf5657 fix: resolve the real path for some host files
when host use systemd-resolved to manage dns and systemd-resolved
working on stub mode, the file /etc/resolv.conf is a symlink to
/run/systemd/resolve/stub-resolv.conf.

refactoring the process for normalization.

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-08 13:46:41 +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
Comix 27ea143990
refactor: only create runtime directory before container running (#965)
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-16 16:12:01 +08:00
ComixHe 499cc111de refactor: change the destination of exported sign files
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-15 09:42:08 +08:00
dengbo 5db9d54b40 fix: error to export applications entries directory
1. we must fix export entries when in no dbus mode;
2. we must copy application entries directorys to the root entries
   directorys before rewrite file;
2025-01-10 22:00:11 +08:00
ComixHe 033dfdedcb feat: change the compression strategy of uab
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-10 17:54:06 +08:00
ComixHe ba889e2c46 chore: fix some compiler warnings
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-10 12:08:59 +08:00
dengbo 7831877744 fix: can not install app when cancel a task
Allow setup different tasks by the same ref.
2025-01-10 11:28:55 +08:00
ComixHe 3c475dea5f fix: add runtimeCheck method for builder
all checkers should execute at the container which
based on binary layer

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-09 14:50:27 +08:00
dengbo c7c3c6bb92 feat: add some translation
1. ll-dialog need to load translation file when running.
2. add some notification message translation.
2025-01-09 14:07:59 +08:00
dengbo de440dc6bc fix: can not install app in chroot
this is a temporary solution:
1. allow cache generation failure;
2. disable font cache generation.
2025-01-09 14:07:59 +08:00
ComixHe f8aa5249db fix: Change the way to check if the next task should be started
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-08 15:54:57 +08:00
ComixHe ba4821dc06 feat: support installing uab which is exported in 'onlyApp' mode
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-07 11:54:08 +08:00
ComixHe ebb84b48cc feat(gen): add annotations for skipping some oci-cfg-generators
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-07 11:54:08 +08:00
ComixHe 137fe30110 feat(builder): support exporting uab in 'onlyApp' mode
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-07 11:54:08 +08:00
ComixHe 4769801e5b refactor: reimplement function that calculating the size of directory
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-07 11:54:08 +08:00
ComixHe 85c17bf538 feat: add optional field 'onlyApp' to UabMetaInfo
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-07 11:54:08 +08:00
ComixHe f655205db9 feat: Temporarily disable directory permission interactions
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-26 16:05:33 +08:00
kamiyadm d9544e26d8 fix: no desktop in launcher after install app
Bring updateAM() back and call another service which in system bus.
Service name is org.desktopspec.ApplicationUpdateNotifier1.

Log:
2024-12-25 18:06:41 +08:00
myml 8544c5a0d6 feat: adjust systemd/user priority
XDG_DATA_DIRS下面的systemd优先级很高, 会影响系统systemd服务
将应用的systemd导出到其他地方, 再使用user-generator复制到优先级最低的generator.late目录
2024-12-25 17:31:40 +08:00
kamiyadm 3d3d94804d refactor: the behavior of install UAB
* Specialize the behavior of installing uab on uos and deepin.
  Old: install->installFromFile->PM
  New: install->installFromFile->(Execute xxx.uab)->install->installFromFile->PM
* Check LINGLONG_UAB_SKIP_RUNNING is exist or not before 'll-cli run'.

Log:
2024-12-25 16:54:17 +08:00
ComixHe 077098ff15 fix: use variable after move
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-25 16:46:59 +08:00
ComixHe 11ce80835b feat: change the compression algorithm to zstd
erofsfuse use fuse3 after 1.8.3

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-25 16:43:04 +08:00
black-desk ef3d303ec8 feat: auto install some modules
1. Update D-Bus API to allow Install method of PackageManager take
   multiple modules;
2. ll-cli will automatically generate a module list for language modules
   from language related environment variables when install a package
   without specify any modules.
2024-12-25 10:21:53 +08:00
myml 8e8bd7b0d7 feat: no need to export all entries on startup
不需要在每次启动package-manager时都执行一遍全量导出
2024-12-25 09:45:19 +08:00
ComixHe e1c9652009 fix: Correcting file mappings when there is no file path passing
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-24 17:47:57 +08:00
ComixHe 85cc8ea8ee build(uab): correct cmake file
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-24 12:29:46 +08:00
ComixHe bf376d3dbc refactor: rewriting taskList
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-24 12:29:46 +08:00
myml 6abd470586 feat: ll-builder supports import directory
ll-builder import命令支持传递目录, 这便于制作base和手动修改app
2024-12-24 09:37:44 +08:00
kamiyadm 5e0540eea5 fix: getOriginRawExec which in ostree.cpp occurs error
-

Log:
2024-12-23 14:43:36 +08:00
myml cd11eaf1ea feat: optimize ll-cli prune command
无论是否存在未使用的runtime, 都清理一遍ostree仓库
2024-12-23 10:56:34 +08:00
kamiyadm 89bb6f0452 fix: incorrect mount of fonts in 90_legacy
-

Log:
2024-12-23 10:54:01 +08:00
kamiyadm 28329c2b76 fix: optimize error output under generateCache.
-

Log:
2024-12-23 10:54:01 +08:00
ComixHe 8cfc01f551 feat: mapping exec field while generating desktop file
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-23 10:54:01 +08:00
kamiyadm 30495bbcdd feat: support rewrite some apps config files
Rewrite *.desktop/*.service/*.conf.

Log:
2024-12-23 10:54:01 +08:00
kamiyadm 1d8fcb948f feat: add new class GKeyFileWrapper
Wrap GKeyFile from glib which used for parsing ini-like config file.

Log:
2024-12-23 10:54:01 +08:00
ComixHe 768828bac6 refactor(oci-gen): using outer json file to generate the patch content
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-20 13:50:47 +08:00
myml 0b7d27fc0b fix: getRemoteModuleList for incompatibility with runtime modules
获取远程模块列表时, 应该考虑兼容旧版本的runtime modules
优化安装和升级流程, 只安装单个模块时, 不需要提前获取远程模块列表
2024-12-20 10:39:18 +08:00
myml 9c7ec8a352 fix: handling of DBus addresses with options
当DBus环境变量包含选项时, 玲珑没有正确处理
2024-12-20 09:48:12 +08:00
ComixHe 241b33e112 fix: correct mappingFile behavior
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-19 18:36:09 +08:00
ComixHe bb25607b91 refactor(gen): change the way of uising generators
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-19 18:21:01 +08:00
kamiyadm 06c55b1e70 fix: install app failed after it was cancled before
The job which the state is not Queued or has no job should be remove.

Log:
2024-12-19 10:17:53 +08:00
ComixHe bbd5df5c95 fix: skip some generating steps which related to env 'HOME'
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-18 17:47:03 +08:00
myml df0a58926b fix: unable to install module
修复因合并代码导致的module功能异常
将module安装独立起来, 避免和binary安装混杂
2024-12-18 16:50:22 +08:00
kamiyadm 2ea8ce7232 fix: PM blocked in a cancled task
Set the runningTaskObjectPath before the next available
task start instead of after the last task finished.

Log:
2024-12-18 16:13:34 +08:00
myml 1792d8df18 fix: abnormal cursor size in wayland
DTK使用XCURSOR_SIZE环境变量设置鼠标尺寸
需要将该环境变量从宿主机传递到容器中
2024-12-18 16:10:56 +08:00
ComixHe a39015081c refactor(gen): make all generator as a static library
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-18 15:28:04 +08:00
myml c195e81fc1 fix: old version of ll-cli cannot export the new package
旧版本玲珑不支持遍历entries/share目录中的软链接, 为保持兼容,
构建应用后不在entries/share目录创建软链接, 而是复制文件
2024-12-16 09:52:51 +08:00
kamiyadm a3412923a4 refactor: use ll-dialog when generate cache for apps
-

Log:
2024-12-12 17:26:10 +08:00
kamiyadm 101d22fbe7 fix: PM start container failed
* If the XDG_DATA_DIRS is not set, the dir that used for storage
  container state will fallback to /run/ll-box. deepin-linglong
  has no permission to create dir in /run, so we should specific
  a writable path to ll-box.
* Change Container::run(Process) to Container::run(Process, RunOption),
  we need to support specific run option.

Log:
2024-12-12 17:26:10 +08:00
kamiyadm 01babce152 fix: error message displayed when generating cache
If LINGLONG_SKIP_HOME_GENERATE is set, don't mount the home dir of host.

Log:
2024-12-12 17:26:10 +08:00
kamiyadm 42263b7072 fix: cannot run application after upgrade cli
* Add dbus method GenerateCache, signal GenerateCacheFinished. (PM)
* Add an exclusive write lock to the application cache in
  ensureCache to ensure that the container runs after the cache
  is generated. (cli)

Log:
2024-12-12 17:26:10 +08:00
kamiyadm b9d8199b71 fix: one of Prune() shoule be private member
-

Log:
2024-12-12 17:26:10 +08:00
kamiyadm 824a49990b fix: ll-builder also need to generate some cache
* In the build stage, create the cache directory in
  workdir and mount it to /run/linglong/cache. Then
  generate ld.so.cache in the hook.
* In the run stage, mount the cache dirctory and generate
  both the ld.so.cache and font cache.

Log:
2024-12-12 17:26:10 +08:00
kamiyadm 5085249328 fix: need support hooks when creating container
-

Log:
2024-12-12 17:26:10 +08:00
kamiyadm a9b7d836bb refactor: no need to pullDependency during ll-builder run
-

Log:
2024-12-12 17:26:10 +08:00
kamiyadm 429bd1cc7c refactor: adjust some cache generation and usage behaviors
The caches that have been processed are ld.so.cache and font cache.

Code:
 * Add a new member ContainerBuilder to PackageManager. (package_manager)
 * Add a new scripts to gererate cache in container. (ld-cache-generator/font-cache-generator)
 * Add new func generateCache() to execute app-cache-generator. (pacakge_manager)
 * Add new func removeCache() to remove cache. (package_manager)
 * Mount the cache during running application. (cli)

Mount:(host->container)
 * Remove /var/cache/fontconfig -> /var/cache/fontconfig
 * Add /usr/local/share/fonts -> /usr/local/share/fonts
 * Add /var/lib/linglong/cache/[hash] -> /run/linglong/cache
 * Add /var/lib/linglong/cache/[hash]/fontconfig -> /var/cache/fontconfig

Config: (config.json)
 * Remove the hooks part.
 * Change env LINGLONG_LD_SO_CACHE to /run/linglong/cache/ld.so.cache.

Log:
2024-12-12 17:26:10 +08:00
ComixHe d2e37dc5cf feat: add permission dialog
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-10 18:13:49 +08:00
kamiyadm f58cd1ffd5 fix: the canceled task would be Queued again
If a task which is queued before has been canceled,
it should not be update to Queued.

Log:
2024-12-10 16:22:37 +08:00
kamiyadm 600c657baa fix: print invalid task when the task is queued
The initial State in the cli is Unknown, and the initial
State of PackageTask is Queued. When a new task enters and
queues, PM will update the State of task to Queued, but the
State has not actually changed at this time.
After receiving the PropertyChanged signal, and the cli will
not update the states from Unknown to Queued. Then the cli finds
that its State is Unknown, so it prints invalid task.

Log
2024-12-10 16:22:37 +08:00
kamiyadm 6ecb60f98b refactor: check permission by method Permissions
Add new method Permissions to PM.

Log:
2024-12-10 16:22:37 +08:00
kamiyadm c6cde14474 fix: wrong upgrade prompt
The 'Please restart ...' staff should not be displayed when the app is not running.

Log:
2024-12-10 15:46:42 +08:00
kamiyadm 92d7f6cdd5 fix: PM crashed during adding new jobs
-

Log:
2024-12-09 18:02:06 +08:00
kamiyadm 40515978ed fix: add task execution log
-

Log:
2024-12-09 18:02:06 +08:00
ComixHe 3005c8ceef fix: entries directory isn't being exported when exporting uab
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-06 15:47:34 +08:00
kamiyadm ddcf78d044 fix: optimize the downgrade prompt output during install
-

Log:
2024-12-05 17:16:26 +08:00
kamiyadm 3f1ce95f20 fix: the permission of states.json is incorrect
-

Log:
2024-12-04 17:04:08 +08:00
kamiyadm ca45488ca4 fix: dbus permission authentication is skipped
The interface org.freedesktop.DBus.Introspectable can not be rejected in
dbus(1.12.20.11-deepin1). We use org.deepin.linglong.PackageManager.Prune
to identify permissions now.

Log:
2024-12-04 16:56:42 +08:00
kamiyadm 563156616c fix: can not uninstall ref if layer dir is not exist
If the layer dir is not exists, we just need to give a warning
instead of return with error.

Log:
2024-12-04 16:54:54 +08:00
myml d7a995f14d feat: custom user-agent with api client and ostree
将玲珑版本号添加到user-agent便于服务端识别
2024-12-04 09:54:49 +08:00
ComixHe a396a3cd9f fix: compatible with old gtest
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-02 16:29:15 +08:00
myml 7e09fb68f3 feat: compatible with runtime module
兼容旧版本的runtime module
2024-11-30 11:55:14 +08:00
ComixHe 01eb8ab22b feat: add sha256 implementation for uab
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-29 17:58:00 +08:00
myml 572d384e89 feat: add list and remove commands to builder
builder添加应用列表和删除应用的命令, 便于开发者清理构建缓存
2024-11-29 17:17:03 +08:00
myml 434eac27b6 fix: ll-builder cannot exit while pulling dependency
修复builder在下载依赖时无法按Ctrl+C退出的问题
尝试使用QCoreApplication::aboutToQuit让任务停止没有效果, 所以使用了自定义的全局对象
2024-11-29 15:10:34 +08:00
dengbo11 c01bc53fee fix(cli): package manager pullDependency misjudgment
Use the correct logical operators to judge module.
2024-11-29 14:45:00 +08:00
black-desk e7b72a8d93 test: bring some tests back
Signed-off-by: black-desk <me@black-desk.cn>
2024-11-29 13:54:51 +08:00
dengbo11 127d31f507 fix(cli): can not install or uninstall develop module
1. Develop module can not be installed without binary module.
2. Develop module should be remove when run uninstall app.
2024-11-28 10:16:00 +08:00
ComixHe c65555e3fe fix: resolve the real path of symlink
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-27 18:01:35 +08:00
ComixHe c56da37a1e fix: remove symlink or empty directory before checkout
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-27 15:38:24 +08:00
ComixHe 2373bd1a98 fix: access value to unexpected
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-27 15:38:24 +08:00
ComixHe 27c2e7cd57 fix: ignore version while creating PackageTask
After we removed support of multi-verison app, PackageTask must
ignore version to avoid installing multi-verison at the same time

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-27 15:38:24 +08:00
myml 776613d7ee fix: should be return when layer is not found
export函数找不到layerdir时应该返回
2024-11-26 19:54:13 +08:00
dengbo11 db54a5f645 fix(cli): ll-cli kill can not stop app by reference
1. Compatible with old versions to stop running app container using fuzz reference.
2. Only support enter running app container by fuzz reference.
2024-11-23 17:24:25 +08:00
ComixHe 6ae5725e2c fix: add fallback channel "main" to earlier packageInfo
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-23 16:03:16 +08:00
dengbo11 e6aea9d998 feat(cli): support kill or enter container by appid
Support kill or enter application by appid.
2024-11-22 17:20:22 +08:00
myml 426bf7ae37 feat: compatibility with older versions of pkexec
旧版本pkexec没有keep-cwd选项, 为兼容旧版本pkexec,
将相对路径的layer文件转为绝对路径
2024-11-22 17:19:59 +08:00
kamiyadm b6a866e666 fix: failed to rebuildCache because of some invalid records
If the repository or cache file is not damaged, rebuildCache should not fail.

Log:
2024-11-22 15:35:34 +08:00
ComixHe 57ea9cb404 feat: filepathMapping supports multiple files or urls
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-22 15:15:50 +08:00
myml cc16885515 fix: unable to export all entries file
将软链接改为重命名时应该使用绝对路径
遍历entries目录时需要跟随软链接
非app包不应该导出entries
2024-11-22 13:11:07 +08:00
ComixHe 7a45551fd9 refactor(migrate): try to migrate builder repo
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-21 17:34:58 +08:00
dengbo11 c1b70c36f7 fix(cli): cli list --upgradable show extra information
Adjust the log output level to debug, do not show extra information.
2024-11-21 17:26:48 +08:00
myml 4bea611f7b feat: re-export all application entries after migrate
在迁移后重新导出所有应用的entries, 避免数据残留影响功能
2024-11-21 16:55:36 +08:00
kamiyadm f33390f7ef fix: refuse to run application as root
Return early if the current user is root.

Log:
2024-11-21 14:52:37 +08:00
kamiyadm 19548c38d8 fix: crashed in anolisos 23.1 after ll-cli run
-

Log:
2024-11-21 13:58:33 +08:00
ComixHe d2df2fcdd1 fix: resolve symlink in filepathMapping
Issue: https://pms.uniontech.com/bug-view-283279.html

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-21 11:15:15 +08:00
myml 4dee0744cd feat: optimize gdbinit
优化生成gdbinit的代码, 使逻辑更清晰
debug-file-directory使用绝对路径而不是substitute-path二次转换, 避免低版本gdb不支持
2024-11-21 10:17:15 +08:00