Commit Graph

259 Commits

Author SHA1 Message Date
transifex-integration[bot] d2121da2c8
i18n: Translate policy.ts in ar
100% translated source file: 'policy.ts'
on 'ar'.
2025-11-20 01:51:01 +00:00
transifex-integration[bot] 001af7f5bf
i18n: Translate policy.ts in en_AU
100% translated source file: 'policy.ts'
on 'en_AU'.
2025-11-20 01:50:52 +00:00
transifex-integration[bot] 67278de55d
i18n: Translate policy.ts in ast
100% translated source file: 'policy.ts'
on 'ast'.
2025-11-20 01:50:43 +00:00
transifex-integration[bot] a331e961c6
i18n: Translate policy.ts in bg
100% translated source file: 'policy.ts'
on 'bg'.
2025-11-20 01:50:33 +00:00
Wang Zichong 36ade87414 i18n: add policy file for translation
build / ubuntu_24.04 (push) Waiting to run Details
build / ubuntu_22.04 (push) Waiting to run Details
coverage / codecov (push) Waiting to run Details
Merging translation can be done using deepin-policy-ts-convert utility.

Log:
2025-11-19 16:06:40 +08:00
dengbo a10faafab7 feat: add translations to polkit policy
Adds translations for the authentication check message and description
in the polkit policy file. This provides a better user experience
by displaying authentication prompts and descriptions in the user's
preferred language. The addition covers a wide range of languages to
ensure broad accessibility.

Influence:
1. Verify that the authentication prompts are displayed in the correct
language based on the system locale.
2. Test the authentication process with different language settings to
ensure that all translations are correctly loaded and displayed.
3. Ensure that untranslated strings fallback gracefully to a default
language (e.g., English).

feat: 为 polkit 策略添加翻译

为 polkit 策略文件中的身份验证检查消息和描述添加翻译。这通过以用户首选的
语言显示身份验证提示和描述来提供更好的用户体验。 添加涵盖了广泛的语言,
以确保广泛的可访问性。

Influence:
1. 验证身份验证提示是否根据系统区域设置以正确的语言显示。
2. 使用不同的语言设置测试身份验证过程,以确保所有翻译都正确加载和显示。
3. 确保未翻译的字符串可以优雅地回退到默认语言(例如,英语)。
2025-09-22 13:12:13 +08:00
wrj97 d1091e3955 feat: enable git submodule fetching with environment variable control
1. Add environment variable support to Cmd class for process execution
2. Set GIT_SUBMODULES=true when executing source fetch scripts
3. Conditionally execute git submodule commands based on GIT_SUBMODULES
env var
4. Fix member variable naming in Cmd class (command -> m_command)
5. Pass environment variables to command existence checking process

This change allows git submodules to be fetched only when explicitly
enabled through the GIT_SUBMODULES environment variable, providing
better control over the source fetching process. The environment
variable mechanism was added to the Cmd utility class to support this
feature, and existing command execution logic was updated to use proper
member variable naming conventions.

Log: Added conditional git submodule fetching support in source fetcher

Influence:
1. Test git repository fetching with submodules enabled
2. Verify git repository fetching without submodules (default behavior)
3. Test environment variable passing in command execution
4. Verify command existence checking with environment variables
5. Test source fetching for projects with and without submodules
6. Validate that existing git fetch functionality remains unchanged

feat: 通过环境变量控制启用 git 子模块获取

1. 为 Cmd 类添加环境变量支持以执行进程
2. 在执行源码获取脚本时设置 GIT_SUBMODULES=true
3. 基于 GIT_SUBMODULES 环境变量条件性执行 git 子模块命令
4. 修正 Cmd 类中的成员变量命名(command -> m_command)
5. 将环境变量传递给命令存在性检查进程

此变更允许仅在通过 GIT_SUBMODULES 环境变量明确启用时才获取 git 子模块,
从而更好地控制源码获取过程。为支持此功能,向 Cmd 工具类添加了环境变量机
制,并更新了现有命令执行逻辑以使用正确的成员变量命名约定。

