During work with RPM packages I frequently need to validate signatures against available GPG keys.
Using
rpm -qip --nosignature <package.rpm> | grep Signature
gives me an Key ID, i.e.:
Signature : RSA/SHA1, Mon 28. Aug 2019 06:00:00 AM CET, Key ID 1234567890abcdef
whereby
gpg --with-fingerprint <RPM-GPG-KEY-package>
gives me a Key Fingerprint:
Key fingerprint = 0987 6543 21FE DCBA 0987 6543 21FE 1234 5678 90AB CDEF
Since it is not easy to compare both outputs, how to get the mentioned Key ID instead of the whole fingerprint?