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

4100 Commits

Author SHA1 Message Date
Joseph Marrero Corchado
dc286053c6 MAINTAINERS: Add Preethi as representative
Preethi represents bootc in public forums like Kubecon,
RH Summit and our community meetings.

Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
2026-02-04 14:49:14 -05:00
John Eckersberg
1b898758c9 kernel: Add KernelPath enum
This just clarifies things in a few places to distinguish between a
UKI which has just a single path versus a traditional kernel with
separate vmlinuz and initramfs.

Also renames `find_uki_filename` to `find_uki_path` and updates the
return type to use `Utf8PathBuf` instead of just `String`.

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2026-02-03 16:28:53 -05:00
John Eckersberg
534fb40b00 seal-uki: break apart args for comment clarity
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2026-02-03 16:28:53 -05:00
jbtrystram
0a757685ee install/bootupd: chroot to deployment
When `--src-imgref` is passed, the deployed systemd does not match the
running environnement. In this case, let's run bootupd from inside
the deployment. This makes sure we are using the binaries
shipped in the image (and relevant config files such as grub fragements).

We use bwrap to set up the chroot for a easier handling of the API
filesystems.

We could do that in all cases but i kept it behind the `--src-imgref`
option since when using the target container as the buildroot it will
have no impact, and we expect this scenario to be the most common.

In CoreOS we have a specific test that checks if the bootloader was
installed with the `grub2-install` of the image.

Fixes https://github.com/bootc-dev/bootc/issues/1559
Also see https://github.com/bootc-dev/bootc/issues/1455

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: jbtrystram <jbtrystram@redhat.com>
2026-02-03 11:07:15 -05:00
Matija Tudan
216d720b9d bootc-lib: fix ARM architecture support
Currently build fails for armv7, this fixes the issue:

```
1094.0    Compiling bootc-lib v1.12.1 (/bootc/crates/lib)
1097.2 error: Unsupported architecture
1097.2    --> crates/lib/src/discoverable_partition_specification.rs:523:13
1097.2     |
1097.2 523 |             compile_error!("Unsupported architecture")
1097.2     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1097.2
1157.8 error: could not compile `bootc-lib` (lib) due to 1 previous error
1157.8 error: Generating manpages: Syncing man pages: Extracting CLI: Running CLI JSON dump command: command exited with non-zero code `cargo run --features=docgen -- internals dump-cli-json`: 101
1157.8 make: *** [Makefile:44: manpages] Error 1
1157.8 make: Leaving directory '/bootc'
```

Signed-off-by: Matija Tudan <tudan.matija@gmail.com>
2026-02-03 14:53:07 +05:30
Alex Iribarren
51dabaa5cb Add AlmaLinux to adopters list
Added AlmaLinux (Atomic SIG) as a new adopter

Signed-off-by: Alex Iribarren <alex@almalinux.org>
2026-01-30 14:12:40 -05:00
John Eckersberg
5d6dd67276 feat: Add bootc container ukify command
Add a new subcommand that builds a Unified Kernel Image (UKI) by
computing the necessary arguments from a container image and invoking
ukify. This simplifies the sealed image build workflow by having bootc
internally compute:

- The composefs digest (via existing compute-composefs-digest logic)
- Kernel arguments from /usr/lib/bootc/kargs.d/*.toml files
- Paths to kernel, initrd, and os-release

Any additional arguments are passed through to ukify unchanged, allowing
full control over signing, output paths, and other ukify options.

The seal-uki script is updated to use this new command instead of
manually computing these values and invoking ukify directly.

Also adds kargs.d configuration files for the sealed UKI workflow:
- 10-rootfs-rw.toml: Mount root filesystem read-write
- 21-console-hvc0.toml: Console configuration for QEMU/virtio

Closes: #1955

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2026-01-30 08:49:07 -05:00
Colin Walters
4f51a5fbcb Update to latest composefs-rs
To unblock reverse dependency testing.

(We still have the forked cfsctl, that's the only thing)

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-29 11:37:42 -05:00
Colin Walters
2ab1dcdd11 docs/composefs: Keep vmlinuz kernel+initramfs setup for now
We need some work in e.g. bcvk among others to have this work.

Closes: https://github.com/bootc-dev/bootc/issues/1940
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-29 09:42:51 -05:00
Colin Walters
efd2743d04 docs: Move composefs tracking from issue #1190 to docs
The composefs backend implementation has largely landed. Consolidate
tracking of known issues into the docs, categorized by severity:

- Deployment blockers: GC, SELinux enforcing=0, OCI registry install
- Important: Sealed image build UX, kargs.d support
- Long-term: Unified storage, UKI/systemd-boot improvements

This allows closing the original tracking issue #1190.

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-29 09:42:51 -05:00
bootc-dev Bot
c7c6d52e51 Sync common files from infra repository
Synchronized from bootc-dev/infra@e15b9622fc.

Signed-off-by: bootc-dev Bot <bot@bootc.dev>
2026-01-28 18:56:16 -05:00
Colin Walters
5c52b25ef9 docs: Add comprehensive ostree-ext container storage documentation
Document how container images are stored as ostree commits, including:

container/mod.rs:
- On-disk storage structure (ref namespace, layer storage, merge commit)
- Import flow from manifest fetch through merge commit creation
- Tar stream format and connection to deployments
- Signature verification options
- Key types and submodules

container/store.rs:
- Reference namespace constants and their purposes
- Three-step import process (create, prepare, execute)
- Layer types (commit, component, derived) and their handling
- Merge commit metadata keys
- Layer caching and deduplication strategy
- Garbage collection behavior
- Example usage

lib.rs:
- Add key modules section highlighting container, tar, sysroot, chunking

This complements the recent installation documentation by explaining how
container images are actually stored on disk in the ostree repository.

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-28 12:47:03 -05:00
Colin Walters
b17ca33ba9 docs: Enhance installation documentation with DPS and provisioning flow
Add comprehensive documentation for the installation process, with particular
focus on the Discoverable Partitions Specification (DPS) and first-boot
provisioning.

Main documentation (bootc-install.md):
- Add DPS section explaining partition type GUIDs and auto-discovery
- Add table showing when DPS vs explicit root= kargs are used
- Add provisioning and first boot section covering cloud-init,
  Ignition, SSH key injection, and custom provisioning
- Document the .bootc-aleph.json provenance file
- Fix typos ('boot install' -> 'bootc install', 'pased' -> 'passed')

Man page (bootc-install-to-disk.8.md):
- Document partition layout conceptually (avoiding specific sizes/GUIDs
  that may change between versions)
- Explain root filesystem discovery with systemd-gpt-auto-generator

Rustdoc for install.rs:
- Add comprehensive module documentation
- Document all installation modes (to-disk, to-filesystem, to-existing-root, reset)
- Explain OSTree vs Composefs storage backends
- Document key types (State, RootSetup, SourceInfo, SELinuxFinalState)
- List configuration paths and submodules

Rustdoc for discoverable_partition_specification.rs:
- Explain how bootc uses DPS for partition creation
- Document automatic root discovery mechanism
- Describe composefs and sealed boot integration

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-28 12:47:03 -05:00
Colin Walters
d790891e7f docs: Add architecture documentation to internals page
Extend our internals docs to have more information.

Assisted-by: OpenCode (Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-28 12:47:03 -05:00
Colin Walters
fa856b1ef8 lib: Fix rustdoc warnings for URLs and intra-doc links
Wrap bare URLs in angle brackets to make them proper hyperlinks,
escape angle brackets in doc comments that look like HTML tags,
and fix broken intra-doc links.

Assisted-by: OpenCode (Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-28 12:47:03 -05:00
bootc-dev Bot
b6f748850f Sync common files from infra repository
Synchronized from bootc-dev/infra@5a0900533a.

Signed-off-by: bootc-dev Bot <bot@bootc.dev>
2026-01-28 11:31:01 -05:00
Xiaofeng Wang
e96d544c2f ci: Build test binaries before sudo commands
Move `cargo build --release -p tests-integration` to run before
`sudo podman build` to avoid cargo registry permission issues.

The tests-integration binary doesn't depend on the fsverity image,
so this reordering has no functional impact on the test flow.

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2026-01-28 07:39:12 -05:00
Colin Walters
14613a0900 docs: Add experimental unified storage documentation
All of our experimental features should still have docs, so add
one for this.

Relates: #20
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-26 18:52:33 -05:00
Colin Walters
cdb79e852e ci: Build as user and copy images to root's podman storage
The install-tests CI job was failing because running `cargo xtask`
as root (via sudojust) modified ~/.cargo files with root ownership,
causing later cargo commands to fail with permission errors.

This change builds container images as the regular user and copies
them to root's podman storage using `podman save | sudo podman load`.
This avoids cargo cache permission issues while still making images
available for privileged tests.

Add two new Justfile recipes:
- copy-to-rootful: Copy a single image from user to root storage
- copy-lbi-to-rootful: Copy all bound images (LBI) to root storage

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-26 17:29:56 -05:00
bootc-bot[bot]
e499b7700e fix(deps): update rust crate cargo_metadata to 0.23
Signed-off-by: bootc-bot[bot] <225049296+bootc-bot[bot]@users.noreply.github.com>
2026-01-23 22:18:33 -05:00
Colin Walters
94d896ae63 xtask: Map /home -> /var/home in local-rust-deps
bootc images have /home as a symlink to /var/home, but /var/home
may not exist in the base container image. When local-rust-deps
outputs bind mount arguments for paths under /home/..., crun fails
to create the mount destination because it can't create /var/home.

Fix by mapping /home/... paths to /var/home/... for the container
destination. Cargo inside the container can still access the files
via /home/... since the symlink works once /var/home exists.

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-23 20:54:31 -05:00
renner
f0ef9c52a1 Fix review nits
Signed-off-by: renner <renner0@posteo.de>
2026-01-23 20:48:21 -05:00
renner
601ea642cf Makefile: add elvish and powershell completion
Not packaging those due to the lack of documentation on this.

Signed-off-by: renner <renner0@posteo.de>
2026-01-23 20:48:21 -05:00
renner
5d89520d21 fix: old versions don't have these macros
Signed-off-by: renner <renner0@posteo.de>
2026-01-23 20:48:21 -05:00
renner
1f5813f13c Makefile/rpm: Add shell completions
Signed-off-by: renner <renner0@posteo.de>
2026-01-23 20:48:21 -05:00
Colin Walters
1d8cf090f9 lib: Set user agent header for container image pulls
This allows registries to distinguish "image pulls for bootc client
runs" from other skopeo/containers-image users. The user agent will
be in the format "bootc/<version> skopeo/<version>".

All places in bootc that create ImageProxyConfig now use a new helper
function that sets the user_agent_prefix field.

Closes: https://github.com/bootc-dev/bootc/issues/1686
Assisted-by: OpenCode (Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-23 17:44:44 -05:00
Colin Walters
21babe7616 xtask: Add local-rust-deps command for auto-detecting path dependencies
Add `cargo xtask local-rust-deps` which uses `cargo metadata` to find
local path dependencies outside the workspace (e.g., from [patch] sections)
and outputs podman bind mount arguments.

This enables a cleaner workflow for local development against modified
dependencies like composefs-rs:

1. Add a [patch] section to Cargo.toml with real local paths
2. Run `just build` - the Justfile auto-detects and bind-mounts them

Benefits over the previous BOOTC_extra_src approach:
- No manual env var needed
- Paths work for both local `cargo build` and container builds
- No /run/extra-src indirection or Cargo.toml path munging required
- Auto-detection means it Just Works™

The Justfile's build target now calls `cargo xtask local-rust-deps` to
get bind mount args, falling back gracefully if there are no external deps.
The old BOOTC_extra_src mechanism is still supported for backwards compat.

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-23 14:51:37 -05:00
Colin Walters
56ac76e533 xtask: Fix sorting stability for tests
Tests with equal numbers were getting unstable sorting, causing
the generated file to flap.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-23 14:51:37 -05:00
Colin Walters
7e59942fc8 ci: Ensure access to Rust toolchain with sudo
I want to be able to write build rules in Rust that may be
invoked from outside of a container build, but in the default
GHA runners Rust is installed via `rustup` which lives just in
the `runner` user's homedir.

When using `sudo` it resets `$PATH` so we lose access to it.
Fix this by passing `$PATH` in.

Assisted-by: OpenCode (claude-sonnet-4-20250514)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-23 14:51:37 -05:00
Pragyan Poudyal
bf3987a465 composefs/selinux: Add tests
Tests added by Claude Code

Assisted-by: Claude Code (Sonnet 4)
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2026-01-23 13:17:31 -05:00
Pragyan Poudyal
e59e967037 composefs/soft-reboot: Check for SELinux policy divergence
Until now while checking if a deployment is capable of being soft
rebooted, we were not taking into account any differences in SELinux
policies between the two deployments. This commit adds such a check

We only check for policy diff if SELinux is enabled

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>

composefs: Refactor

Add doc comments for StagedDeployment struct
Use `serde_json::to_writer` to prevent intermediate string allocation

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>

composefs/selinux: More refactor

Move SELinux realted oprations to a separate module
Minor refactoring and add some comments

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2026-01-23 13:17:31 -05:00
Pragyan Poudyal
d8347297bf composefs/update: Handle --download-only flag
When `--download-only` is passed, only download the image into the
composefs repository but don't finalize it.

Conver the /run/composefs/staged-deployment to a JSON file and Add a
finalization_locked field depending upon which the finalize service will
either finalize the staged deployment or leave it as is for garbage
collection (even though GC is not fully implemented right now).

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2026-01-23 13:17:31 -05:00
Pragyan Poudyal
653a1da6ca composefs/export: Update image digest query format
After bootc/commit/49d753f996747a9b1f531abf35ba4e207cf4f020,
composefs-rs saves config in the format `oci-config-sha256:`.

Update to match the same

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2026-01-23 13:17:31 -05:00
Pragyan Poudyal
e4d4a96f37 composefs: Don't soft-reboot automatically
Aligning with ostree API, now we only initiate soft-reboot if `--apply`
is passed to `bootc update`, `bootc switch`, else we only prepare the
soft reboot

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2026-01-23 13:17:31 -05:00
Pragyan Poudyal
7dd3683034 composefs: Add option to reset soft reboot state
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2026-01-23 13:17:31 -05:00
jbtrystram
4c22d1664e install: Allow root and boot mount-specs in config
Allow configuring the root and boot filesystem mount
specs via the install configuration file under [install].

As for other options, CLI arguments take precedence.

For the to-existing-root flow, mount specs from config are ignored.
Example configuration:
```
[install]
root-mount-spec = "LABEL=rootfs"
boot-mount-spec = "UUID=abcd-1234"
```

Fixes https://github.com/bootc-dev/bootc/issues/1939

Assisted-by: Opencode (Claude Opus 4.5)
Signed-off-by: jbtrystram <jbtrystram@redhat.com>
2026-01-23 11:45:13 -05:00
jbtrystram
a17413c979 install: Allow setting ostree stateroot in install config
Support for configuring the stateroot name through the install
configuration file under `[install.ostree]`.
The CLI flag will override config file values, as for other options.

Partial fix for https://github.com/bootc-dev/bootc/issues/1939

Assisted-by: Opencode (Claude Opus 4.5)
Signed-off-by: jbtrystram <jbtrystram@redhat.com>
2026-01-23 11:45:13 -05:00
Xiaofeng Wang
fece2e0b58 test: Fix bib test failure and add required package in bib test
error: cannot build manifest: no default fs set: mount "/boot"
requires a filesystem but none set

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2026-01-23 07:01:44 -05:00
Joel Capitao
b901498d44 install: support configuring sysroot.bls-append-except-default
Add a new [install.ostree] configuration section to allow setting the
ostree sysroot.bls-append-except-default option during installation.

Closes: https://github.com/bootc-dev/bootc/issues/1710

Signed-off-by: Joel Capitao <jcapitao@redhat.com>
Co-authored-by: Jean-Baptiste Trystram <jbtrystram@redhat.com>
Assisted-by: Claude (Sonnet 4)
2026-01-22 07:37:59 -05:00
Colin Walters
c68e2b4987 packaging: Use bootc container inspect
This is a nicer way to check for the kernel version.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 19:15:05 -05:00
Colin Walters
aa2680faa0 build-sys: Add BOOTC_nocache option to force rebuild without cache
This is useful when debugging issues with stale cached layers,
such as package version skew between base images and repos.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 19:15:05 -05:00
Colin Walters
62e7b69654 docs: Improve Justfile with groups and self-documenting targets
Justfile changes:
- Organize targets into groups (core, testing, docs, debugging, maintenance)
- Add `list-variants` target to show available build variants
- Simplify comments to be concise single-line descriptions
- Move composefs targets (build-sealed, test-composefs) into core group

CONTRIBUTING.md changes:
- Reference `just --list` and `just list-variants` instead of duplicating
- Remove tables that duplicate Justfile information
- Fix broken link to cli.rs

The Justfile is now self-documenting via `just --list` (grouped targets)
and `just list-variants` (build configuration options).

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 19:15:05 -05:00
Colin Walters
766b534d6c docs: Expand composefs backend documentation
Add comprehensive documentation for building sealed bootc images,
focusing on the core concepts and the key command:
`bootc container compute-composefs-digest`.

Key additions:
- Document how sealed images work (UKI + composefs digest + Secure Boot)
- Explain the build workflow abstractly without distribution-specific details
- Document the compute-composefs-digest command and its options
- Add section on generating/signing UKIs with ukify
- Document developer testing commands (just variant=composefs-sealeduki-sdboot)
- Add validation tooling documentation

This provides the foundation for distribution-specific documentation
to build upon with concrete Containerfile examples.

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 19:15:05 -05:00
Colin Walters
a4d6438881 Add validator for composefs digest views
We changed how composefs digests are computed to ensure that
mounted filesystem via --mount=type=image and install-time view
(OCI tar layer processing from containers-storage) match.

There were various problems like differing metadata for `/`
among other things.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 19:15:05 -05:00
Colin Walters
efa510a90e Update composefs-rs to merged PR #209
The composefs-rs PR 209 has been merged to main. This updates
bootc to use the containers/composefs-rs repository at the
merge commit.

Key API changes:
- Directory::default() -> Directory::new(Stat::uninitialized())
- read_filesystem() no longer takes stat_root parameter
- New read_container_root() for OCI containers (propagates /usr metadata to root)
- stat_root CLI flag renamed to no_propagate_usr_to_root with inverted logic

See https://github.com/containers/composefs-rs/pull/209

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 19:15:05 -05:00
Colin Walters
2c32a334bb build-sys: Add BOOTC_extra_src for local dependency development
Add support for bind-mounting an extra source directory into container
builds, primarily for developing against a local composefs-rs checkout.

Usage:
  BOOTC_extra_src=$HOME/src/composefs-rs just build

The directory is mounted at /run/extra-src inside the container. When
using this, also patch Cargo.toml to use path dependencies pointing to
/run/extra-src/crates/....

Signed-off-by: Colin Walters <walters@verbum.org>

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 19:15:05 -05:00
Colin Walters
4301c89784 build-sys: Rework sealing to be one build step
Now that we're doing a "from scratch" build we don't
have the mtime issue, and so we can change our build system
to do everything in a single step.

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 19:15:05 -05:00
Colin Walters
108c35baf9 tmt: Add bootc-image-builder integration test for issue #1907
Add a TMT test that exercises the mount point check fix from PR #1904.
The test builds a container image with an embedded disk.yaml that creates
a partition layout WITHOUT a separate /boot partition - just root (/)
with /boot/efi as a separate mount point.

This partition layout triggers the bug from issue #1907 where bootc's
empty rootfs verification would fail with:
  "Found entry in boot: efi"

The issue was that when /boot is a directory on the root filesystem
(not a separate partition), but /boot/efi IS a mount point on a different
device, the old code incorrectly saw "efi" as a regular directory entry
rather than recognizing it was a mount point boundary.

Verified that temporarily reverting the fix from PR #1904 causes this
test to fail with the expected error message.

This was already fixed by ab65078675
but we didn't realize at the time the scope.

Closes: https://github.com/bootc-dev/bootc/issues/1907
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 10:02:29 -05:00
ckyrouac
b72ad5641a ci: Update schedule release cadence to account for the new year
The new 3 week cadence starts on 2026-01-26.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2026-01-21 09:56:59 -05:00
Colin Walters
f5bfc7fb9a docs: Add man page for bootc-destructive-cleanup.service
Document the bootc-destructive-cleanup.service systemd unit that runs
on first boot after an alongside installation with --cleanup. The man
page explains how the service is enabled via the systemd generator,
what the Fedora cleanup script does, and how distributions can
customize the cleanup behavior.

Resolves: https://issues.redhat.com/browse/RHEL-131317

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 09:54:32 -05:00