Skip to content

ISO build fails during depsolve when enabled repo uses gpgkey=file://... from source image (Curl error 37) #1188

@seedmonn

Description

@seedmonn

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-iso ultimately 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)

  1. Use/build a bootc container image that has an enabled repo with:
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-example and the key file exists in the image at /etc/pki/rpm-gpg/RPM-GPG-KEY-example.
  2. 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>
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/anaconda-isoIssues relating to the unattended Anaconda ISObugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions