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 输出而非直接
导出
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>
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>
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.
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.
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:
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>
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
This patch deprecate the linglong-upgrade script, linglong-upgrade
systemd service and systemd timer.
Check comments in linglong-upgrade.service for more information.
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>
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
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.
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.
org.deepin.linglong.PackageManager add Capability_Check, Cgroup_Check
and Polkit_Check, it only used to skip DBus security check, it will be removed later
Log: