RPM tag - how to get RPM signature details like Key ID
Panu Matilainen
pmatilai at laiskiainen.org
Thu Dec 15 13:18:48 UTC 2011
On 12/15/2011 12:17 PM, George Machitidze wrote:
> Hello
>
> I want to list packages by signatures and to include Key ID in queries when
> using "rpm -qa --queryformat", but I couldn't get values I need.
>
> Is there a way to get it somehow without parsing "rpm -qia" data?
>
> From rpm -qi:
>
> Signature : DSA/SHA1, Mon 03 Oct 2011 07:16:25 PM GET, *Key ID
> 5326810137017186*
Key ID is not available as such, only as a part of :pgpsig format
extension as seen in the Signature line of -qi output. For example to
query package name + its RSA signature (if it exists) in "human
readable" format you could use:
rpm -qa --qf "%{NAME} %|RSAHEADER?{%{RSAHEADER:pgpsig}}:{(none)}|\n"
See the --info alias in /usr/lib/rpm/rpmpopt* for the gory details how
to handle all the possible signature types.
- Panu -
More information about the Rpm-list
mailing list