Commit Graph

50 Commits

Author SHA1 Message Date
reddevillg b5dabe595c fix: fix compiler error on nlohmann_json 3.9.1
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-07-16 15:48:53 +08:00
reddevillg 13e7061526 fix: correctly pass argument by vector
use quoteBashArg if run with bash -c or write to bash script.

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-06-20 18:15:10 +08:00
dengbo b54fd561aa feat: add hooks features
Add hooks features for app install.
2025-06-06 17:33:22 +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
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
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
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
ice909 d9d0a802c6 feat: support specifying the desktop installation directory
Specify 'LINGLONG_DESKTOP_EXPORT_PATH' during compilation.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-27 14:21:10 +08:00
ComixHe 1840243f59 refactor: fix compiling warnings
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-24 13:53:45 +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
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
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 672f23f0d3 refactor: separate build process into several stages
separate build process into several stages
2025-04-08 10:08:43 +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 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
ComixHe d7cea3443a refactor: optimize starting container
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-02-27 19:42:27 +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
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
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
ComixHe ba889e2c46 chore: fix some compiler warnings
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-10 12:08:59 +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
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
myml 8e8bd7b0d7 feat: no need to export all entries on startup
不需要在每次启动package-manager时都执行一遍全量导出
2024-12-25 09:45:19 +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 d2e37dc5cf feat: add permission dialog
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-10 18:13:49 +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
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
ComixHe 57ea9cb404 feat: filepathMapping supports multiple files or urls
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-22 15:15:50 +08:00
ComixHe 6f37db0765 refactor: Adapts to Qt 6.8.0
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-13 16:03:50 +08:00
myml a85107ae40 feat: not use the host machine PATH variable
目前会通过profile.d/00env.sh将宿主机的PATH变量传递到容器中并覆盖profile文件设置的默认值
目前看来并没有好处, 反而会导致预料之外的问题, 比如在一些系统上PATH没有包含/bin目录, 但玲珑的base有可能需要
2024-11-11 09:32:41 +08:00
dengbo11 583ad9d024 feat(cli): linglong cli help information internationalization
Add ll-cli chinese and spanish help information.
2024-11-05 20:12:08 +08:00
dengbo11 e8a17cd9c3 chore: misspelling of word
Word spelling inaccurate.
2024-11-01 10:56:18 +08:00
ComixHe 032627936c feat: add syncing mecanism between ll-cli and ll-package-manager
ll-package-manager will delay the uninstall process of application
if there are running containers that are using the application that
will be uninstalled and ll-package-manager may not daemonlize anymore
in the future.

So we need a mecanism to sync states and let ll-package-manager to know
how many running container there are and whether container is building
or not.

ll-cli should touch a file under /run/linglong/UID which named
with current pid and left empty to present initialization of ll-cli is
incomplete, ll-package-manager should waiting until all file are valid
(or exit immediately) if ll-package-manager want to uninstalling
package.

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-10-31 13:35:32 +08:00
ComixHe fc1088eba4 refactor: the mechanism of task
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-10-31 13:35:32 +08:00
kamiyadm 63fa3687a2 fix: some errors during migration
-

Log:
2024-10-08 17:40:34 +08:00
ComixHe 29b0a39a0e refactor: remove unnecesseray code and refactor OSTreeRepo
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-10-08 17:40:34 +08:00
kamiyadm df449dc704 feat: overload loadJSONFile with other type
Support std::filesystem and GFile.

Log:
2024-10-08 17:40:34 +08:00
dengbo11 71caecb838 chore: adujust include guards
Use #pragma once to replace #ifndef
reference https://includeguardian.io/article/pragma-once-vs-ifndef.

Log: use #pragma once to guard include
2024-09-05 14:55:38 +08:00
ComixHe eb21723f5c refactor: inject checkers into the end of build script
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-08-01 17:46:34 +08:00
black-desk ff8360cfde build(builder): change uab elfs install dest
Signed-off-by: black-desk <me@black-desk.cn>
2024-07-09 16:20:47 +08:00
ComixHe 0e77738d59 fix: check if the ref exists in the local repo before deleting it
currently, ostree_repo_set_ref_immediate will ignore error 'ENOENT'
when unlinking ref using unlinkat and doesn't report any errors.

so we should resolve ref locally before deleting it.

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-07-05 14:39:28 +08:00
ComixHe b4e3b2f826 refactor: install layer file asynchronously
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-27 13:56:31 +08:00
ComixHe efbe93fefe feat: support for installing from uab
linglong doesn't have a completed mechanism of minifying dependencies yet,
it will be implemented later

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-27 13:56:31 +08:00
ComixHe 1326fb0c0e feat: support export uab file
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-19 16:08:11 +08:00
ComixHe 8d099eeda3 refactor: split target linglong::linglong into four parts
- linglong::linglong
 - linglong::utils
 - linglong::api
 - linglong::dbus-api

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-17 11:04:45 +08:00