Module completion

Module completion 

Source
Expand description

This module handles finishing/completion after an ostree-based install from e.g. Anaconda.

StructsΒ§

Renamer πŸ”’
A little helper struct which on drop renames a file. Used for putting back /etc/resolv.conf.

ConstantsΒ§

ANACONDA_ENV_HINT πŸ”’
An environment variable set by anaconda that hints we are running as part of that environment.
ANACONDA_SYSROOT πŸ”’
The path where Anaconda sets up the target. https://anaconda-installer.readthedocs.io/en/latest/mount-points.html#mnt-sysroot
CGROUPFS πŸ”’
The cgroupfs mount point, which we may propagate from the host if needed
OSTREE_BOOTED πŸ”’
Global flag to signal we’re in a booted ostree system
PROC1_ROOT πŸ”’
The root filesystem for pid 1
RESOLVCONF πŸ”’
The very well-known DNS resolution file
RESOLVCONF_ORIG πŸ”’
A renamed file
RUN_BOOTC_INSTALL_RECONCILED πŸ”’
A sub path of /run which is used to ensure idempotency
RUN_OSTREE_AUTH πŸ”’
The path to the temporary global ostree pull secret

FunctionsΒ§

bind_from_host πŸ”’
Bind a mount point from the host namespace into our root
ensure_cgroupfs πŸ”’
Anaconda doesn’t mount /sys/fs/cgroup in /mnt/sysroot
ensure_ostree_auth πŸ”’
If we have /etc/ostree/auth.json in the Anaconda environment then propagate it into /run/ostree/auth.json
ensure_resolvconf πŸ”’
Work around https://github.com/containers/buildah/issues/4242#issuecomment-2492480586 among other things. We unconditionally replace the contents of /etc/resolv.conf in the target root with whatever the host uses (in Fedora 41+, that’s systemd-resolved for Anaconda).
impl_completion πŸ”’
Core entrypoint for completion of an ostree-based install to a bootc one:
open_proc1_root πŸ”’
reconcile_kargs πŸ”’
Assuming that the current root is an ostree deployment, pull kargs from it and inject them.
run_from_anaconda πŸ”’
Core entrypoint invoked when we are likely being invoked from inside Anaconda as a %post.
run_from_ostree
From ostree-rs-ext, run through the rest of bootc install functionality