-
Notifications
You must be signed in to change notification settings - Fork 98
Description
Summary
Building an ISO with bootc-image-builder can fail during depsolve when an enabled RPM repo in the source bootc container image uses a local GPG key reference like gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-....
In our case (Bazzite / terra-mesa repo) depsolve fails with Curl error (37) because the depsolve environment cannot open the file:// path, even though the key exists inside the source image.
How we run it (via ublue image-template)
We build and then run BIB using the ublue-os/image-template Justfile:
rebuild-isoultimately calls:
bootc-image-builder --type iso --use-librepo=True --rootfs=btrfs ... <image>:<tag>
(See Justfile recipe: rebuild-iso -> _build-bib type "iso".)
Expected behavior
If the GPG key file exists inside the source container image at the referenced path, depsolve should not fail trying to read it, or bootc-image-builder should detect this situation and fail early with an actionable error.
Actual behavior
Depsolve fails with:
Errors during downloading metadata for repository 'terra-mesa':
- Curl error (37): Could not read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-terra43-mesa
[Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-terra43-mesa]
RepoError: Failed to retrieve GPG key for repo 'terra-mesa': Curl error (37) ...
Reproduction (generic)
- Use/build a bootc container image that has an enabled repo with:
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-exampleand the key file exists in the image at/etc/pki/rpm-gpg/RPM-GPG-KEY-example. - Run bootc-image-builder for ISO:
sudo podman run --rm -it --privileged --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 iso <image-ref>
- Observe depsolve failing with Curl error (37) reading the
file://key path.
Why this happens (hypothesis)
Depsolve runs in an isolated build environment; file:// URLs are resolved against the depsolve filesystem, not the source
image filesystem. Therefore absolute paths like /etc/pki/rpm-gpg/... may not exist there.