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
We support an `overrides/{rootfs,rpm}` API as described in the
Containerfile, so we shouldn't ignore it.
Fixes 8a140cea ("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.