As this feature is enabled with f45+ hosts: https://fedoraproject.org/wiki/Changes/Enforcing_signature_checking_by_default
There is likely a need to set a per-external-repository GPG key accessible from the builder in order to populate the buildroot (likely for both bootstrap and non-bootstrap).
Mock always copies distribution keys to the buildroot. Isn't it that enough? (Updating/installing own version of that package gpg-distribution-keys to the builder) /I've not tested it/
Metadata Update from @tkopecek: - Custom field Size adjusted to None
Metadata Update from @tkopecek: - Issue set to the milestone: 1.36.1
We've run into this with a buildroot based on rawhide as well, using bootstrap_chroot.
In the process of replicating this locally, the issue seems to be triggered by the behavior of the tools in the bootstrap chroot.
%_pkgverify_level
%_pkgverify_level all
gpgcheck=0
I can work around locally by disabling bootstrap, but that is likely not an option in many cases.
They only way I see to handle this (short of changes to mock, dnf or rpm) is to add an extra package to the build tag that sets %_pkgverify_level digest when installed, add it both to the bootstrap_chroot_additional_packages mock config, and probably also add it to the build and srpm-build install groups.
%_pkgverify_level digest
bootstrap_chroot_additional_packages
In my case, the signing key is present in the bootstrap chroot (part of fedora-gpg-keys), but is not trusted by rpm. I don't see a sane way to programmatically determine which key to trust.
In short, the buildroot configuration defines a buildroot that requires gpg keys, but does not trust any.
Koji doesn't have a way to set bootstrap_chroot_additional_packages. I suppose we could add it if we can't find a better solution.
I thought about maybe adding the macros in a package that Supplements one of the base install package, but koji always sets install_weak_deps=0
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/4544
Please continue any further discussion there.