1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 06:45:13 +01:00
Commit Graph

3471 Commits

Author SHA1 Message Date
Jorge O. Castro
f746b0f498 docs: add LFX Insights badges
This adds the health check, contributor count, and contributor count (yearly) to the badges section of the readme.
2025-07-30 23:01:17 -04:00
Colin Walters
3f6d199d99 Merge pull request #1466 from LukeShortCloud/adopters-playtron-gameos
docs: add Playtron GameOS
2025-07-30 19:33:55 -04:00
Luke Short
57cf6cf68e docs: add Playtron GameOS
to the ADOPTERS.md. We have builds dating all the way back to 2022.

Signed-off-by: Luke Short <ekultails@gmail.com>
2025-07-30 16:29:55 -06:00
Colin Walters
689340333d Merge pull request #1457 from cgwalters/doc-non-root
docs: Elaborate a bit on sysusers and /usr
2025-07-30 13:26:56 -04:00
Joseph Marrero Corchado
d35d2359d5 Merge pull request #1456 from imbev/patch-1
Update ADOPTERS.md: Label HeliumOS as vendor, not end-user
2025-07-30 08:36:06 -04:00
Colin Walters
47aad72657 Merge pull request #1459 from cgwalters/command-run-cleanups
command: Split up run() method
2025-07-30 08:34:04 -04:00
Colin Walters
cff9730266 Merge pull request #1460 from jbtrystram/install-bootupd-target
install: use deployed sysroot as root for bootloader install
2025-07-29 18:26:32 -04:00
Colin Walters
634e038a95 command: Split up run() method
There really isn't any kind of single default way to run a subprocess,
that's why it's tricky. Sometimes one wants to have them be async,
sometimes synchronous. Sometimes one wants to capture stdout,
other times not etc.

The `run()` name implies it's a default but it can't really be
because some use cases we really do want to directly copy
stderr instead of capturing it.

It happens that *most* cases here inside bootc we're fine
to only show stderr on error I think; I only changed the editor
case to use the new `run_inherited()`.

But in contrast many use cases in e.g.
https://github.com/coreos/rpm-ostree/pull/5439
wanted `run_inherited()`.

Unit tests: Assisted-by: Claude Code
Signed-off-by: Colin Walters <walters@verbum.org>
2025-07-29 18:14:23 -04:00
jbtrystram
5454608c26 install: use deployed sysroot as root for bootloader install
Tell bootupctl to load components from the deployed image rather than
expecting we are running in the container (or assume that the buildroot
is the container.)
As the image content is already deployed at this stage, pointing to
it makes it work in both scenarios (different buildroot or running from
the container.)

Fixes https://github.com/bootc-dev/bootc/issues/1455
2025-07-29 22:50:21 +02:00
Colin Walters
e2d21f7bf1 Update docs/src/building/users-and-groups.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-07-29 11:27:40 -04:00
Colin Walters
fddadc2ccb docs: Elaborate a bit on sysusers and /usr
Don't do it, make your /usr content root owned.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-07-29 10:43:51 -04:00
imbev
e07d3f220d Update ADOPTERS.md: Label HeliumOS as vendor, not end-user 2025-07-29 07:55:02 -05:00
Colin Walters
a27199dede Merge pull request #1454 from ckyrouac/release-cleanup
ci: Check if it's time for release earlier in gh action
2025-07-28 15:58:40 -04:00
Colin Walters
b173486d0e Merge pull request #1450 from cgwalters/quiet-spawn
reboot: Quiet the output from systemd-run
2025-07-28 15:58:18 -04:00
Colin Walters
ee1bc611b5 Merge pull request #1451 from jbtrystram/install-no-kargs
install: ommit mountspec kargs when `--root-mount-spec` is empty
2025-07-28 15:58:00 -04:00
ckyrouac
f15a65a528 ci: Check if it's time for release earlier in gh action
Just a small optimization to avoid installing deps when it's not time
for a release.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-07-28 15:35:10 -04:00
Colin Walters
b803ea7224 Merge pull request #1449 from gursewak1997/fix-loopback-cleanup-helper
blockdev: implement signal-safe loopback device cleanup helper
2025-07-28 15:08:56 -04:00
jbtrystram
560711d148 install: skip mountspec kargs when passed empty rootspec
Notably, we skip generating an fstab entry for boot, even if it's on a
separate partition. this requires the image initramfs have some
knowledge to find the rootfs and bootfs (labels or DPS).

See https://github.com/bootc-dev/bootc/issues/1441
2025-07-28 16:51:44 +02:00
gursewak1997
ff004c907d blockdev: fix loopback cleanup helper path resolution
- Add robust binary path resolution with multiple fallback strategies
- Use /proc/self/exe, argv[0], common paths, and PATH search
- Add graceful fallback when cleanup helper can't be spawned
- Improve error handling and logging
- Add comprehensive tests for binary finding logic

This fixes the 'Failed to spawn loopback cleanup helper' error that
was causing issues in packaged distributions where the binary path
was not easily discoverable.
2025-07-25 10:37:39 -07:00
Colin Walters
a6f58d551f reboot: Quiet the output from systemd-run
The fact that we have a transient unit here is just
implementation detail, no need to tell the user the
name of the unit.
2025-07-24 20:56:38 -04:00
Colin Walters
f4b01ab08c Merge pull request #1446 from cgwalters/opt-continuous
Dockerfile: Support pulling in the continuous repo
2025-07-24 17:04:33 -04:00
Colin Walters
a617a6c4fc Merge pull request #1448 from cgwalters/use-verity-retry
fsverity: use _with_retry
2025-07-24 16:27:08 -04:00
Colin Walters
632931a5cb Merge pull request #1442 from ckyrouac/chunking-xattrs-fix
chunking: Fix specific component file allocation
2025-07-24 16:16:19 -04:00
gursewak1997
a81de6dcad blockdev: implement signal-safe loopback device cleanup helper
Add fork+exec based cleanup helper to prevent loopback device leaks when
bootc install --via-loopback is interrupted by signals like SIGINT.

- Add loopback-cleanup-helper CLI subcommand
- Implement run_loopback_cleanup_helper() with PR_SET_PDEATHSIG
- Update LoopbackDevice to spawn cleanup helper process
- Add tests for spawn mechanism
2025-07-24 12:15:46 -07:00
Colin Walters
1b0ecca3f2 Merge pull request #1447 from cgwalters/drop-ppc64le-copr
ci: Drop ppc64le && Fedora 41
2025-07-24 14:35:10 -04:00
Colin Walters
7e0914152f ci: Stop building and testing on Fedora 41
This is soon to go EOL and I don't think we need
to keep testing it upstream.

In particular the integration tests are super expensive
and slow and this should cut down our usage of them.
2025-07-24 14:19:04 -04:00
Colin Walters
ec6563275a fsverity: use _with_retry
To paper over the fork-vs-fsverity issue a bit
more.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-07-24 14:11:59 -04:00
Colin Walters
8557d1a07d Dockerfile: Support pulling in the continuous repo
If enabled this pulls in git main of ostree which I want
for soft reboot work.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-07-24 13:59:09 -04:00
Colin Walters
fa313f7bc0 ci: Drop ppc64le COPR builds from presubmits
These are failing due to infra issues apparently, and
we have coverage at release time, we really don't
need to build every single PR by default.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-07-24 13:49:45 -04:00
Colin Walters
87e2867e73 Merge pull request #1445 from Johan-Liebert1/composefs-crates
Bump composefs-rs
2025-07-24 13:47:36 -04:00
ckyrouac
8da71a284c chunking: Fix specific component file allocation
This fixes the bug where the specific layers were looking at the wrong
meta object to allocate files to the layer.

Assisted-by: Claude code
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-07-24 11:45:39 -04:00
Johan-Liebert1
dea3a5f322 Bump composefs-rs
Also pull in `composefs-boot` and `composefs-oci`

Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
2025-07-24 18:50:14 +05:30
ckyrouac
4fc87419c2 build: Add actions to automate release
This adds two github actions, "Create Release PR" and "release". The
first is scheduled to run every 3 weeks to automatically create a
release PR that bumps the versions. The "release" action is triggered
when the release PR is merged. It will create a draft release with the
tars attached.

Assited-by: Claude Code
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-07-23 11:08:45 -04:00
Colin Walters
6607f10ed6 Merge pull request #1440 from jmarrero/revert-fallout
Revert "blockdev: implement signal-safe loopback device cleanup helper"
2025-07-23 10:49:30 -04:00
Joseph Marrero Corchado
fe364208ec Revert "blockdev: implement signal-safe loopback device cleanup helper"
This reverts commit c2c918cc80.

As it makes install to-disk fail:
https://github.com/bootc-dev/bootc/issues/1439
2025-07-23 09:40:34 -04:00
Gursewak Mangat
ed787b4cee Merge pull request #1402 from gursewak1997/bootc-799
blockdev: Fix loopback device resource leak on signal interruption
2025-07-22 13:02:05 -07:00
gursewak1997
c2c918cc80 blockdev: implement signal-safe loopback device cleanup helper
Add fork+exec based cleanup helper to prevent loopback device leaks when
bootc install --via-loopback is interrupted by signals like SIGINT.

