Commit graph

8 commits

Author SHA1 Message Date
Michael Vogt
1bfb930266 test: add test that ensure disk space is doubled
Ensure that the disk size of a container is taken into account
when the image is generated. The current heuristic is that we
just double the container size.

The test will not build an image just generate a manifest and
check that the image file is generated with the expected size.
2025-03-31 18:19:33 +00:00
Colin Walters
2d95d34bb6 Ensure root_t label for /store
The way osbuild works is to synthesize a filesystem tree in the
store, then copy it to the disk.  This ensures the label for the
store is `root_t` which ends up being the labeling for
the "infrastructure" bits in the `/ostree` repository in the
target root.

This in turn is blocking a lot of things.

Closes: https://github.com/osbuild/bootc-image-builder/issues/149
2025-03-31 18:19:33 +00:00
Michael Vogt
1ea8e87fad bib: tweak EnsureEnvironment() based on the feedback from Colin 2025-03-31 18:19:33 +00:00
Michael Vogt
4fa198c18d bib: mount devtmpfs inside the container too
This ensures that the new `partscan` feature in osbuild works. By
default the containers only have a static snapshot of /dev on a
tmpfs. This means that anything later added by losetup will be
missing inside the container.

It also means that https://github.com/osbuild/osbuild/pull/1468
can be reverted.
2025-03-31 18:19:33 +00:00
Colin Walters
bff341cb0b Rename utils -> util
Per style.
2025-03-31 18:19:33 +00:00
Colin Walters
3c717fde11 Add and use a helper to run subprocess
In most cases e.g. we do want to show stdout/stderr, and
it's handy to have a debug log when we're running
a subprocess.

While we're here, switch to just forking `cp` in
the setup code.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-31 18:19:33 +00:00
Colin Walters
214fcda30e Validate that we're in rootful podman
As this is a footgun that multiple people have run into.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-31 18:19:33 +00:00
Colin Walters
402c3955b9 Move some helpers into modules
For functional clarity.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-31 18:19:33 +00:00