Log: 在源码获取器中添加条件性 git 子模块获取支持

Influence:
1. 测试启用子模块的 git 仓库获取
2. 验证不带子模块的 git 仓库获取(默认行为)
3. 测试命令执行中的环境变量传递
4. 验证带环境变量的命令存在性检查
5. 测试带和不带子模块的项目源码获取
6. 验证现有 git 获取功能保持不变
2025-09-17 13:26:36 +08:00
wrj97 090b6fc6a8 fix: Optimize file fetching with hard links
1. Changed the method for copying cached files to the output file from
`cp` to `cp --remove-destination --link`.
2. This introduces hard links instead of full copies, significantly
improving performance when fetching files from the cache.  A fallback
`cp` is included to handle cases where hard linking might fail (e.g.,
due to filesystem limitations).
3. The `--remove-destination` option ensures that if the destination
file already exists, it's removed before creating the hard link,
preventing errors.

Log: Improved file fetching performance by utilizing hard links for
cached files

Influence:
1. Verify that files fetched from the cache are functionally identical
before and after the change.
2. Measure the performance of file fetching (time taken) with and
without the hard link optimization.
3. Test the fallback `cp` mechanism by simulating scenarios where hard
linking might fail (e.g., by mounting a filesystem that doesn’t support
it).
4. Confirm that the fallback `cp` still correctly copies the file in
case of hard link failure.

修复: 使用硬链接优化文件获取

1. 将从缓存复制文件的写入方式从 `cp` 改为 `cp --remove-destination
--link`。
2. 这样可引入硬链接,而不是完整复制,从而显著提高性能,尤其是在从缓存获
取文件时。  包含一个备用 `cp` 以处理硬链接可能失败的场景(例如,由于文件
系统限制)。
3. `--remove-destination` 选项可确保如果目标文件已存在,则在创建硬链接之
前将其删除,从而防止错误。

Log: 通过使用硬链接来改善文件获取性能

Influence:
1. 验证在更改前后,从缓存获取的文件在功能上是否相同。
2. 测量带和不带硬链接优化时文件获取的性能(耗时)。
3. 测试通过模拟无法进行硬链接的场景(例如,挂载不支持它的文件系统)来测
试备用 `cp` 机制。
4. 确认在硬链接失败时,备用 `cp` 仍然可以正确复制文件。
2025-09-08 10:23:27 +08:00
wrj97 8904ee6c86 feat: improve ldd dependency check with better error handling
改进ldd依赖检查的错误处理机制, 通过收集所有缺失的依赖项来增强错误报告
2025-08-27 09:51:23 +08:00
dengbo b76e908d3b chore: use CMAKE_INSTALL_FULL_SYSCONFDIR
Update installation paths for shell scripts to use
`CMAKE_INSTALL_FULL_SYSCONFDIR` instead of `CMAKE_INSTALL_SYSCONFDIR`.
This ensures that the scripts are installed in the correct location,
even when the installation prefix is not the root directory. This fixes
issues where linglong related scripts were not correctly installed in
non-standard installation paths.

Influence:
1. Verify that linglong.sh is installed to the correct path, both when
installing to /usr and to a non-standard prefix.
2. Check that the environment variables set in the script are correctly
sourced when a new session starts.
2025-08-14 14:24:19 +08:00
rewine b0a2a1d873 fix: use CMAKE_INSTALL_SYSCONFDIR for config paths
1. Replace hardcoded /etc paths with CMAKE_INSTALL_SYSCONFDIR variable
2. Fix two installation destinations in the CMakeLists.txt file:
   - Changed /etc/profile.d to ${CMAKE_INSTALL_SYSCONFDIR}/profile.d
   - Changed /etc/X11/Xsession.d to ${CMAKE_INSTALL_SYSCONFDIR}/X11/
