Commit Graph

587 Commits

Author SHA1 Message Date
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
kamiyadm 3d026001bf fix: ll-cli abort after construct OSTreeRepo
-

Log:
2024-06-27 13:12:02 +08:00
dengbo 87076c5ac7 fix: container env error when environment variables have multiple values
quote the values environment variables to avoid loading errors when some
environment variables have multiple values, such as A=a;b

Log:
2024-06-27 10:25:02 +08:00
kamiyadm 9efeb5b0cd fix: always use config.yaml to init ostree repo
fix https://github.com/linuxdeepin/developer-center/issues/9416.

Log:
2024-06-27 10:00:53 +08:00
ComixHe 95ac7e9525 refactor: InstallTask
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-26 13:51:22 +08:00
ComixHe 3d1d04ada6 feat: beginning support for installing from uab file
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-24 11:01:29 +08:00
ComixHe 5f8fccdef2 feat: ignore minified files when exporting layer and uab
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-24 11:01:29 +08:00
ComixHe e4acf15319 feat: add 'MinifiedInfo' to api
extending the concept of LayerDir

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-21 17:53:28 +08:00
dengbo 6a0e8b039f fix: failed to package linglong in uos1071
std::filesystem can not been declared in uos, so we need to add filesystem header

Log:
2024-06-21 17:06:14 +08:00
ComixHe a42c4dc9f1 refactor: cli command 'install'
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-21 13:40:00 +08:00
dengbo 1fe1c100a7 fix: layer size error when export layer repeatedly
if layer file exist, we must remove it before export it, or layer will overlay

Log:
2024-06-20 16:17:36 +08:00
kamiyadm 9eabcb2105 fix: missed some env during ll-builer build
We should append the process.env which from Container::run to
the origin container config.

Log:
2024-06-20 16:04:49 +08:00
kamiyadm 2d2a54cf49 fix: missed some env variables when reusing container
* Save env variables to /run/user/1000/linglong/containerId/00env.sh
  and mount it to /etc/profile.d/00env.sh in container.
* Remove 'bash --login -c' from exec() of ll-box, we
  add it before .

Log:
2024-06-20 14:26:11 +08:00
ComixHe 88a047660f fix: include unistd.h directly in uab_packager.cpp
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-20 11:29:19 +08:00
kamiyadm ddea8b0667 refactor: add 25-host-env to generate env variables
Add new generator 25-host-env and use it.

Log:
2024-06-20 10:52:46 +08:00
myml 0865484023 fix: builder did not exit when the build script failed
构建出错时, 玲珑没有返回错误

Log:
2024-06-19 16:50:16 +08:00
ComixHe 1326fb0c0e feat: support export uab file
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-19 16:08:11 +08:00
myml c2d00d62e6 feat: Use scripts to download sources instead
file和archive类型的source也改用脚本处理

Log:
2024-06-17 21:18:41 +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
kamiyadm 7e1aa4a534 refactor: using 'binary' as one of the module
* Add ostreeSpecFromReferenceV2() which return
   a string with the 'binary' module.
* Add getLayerQDirV2() which use ostreeSpecFromReferenceV2()
* Always use 'binary' first and fallback to 'runtime'

Log:
2024-06-17 10:12:02 +08:00
myml bf9d84deb3 fix: dangling pointer issue by retaining shared_ptr
修复因未保活智能指针导致指针悬空的问题

Log:
2024-06-14 15:05:07 +08:00
myml bf8489cfc9 feat: Create dedicated client for HTTP requests
使用单独的client发送http请求, 避免请求结果混淆

Log:
2024-06-14 09:42:52 +08:00
kamiyadm 76c9989012 chore: add const to ref in Update() and print ref value
-

Log:
2024-06-13 17:23:38 +08:00
myml 80d3b53e0a feat: does not use temporary repository when pulling
ostree拉取数据时不再使用临时仓库, 这样在网络中断后可以续传

Log:
2024-06-13 10:37:43 +08:00
kamiyadm 6bb16ef955 fix: should not modify automatically generated code
Change schema_version to schemaVersion back.

Log:
2024-06-12 17:14:15 +08:00
kamiyadm 72c0a4e525 refactor: add PackageInfoV2 and use it
* The difference between PackageInfo and PackageInfoV2:
   PackageInfo    PackageInfoV2
   appid          -
   -              id
   -              infoVersion
* We use PackageInfoV2 now and PackageInfo will
  be converted to PackageInfoV2.

Log:
2024-06-07 13:09:25 +08:00
myml dd8f95fb0c fix: builder log redirection losing error message
日志重定向会导致应用检测到非tty环境, 关闭stderr日志输出
builder强制开启非tty环境的终端日志输出

Log:
2024-06-07 11:24:37 +08:00
ComixHe edfbb6626c feat: add uab-header
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-07 11:09:15 +08:00
ComixHe 15fe4dd236 feat: add UABMetaInfo to api
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-06-07 09:41:12 +08:00
myml a2c66394e9 fix: builder did not exit when the build script failed
修复构建出错时, 玲珑没有正常的退出

