feat(x86_64_v2): targetuserspacecreator: support custom rootfs for target userspace bootstrap#155
Conversation
…otstrap Add the ability to use a pre-built rootfs instead of bootstrapping the target userspace container via 'dnf install --installroot'. Two new methods are supported, checked in order of priority: 1. Local tarball: place a .tar.xz/.tar.gz/.tar.bz2/.tar archive in /etc/leapp/files/rootfs/ and it will be extracted directly. 2. Container image: set LEAPP_DEVEL_ROOTFS_CONTAINER_IMAGE to a container image URL (e.g. quay.io/almalinuxorg/almalinux:10). The image is pulled via podman, exported as a flat filesystem, and extracted into the userspace directory. The platform can be specified via LEAPP_DEVEL_ROOTFS_CONTAINER_PLATFORM (e.g. linux/amd64/v2). If neither is configured, the original DNF-based bootstrap is used. Also fix the update-ca-trust invocation in _prep_repository_access() to call the binary directly instead of wrapping it with 'su', which may not be present in minimal rootfs images.
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the leapp-repository contribution and development guidelines and must pass all tests in order to be mergeable.
Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build.
Note that first time contributors cannot run tests automatically - they need to be started by a reviewer. It is possible to schedule specific on-demand tests as well. Currently 2 test sets are supported,
See other labels for particular jobs defined in the Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please contact leapp-infra. |
Add the ability to use a pre-built rootfs instead of bootstrapping the target userspace container via 'dnf install --installroot'. This enables 9->10 x86_64_v2 upgrades.
Two new methods are supported, checked in order of priority:
Local tarball: place a .tar.xz/.tar.gz/.tar.bz2/.tar archive in /etc/leapp/files/rootfs/ and it will be extracted directly.
Container image: set LEAPP_DEVEL_ROOTFS_CONTAINER_IMAGE to a container image URL (e.g. quay.io/almalinuxorg/almalinux:10). The image is pulled via podman, exported as a flat filesystem, and extracted into the userspace directory. The platform can be specified via LEAPP_DEVEL_ROOTFS_CONTAINER_PLATFORM (e.g. linux/amd64/v2).
If neither is configured, the original DNF-based bootstrap is used.
Also fix the update-ca-trust invocation in _prep_repository_access() to call the binary directly instead of wrapping it with 'su', which may not be present in minimal rootfs images.