Xsession.d
3. This makes the installation paths configurable through CMake rather
than hardcoded
4. The change ensures better compatibility across different Linux
distributions and packaging systems

Influence:
1. Test installation on target system to verify script placement
2. Check that environment variables are properly set in both profile.d
and Xsession.d locations
3. Verify package builds work correctly with custom
CMAKE_INSTALL_SYSCONFDIR values

fix: 使用 CMAKE_INSTALL_SYSCONFDIR 变量替代配置路径中的硬编码值

1. 将原有的硬编码路径 /etc 替换为 CMAKE_INSTALL_SYSCONFDIR 变量
2. 修改了 CMakeLists.txt 中的两个安装路径:
   - 将 /etc/profile.d 替换为 ${CMAKE_INSTALL_SYSCONFDIR}/profile.d
   - 将 /etc/X11/Xsession.d 替换为 ${CMAKE_INSTALL_SYSCONFDIR}/X11/
Xsession.d
3. 这使得安装路径可以通过 CMake 配置而非固定写死
4. 此修改提升了不同 Linux 发行版和打包系统的兼容性

Influence:
1. 在目标系统上测试安装以验证脚本位置的正确性
2. 检查 profile.d 和 Xsession.d 中的环境变量是否正确设置
3. 验证使用自定义 CMAKE_INSTALL_SYSCONFDIR 值时的包构建过程
2025-08-13 11:44:57 +08:00
dengbo d8fd18a645 feat: Add Linyaps application icon
This commit adds a new application icon for Linyaps and integrates it
into the desktop entry.

The `linyaps.svg` file contains the vector graphic for the icon. The
CMakeLists.txt file is updated to install the icon to the correct
location in the file system (`/usr/share/icons/hicolor/scalable/apps`).
The `linyaps.desktop` file is modified to use the new icon by setting
the `Icon` field to "linyaps".

This change improves the visual presentation of the Linyaps application
in the desktop environment.

Log: Added application icon for Linyaps

Influence:
1. Verify that the Linyaps icon is displayed correctly in application
launchers and desktop environments.
2. Check that the icon is visually appealing and consistent with the
application's branding.
3. Test the icon at different sizes to ensure it remains clear and
recognizable.
4. Confirm that the icon is correctly installed to the system's icon
directory.
2025-08-11 17:24:06 +08:00
dengbo 77224b7077 Revert "chore: hide linyaps desktop file"
This reverts commit c33cf2a3a8.
2025-08-07 19:46:21 +08:00
dengbo c33cf2a3a8 chore: hide linyaps desktop file
This change hides the `linyaps.desktop` file by setting `Hidden=true`.
This is necessary because the application is not intended to be launched
directly by the user through the desktop environment.  The intended
use is via command line invocation through `ll-cli install`. Preventing
direct launching reduces potential user confusion, as it requires
specific arguments only provided via the command line interface.

Influence:
1. Verify that the application is not visible in the desktop environment
application launcher or file manager.
2. Confirm that the application can still be invoked through the command
line using `ll-cli install`.

chore: 隐藏如意玲珑桌面文件

此更改通过设置 `Hidden=true` 来隐藏 `linyaps.desktop` 文件。 这是必要
的,因为该应用程序不打算由用户通过桌面环境直接启动。 预期用途是通过 `ll-
cli install` 的命令行调用。 阻止直接启动可减少潜在的用户困惑,因为它需要
仅通过命令行界面提供的特定参数。

Influence:
1. 验证该应用程序在桌面环境应用程序启动器或文件管理器中不可见。
2. 确认仍然可以使用 `ll-cli install` 通过命令行调用该应用程序。
2025-08-06 17:30:03 +08:00
reddevillg fe1bd7da21 fix: fix bash completion
1. Correct ll-builder repo completion
2. Don't pull data from remote when completion "ll-cli install" and
   "ll-cli search"

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-07-28 15:32:15 +08:00
deepsource-autofix[bot] f4277e2b74 style: format code with ClangFormat and Prettier
This commit fixes the style issues introduced in 941b502 according to the output
from ClangFormat and Prettier.

