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

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

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

The spec ( https://www.freedesktop.org/software/systemd/man/latest/os-release.html#VERSION_ID= ) says

This field is optional

but right now attempting to build an Arch Linux image (which doesn't set VERSION_ID) results in

[/] Manifest generation step
Message: Generating manifest manifest-qcow2.json
2025/03/27 21:36:13 error: cannot build manifest: missing VERSION_ID in os-release

If I'm reading https://github.com/osbuild/bootc-image-builder/blob/main/bib/internal/source/source.go correctly... which is questionable, I'm not a developer... then it may be sufficient to treat VERSION_ID like VARIANT_ID (which I think just means don't error if it's absent).

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

Thanks for your issue report. Can you please provide the commandline(s) you used so that we can try to reproduce the issue?

mvo5 avatar Mar 31 '25 07:03 mvo5

As of today the minimal reproduction steps appear to be

git clone --depth 1 https://github.com/frap129/arch-bootc.git
cd arch-bootc
sed -i /pkgbuilds/d Containerfile
sudo podman build . -t arch-bootc --net=host --cap-add all --security-opt=label=disable
mkdir output
sudo podman run \
    --rm \
    -it \
    --privileged \
    --pull=newer \
    --security-opt label=type:unconfined_t \
    -v ./output:/output \
    -v /var/lib/containers/storage:/var/lib/containers/storage \
    quay.io/centos-bootc/bootc-image-builder:latest \
    --type qcow2 \
    --use-librepo=True \
    --rootfs ext4 \
    localhost/arch-bootc

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