diff options
author | poornimakshirsagar <pkshiras@redhat.com> | 2014-09-11 16:46:50 +0530 |
---|---|---|
committer | poornimakshirsagar <pkshiras@redhat.com> | 2014-09-11 17:55:39 +0530 |
commit | 612fcb7e95722709037fb0ee276f4eeb9ce95f22 (patch) | |
tree | 364a08498ea0eb471060585800d19153a5e7ca0c | |
parent | 62fbdcc6fca86d21ad5b582a54b3fd1372643363 (diff) | |
download | sos-612fcb7e95722709037fb0ee276f4eeb9ce95f22.tar.gz |
[rpm] Add Signature tag to the output of 'installed-rpms'
RPM meta data consists of Signature,Packager,BuildHost,Vendor tags
it is useful for identifying 3rd party packages present on a system.
This patch adds the gpg and pgp signature columns to installed-rpms.
Signed-off-by: Poornima M. Kshirsagar <pkshiras@redhat.com>
-rw-r--r-- | sos/plugins/rpm.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py index 1d67722b..c93df795 100644 --- a/sos/plugins/rpm.py +++ b/sos/plugins/rpm.py @@ -39,8 +39,9 @@ class Rpm(Plugin, RedHatPlugin): if self.get_option("rpmq"): query_fmt = '"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}~~' query_fmt = query_fmt + '%{INSTALLTIME:date}\t%{INSTALLTIME}\t' - query_fmt = query_fmt + '%{VENDOR}\t%{BUILDHOST}\n"' - rpmq_cmd = "rpm --nosignature --nodigest -qa --qf=%s" % query_fmt + query_fmt = query_fmt + '%{VENDOR}\t%{BUILDHOST}\t' + query_fmt = query_fmt + '%{SIGPGP}\t%{SIGPGP:pgpsig}\n"' + rpmq_cmd = "rpm --nodigest -qa --qf=%s" % query_fmt filter_cmd = 'awk -F "~~" ' \ '"{printf \\"%-59s %s\\n\\",\$1,\$2}"|sort' shell_cmd = "sh -c '%s'" % (rpmq_cmd + "|" + filter_cmd) |