Details: None
2025-07-18 15:13:19 +08:00
myml 3cbe65dad1 refactor: simplify environment variable handling in systemd generator
1. Removed debug logging code that was checking for script readability
2. Changed from direct export to echo output for systemd environment
handling
3. Simplified the logic by removing redundant checks since systemd
generators expect echo output
4. The change aligns better with systemd's environment generator
expectations where variables should be echoed rather than exported
directly

refactor: 简化 systemd 生成器中的环境变量处理

1. 移除了检查脚本可读性的调试日志代码
2. 将直接导出改为 echo 输出以适配 systemd 环境处理
3. 通过移除冗余检查简化了逻辑,因为 systemd 生成器期望 echo 输出
4. 此变更更符合 systemd 环境生成器的预期,变量应该通过 echo 输出而非直接
导出
2025-07-07 22:26:54 +08:00
reddevillg c3d8c21aca fix: Isolate app-specific patches in dedicated directories
Previously, app-specific patches were identified by matching the patch
filename (without the extension) against the application ID. This
approach was flawed as it caused patch conflicts between different
applications. For example, a patch named `com.app.A.json`, intended
only for `com.app.A`, would be incorrectly applied as a global patch
to `com.app.B`.

This commit introduces a directory-based mechanism to correctly isolate
application-specific patches. All patches for a specific app must now
reside within a subdirectory named after the app ID.

Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-07-01 20:14:26 +08:00
ComixHe 6d5c1f1404 refactor: some scripts that export env 'XDG_DATA_DIRS'
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-06-23 16:02:44 +08:00
Felix Yan 8a42aaa2cd fix: don't hardcode libexec dir
Use `CMAKE_INSTALL_FULL_LIBEXECDIR` so that setting `CMAKE_INSTALL_LIBEXECDIR` changes `LIBEXEC_LINGLONG_DIR` accordingly.
2025-06-23 10:31:06 +08:00
reddevillg 3bc48055bc fix: fix build failure caused by removed file
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-06-19 19:01:41 +08:00
reddevillg fa063275db fix: remove unused old config
Signed-off-by: reddevillg <reddevillg@gmail.com>
2025-06-19 17:40:18 +08:00
dengbo 51e373aa38 fix: failed to export XDG_DATA_DIRS enviroment
Path "/usr/local/share:/usr/share" must be set when XDG_DATA_DIRS is
empty.
2025-06-16 15:21:13 +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
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 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
ice909 63263e8a29 fix: zsh completion failed
"_values:compvalues:11: not enough arguments"

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-25 13:03:58 +08:00
ice909 605b8eff45 fix: add the --no-same-owner parameter to avoid tar unpack errors
Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-24 17:59:53 +08:00
ice909 72f9be6bdb chore: update completion script
Install with ./ prefix will only list local files and won't search online.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-04-21 14:33:52 +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 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
ComixHe 468466df1f chore: suppress error while executing systemd-generator
file or directory may not exist

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-07 13:03:20 +08:00
myml 17276ba01d fix: adjust container mount items
在之前的提交中, 本应删除/tmp挂载, 却误删了/dev的挂载
2025-03-26 09:34:49 +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
dengbo 845089d652 fix: app cannot be started immediately after exiting
Mount /tmp to tmpfs to prevent some files sharing.
2025-03-12 09:46:18 +08:00
ice909 c6f4126e54 chore: update bash-completion
Now repo should use alias.

