- Indicatif instead of eprintln! ensures we handle ttys vs not always;
on a non-tty we're silent
- Use a proper async task instead of a try+sleep loop
- But do try once outside of the await to make the happy path
avoid emitting a wait message
Signed-off-by: Colin Walters <walters@verbum.org>
Otherwise we just completely break machine readability
with `bootc status --format=json`.
(We probably need a full audit to stop using `{,e}println!`
globally)
Signed-off-by: Colin Walters <walters@verbum.org>
Aboot images need to have the ostree bootloader backend set
to "aboot", otherwise the deploy during bootc install will
not create the correct boot A/B symlinks, and additionally
once booted will not correctly deploy to the aboot partition
during an update.
To see whethere an image is using aboot, we look for the "aboot.img"
file in the kernel modules dir.
NOTE: In order to correctly handle running bootc from a different
container than the to-be-installed container we look for aboot.img
in the actual commit, not just in the running container.
The Dockerfile right now doesn't build an RPM, so this
ensures the two build systems match. We should probably
also change the RPM to use this Makefile.
Motivated by accidentally merging a change that breaks
with the feature on.
Signed-off-by: Colin Walters <walters@verbum.org>
/proc/self doesn't resolve correctly for subprocesses that may be
spawned. In particular, if ostree spawns aboot-deploy to update the
aboot symlinks that will fail.
This allows files with duplicate contents (and checksums) to be stored
in different layers when using the rechunker.
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
Naming things is hard, but as of right now since this storage
instance doesn't hold the booted host, let's call it
`podstorage` to make clear is association and purpose in
being used by podman and related tools.
Signed-off-by: Colin Walters <walters@verbum.org>
Previously we had two different `Storage` structs, this
ensures that the main one is primary and `CStorage` is secondary.
This should be less confusing.
Signed-off-by: Colin Walters <walters@verbum.org>
It's just way too confusing we have two structs called `Storage`.
I'm going to rename one of them after this. But as prep for that,
switch to dynamically initialzing the containers-storage version
from the main Storage.
Signed-off-by: Colin Walters <walters@verbum.org>
This commit adds --soft-reboot=required|auto to the
cli which uses the ostree api's to setup soft-reboots
during switch, update and rollback operations.
Co-authored-by: Colin Walters <walters@verbum.org>
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
Signed-off-by: Colin Walters <walters@verbum.org>
- Handle multiple initrd entries.
- Add support for machine-id and sort-key.
To do this we can't just map the keys into JSON because we need
to handle multiple values. Switch to a manual parser.
Assisted-by: Gemini CLI+gemini-2.5-pro
Signed-off-by: Colin Walters <walters@verbum.org>
A while ago we added a trait in preparation for multiple backends.
The current composefs branch ignores it and has a bunch of
`if {} else {}`.
Looking at this, what I think will work better in the end is
actually a more refined version of the `if {} else {}` model
instead of trying to really flesh out this trait. It's
hard to say of course until we get there, but the trait
approach forces a high level of abstraction vs just trying
to factor out common code between two backends.
Signed-off-by: Colin Walters <walters@verbum.org>
Without the "internals" prefix, bootc fails to spawn the
loopback-cleanup-helper because the helper is only available
under the `bootc internals` subcommand.
This patch updates the spawned command to include "internals" before
the helper name so it runs as intended.
Signed-off-by: Sam Dasilva <samuelramos852@gmail.com>