- Add loopback-cleanup-helper CLI subcommand
- Implement run_loopback_cleanup_helper() with PR_SET_PDEATHSIG
- Update LoopbackDevice to spawn cleanup helper process
- Add tests for spawn mechanism
2025-07-22 12:04:27 -07:00
Colin Walters
fe7e44c88e Merge pull request #1437 from bachorp/main
cli: fix documentation of `bootc image cmd`
2025-07-22 13:37:19 -04:00
Pascal Bachor
138e17e20c cli: fix documentation of bootc image cmd 2025-07-22 08:52:17 +02:00
Colin Walters
03fa72b194 Merge pull request #1426 from cgwalters/test-reboot
Add a test case for our internal reboot command
2025-07-18 09:16:56 -04:00
Colin Walters
d4c19f7d31 tests: Add a suite which runs tests under systemd
And add a single test which verifies that our internal `reboot`
code actually does what it should (via systemd-run etc.)

This took me way, way too long to do...there were so many missteps
and confusion. First of all, I kept trying to use `systemd.extra-unit`
from https://www.freedesktop.org/software/systemd/man/latest/systemd-debug-generator.html#
but that doesn't exist in stream9.

I spent way too long trying to debug the fact that switching from
`podman run <image> /sbin/init` to `podman run <image> /bin/sh -c '<stuff> && exec /sbin/init`
fails because in the latter case podman's auto-detection fails and
we need to explicitly say `--systemd=always`. In retrospect obvious...but oh well.

On the positive side, I think with some cleanup we could extend this model
and generalize it for "test running in a container with systemd" (with
a lot of cleanup really)

Signed-off-by: Colin Walters <walters@verbum.org>
2025-07-18 07:42:05 -04:00
Colin Walters
4e433eddcb Merge pull request #1427 from cgwalters/drop-task
osbuild: Drop use of Task
2025-07-17 20:19:38 -04:00
Colin Walters
b696395744 internals: Add a helper verb to initiate a reboot
This is intended to aid unit testing outside of `upgrade --apply`.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-07-17 19:35:29 -04:00
Colin Walters
dd54f4b7aa osbuild: Drop use of Task
I've come to the conclusion that Task isn't buying us much value
over Command.

I'd like to eventually drop it. This is just getting the ball
rolling.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-07-17 19:20:14 -04:00
Colin Walters
778ec6a095 Merge pull request #1415 from jeckersb/decompressor_finish_on_inner
unencapsulate: use "inner" stream when finishing Decompressor
2025-07-17 19:08:14 -04:00
John Eckersberg
75d5e7106e ostree-ext: Refactor decompression
This moves all of the code related to handling decompression out of
container/unencapsulate.rs and into a new module `generic_decompress`.
The only exposed API is via the existing (relocated) `Decompressor`
type.

Internal to `generic_decompress` this adds a new trait
`ReadWithGetInnerMut`, which allows access to the original, inner,
un-decompressed stream.  This is used when finishing the decompressor,
whether explicitly through calling its `finish()` method, or
implicitly by dropping it.

For things like GzDecoder, we don't want to read via the actual
decompression reader because we don't care about decompressing at this
point.  Plus, the inner reader may have encountered an error partway
through, and trying to decode via decompression will error with
UnexpectedEof.

Instead, wrap a reader for each content type which implements
`ReadWithGetInnerMut`.  When we finish decompressing, use the trait
method `get_inner_mut()` to read directly from inner stream to flush
any data.

Resolves: #1407
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2025-07-17 18:13:11 -04:00
Colin Walters
0f3d02e240 Merge pull request #1413 from cgwalters/crates-refactor
Move all crates under `crates/`
2025-07-17 17:06:48 -04:00
Colin Walters
2f69a16074 Move all crates under crates/
Just organizational cleanup, a number of Rust projects
do this:
https://github.com/search?q=+%22crates%2F*%22+path%3ACargo.toml+-is%3Afork&type=code&p=5

Signed-off-by: Colin Walters <walters@verbum.org>
2025-07-17 16:27:39 -04:00
Colin Walters
883690598e crates: Drop readme =
We don't actually publish any of these so there's no need
for this.
2025-07-17 16:27:39 -04:00
Colin Walters
c2dc021781 Merge pull request #1421 from jlebon/pr/reproducible-pull
Make `ostree container image pull` merge commit reproducible
2025-07-17 16:06:49 -04:00