Can rpm be persuaded to import and fetch public keys from an arbitrary pubkey database?
On the same build machine I've got two automated users who each need to verify package signatures from different sources, signed under different keys. If I rpm --import pkg-source1.pub pkg-source2.pub
, each user will be able to verify packages intended for the other. I'd rather each user not know about the other's public keyring.
Is there a way I can specify an alternate or supplementary pubkey database on a per-user or per-rpm(8)-invocation basis?
Keys reside in the RPM database. Thus, you'd need to maintain 2 separate rpm databases. For example:
Then add
--dbpath /var/lib/rpm_a
to yourrpm
command or add to~/.rpmmacros
:However, you now have to maintain 2 rpm databases. I would have your automation temporarily copy the system db, add the keys, do your work, then delete the temp db.