|
|
6b17e9 |
commit 1b3fc3f029ed3ab1dcbfeaaaa8fe1616dbc3744f
|
|
|
6b17e9 |
Author: Bryn M. Reeves <bmr@redhat.com>
|
|
|
6b17e9 |
Date: Tue Jul 30 19:30:13 2013 +0100
|
|
|
6b17e9 |
|
|
|
6b17e9 |
Add restricted rpm verify
|
|
|
6b17e9 |
|
|
|
6b17e9 |
Add a default call to rpm -V/--verify for a targeted subset of
|
|
|
6b17e9 |
packages. This greatly reduces the time taken relative to rpm -Va
|
|
|
6b17e9 |
while still capturing important diagnostic information.
|
|
|
6b17e9 |
|
|
|
6b17e9 |
In future this capability could be made a feature of the
|
|
|
6b17e9 |
PackageManager class interface and available to all ports/modules.
|
|
|
6b17e9 |
|
|
|
6b17e9 |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
6b17e9 |
|
|
|
6b17e9 |
diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py
|
|
|
6b17e9 |
index 9d44fde..a315018 100644
|
|
|
6b17e9 |
--- a/sos/plugins/rpm.py
|
|
|
6b17e9 |
+++ b/sos/plugins/rpm.py
|
|
|
6b17e9 |
@@ -23,6 +23,8 @@ class Rpm(Plugin, RedHatPlugin):
|
|
|
6b17e9 |
option_list = [("rpmq", "queries for package information via rpm -q", "fast", True),
|
|
|
6b17e9 |
("rpmva", "runs a verify on all packages", "slow", False)]
|
|
|
6b17e9 |
|
|
|
6b17e9 |
+ verify_list = [ 'kernel', 'glibc', 'pam_.*' ]
|
|
|
6b17e9 |
+
|
|
|
6b17e9 |
def setup(self):
|
|
|
6b17e9 |
self.add_copy_spec("/var/log/rpmpkgs")
|
|
|
6b17e9 |
|
|
|
6b17e9 |
@@ -36,3 +38,9 @@ class Rpm(Plugin, RedHatPlugin):
|
|
|
6b17e9 |
|
|
|
6b17e9 |
if self.get_option("rpmva"):
|
|
|
6b17e9 |
self.add_cmd_output("rpm -Va", root_symlink = "rpm-Va", timeout = 3600)
|
|
|
6b17e9 |
+ else:
|
|
|
6b17e9 |
+ pkgs_by_regex = self.policy().package_manager.all_pkgs_by_name_regex
|
|
|
6b17e9 |
+ verify_list = map(pkgs_by_regex, self.verify_list)
|
|
|
6b17e9 |
+ for pkg_list in verify_list:
|
|
|
6b17e9 |
+ for pkg in pkg_list:
|
|
|
6b17e9 |
+ self.add_cmd_output("rpm -V %s" % pkg)
|
|
|
6b17e9 |
commit 1a73d5932a3f8153a9d1440c931823720e7e6245
|
|
|
6b17e9 |
Author: Bryn M. Reeves <bmr@redhat.com>
|
|
|
6b17e9 |
Date: Tue Aug 13 21:54:27 2013 +0100
|
|
|
6b17e9 |
|
|
|
6b17e9 |
Add new patterns to the RPM plug-in verify list
|
|
|
6b17e9 |
|
|
|
6b17e9 |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
6b17e9 |
|
|
|
6b17e9 |
diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py
|
|
|
6b17e9 |
index a315018..71f36a0 100644
|
|
|
6b17e9 |
--- a/sos/plugins/rpm.py
|
|
|
6b17e9 |
+++ b/sos/plugins/rpm.py
|
|
|
6b17e9 |
@@ -23,7 +23,13 @@ class Rpm(Plugin, RedHatPlugin):
|
|
|
6b17e9 |
option_list = [("rpmq", "queries for package information via rpm -q", "fast", True),
|
|
|
6b17e9 |
("rpmva", "runs a verify on all packages", "slow", False)]
|
|
|
6b17e9 |
|
|
|
6b17e9 |
- verify_list = [ 'kernel', 'glibc', 'pam_.*' ]
|
|
|
6b17e9 |
+ verify_list = [
|
|
|
6b17e9 |
+ 'kernel', 'glibc', 'initscripts',
|
|
|
6b17e9 |
+ 'pam_.*',
|
|
|
6b17e9 |
+ 'java.*', 'perl.*',
|
|
|
6b17e9 |
+ 'rpm', 'yum',
|
|
|
6b17e9 |
+ 'spacewalk.*',
|
|
|
6b17e9 |
+ ]
|
|
|
6b17e9 |
|
|
|
6b17e9 |
def setup(self):
|
|
|
6b17e9 |
self.add_copy_spec("/var/log/rpmpkgs")
|
|
|
6b17e9 |
commit ffcde57daa6f6cbbfd9cb588ab64eb485d07d9ca
|
|
|
6b17e9 |
Author: Bryn M. Reeves <bmr@redhat.com>
|
|
|
6b17e9 |
Date: Wed Oct 16 19:12:58 2013 +0100
|
|
|
6b17e9 |
|
|
|
6b17e9 |
Verify fewer packages in rpm plug-in
|
|
|
6b17e9 |
|
|
|
6b17e9 |
The current default set of packages to verify includes debuginfo
|
|
|
6b17e9 |
and devel subpackages. Filter these out to reduce the time spent
|
|
|
6b17e9 |
running rpm -V.
|
|
|
6b17e9 |
|
|
|
6b17e9 |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
6b17e9 |
|
|
|
6b17e9 |
diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py
|
|
|
6b17e9 |
index 71f36a0..55c8019 100644
|
|
|
6b17e9 |
--- a/sos/plugins/rpm.py
|
|
|
6b17e9 |
+++ b/sos/plugins/rpm.py
|
|
|
6b17e9 |
@@ -24,7 +24,7 @@ class Rpm(Plugin, RedHatPlugin):
|
|
|
6b17e9 |
("rpmva", "runs a verify on all packages", "slow", False)]
|
|
|
6b17e9 |
|
|
|
6b17e9 |
verify_list = [
|
|
|
6b17e9 |
- 'kernel', 'glibc', 'initscripts',
|
|
|
6b17e9 |
+ 'kernel$', 'glibc', 'initscripts',
|
|
|
6b17e9 |
'pam_.*',
|
|
|
6b17e9 |
'java.*', 'perl.*',
|
|
|
6b17e9 |
'rpm', 'yum',
|
|
|
6b17e9 |
@@ -49,4 +49,7 @@ class Rpm(Plugin, RedHatPlugin):
|
|
|
6b17e9 |
verify_list = map(pkgs_by_regex, self.verify_list)
|
|
|
6b17e9 |
for pkg_list in verify_list:
|
|
|
6b17e9 |
for pkg in pkg_list:
|
|
|
6b17e9 |
+ if 'debuginfo' in pkg \
|
|
|
6b17e9 |
+ or pkg.endswith('-debuginfo-common'):
|
|
|
6b17e9 |
+ continue
|
|
|
6b17e9 |
self.add_cmd_output("rpm -V %s" % pkg)
|