Installing Public Signing Keys Automatically

We want to install out public signing keys when we install our software. Our Server Tools package has the keys, but we have not been able to install them properly.

We cannot us “rpm --import” in %post because it requires an rpm lock.
Using instead %posttrans works, but has one caveat. The keys work with zypper, but not with rpm.

rpm --import PUB-KEY.asc

I tried looking into this project in OBS, but it says those keys are not used for anything.

Do these packages come from a repository?
Using zypper, you can automatically accept keys when adding and refreshing the repository

If you have loose RPMs,
I suppose you apply the described method by defining a folder as your repository and placing your RPMs in it.

No need for any rpm commands…