Signed-off-by: ice909 <gaochang1@uniontech.com>
2025-03-11 21:22:32 +08:00
dengbo bc206df5be feat: add linglong desktop
Add linglong desktop file to support install uab.
2025-03-11 20:57:55 +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 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
dengbo fae28f069a fix: uab icon display abnormality
Update generic-icon to universal-application-bundle.
2025-02-24 20:31:35 +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
ice909 02f64f65b2 feat: add command automatic completion for zsh
ll-cli in zsh supports automatic completion.
2025-02-24 14:28:40 +08:00
myml 0615abd96c fix: debug symbols not stripped from build artifacts
之前在剥离调试符号的脚本中尝试跳过被剥离的调试符号文件,
但因判断条件错误, 导致未剥离调试符号的二进制文件也被跳过
2025-02-18 10:16:37 +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
reddevillg 21131d055e fix: Fix incorrect path when build prefix is /usr/local
Fix incorrect path when build prefix is /usr/local
2025-02-11 16:39:59 +08:00
ComixHe 715d3a6fb6 chore: ldd-check ignores some libs which under /opt
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-01-09 15:29:34 +08:00
ComixHe d51b9b5b8c chore(uab): add exporting blacklist
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 3ac393ad57 feat: cache generation failed when installing modules
安装modules时, 因为缓存文件已存在, 创建目录会失败
2024-12-23 10:45:40 +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
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
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 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
kamiyadm 5682152a1d feat: add new dialog to show cache generation
-

Log:
2024-12-11 15:05:26 +08:00
ComixHe d2e37dc5cf feat: add permission dialog
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-12-10 18:13:49 +08:00
myml f7a824138f feat: skip debug files when stripping symbols
剥离调试符号时应跳过已存在的debug文件, 这些文件可能是跟随deb导入的
2024-11-25 09:20:56 +08:00
kamiyadm ee9c5dee99 fix: admin user skips authentication during call PM
Default rules is enough. The extra rule allow the admin user
to skip authentication. Just remove it.

Log:
2024-11-20 10:13:31 +08:00
ComixHe ca4f8bc7c7 refactor: re-implement migrate
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-11-19 17:46:22 +08:00
myml 172a51aa5d fix: ldd-check should run ldconfig first
ldd-check在检查之前应该刷新ldconfig缓存,
否则无法找到应用构建生成的so文件
2024-11-15 10:53:05 +08:00
dengbo11 5f416426be fix(builder): example can not build in loong64 arch
Base and runtime do not have loong64 arch, so use org.deepin.base.

Bug: https://pms.uniontech.com/bug-view-284713.html
2024-11-11 17:35:04 +08:00
kamiyadm 09dccbcecc fix: bash-completion error in 'll-cli search'
-

Log:
2024-11-08 17:55:15 +08:00
kamiyadm 21ce364aea fix: no permission to migrate
* Not doing interact before migration, only notification.
* Allow anyone to call WaitForAvailable() by dbus.

Log:
2024-11-05 15:33:04 +08:00
kamiyadm 84e3ec6244 fix: broken bash completions
Both of ll-cli and ll-builder.

Log:
2024-11-05 15:16:17 +08:00
kamiyadm 5c3623d663 fix: check dbus error after read/write the Property of PM
Configuration() and setConfiguration() could be failed. Due to
the limit of dbus permission policy, we should call runningAsRoot()
before setConfiguration().

Log:
2024-11-05 14:34:22 +08:00
kamiyadm c056e3959a fix: auth_admin_keep is not worked
-

Log:
2024-11-01 17:37:54 +08:00
kamiyadm 92a7467da0 fix: adjust the dbus policy conf of PM
* Write the rule in a better way.
* Not allow the org.freedesktop.DBus.Introspectable for now.

Log:
2024-10-31 18:00:49 +08:00
kamiyadm 50adb43437 chore: adjust polkit action conf
Change the value in allow_any and allow_inactive from 'no' to 'auth_admin'.

Log:
2024-10-31 18:00:49 +08:00
kamiyadm 3d0336714f chore: add polkit rules and install it
-

