Skip to content

feat(x86_64_v2): targetuserspacecreator: support custom rootfs for target userspace bootstrap#155

Merged
andrewlukoshko merged 1 commit intoAlmaLinux:almalinux-ng-0.24.0from
ykohut:almalinux-ng-v2-0.24.0
Apr 14, 2026
Merged

feat(x86_64_v2): targetuserspacecreator: support custom rootfs for target userspace bootstrap#155
andrewlukoshko merged 1 commit intoAlmaLinux:almalinux-ng-0.24.0from
ykohut:almalinux-ng-v2-0.24.0

Conversation

@ykohut
Copy link
Copy Markdown
Collaborator

@ykohut ykohut commented Apr 14, 2026

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:

  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.

…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.
@ykohut ykohut requested a review from andrewlukoshko April 14, 2026 14:41
@github-actions
Copy link
Copy Markdown

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.
If you want to request a review or rebuild a package in copr, you can use following commands as a comment:

  • review please @oamg/developers to notify leapp developers of the review request
  • /packit copr-build to submit a public copr build using packit

Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build.
However, here are additional useful commands for packit:

  • /packit test to re-run manually the default tests
  • /packit retest-failed to re-run failed tests manually
  • /packit test oamg/leapp#42 to run tests with leapp builds for the leapp PR#42 (default is latest upstream - main - 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, beaker-minimal and kernel-rt, both can be used to be run on all upgrade paths or just a couple of specific ones.
To launch on-demand tests with packit:

  • /packit test --labels kernel-rt to schedule kernel-rt tests set for all upgrade paths
  • /packit test --labels beaker-minimal-8.10to9.4,kernel-rt-8.10to9.4 to schedule kernel-rt and beaker-minimal test sets for 8.10->9.4 upgrade path

See other labels for particular jobs defined in the .packit.yaml file.

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.

@andrewlukoshko andrewlukoshko merged commit 99763a4 into AlmaLinux:almalinux-ng-0.24.0 Apr 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants