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

4036 Commits

Author SHA1 Message Date
bootc-bot[bot]
9bb976d540 Release 1.12.1
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v1.12.1
2026-01-15 19:53:46 -05:00
Colin Walters
62e56b62de Fully disable fedora 44
Due to https://bugzilla.redhat.com/show_bug.cgi?id=2429501

This reverts the prior change to make the test non gating
because the problem is we'd consistently fail to do a bootc install
*for each test* which dramatically slowed down that job.

We could fix that but it's easier to just disable the job.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-15 17:45:54 -05:00
Joseph Marrero Corchado
b76d75d602 ostree-ext/tar: Unset G_MESSAGES_DEBUG before spawning ostree commit
When G_MESSAGES_DEBUG is set (e.g., 'all'), GLib and OSTree emit debug
messages to stdout instead of stderr. This corrupts the commit hash
that we parse from the ostree commit subprocess output, causing derived
layer content to be silently lost during container imports.

The issue manifests as packages installed via 'dnf install' in a
Containerfile not appearing in the deployed system's rpmdb after
a rebase/upgrade operation.

Fixes: https://issues.redhat.com/browse/OCPBUGS-64692

Assisted-by: OpenCode (Claude Opus 4.5)
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
2026-01-15 15:42:03 -05:00
Chris Kyrouac
e074a41720 install: Move /var mount test to TMT to reduce disk usage (#1910)
The "install to-filesystem with separate /var mount" test was causing
disk space issues on GitHub Actions runners due to its large disk
image requirements (12GB for partitions with LVM). Moving it to a TMT
test allows it to run in a dedicated VM where disk space is not as
constrained.

The test verifies that bootc install to-filesystem correctly handles
scenarios where /var is on a separate filesystem, which is a common
production setup.

Changes:
- Remove the test from Rust integration tests (install.rs)
- Add new TMT test: test-32-install-to-filesystem-var-mount.sh
- Add package requirements (parted, lvm2, dosfstools, e2fsprogs)
- Update tests.fmf and integration.fmf with new test entry

Assisted-by: Claude Code (Opus 4.5)

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2026-01-15 15:38:15 +08:00
Colin Walters
3b0f38aa19 utils: Always print status to stderr
If we were waiting on a lock as part of `bootc status --format=json`
this information message would end up in stderr, corrupting the output.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-14 16:45:50 -05:00
ckyrouac
87e20d6b80 install: Reduce disk space usage of mount test
It was using 12G, reduce it down to 1G to avoid the github runner
running out of space.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2026-01-14 13:10:01 -05:00
ckyrouac
40c5216a37 install: Fix bug in mount point check
This fixes a regression from https://github.com/bootc-dev/bootc/pull/1727
by removing the unnecessary mount point check prior to the recursive
function call. Also adds some tracing statements and updates the
integration test to validate the mount check works for this scenario:

/boot/efi mounted with contents in /boot/efi/EFI/firmware/foo

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2026-01-14 13:10:01 -05:00
Colin Walters
8734dcc1ba ci: Add gating property to allow non-blocking test failures
Add a `gating` matrix property to test-integration jobs.
Jobs with `gating: false` use `continue-on-error: true`, allowing
them to fail without blocking PR merges.

Mark fedora-44 as non-gating due to a grub2 regression in the base
image (https://bugzilla.redhat.com/show_bug.cgi?id=2429501).

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-14 10:41:18 -05:00
Colin Walters
49d753f996 various: Update to latest composefs-rs API
Update composefs-rs from rev b636e0e9 to e9008489, adapting to API changes:

- merge_splitstream now takes 4 arguments instead of 3
- import_layer takes digest as string directly
- pull/seal return (digest, verity) as (String, ObjectID)
- SplitStreamWriter::new and write_stream have new signatures
- initialize_composefs_repository returns String instead of Sha256Digest

Co-authored-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
Assisted-by: OpenCode (Claude claude-sonnet-4-20250514)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-12 19:52:34 +01:00
Colin Walters
27487f1145 build-sys: Avoid propagating local perms into /usr
The `cp -a lbi/usr/. /usr` command was preserving local directory
permissions which in one case for me have a restrictive mode 0750
which breaks booting.

Switch to `install -D -m 0644` which explicitly sets file modes and
creates parent directories with correct 755 permissions, while also
simplifying the directory structure.

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-12 19:52:34 +01:00
Daniele Guarascio
13d5db68aa Update workspace to Rust edition 2024
Migrate all crates from edition 2021 to 2024. This includes
updating Cargo.toml files and fixing code compatibility issues.

The MSRV is bumped to 1.85.0 to support edition 2024.

Note: global_init() requires #[allow(unsafe_code)] for
std::env::set_var which is now unsafe in edition 2024.
This is safe because the function is called early in main()
before any threads are spawned.

Closes: #1414

Signed-off-by: Daniele Guarascio <guarascio.daniele@gmail.com>
2026-01-12 17:38:26 +01:00
Shion Tanaka
ab78a79487 fix: Use unicode-width for accurate display width calculation
- status.rs: Use UnicodeWidthStr::width() for correct display alignment
- container.rs: Use as_bytes().len() for hex string length verification
- Add unicode-width dependency (already a transitive dep via comfy-table)

Assisted-by: Cursor (Auto)
Signed-off-by: Shion Tanaka <shtanaka@redhat.com>
2026-01-09 20:17:58 +01:00
Chaser Huang
4cb64bb996 nit: Fix typo and improve readability
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Chaser Huang <huangkangjing@gmail.com>
2026-01-09 14:57:25 +05:30
Chaser Huang
1670cdc8ae composefs/status: resolve rollback entry correctly
Previous implementation had undefined behavior and was coincidentally correct under conditions where no rollback was performed, see #1887

Matches deployment entries in composefs deploy folder that are neither staged nor booted against entires defined in /boot to find out rollback entry.

Fixes #1887

Signed-off-by: Chaser Huang <huangkangjing@gmail.com>
2026-01-09 14:57:25 +05:30
Colin Walters
ad60763ff2 ci: Use shared actions from bootc-dev/actions (#1897)
https://github.com/bootc-dev/actions now exists and is
nicer than syncing GHA via the sync-common flow.

Assisted-by: OpenCode (Opus 4.5)

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-09 10:59:45 +08:00
Shion Tanaka
d2eb1b69e2 cli: Add shell completion generation command
- Add completion subcommand supporting bash, zsh, and fish

Assisted-by: Cursor (Auto)
Signed-off-by: Shion Tanaka <shtanaka@redhat.com>
2026-01-09 00:11:15 +01:00
Colin Walters
0ee11dbfe2 docs: Pass GH_TOKEN to cargo-binstall to avoid rate limits
When cargo-binstall fetches pre-built binaries from GitHub, it can hit
API rate limits (403 Forbidden) when unauthenticated. This causes it to
fall back to building from source, which fails for mdbook-linkcheck
because the devenv container lacks openssl-devel and the perl modules
needed to build OpenSSL from source.

Pass the GitHub Actions token through to the container build as a secret,
allowing cargo-binstall to make authenticated requests with higher rate
limits.

Assisted-by: OpenCode (claude-sonnet-4-20250514)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 22:44:10 +01:00
Colin Walters
760bfcaf7d Cargo.toml: Cross-reference composefs-rs crates with docs
Add a comment noting that changes to the composefs-rs crate list should
also update the documentation files that reference them.

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 22:44:10 +01:00
Colin Walters
8cbd6e93ff docs: Add composefs-rs crates to internals rustdoc
These external git dependencies don't have docs on docs.rs, so include
them in the internal documentation alongside our workspace crates.

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 22:44:10 +01:00
Pragyan Poudyal
fd7f1b6ec4 copy-to-storage: Fix deadlock in ostree path
The sysroot lock was being taken by `get_host` before it was released by
the caller. Move the `get_host` function up the stack of calls

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2026-01-08 14:38:18 +01:00
Pragyan Poudyal
7f8565ed0a copy-to-storage: Refactor tar parsing
Inline the tar parsing/unpacking
Check for two NULL 512 blocks instead of just one
Share source image and target image generating code between composefs
and ostree

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2026-01-08 14:38:18 +01:00
Pragyan Poudyal
9f5c491a24 composefs/export: Use ocidir for creating OCI compliant directory
Instead of handling the history,metadata,annotations ourselves, delegate
them to `ocidir` crate. Also take into account the source and target
image references

Finally call `skopeo::copy` to copy to containers-storage

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2026-01-08 14:38:18 +01:00
Pragyan Poudyal
64a82e5794 composefs: Implement bootc image copy-to-storage
Export a composefs repository as an OCI image. In this iteration the
outputted files are in OCI Directory format and are plain TARs, i.e. not
compressed

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2026-01-08 14:38:18 +01:00
Colin Walters
8c9ed983d9 ci: Extract CoreOS install test to separate job
The CoreOS install test was previously run conditionally within the
test-integration matrix job. Running it separately avoids disk space
issues that can occur when both tests run in the same job, as the
CoreOS test requires building additional container images.

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 14:34:23 +01:00
Colin Walters
41faae65ba build-sys: Simplify build recipes and add BOOTC_SKIP_PACKAGE
Remove the separate build-from-packages and _build-from-package helper
recipes. The build logic is now inlined directly in the build recipe.

Add BOOTC_SKIP_PACKAGE=1 environment variable support to skip the
package build step when packages are provided externally (e.g. from
CI artifacts). This is used in ci.yml for the test-integration job.

Assisted-by: OpenCode (Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 14:34:23 +01:00
Colin Walters
4b5242bad2 tests: Fix incorrect prune
Now that we're building a from-scratch image it won't have `/ostree`
in it; this line was always pruning the wrong repo.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 14:34:23 +01:00
Colin Walters
ea0df4fcf9 build-sys: Consistently use RUN --network=none and add check
Ensure all RUN instructions after the "external dependency cutoff point"
marker include `--network=none` right after `RUN`.
This enforces that external dependencies are clearly delineated in the early stages of the Dockerfile.

The check is part of `cargo xtask check-buildsys` and includes unit tests.

Assisted-by: OpenCode (Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 14:34:23 +01:00
Colin Walters
fab93ac4e3 build-sys: Keep bootc-pkg image for layer caching
Removing localhost/bootc-pkg at the end of the package target
also deletes the build stage layers, causing subsequent builds
to miss the cache and rebuild the RPMs from scratch.

Keep the image around; use `just clean-local-images` to reclaim space.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 14:34:23 +01:00
Colin Walters
a6c87c6667 build-sys: Remove separate integration test image
The previous commit consolidated test content (nushell, cloud-init, etc.)
into the base image. This completes that work by removing the separate
`build-integration-test-image` target and updating all references.

Now `just build` produces the complete test-ready image directly,
simplifying the build pipeline and eliminating the intermediate
`localhost/bootc-integration` image.

Also adds SKIP_CONFIGS support for the coreos testing workflow, which
skips LBIs, test kargs, and install configs that would conflict with FCOS.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 14:34:23 +01:00
Colin Walters
f1a7624542 build-sys: Consolidate test image content into base
Move all content from the derived test image (hack/Containerfile) into
the main Dockerfile base image. This includes nushell, cloud-init, and
the other testing packages from packages.txt.

This simplifies the build by avoiding the need to juggle multiple images
during testing workflows - the base image now contains everything needed.

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>

# Conflicts:
#	hack/Containerfile
2026-01-08 14:34:23 +01:00
Colin Walters
6edd1f5384 build-sys: Always build a "from scratch" image
This changes things so we always run through https://docs.fedoraproject.org/en-US/bootc/building-from-scratch/
in our default builds, which helps work around https://github.com/containers/composefs-rs/issues/132

But it will also help clean up our image building in general
a bit.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 14:34:23 +01:00
Colin Walters
9745361288 build-sys: Move build back to being the default target
Oops.

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

# Conflicts:
#	Justfile
2026-01-08 14:34:23 +01:00
Colin Walters
d7a7c0c98f build-sys: Always build packages as separate stage
We were previously trying to support a direct `podman/docker build`
*and* injecting externally built packages (for CI).

Looking to rework for sealed images it was too hacky; let's
just accept that a raw `podman build` no longer works, the canonical
entry for local build is `just build` which builds both a package
and a container.

This way CI and local work exactly the same.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 14:34:23 +01:00
Colin Walters
52b432382a ostree: Handle images without final diffid
This will be tested by the following change to build flattened
images.

Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 14:34:23 +01:00
Colin Walters
881d2e4c94 ostree-ext: Fix /etc remapping for derived layers in container export
When exporting derived container images via store::export, content in
derived layers that was originally at /etc (stored in ostree as /usr/etc)
was incorrectly output as /usr/etc instead of being remapped back to /etc.

This was because the "remaining layers" (non-ostree derived layers) were
exported using the raw ostree CLI which doesn't perform the remapping.

Fix this by adding a "raw" export mode to the tar export machinery that
outputs plain filesystem content with proper /usr/etc -> /etc remapping
but without ostree repository structure (no hardlinks to object store,
no commit metadata). This mode also preserves xattrs via PAX extensions.

Assisted-by: OpenCode (Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 14:34:23 +01:00
Colin Walters
b68100b20e docs: Publish rustdoc for internal crates alongside mdbook
The docs workflow now also generates rustdoc for all workspace crates
and publishes them as a subdirectory of the main documentation site.
This makes internal API documentation available at
bootc-dev.github.io/bootc/internals.html with links to each crate.

Note this required switching the docs container to CentOS Stream 10 for newer Rust (1.91).

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-07 21:25:27 +01:00
Daniel Hast
2a4476c6a8 ostree-ext: Make new packing if using prior build fails
Under some circumstances--for example, if a new exclusive component has
been added since the prior build--packing with a prior build structure
can fail. When this happens, we can simply discard the prior build
data and make a new packing structure, rather than having chunking fail
entirely.

Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
2026-01-07 00:18:58 +01:00
bootc-bot[bot]
0ee9b2276d Release 1.12.0
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v1.12.0
2026-01-06 20:19:44 +01:00
Huijing Hei
c7e3d10658 tests/plan: add PubkeyAcceptedAlgorithms=+ssh-rsa to ssh-option
To workaround the issue that failed to ssh after reboot, can not
reproduce locally.

Signed-off-by: Huijing Hei <hhei@redhat.com>
2026-01-06 17:17:18 +01:00
Huijing Hei
44b1ccca57 tests: Add test test-tmt-on-coreos
To workaround https://github.com/bootc-dev/bcvk/issues/174, will
build `bootc-integration-coreos` container firstly and save it to
`bootc.tar`, then load it to install.

Signed-off-by: Huijing Hei <hhei@redhat.com>
2026-01-06 17:17:18 +01:00
Huijing Hei
1d7b73d24b install: mount esp in clean_boot_directories()
On FCOS, esp is not mounted after booted, need to find esp and
mount before cleaning, or `/boot/efi` will be removed.

Signed-off-by: Huijing Hei <hhei@redhat.com>
2026-01-06 17:17:18 +01:00
Huijing Hei
b9ac902709 install: should remove the empty dir under /boot
Fix what we did in
92d9d38494

Signed-off-by: Huijing Hei <hhei@redhat.com>
2026-01-06 17:17:18 +01:00
Huijing Hei
bf89a7dd11 install: add target_root_path for RootSetup
When running `install to-filesystem` on ostree OS, should use
`target_root_path` for bootupctl to install bootloader.

Signed-off-by: Huijing Hei <hhei@redhat.com>
2026-01-06 17:17:18 +01:00
Huijing Hei
19534d148e install: empty /boot & /boot/efi
Get pointer from Colin's comment
https://github.com/bootc-dev/bootc/pull/1752#issuecomment-3532953293
- Empty the complete ESP
- On ostree OS, empty `/boot` but preserve `/boot/loader`
- On none ostree OS, the loader is directory that needs to be
removed.

Signed-off-by: Huijing Hei <hhei@redhat.com>
2026-01-06 17:17:18 +01:00
bootc-bot[bot]
5ec2c5ce69 Sync common files from infra repository (#1875)
Synchronized from bootc-dev/infra@d5a5a62c98.

Signed-off-by: bootc-dev Bot <bot@bootc.dev>
Co-authored-by: bootc-dev Bot <bot@bootc.dev>
2025-12-29 13:31:32 +00:00
Colin Walters
d5dd1af815 container inspect: Add human-readable and yaml output formats
The container inspect command previously only supported JSON output.
This extends it to support human-readable output (now the default)
and YAML, matching the output format options available in other
bootc commands like status.

The --json flag provides backward compatibility for scripts that
expect JSON output, while --format allows explicit selection of
any supported format.

Assisted-by: OpenCode (Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2025-12-29 12:40:36 +01:00
Colin Walters
fd83c659a8 cli: Extend bootc container inspect with kernel info
The container-inspect command previously only reported kernel arguments.
Extend it to also report kernel information, including whether the image
contains a traditional kernel or a Unified Kernel Image (UKI).

This consolidates UKI detection logic previously in bootc_composefs::boot
into a new kernel module that can find kernels via either the traditional
/usr/lib/modules/<version>/vmlinuz path or UKI files in /boot/EFI/Linux/.

The ContainerInspect output now includes a "kernel" field with version
and unified (boolean) properties, enabling tooling to determine the
boot method before installation.

Assisted-by: OpenCode (Claude Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2025-12-29 12:40:36 +01:00
Chaser Huang
bd9026997b composefs/state: Copy /var from image to fresh installations
Signed-off-by: Chaser Huang <huangkangjing@gmail.com>
2025-12-29 15:29:00 +05:30
Pragyan Poudyal
0e2ad92675 test/tmt: Use bootc usroverlay for /usr overlay mount (#1882)
Previously we were mounting a rw overlay on top of /usr using
`mount -t overlay -olowerdir=/usr,workdir=...,upperdir=... overlay /usr`
which caused the kernel to throw
`overlayfs: maximum fs stacking depth exceeded`
possibly because the mountpoint was the same as the lowerdir

Also, move the overlay mount BEFORE we mask off `/sysroot/ostree` else
bootc throws `error: Read only filesystem`

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2025-12-29 15:59:47 +08:00
Pragyan Poudyal
0aae35a434 composefs/state: Fix imgref format in origin file
On `UpdateAction::UpdateOrigin` the origin for the container image used
was not properly formatted. Fixed it

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2025-12-22 16:06:52 +05:30