Log:
2024-10-31 18:00:49 +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
myml 375e21491f fix: systemd service file not revised correctly
玲珑在构建后会使用app-conf-generator脚本修改应用的desktop, service等文件
在Exec字段添加ll-cli run实现通过玲珑启动应用, 减少应用开发者工作量
修复了在错误的share/systemd目录查找service,改为在lib/systemd目录查找
share/systemd目录是在执行完app-conf-generator后才从lib/systemd复制的
复制的原因是因为entries是指向share的软链接, systemd需要在entries中才会生效

Log:
2024-10-30 09:51:49 +08:00
kamiyadm 3f682e0b8c fix!: restrict access to some methods of PM
* Add some rules to the dbus conf of PM:
  For deepin-linglong and root, allow to call any method.
  For other users, they should not call any method instead of Search.
* Capture the error of dbus reply which is from PM. If the error type is 'AccessDenied',
  notify pepole and return.

Log:
2024-10-29 15:59:16 +08:00
myml 6fe39d6040 feat: ll-builder add debug argument
ll-builder添加debug参数, 方便调试应用
debug环境使用develop模块, 可使用 gdb 调试应用
添加了模块拆分功能的文档, 更新了调试应用的文档
2024-10-22 11:21:39 +08:00
dengbo11 e72d2dc8cd fix(config): failed to install uab mime-type file
deepin-linglong.xml rename vnd.linyaps.uab.xml, install file name should be modified synchronously.
2024-10-16 18:17:18 +08:00
dengbo11 a11015011a refactor(config): optimization uab mime config
Optimization uab mime config file,
refer to: https://specifications.freedesktop.org/shared-mime-info-spec/latest/ar01s02.html.
2024-10-15 20:16:09 +08:00
myml 6d5425545e feat: support module split files
实现了调试符号剥离的功能, 在编译前给gcc添加全局-g参数, 在编译后剥离调试符号到$PREFIX/lib/debug目录
实现了按模块拆分文件的功能, 在linglong.yaml中使用modules字段将构建产物拆分到不同的模块中

Log:
2024-10-15 14:18:40 +08:00
ComixHe 6f7b243ec2 feat: add new dbus object for migrating underlying storage
Adding version '1' to dbus service 'org.deepin.linglong.PackageManager' and it's dbus object.

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-10-08 17:40:34 +08:00
kamiyadm f7a37cc3bc fix: failed to run linglong.sh
Change 'source' to '.', because '#/usr/bin/env bash' is not work
in /etc/profile.d(Default is 'sh') and source is not supported in 'sh'.

Log:
2024-10-08 13:33:33 +08:00
myml 847b2def61 fix: change the mount options of rootfs
Modify the mount permissions of a root filesystem, so that it allows applications to read and write files to the host file system.
For example, deepin calendar needs to create a systemd timer in the ~/.cache/systemd directory, but ~/.cache directory is overlay by linglong, you can use /run/hosts/rootfs/home/xxx/.cache/systemd.

Bug: https://pms.uniontech.com/bug-view-271647.html
2024-09-29 14:15:19 +08:00
dengbo11 f0e83cdc2d fix(config): linglong config symlink is missing
Need to install linglong config file before create symlink.

Log: fix linglong config file is missing
2024-09-27 15:25:37 +08:00
dengbo11 3c3ffc8272 chore: code clean
Project configuration file optimization.

Log:
2024-09-26 15:12:47 +08:00
black-desk 4b98ee7682 chore!: remove linglong-upgrade
This patch deprecate the linglong-upgrade script, linglong-upgrade
systemd service and systemd timer.

Check comments in linglong-upgrade.service for more information.
2024-09-10 17:45:20 +08:00
black-desk c3e109848f chore: adjust XDG_DATA_DIRS environment
This patch does two things:

- Adjust linglong data directory order in XDG_DATA_DIRS;

  See comments in
  /misc/lib/systemd/system-environment-generators/61-linglong
  for more information.

- Remove user level linglong data directory in XDG_DATA_DIRS;

  We are not going to implement user level installation in linyaps.

