Pavel Raiskup wrote:
On Friday, January 22, 2021 8:55:02 AM CET Daniel Mach wrote:
> Isn't the problem that mock uses rpm and dnf from the host environment
> and expects the GPG key to be there too?
That would be good guess, with '--no-bootstrap-chroot'. But nowadays there are
two steps by default:
* Host RPM/DNF installs target RPM/DNF into "bootstrap" chroot
* RPM/DNF from bootstrap is used to install the final chroot
And so the gpg keys need to be available in bootstrap chroot, and
sometimes also on host, depending on use-case.
There's a mock's internal method [1] which copies GPG keys into both
bootstrap and normal chroot, but it only looks at
/usr/share/distribution-gpg-keys - so the easiest way is to put the custom
GPG keys there.
Or in /etc/pki/mock, named RPM-GPG-KEY-*. For keys which
are not likely to be added to distribution-gpg-keys, this is
probably a better location. And then be sure to set the
gpgkey parameter in rpm/cs8.cfg appropriately, e.g.:
gpgkey=file:///etc/pki/mock/RPM-GPG-KEY-foo
--
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Life is the art of drawing sufficient conclusions from insignificant
premises
-- Samuel Butler