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>
Mounting may fail if the file types differed between the build layer and
host (e.g., regular file vs. symbolic link).
Implemented solution through two approaches
1. Build phase: Proactively remove /etc/localtime and /etc/resolv.conf
from base layer during overlayfs preparation to prevent conflicts
with host.
2. Container configuration: Introduced dedicated buildMountLocalTime
and buildNetworkConf methods to handle timezone and resolv.conf
mounts, with enableSelfAdjustingMount properly managing these cases.
Signed-off-by: reddevillg <reddevillg@gmail.com>
- Add content-based validation for ld.so.conf to detect layer path
changes
- Include configuration sources hash in ld.so.conf for validation
- In PackageManager GenerateCache always generate cache,
tryGenerateCache will skip it if cache directory exists
- use memcpy in sha256 to avoid unaligned visit
This ensures that ld.so.cache is properly regenerated when the
underlying layer configuration changes, preventing stale cache issues.
Signed-off-by: reddevillg <reddevillg@gmail.com>
This change introduces a quoting mechanism (`quoteArg`) that:
1. Encloses each argument in single quotes.
2. Escapes embedded single quotes within an argument (e.g., `it's`
becomes `'it'\''s'`).
This ensures that arguments are passed to the `exec` command
in the entrypoint script as single, intact units, even if they
contain spaces or single quotes.
Signed-off-by: reddevillg <reddevillg@gmail.com>
Added missing return statements after loop.exit() calls in the prune
command
to prevent function execution from continuing after exit is called. This
fixes a crash that occurred when the function continued executing code
after
requesting the event loop to exit, potentially accessing invalid memory.
Updated the exportDir function to rename source files to include a ".linyaps.original" suffix if they are not already named as such, ensuring proper handling during the export process. This change prevents overwriting original files and maintains compatibility with existing export logic.
Changed the size type from int to int64_t in both Builder and UABPackager to ensure proper handling of larger values. Additionally, initialized struct stat variables to improve code clarity and maintainability.
1. Ensure container HOME env matches the host environment exactly, we
rely on it before support portal well.
2. remove /run/udev bind, udev database path and file across different
versions are not guaranteed to be compatible.
3. add all_proxy env to defulat forward list.
Signed-off-by: reddevillg <reddevillg@gmail.com>
The set-default command ensures compatibility by setting the priority.
However, its modification to the priority is unidirectional and
one-time, subsequent set-priority invokes will not alter the default
state.
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.
Containers may fail to start if the bundle directory contains residual
files or conflicts from previous run.
Signed-off-by: reddevillg <reddevillg@gmail.com>
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>
If the current RunContext contains innerBinds, self-adjust mount must be
enabled; otherwise, execution may fail due to missing mount points.
Signed-off-by: reddevillg <reddevillg@gmail.com>
1. apply extension environment
2. apply app and extension permission binds
3. run ldconfig with -X option in cache generate phase
4. introduce dummy extension which is enabled by default
Signed-off-by: reddevillg <reddevillg@gmail.com>
update-desktop-database and update-mime-database will generate system files in
specify a directory. these files do not belong to the applications and should not be
printed in the log.