Signed-off-by: black-desk <me@black-desk.cn>
2024-09-05 16:28:00 +08:00
dengbo11 bf27abe33b chore: delete appimage convert feature from ll-builder
delete appimage convert feature from ll-builder
and move it to linglong-pica

Log:
2024-08-28 13:54:32 +08:00
myml ebeae251da feat: do not use bash to execute ldconfig
在制作flatpak的base时发现, flatpak的动态链接器 (ld-linux-x86-64.so.2)
只包含了/usr/lib/x86_64-linux-gnu这一个动态库搜索路径, 导致bash在运行ldconfig之前是无法启动的
所以在容器钩子中不再通过bash运行ldconfig而是直接启动ldconfig, 以兼容复杂的base环境

note: org.gnome.Platform/x86_64/43 和 org.kde.Platform/x86_64/5.15-23.08 都有这个问题

Log:
2024-08-28 10:43:43 +08:00
kamiyadm 893f2ba96b fix(ll-builder): failed to generate desktop file
* Return error when execute app-conf-generator failed.
* Do not parse full line of Exec, just insert string after Exec=.

issue: https://github.com/linuxdeepin/developer-center/issues/10419

Log:
2024-08-23 16:06:39 +08:00
ComixHe 29318500c1 refactor: uab filtering rules
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-08-19 16:30:01 +08:00
ComixHe d5fd779a17 fix: couldn't find all execuable elf files
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-08-15 10:29:19 +08:00
ComixHe 5a4eb3cc12 feat: support for trimming unneeded dynamic libraries
Adjustments to subref-related implementations

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-08-08 15:00:28 +08:00
kamiyadm 8526fae52f fix: the upgrade service affects system startup time
Start the upgrade service after defaults.target.

Log:
2024-08-06 06:27:36 -05:00
kamiyadm 22e0790a1d fix: automatic updates will break the base env
* Updates to base and runtime need to be separated
  from applications. Temporarily handle this in the
  automatic update script.
* installedAppFuzzyRef should parse from paras->package.
Log:
2024-08-06 06:27:36 -05:00
ComixHe d5a9312394 refactor: export information of extra libraries in ldd-check
Generate "extraLibs.uab.yaml" file for trimming the size of the uab package

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-08-01 17:46:34 +08:00
ComixHe f6dc1a947b chore: remove unneeded files
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-08-01 17:46:34 +08:00
myml 2812359843 fix: error when pulling source code with git
如果commit填写的是tag号, 使用fetch-git-source是会报错

Log:
2024-07-26 13:57:24 +08:00
black-desk e5127668b7 fix: use d instead of D in tmpfiles.d config
systemd-tmpfiles-setup.service will call systemd-tmpfiles with --remove
at boot, which will remove all D directories.

So we should use d to make --remove not effect on /var/lib/linglong
2024-07-24 15:17:57 +08:00
black-desk b37723d1d2 refact: remove create-linglong-dirs
1. Use tmpfiles.d to create /var/lib/linglong instead of ExecPre of
   systemd service;
2. Run wrap-and-sort;
3. Sort files to configure in misc/CMakeLists.txt.
2024-07-23 17:16:37 +08:00
wrj97 69140f3741
fix: hooks missing command args (#605)
容器hooks缺少命令参数

Log:
2024-07-22 17:40:59 +08:00
myml 9ef46f8ce7 fix: Error when running ldconfig
ldconfig会在生成缓存内容后,移动临时文件到缓存文件,所以不应该将临时文件做成挂载点
现在将缓存文件做成软链接, 软链接指向可读写的位置,可避免 /etc 只读的情况

Log:
2024-07-22 11:31:13 +08:00
black-desk b7fde13559 chore: clean package manager service file
Refer to manpage of systemd.service:

> For bus-activatable services,
> do not include a [Install] section in the systemd service file,
> but use the SystemdService= option
> in the corresponding DBus service file,
> for example ...

We should not have an Install section here.

Also remove some unused capability limit.
2024-07-18 16:23:11 +08:00