Log:
2024-06-06 16:03:24 +08:00
kamiyadm 555d0b595f fix: no package exist after update failed
close: https://github.com/linuxdeepin/linglong/issues/470

Log:
2024-06-05 10:41:14 +08:00
kamiyadm 6bc6d3eff6 fix: remove extra dir after uninstall
close: https://github.com/linuxdeepin/linglong/issues/462

Log:
2024-06-05 10:41:14 +08:00
myml eb40e28ccd feat: add offline parameter to ll-builder run
ll-builder run添加offline参数,便于测试本地的Runtime

Log:
2024-05-31 11:25:06 +08:00
kamiyadm f89ad0adaf fix: the exported file has no executable permission
close: https://github.com/linuxdeepin/linglong/issues/458

Log:
2024-05-27 16:48:48 +08:00
dengbo 2aa0e267df fix: ll-build failed to convert appimage
linglong.yaml must have command and base option when convert

Log:
2024-05-27 16:38:19 +08:00
kamiyadm b4d2273973 fix: print develop module when pulling runtime
-

Log:
2024-05-22 17:57:55 +08:00
ComixHe 83d98b5820 feat: reuse container when application is runnnig
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-05-21 14:24:57 +08:00
kamiyadm f356697726 fix: some app won't exit after recieved SIGTERM
Temprary add '; exit' to the end of bashArgs.

Log:
2024-05-16 16:20:04 +08:00
dengbo 372321bd44 fix: linglong app can not access network
/etc/resolv.conf must be mount to container

Log:
2024-05-16 15:52:46 +08:00
kamiyadm 6fe9b93ac1 refactor: make cacheDir to be the member of SourceFetcher
-

Log:
2024-05-15 13:26:39 +08:00
kamiyadm d0332be2f8 fix: always need to download source
The QFile should be open when caculate the file hash.

Log:
2024-05-15 11:13:14 +08:00
kamiyadm 76be5f9091 fix: lost the catch file
Create a new directory to save cache file intead of use QTemporaryDir.

Log:
2024-05-15 11:13:14 +08:00
kamiyadm 8ad800567d fix: lost source files after fetching
The parent directory should be create first.

Log:
2024-05-15 11:13:14 +08:00
ComixHe 2f9ae75620 fix: add uid and gid to extra exec option and correct commands
Issue: https://github.com/linuxdeepin/developer-center/issues/8580

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-05-14 23:22:19 +08:00
kamiyadm 181b00841d fix: the version of runtime is not fuzzy in info.json
If the version of base or runtime is not set tweak, we should not write the
version with tweak to info.json.

Log:
2024-05-10 14:54:29 +08:00
kamiyadm c895c4d0c2 refactor: update pullDependency and overload it
-

Log:
2024-05-10 14:54:29 +08:00
ComixHe 54dd0f4f0c feat: support copy-symlink
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-05-10 10:45:51 +08:00
kamiyadm 9b8f4e50b8 fix: update the warning message in exportReference()
-

Log:
2024-05-09 17:41:34 +08:00
kamiyadm 1186628649 refactor: move shouldExport() to exportRefrence()
-

Log:
2024-05-09 17:41:34 +08:00
kamiyadm 967378e5d7 fix: some shared info is not update
Desktop database, mime info, glib-2.0/schemas.

Log:
2024-05-09 17:41:34 +08:00
kamiyadm a54b9a8718 fix: some config is not exported when installing layer
-

Log:
2024-05-09 17:41:34 +08:00
black-desk af82dd0424
Revert "fix: add finalizeMounts to delay remount"
This reverts commit 43a6068163.

Signed-off-by: black-desk <me@black-desk.cn>
2024-05-08 10:12:32 +08:00
ComixHe 43a6068163 fix: add finalizeMounts to delay remount
and fix some typo

Issue: https://github.com/linuxdeepin/linglong/issues/398

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-05-07 15:15:59 +08:00
kamiyadm b973e9b646 fix: extract layer failed
If the directory is a mount point, it will be moved failed.
Use cp instead of mv.

Log:
2024-05-07 14:17:00 +08:00
kamiyadm fc9833c685 fix: format the output of ll-builder
-

Log:
2024-05-07 14:17:00 +08:00
kamiyadm 83d10afe36 fix: update fetch-git-repo.sh to fetch-git-repo
Use the correct file name which will be installed.

Log:
2024-05-07 14:17:00 +08:00
ComixHe 7f513e0d21 refact(generators): mount to default location
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-05-06 16:40:16 +08:00
kamiyadm bcfba62c29 fix: ll-cli install foundation or runtime failed
-

Log:
2024-05-06 09:38:54 +08:00
dengbo 6b633f6f8c docs: optimization api doc
add description of api doc

Log:
2024-04-29 17:09:24 +08:00
myml a2a3c90e5c feat: ll-builder support skip run container
builder支持跳过容器运行(构建), 用于只下载源码和依赖的时候使用

