Commit graph

4 commits

Author SHA1 Message Date
jbtrystram
af0d6638f0 build-rootfs: inject disk partition layouts for image-builder
bootc-image-builder needs a disk partition table definition at
/usr/lib/image-builder/bootc/disk.yaml to produce disk images. Each
architecture has a different partition layout (e.g. BIOS boot on x86_64,
PReP on ppc64le, no boot partition on s390x), so the correct file must
be selected at build time.

This follows the same injection pattern already used for platforms.json
and image.json: build-rootfs links the correct partitioncorrect partition
table from the disk-image overlay.

Authored-by: Opencode.ai claude-opus-4-6@default
2026-06-04 19:05:25 +02:00
Dusty Mabe
c1dd301266 .containerignore: add bootc-base-imagectl, rpm-ostree
Without this the suggestions [1] for how to debug/develop
bootc-base-imagectl, and rpm-ostree don't work.

[1] 2f1bb66bd8/Containerfile (L34-L36)
2025-11-07 08:08:38 -05:00
Jonathan Lebon
92ac556e15 .containerignore: exclude overrides/
We support an `overrides/{rootfs,rpm}` API as described in the
Containerfile, so we shouldn't ignore it.

Fixes 8a140cea ("Containerfile: COPY build context").
2025-09-15 16:40:52 -04:00
Jonathan Lebon
8a140cead9 Containerfile: COPY build context
I like the efficiency of being able to just mount the build context
instead of having to copy it in. For example, I often have git worktrees
in my git checkout and I don't want `COPY` to dumbly copy those too
(though I then realized we could just use a `.containerignore` for it).

However, a down side of mounting is that we render layer caching even
more useless because it can't know which files from the mount we're
actually using.

More recently, an issue around setgid leaking into
the context dir (because OpenShift) came up (see
https://github.com/coreos/coreos-assembler/pull/4277) and it's just not
acceptable to chmod the real build context directory.

Of course, `build-rootfs` could e.g. copy the overlay dirs into a
temporary location and then adjust the perms there, but at that point,
we're quite close to just doing a `COPY` upfront anyway.

So let's just switch to that, strip the bits as we want, but include a
`.containerignore` to only copy what we need.

This then limits the build context mounting to just the rechunk and
`FROM oci-archive:` hack. Which... hopefully one day we could normalize
that.
2025-09-09 11:35:47 +02:00