1. Changed output check behavior to always run main-check.sh for UAB
export statistics
2. Separated skip conditions for non-app packages and output check
skipping
3. Improved message clarity with "skipped" vs "ignored" states
4. Maintained existing error handling for failed checks
The modification ensures main-check.sh always runs for app packages
since its output is needed for UAB export statistics, even when output
checks are skipped. The logic is now clearer with distinct handling for
non-app packages (skipped) vs skipped output checks (ignored).
fix: 修改ldd检查逻辑以支持UAB导出
1. 修改ldd检查行为,为UAB导出功能, 无论是否跳过output skip都执行main-check.sh
2. 分离非应用包和跳过输出检查的不同跳过条件
3. 使用"skipped"和"ignored"提高消息清晰度
4. 保留对检查失败的现有错误处理
此修改确保对于应用包始终运行main-check.sh,因为其输出用于UAB导出统计,即
使跳过输出检查。现在逻辑更清晰,区分了非应用包(跳过)和跳过输出检查(忽略)
的不同处理情况。
1. Added new fields needed_archived, needed_unpacked, and needed_objects
to ostreeUserData struct
2. Implemented getCommitSize method to fetch commit metadata and
calculate download requirements
3. Modified progress_changed to use needed_objects for more accurate
progress reporting
4. Integrated size calculation into pull operation to improve progress
tracking
5. Added error handling for cases where size calculation fails
The changes improve download progress reporting by:
- Getting actual commit sizes from server before download begins
- Calculating exact number of objects needed for download
- Providing more accurate progress percentage during download
- Maintaining backward compatibility when size info isn't available
feat: 添加提交大小计算以改进拉取进度显示
1. 在ostreeUserData结构体中新增needed_archived、needed_unpacked和
needed_objects字段
2. 实现getCommitSize方法获取提交元数据并计算下载需求
3. 修改progress_changed函数使用needed_objects实现更精确的进度报告
4. 将大小计算集成到pull操作中以改进进度跟踪
5. 添加了大小计算失败时的错误处理
这些改进通过以下方式提升了下载进度报告的准确性:
- 在下载开始前从服务器获取实际提交大小
- 计算需要下载的精确对象数量
- 在下载过程中提供更准确的进度百分比
- 当大小信息不可用时保持向后兼容
Move buildMountHome after buildPrivateDir, because it depends on private
directory that are initialized within buildPrivateDir.
Correct private config, cache, state directory mounting.
Signed-off-by: reddevillg <reddevillg@gmail.com>
The init process will now exit with the same code as the initial child
process it manages. This is crucial for environments like the builder,
where the success or failure of a command must be detected.
Add missing LINYAPS_INIT_SINGLE_MODE in handling process build depends.
Signed-off-by: reddevillg <reddevillg@gmail.com>
Adds support for specifying a module when using the `ll-cli dir`
command. This allows users to retrieve the layer directory for a
specific module within an application.
1. Added "disable-static-deltas" option set to true in OSTree pull
operations
2. This change prevents the use of static deltas which can cause issues
with certain repository configurations
3. The modification was made in both pull operation variants for
consistency
4. Static deltas can sometimes lead to corrupted downloads or
inefficient storage usage
fix: 在OSTree拉取操作中禁用静态增量
1. 在OSTree拉取操作中添加了"disable-static-deltas"选项并设为true
2. 此变更防止使用静态增量,某些仓库配置下会导致问题
3. 修改在两个拉取操作变体中保持一致
4. 静态增量有时会导致下载损坏或存储使用效率低下
1. Added QTemporaryDir and fstream headers for temporary file operations
2. Implemented fallback mechanism when direct file descriptor access
fails
3. Added UUID-based temporary file naming for layer files
4. Improved error handling for file save operations
The changes address cases where direct access to file descriptors
via /proc may fail (common in containerized environments). The new
implementation first attempts direct access, then falls back to copying
the file to a temporary location if needed. This makes the unpacking
process more robust across different environments.
fix: 修复layer解包中文件描述符访问权限问题
1. 添加 QTemporaryDir 和 fstream 头文件以支持临时文件操作
2. 当直接文件描述符访问失败时实现回退机制
3. 为layer文件添加基于UUID的临时文件命名
4. 改进文件保存操作的错误处理
这些改动解决了通过/proc直接访问文件描述符可能失败的情况(在容器环境中常
见)。新实现首先尝试直接访问,如果需要则回退到将文件复制到临时位置。这使
得解包过程在不同环境中更加健壮。
1. Added new CLI commands `enable-mirror` and `disable-mirror` for
repository management
2. Implemented handler functions for mirror enable/disable operations in
both ll-builder and ll-cli
3. Modified repo config handling to support mirrorEnabled flag as
optional boolean
4. Updated test cases to include mirrorEnabled field in test data
5. Improved repo alias handling by using value_or to fallback to
repoName when alias is not provided
These changes allow users to control mirror functionality for
repositories through CLI commands, providing more flexibility in
repository configuration. The mirrorEnabled flag is now properly handled
in the OSTree repo configuration.
feat: 为仓库添加镜像启用/禁用功能
1. 新增了用于仓库管理的`enable-mirror`和`disable-mirror` CLI命令
2. 在ll-builder和ll-cli中实现了镜像启用/禁用操作的处理函数
3. 修改了仓库配置处理以支持可选的mirrorEnabled标志
4. 更新了测试用例,在测试数据中包含mirrorEnabled字段
5. 通过使用value_or在别名未提供时回退到repoName,改进了仓库别名处理
这些变更允许用户通过CLI命令控制仓库的镜像功能,为仓库配置提供更多灵活
性。现在在OSTree仓库配置中正确处理了mirrorEnabled标志。
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.
Introduce RunContext to unify runtime layer resolution, requiring
changes across the builder, CLI, and PM.
Signed-off-by: reddevillg <reddevillg@gmail.com>
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
Added implementation for JSONPrinter::printMessage method to output
messages
in JSON format. The method serializes the message as a JSON object with
a
"message" property. This enhances the JSON output capability by properly
handling messages alongside other data types.
This change optimizes the version filtering process by:
1. Replacing QString::fromStdString() with direct c_str() calls to
eliminate unnecessary string conversions
2. Directly updating existing entries instead of creating temporary maps
3. Adding proper checks when updating package repositories to prevent
overwriting existing entries
1. Added repository field to search parameters requiring specifying
repos to search
2. Modified search implementation to support searching in multiple
repositories
3. Restructured search results to group packages by repository source
4. Added --repo option to the CLI search command
5. Updated display format to show repository information in search
results
6. Improved filtering logic to work with the repository-grouped package
structure
7. Added PackageManager1PruneResult type to separate it from search
results
1. Remove automatic priority calculation when adding new repos
2. Remove automatic priority adjustment when setting default repo
3. Allow multiple repositories to have the same priority value
4. Use stable sort when displaying repositories to maintain order for
equal priorities
5. Set new repositories' default priority to 0 instead of calculated
value
refactor: 简化仓库优先级管理
1. 移除添加新仓库时的自动优先级计算
2. 移除设置默认仓库时的自动优先级调整
3. 允许多个仓库具有相同的优先级值
4. 使用稳定排序显示仓库,以维持优先级相同时的原始顺序
5. 设置新仓库的默认优先级为0,取代之前的计算值
Enhance CLI repository information display with dynamic column widths
and URL truncation:
1. Calculate maximum lengths for name, URL, and alias columns
dynamically
2. Limit URL display length to 100 characters with ellipsis for longer
URLs
3. Use calculated widths instead of fixed column widths for better
alignment
4. Truncate long URLs with "..." to improve readability
style: 改进仓库信息显示格式
增强命令行界面仓库信息显示,使用动态列宽和 URL 截断:
1. 动态计算名称、URL 和别名列的最大长度
2. 限制 URL 显示长度为 100 个字符,超长时添加省略号
3. 使用计算出的宽度而非固定列宽,以获得更好的对齐效果
4. 为长 URL 添加"..."截断,提高可读性
This change removes the VersionRange class which was marked with a TODO
comment
as "currently not used". Also removes the unused PreRelease struct from
version.cpp that was marked as having "no practical use". Deleted
associated
test files and updated CMake configuration files to reflect these
removals.
refactor: 移除未使用的 VersionRange 类及相关代码
此更改移除了标记为"当前未使用"的 VersionRange 类。同时删除了 version.cpp
中被标记为"无实际用途"的未使用 PreRelease 结构体。删除了相关的测试文件,
并更新了 CMake 配置文件以反映这些移除。
Added validation to ensure the content command can only be used with
application layers by checking the layer kind. If the layer is not an
app,
an error message is displayed to inform the user that only app content
viewing is supported. This prevents potential issues when trying to view
content of non-application layers.
fix: 限制内容命令仅用于应用类型层
添加验证以确保内容命令只能用于应用层,方法是检查层的类型。
如果该层不是应用类型,则显示错误消息,通知用户只支持查看应用内容。
这可以防止尝试查看非应用层内容时可能出现的问题。