Log:
2024-04-29 07:02:48 +00:00
myml 9dff4a96c4 feat: clean up unseless environment variables
清理无用的环境变量

Log:
2024-04-29 11:45:09 +08:00
dengbo 9d488f0368 fix: ll-cli list(search) --type not valid
support ll-cli list(search) --type option

Log:
2024-04-29 10:58:29 +08:00
kamiyadm 63c721b614 feat: support ll-cli content
New subcommand to display the exported files.

Log:
2024-04-28 11:43:33 +08:00
dengbo 7284fd33df chore: file prefix is error
file prefix must be file://

Log:
2024-04-26 17:50:04 +08:00
black-desk d273a45cab fix: check app is valid
check app is valid

Log:
2024-04-26 17:50:04 +08:00
dengbo 778f1226b5 refactor: refactor ll-cli list --app to ll-cli info
refactor ll-cli list --app to ll-cli info

Log:
2024-04-26 17:50:04 +08:00
myml 7821ba2266 fix: build failure on UOS 20
修复在UOS 20系统构建错误

Log:
2024-04-26 13:56:20 +08:00
dengbo 29ee27bb36 feat: ll-cli list support show tier of speciafy app
ll-cli list support show tier of speciafy app

Log:
2024-04-26 12:01:16 +08:00
ComixHe ea3e3ff80c feat: add new envFilter `XDG_DATA_HOME`
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-04-26 10:35:31 +08:00
black-desk 6328cc8e9d fix(ll-box): exit with -1 when init don't return 0
Signed-off-by: black-desk <me@black-desk.cn>
2024-04-25 13:18:31 +08:00
dengbo ba7ed87ad7 fix: fix v20 package
1. linglong-bin must be first in debian control, it will influence
   debian sysctl.d/linglong.conf install
2. Quuid must include in head

Log:
2024-04-25 13:08:43 +08:00
kamiyadm 2728b0f3bb fix: ll-builder run failed
The default module of org.deepin.foundation should be runtime.

Log:
2024-04-23 16:43:57 +08:00
black-desk 14a06b2626
refact: archieve linglong runtime dir instead of leave it alone
Signed-off-by: black-desk <me@black-desk.cn>
2024-04-23 15:43:55 +08:00
ComixHe 5ec46ecc63 fix: ignore broken symlink while iterating files
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-04-23 15:39:24 +08:00
kamiyadm 74c0480a7a fix: install layer or export layer failed
Use /tmp/linglong-layer-$uuid instead of /tmp/linglong-layer/$uuid.
Because ll-package-manager and ll-builder owned by diffrent user,
if one of them creates the parent dir 'linglong-layer', another one
has no permisson to open it.

Log:
2024-04-23 14:35:40 +08:00
kamiyadm 1c5ec42068 fix: rename 'll-cli repo list' to 'll-cli repo show'
-

Log:
2024-04-23 14:35:40 +08:00
black-desk 570a0d562a chore: enable info logging and deprecate builder -v
Signed-off-by: black-desk <me@black-desk.cn>
2024-04-22 13:44:07 +08:00
ComixHe f262b8d2ae fix: add LINGLONG_APPID env before running container
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-04-19 14:02:34 +08:00
black-desk 44426d5e37 chore: refine log level
Signed-off-by: black-desk <me@black-desk.cn>
2024-04-19 10:42:30 +08:00
black-desk 0b95337343
chore(ocppi): return full command if failed
Signed-off-by: black-desk <me@black-desk.cn>
2024-04-18 20:48:01 +08:00
dengbo 9521c0a207 fix: ll-cli info show error
pack should use LayerInfo instead of PackageInfo

Log:
2024-04-18 17:57:30 +08:00
dengbo 53702a996b fix: failed to install linglong layer file use ll-cli
1. if is linglong layer file, install it directly.
2. LayerFile has offset a magicNumber size(40) in Constructor, so we do not need to skip magicNumber before read meta info length.

Log:
2024-04-18 15:25:28 +08:00
dengbo 76afa0e3e0 fix: umount error dir in LayerPackager destruct
umount error dir in LayerPackager destruct

Log:
2024-04-18 13:17:43 +08:00
black-desk bbda931b9b feat: allow set the oci runtime via env variable
1. Introduce LINGLONG_DEFAULT_OCI_RUNTIME cmake option to set the
   default oci runtime cli used by linglong;
2. Allow override oci runtime by set env variable LINGLONG_OCI_RUNTIME.

Signed-off-by: black-desk <me@black-desk.cn>
2024-04-18 11:11:56 +08:00
ComixHe 7cca859463 fix: add `copy-symlink` option for symlink source
crun use `copy-symlink` instead of `nosymfollow`

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-04-18 10:33:54 +08:00
black-desk 36c9d35800 build: backport to UOS v20
1. vendor more dependencies
   - docopt.cpp
   - tl-expected
2. make ocppi subproject
3. upgrade PFL.cmake

Signed-off-by: black-desk <me@black-desk.cn>
2024-04-17 20:55:14 +08:00