bootc-image-builder icon indicating copy to clipboard operation
bootc-image-builder copied to clipboard

bootc-image-builder should not require PLATFORM_ID in /etc/os-release

Open yjftsjthsd-g opened this issue 8 months ago • 4 comments

As of yesterday (build_revision: 7dd9bea), bootc-image-builder requires that the image it's building from has PLATFORM_ID in /etc/os-release; if this is absent, then:

Message: Generating manifest manifest-qcow2.json
2025/03/27 22:47:43 error: cannot build manifest: missing PLATFORM_ID in os-release

This is a problem for any aspirations the tool has of working with other distros (since PLATFORM_ID is apparently a Fedora invention), but even Fedora has a proposal to drop it - https://fedoraproject.org/wiki/Changes/Drop_PLATFORM_ID - which would obviously break things.

yjftsjthsd-g avatar Mar 28 '25 17:03 yjftsjthsd-g

One thing I will say here is that we're basically getting bit here by osbuild having very significant logic wrapping/intercepting dnf; I know there's reasons for some of it, but this is an example of the cost of that.

(rpm-ostree is also still carrying a branch of libdnf4, which also still expects PLATFORM_ID and emits a warning, which is just cosmetic but...the same thing really)

cgwalters avatar May 02 '25 12:05 cgwalters

I'm facing the same issue when building fedora-bootc:43 image. Issue started from bib commit id ea517bf2c59bf1925a1ee301c096dbbb7f9b6d53. The 6a795b46f34f5faf26570b3f45a9aecd0528e2eb does not have this issue.

henrywang avatar May 06 '25 09:05 henrywang

That's surprising, actually; F43 doesn't have PLATFORM_ID:

$ docker run --rm -ti --entrypoint /bin/grep quay.io/fedora/fedora-bootc:42  ID /etc/os-release
ID=fedora
VERSION_ID=42
PLATFORM_ID="platform:f42"
$ docker run --rm -ti --entrypoint /bin/grep quay.io/fedora/fedora-bootc:43  ID /etc/os-release
ID=fedora
VERSION_ID=43

so I would expect bib to either fail regardless, or possibly for a newer version to start working.

yjftsjthsd-g avatar May 06 '25 22:05 yjftsjthsd-g

It looks like its just coincidence, i.e. the commit and the timing of the removal happend to happen around the same time (I have not double checked this theory but looking at the code it seems very plausible).

mvo5 avatar May 07 '25 07:05 mvo5