[sos/f19] Update sos to latest 3.0 changes

Bryn Reeves bmr at fedoraproject.org
Mon Mar 31 15:25:36 UTC 2014


commit 1d13e90a848eb9e5b5864364c3134ec99d278f3f
Author: Bryn M. Reeves <bmr at redhat.com>
Date:   Mon Mar 31 16:24:45 2014 +0100

    Update sos to latest 3.0 changes

 sos-Added-XFS-plugin.patch                         |   54 +++++
 ...-exit-on-interactive-mode-read-exceptions.patch |   33 +++
 sos-Fix-policy-classes-for--tmp-dir.patch          |   35 +++
 sos-No-TTY-should-not-imply-batch-mode.patch       |   54 +++++
 sos-add-distupgrade-plugin.patch                   |   59 +++++
 sos-add-file-size-restriction-to-sar.patch         |   84 +++++++
 sos-add-krb5-plugin-and-klist.patch                |  126 +++++++++++
 sos-add-nfs-client-plugin.patch                    |   65 ++++++
 sos-add-powerpc-plugin.patch                       |   97 ++++++++
 sos-add-rhsm-debug-to-yum.patch                    |   21 ++
 sos-call-rhsm-debug-with-sos.patch                 |   23 ++
 sos-check-for-usable-temporary-directory.patch     |   29 +++
 sos-cluster-collect-crm_report.patch               |   28 +++
 ...er-plugin-add-obfuscation-of-luci-secrets.patch |   28 +++
 sos-collect-proc-self-mountstats.patch             |   21 ++
 sos-collect-saved-vmcore-dmesg.patch               |   43 ++++
 sos-collect-var-log-squid.patch                    |   20 ++
 sos-correct-log-and-message-levels.patch           |   87 +++++++
 sos-do-not-attempt-to-read-use-gss-proxy.patch     |   35 +++
 sos-fix-alloptions.patch                           |   35 +++
 sos-fix-anacron-checks.patch                       |   28 +++
 sos-fix-cluster-crm_report.patch                   |   72 ++++++
 sos-fix-cluster-get_option-use.patch               |   32 +++
 ...fix-command-output-substitution-exception.patch |  141 ++++++++++++
 sos-fix-config-file-regression.patch               |   51 +++++
 sos-fix-dash-dash-build-regressions.patch          |   98 ++++++++
 sos-fix-fd-leaks-on-popen.patch                    |   74 ++++++
 sos-fix-gluster-volume-name-extraction.patch       |   26 +++
 sos-fix-ldap-postproc.patch                        |  187 ++++++++++++++++
 sos-fix-multiple-plugin-opts.patch                 |   35 +++
 sos-fix-rhel_version-problems.patch                |  186 +++++++++++++++
 sos-fix-traceback-when-sar-module.patch            |   48 ++++
 sos-fix-typo-in-yum-add_forbidden_paths.patch      |   26 +++
 sos-fix-verbose-file-logging.patch                 |   38 +++
 sos-gluster-include-geo-replication.patch          |   70 ++++++
 sos-include-etc-yaboot-conf-in-boot.patch          |   20 ++
 sos-include-openhpi-config.patch                   |  116 ++++++++++
 sos-log-command-timeouts.patch                     |   71 ++++++
 sos-make-ethernet-detection-more-robust.patch      |   90 ++++++++
 sos-nis-add-domainname-output.patch                |   17 ++
 sos-normalise-tmp-dir-path.patch                   |   31 +++
 sos-pass-no-archive-to-rhsm-debug.patch            |   26 +++
 sos-remove-anaconda-ks-cfg-from-general.patch      |   33 +++
 sos-remove-logs-debug-statements.patch             |   34 +++
 ...emove-pipe-communicate-newline-workaround.patch |   29 +++
 sos-remove-rhel_version-from-yum-plugin.patch      |   21 ++
 sos-remove-upload-option.patch                     |  236 ++++++++++++++++++++
 sos-remove-useless-os-path-check-for-brctl.patch   |   37 +++
 sos-remove-version-checks-in-gluster.patch         |   40 ++++
 sos-restore-build-command-line-option.patch        |  187 ++++++++++++++++
 ...t-wbinfo-collection-to-the-current-domain.patch |   36 +++
 sos-rhevm-treat-vdsmlogs-as-string.patch           |   28 +++
 sos-rpm-restricted-verify.patch                    |   98 ++++++++
 sos-strip-trailing-newline.patch                   |   25 ++
 sos-update-sos-ui-text.patch                       |  103 +++++++++
 sos.spec                                           |  207 +++++++++++++++++-
 56 files changed, 3573 insertions(+), 1 deletions(-)
---
diff --git a/sos-Added-XFS-plugin.patch b/sos-Added-XFS-plugin.patch
new file mode 100644
index 0000000..fe57b96
--- /dev/null
+++ b/sos-Added-XFS-plugin.patch
@@ -0,0 +1,54 @@
+commit dc11544c78dda4625cb6d985f6e1d76036ba6faf
+Author: Pierguido Lambri <plambri at redhat.com>
+Date:   Sat Jul 6 21:21:42 2013 +0100
+
+    Added XFS plugin
+    
+    Signed-off-by: Pierguido Lambri <plambri at redhat.com>
+
+diff --git a/sos/plugins/xfs.py b/sos/plugins/xfs.py
+new file mode 100644
+index 0000000..fe84b03
+--- /dev/null
++++ b/sos/plugins/xfs.py
+@@ -0,0 +1,40 @@
++### This program is free software; you can redistribute it and/or modify
++## it under the terms of the GNU General Public License as published by
++## the Free Software Foundation; either version 2 of the License, or
++## (at your option) any later version.
++
++## This program is distributed in the hope that it will be useful,
++## but WITHOUT ANY WARRANTY; without even the implied warranty of
++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++## GNU General Public License for more details.
++
++## You should have received a copy of the GNU General Public License
++## along with this program; if not, write to the Free Software
++## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
++import os
++import re
++from itertools import *
++
++class Xfs(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
++    """information on the XFS filesystem
++    """
++
++    plugin_name = 'xfs'
++
++    option_list = [("logprint", 'gathers the log information', 'slow', False)]
++
++    def setup(self):
++        mounts = '/proc/mounts'
++        ext_fs_regex = r"^(/dev/.+).+xfs\s+"
++        for dev in izip(self.do_regex_find_all(ext_fs_regex, mounts)):
++            for e in dev:
++                parts = e.split(' ')
++                self.add_cmd_output("xfs_info %s" % (parts[1]))
++
++        if self.get_option('logprint'):
++            for dev in izip(self.do_regex_find_all(ext_fs_regex, mounts)):
++                for e in dev:
++                    parts = e.split(' ')
++                    self.add_cmd_output("xfs_logprint -c %s" % (parts[0]))
diff --git a/sos-Do-not-exit-on-interactive-mode-read-exceptions.patch b/sos-Do-not-exit-on-interactive-mode-read-exceptions.patch
new file mode 100644
index 0000000..4aa0c26
--- /dev/null
+++ b/sos-Do-not-exit-on-interactive-mode-read-exceptions.patch
@@ -0,0 +1,33 @@
+From 4e5f11cc49d28bd678b1ec0c9c3a8df3b9ac4380 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Thu, 3 Oct 2013 17:58:07 +0100
+Subject: [PATCH 2/2] Do not exit on interactive mode read exceptions
+
+Currently the default policy object will exit without logging any
+errors if an exception (e.g. EOF while reading line) is caught
+during reads for interactive mode prompts.
+
+Instead re-set the report name to a sane value (localname) and
+attempt to continue.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/policies/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
+index 8eff993..752d480 100644
+--- a/sos/policies/__init__.py
++++ b/sos/policies/__init__.py
+@@ -455,7 +455,7 @@ class LinuxPolicy(Policy):
+                 self._print()
+             except:
+                 self._print()
+-                sys.exit(0)
++                self.report_name = localname
+ 
+         if len(self.report_name) == 0:
+             self.report_name = localname
+-- 
+1.7.11.7
+
diff --git a/sos-Fix-policy-classes-for--tmp-dir.patch b/sos-Fix-policy-classes-for--tmp-dir.patch
new file mode 100644
index 0000000..c089c41
--- /dev/null
+++ b/sos-Fix-policy-classes-for--tmp-dir.patch
@@ -0,0 +1,35 @@
+commit 420f6ee7a25833ebaaea224fc0955cacdecdd6c2
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Jun 10 20:32:20 2013 +0100
+
+    Fix policy classes for --tmp-dir
+    
+    Policy classes need to return the user-supplied temporary
+    directory if they decide not to override it.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
+index 752d480..983842d 100644
+--- a/sos/policies/__init__.py
++++ b/sos/policies/__init__.py
+@@ -190,6 +190,7 @@ No changes will be made to system configuration.
+     def get_tmp_dir(self, opt_tmp_dir):
+         if not opt_tmp_dir:
+             return tempfile.gettempdir()
++        return opt_tmp_dir
+ 
+     def validatePlugin(self, plugin_class):
+         """
+diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
+index c3740dc..9321815 100644
+--- a/sos/policies/redhat.py
++++ b/sos/policies/redhat.py
+@@ -85,6 +85,7 @@ class RedHatPolicy(LinuxPolicy):
+     def get_tmp_dir(self, opt_tmp_dir):
+         if not opt_tmp_dir:
+             return self._tmp_dir
++        return opt_tmp_dir
+ 
+     def get_local_name(self):
+         return self.host_name()
diff --git a/sos-No-TTY-should-not-imply-batch-mode.patch b/sos-No-TTY-should-not-imply-batch-mode.patch
new file mode 100644
index 0000000..a0a2879
--- /dev/null
+++ b/sos-No-TTY-should-not-imply-batch-mode.patch
@@ -0,0 +1,54 @@
+From d975e802c6513463cc52efa0cfdfaa2d2de84adf Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Thu, 3 Oct 2013 17:57:42 +0100
+Subject: [PATCH 1/2] No TTY should not imply batch mode
+
+Commit 6ea48cbb introduced an isatty() check on stdin and
+automatically sets batch mode if we're not attached to a TTY.
+
+Although the logic of this seems simple enough the combination of
+this and commit 4b46e04 breaks valid uses that have worked since
+sos-1.x, e.g.:
+
+Traceback (most recent call last):
+  File "/usr/sbin/sosreport", line 23, in <module>
+    main(sys.argv[1:])
+  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1171, in main
+    sos.execute()
+  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1133, in execute
+    self._setup_logging()
+  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 630, in _setup_logging
+    self.opts.batch = True
+  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 324, in batch
+    self._check_options_initialized()
+  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 229, in _check_options_initialized
+    + "from command line")
+ValueError: SoSOptions object already initialized from command line
+
+Given the actual semantics of --batch (do not prompt for or read
+user input from stdin) there is no need to enable it if stdin is
+a pipe or other non-TTY file descriptor.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/sosreport.py | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index 908cbed..88c6730 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -625,10 +625,6 @@ class SoSReport(object):
+             pass
+ 
+     def _setup_logging(self):
+-
+-        if not sys.stdin.isatty():
+-            self.opts.batch = True
+-
+         # main soslog
+         self.soslog = logging.getLogger('sos')
+         self.soslog.setLevel(logging.DEBUG)
+-- 
+1.7.11.7
+
diff --git a/sos-add-distupgrade-plugin.patch b/sos-add-distupgrade-plugin.patch
new file mode 100644
index 0000000..f65a14c
--- /dev/null
+++ b/sos-add-distupgrade-plugin.patch
@@ -0,0 +1,59 @@
+commit 19b479bb0686ff1079300f417505503f8ba8f3d5
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Feb 10 15:27:24 2014 +0000
+
+    Add distupgrade plugin
+    
+    Add a new plugin to collect data relating to completed or
+    attempted distribution upgrades. Currently supports the Red Hat
+    set of tools and files but other distributions can supply their
+    own filelists or override setup() to perform other distribution
+    specific actions.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/distupgrade.py b/sos/plugins/distupgrade.py
+new file mode 100644
+index 0000000..b45d099
+--- /dev/null
++++ b/sos/plugins/distupgrade.py
+@@ -0,0 +1,39 @@
++## Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr at redhat.com>
++
++### This program is free software; you can redistribute it and/or modify
++## it under the terms of the GNU General Public License as published by
++## the Free Software Foundation; either version 2 of the License, or
++## (at your option) any later version.
++
++## This program is distributed in the hope that it will be useful,
++## but WITHOUT ANY WARRANTY; without even the implied warranty of
++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++## GNU General Public License for more details.
++
++## You should have received a copy of the GNU General Public License
++## along with this program; if not, write to the Free Software
++## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++import os
++from sos.plugins import Plugin, RedHatPlugin
++
++class DistUpgrade(Plugin):
++    """ Distribution upgrade data """
++
++    plugin_name = "distupgrade"
++
++    files = None
++
++    def setup(self):
++        self.add_copy_specs(list(self.files))
++
++class RedHatDistUpgrade(DistUpgrade, RedHatPlugin):
++
++    files = (
++        "/var/log/upgrade.log",
++        "/var/log/redhat_update_tool.log",
++        "/root/preupgrade/all-xccdf*",
++        "/root/preupgrade/kickstart"
++    )
++
++
diff --git a/sos-add-file-size-restriction-to-sar.patch b/sos-add-file-size-restriction-to-sar.patch
new file mode 100644
index 0000000..3ded6ea
--- /dev/null
+++ b/sos-add-file-size-restriction-to-sar.patch
@@ -0,0 +1,84 @@
+commit 3aa158a35a4e7fe4d370c254c320455081e3b1cb
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Oct 29 14:43:02 2013 +0000
+
+    Move sar data colletion to sar plug-in
+    
+    Historically the general plug-in collected the content of the
+    /var/log/sa directory while a separate sar plug-in handles the text
+    formatted summary files.
+    
+    This makes little sense and adds to the bloat in the "general"
+    module; move the collection to the sar plug-in itself.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/general.py b/sos/plugins/general.py
+index fbf3991..d7059e6 100644
+--- a/sos/plugins/general.py
++++ b/sos/plugins/general.py
+@@ -28,7 +28,6 @@ class General(Plugin):
+             "/etc/sos.conf",
+             "/etc/sysconfig",
+             "/proc/stat",
+-            "/var/log/sa",
+             "/var/log/pm/suspend.log",
+             "/var/log/up2date",
+             "/etc/hostid",
+diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py
+index c09055c..6c09323 100644
+--- a/sos/plugins/sar.py
++++ b/sos/plugins/sar.py
+@@ -33,6 +33,7 @@ class Sar(Plugin,):
+         return True
+ 
+     def setup(self):
++        self.add_copy_spec("/var/log/sa")
+         dirList = os.listdir(self.sa_path)
+         # find all the sa file that don't have an existing sar file
+         for fname in dirList:
+commit d51a2b5e3c07ddc986c41e1494dabc852d224873
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Oct 29 14:53:53 2013 +0000
+
+    Limit default sar data collection
+    
+    By default the general module will scoop up all files under the
+    /var/log/sa directory. With some configurations this path could
+    contain many GB of data.
+    
+    Use add_copy_spec_limit() by default for sar data and add a new
+    option sar.all_sar=False to allow the user to override this.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py
+index 6c09323..4f89b53 100644
+--- a/sos/plugins/sar.py
++++ b/sos/plugins/sar.py
+@@ -23,6 +23,10 @@ class Sar(Plugin,):
+ 
+     packages = ('sysstat',)
+     sa_path = '/var/log/sa'
++    option_list = [("all_sar", "gather all system activity records", "", False)]
++
++    # size-limit SAR data collected by default (MB)
++    sa_size = 20
+ 
+     def check_enabled(self):
+         # check to see if we are force-enabled with no sar installation
+@@ -33,7 +37,13 @@ class Sar(Plugin,):
+         return True
+ 
+     def setup(self):
+-        self.add_copy_spec("/var/log/sa")
++        if self.get_option("all_sar"):
++            self.sa_size = 0
++
++        self.add_copy_spec_limit("/var/log/sa/sar[0-9]*",
++                                 sizelimit = self.sa_size)
++        self.add_copy_spec_limit("/var/log/sa/sa[0-9]*",
++                                 sizelimit = self.sa_size)
+         dirList = os.listdir(self.sa_path)
+         # find all the sa file that don't have an existing sar file
+         for fname in dirList:
diff --git a/sos-add-krb5-plugin-and-klist.patch b/sos-add-krb5-plugin-and-klist.patch
new file mode 100644
index 0000000..19ea04d
--- /dev/null
+++ b/sos-add-krb5-plugin-and-klist.patch
@@ -0,0 +1,126 @@
+commit c18486621d2df774f270f8bc1dc602d6487681aa
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Thu Aug 1 16:43:43 2013 +0100
+
+    Split kerberos data collection into separate plug-in
+    
+    The krb5 data collection in the samba plug-in is misplaced. Since
+    this is collecting information about the system keytab move it
+    to its own plug-in that can be activated on any kerberos enabled
+    system.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/krb5.py b/sos/plugins/krb5.py
+new file mode 100644
+index 0000000..d9dca89
+--- /dev/null
++++ b/sos/plugins/krb5.py
+@@ -0,0 +1,29 @@
++## Copyright (C) 2013 Red Hat, Inc., Bryn M. Reeves <bmr at redhat.com>
++
++### This program is free software; you can redistribute it and/or modify
++## it under the terms of the GNU General Public License as published by
++## the Free Software Foundation; either version 2 of the License, or
++## (at your option) any later version.
++
++## This program is distributed in the hope that it will be useful,
++## but WITHOUT ANY WARRANTY; without even the implied warranty of
++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++## GNU General Public License for more details.
++
++## You should have received a copy of the GNU General Public License
++## along with this program; if not, write to the Free Software
++## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
++
++class Krb5(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
++    """Kerberos related information
++    """
++    packages = ('krb5-libs', 'krb5-user')
++    plugin_name = 'krb5'
++
++    def setup(self):
++        self.add_copy_specs([
++            "/etc/krb5.conf",
++            "/etc/krb5.keytab"])
++
+diff --git a/sos/plugins/samba.py b/sos/plugins/samba.py
+index f3a44b7..f3dc862 100644
+--- a/sos/plugins/samba.py
++++ b/sos/plugins/samba.py
+@@ -14,9 +14,10 @@
+ 
+ from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+ 
+-class Samba(Plugin):
++class Samba(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+     """Samba related information
+     """
++    packages = ('samba-common',)
+     plugin_name = "samba"
+ 
+     def setup(self):
+@@ -27,19 +28,3 @@ class Samba(Plugin):
+         self.add_cmd_output("wbinfo --domain='.' -u")
+         self.add_cmd_output("testparm -s -v")
+ 
+-
+-class RedHatSamba(Samba, RedHatPlugin):
+-    """Samba related information for RedHat based distributions
+-    """
+-    def setup(self):
+-        super(RedHatSamba, self).setup()
+-        # FIXME: krb5 specific
+-        self.add_copy_specs([
+-            "/etc/krb5.conf",
+-            "/etc/krb5.keytab"])
+-
+-class DebianSamba(Samba, DebianPlugin, UbuntuPlugin):
+-    """Samba related information for Debian based distributions
+-    """
+-    def setup(self):
+-        super(DebianSamba, self).setup()
+commit 54eb134fb78a64782560df8f0aa2f5e51c6ae410
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Thu Aug 1 16:48:19 2013 +0100
+
+    Do not collect krb5.keytab
+    
+    Avoid collecting kerberos keytabs to prevent unintended
+    information disclosures. Instead retrieve a list using the klist
+    command.
+    
+    Also remove the duplicative collection of this information from
+    the ipa plug-in (which should only be collecting non-system
+    keytabs that are specific to the IPA tools).
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/ipa.py b/sos/plugins/ipa.py
+index 3244f34..0061659 100644
+--- a/sos/plugins/ipa.py
++++ b/sos/plugins/ipa.py
+@@ -73,7 +73,6 @@ class Ipa(Plugin, RedHatPlugin):
+ 
+         self.add_cmd_output("klist -ket /etc/dirsrv/ds.keytab")
+         self.add_cmd_output("klist -ket /etc/httpd/conf/ipa.keytab")
+-        self.add_cmd_output("klist -ket /etc/krb5.keytab")
+ 
+         return
+ 
+diff --git a/sos/plugins/krb5.py b/sos/plugins/krb5.py
+index d9dca89..0d33094 100644
+--- a/sos/plugins/krb5.py
++++ b/sos/plugins/krb5.py
+@@ -23,7 +23,6 @@ class Krb5(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+     plugin_name = 'krb5'
+ 
+     def setup(self):
+-        self.add_copy_specs([
+-            "/etc/krb5.conf",
+-            "/etc/krb5.keytab"])
++        self.add_copy_spec("/etc/krb5.conf")
++        self.add_cmd_output("klist -ket /etc/krb5.keytab")
+ 
diff --git a/sos-add-nfs-client-plugin.patch b/sos-add-nfs-client-plugin.patch
new file mode 100644
index 0000000..0b52e36
--- /dev/null
+++ b/sos-add-nfs-client-plugin.patch
@@ -0,0 +1,65 @@
+commit 9259b1ba0b19e4376815b3d77545cfb4f700c6dd
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Fri Nov 8 14:59:56 2013 +0000
+
+    Add simple nfs plug-in
+    
+    There has been an nfsserver plug-in for some time however no
+    corresponding client-side data is collected.
+    
+    This was added to sos-2.2 earlier this year. This commit is a
+    forward port of those changes:
+    
+        commit 71066b4a7d4fd97692b50bf231ad6810df5ec3d0
+        Author: root <root at rhel6-vm2.(none)>
+        Date:   Wed Jul 10 17:11:52 2013 +0100
+    
+            Collect additional nfs-client relevant files
+    
+            Additional NFS client-side data collection:
+    
+                "/etc/nfsmount.conf",
+                "/proc/fs/nfsfs/servers",
+                "/proc/fs/nfsfs/volumes"
+    
+            Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/nfs.py b/sos/plugins/nfs.py
+new file mode 100644
+index 0000000..4acbe38
+--- /dev/null
++++ b/sos/plugins/nfs.py
+@@ -0,0 +1,31 @@
++### This program is free software; you can redistribute it and/or modify
++## it under the terms of the GNU General Public License as published by
++## the Free Software Foundation; either version 2 of the License, or
++## (at your option) any later version.
++
++## This program is distributed in the hope that it will be useful,
++## but WITHOUT ANY WARRANTY; without even the implied warranty of
++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++## GNU General Public License for more details.
++
++## You should have received a copy of the GNU General Public License
++## along with this program; if not, write to the Free Software
++## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
++
++class Nfs(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
++    """NFS related information
++    """
++    plugin_name = 'nfs'
++    packages = ['nfs-utils']
++
++    def setup(self):
++	self.add_copy_specs([
++                "/etc/nfsmount.conf",
++                "/etc/idmapd.conf",
++                "/proc/fs/nfsfs/servers",
++                "/proc/fs/nfsfs/volumes"
++        ])
++        return
++
diff --git a/sos-add-powerpc-plugin.patch b/sos-add-powerpc-plugin.patch
new file mode 100644
index 0000000..8b68bc6
--- /dev/null
+++ b/sos-add-powerpc-plugin.patch
@@ -0,0 +1,97 @@
+commit dac86b921fafecc81fbd492af177d9260cddfe20
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Wed Oct 30 13:57:22 2013 +0000
+
+    This patch defines a new PowerPC Plugin to collect generic Power logs.
+    Based on further platform checks,IBM Power System specific logs and
+    commands will be collected. This would help IBM Power system users to
+    collect system data in one shot by running sosreport.
+    
+    Signed-off-by: Bharani C.V. <bharanve at linux.vnet.ibm.com>
+    Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+    
+    ---
+     sos/plugins/powerpc.py |   73 ++++++++++++++++++++++++++++++++++++++++++++++++
+     1 file changed, 73 insertions(+)
+     create mode 100644 sos/plugins/powerpc.py
+
+diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py
+new file mode 100644
+index 0000000..974baa1
+--- /dev/null
++++ b/sos/plugins/powerpc.py
+@@ -0,0 +1,73 @@
++### This program is free software; you can redistribute it and/or modify
++## it under the terms of the GNU General Public License as published by
++## the Free Software Foundation; either version 2 of the License, or
++## (at your option) any later version.
++
++## This program is distributed in the hope that it will be useful,
++## but WITHOUT ANY WARRANTY; without even the implied warranty of
++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++## GNU General Public License for more details.
++
++## You should have received a copy of the GNU General Public License
++## along with this program; if not, write to the Free Software
++## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++## This plugin enables collection of logs for Power systems and more
++## specific logs for Pseries, PowerNV platforms.
++
++import os
++from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin
++
++class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
++    """IBM Power System related information
++    """
++
++    plugin_name = 'powerpc'
++
++    def check_enabled(self):
++	return (self.policy().get_arch() == "ppc64")
++
++    def setup(self):
++	try:
++		with open('/proc/cpuinfo', 'r') as fp:
++			contents = fp.read()
++			ispSeries = "pSeries" in contents
++			isPowerNV = "PowerNV" in contents
++	except:
++		ispSeries = False
++		isPowerNV = False
++
++	if ispSeries or isPowerNV:
++		self.add_copy_spec("/proc/device-tree/")
++		self.add_copy_spec("/proc/loadavg")
++		self.add_copy_spec("/proc/locks")
++		self.add_copy_spec("/proc/misc")
++		self.add_copy_spec("/proc/swaps")
++		self.add_copy_spec("/proc/version")
++		self.add_copy_spec("/dev/nvram")
++		self.add_copy_spec("/var/log/platform")
++		self.add_cmd_output("ppc64_cpu --smt")
++		self.add_cmd_output("ppc64_cpu --cores-present")
++		self.add_cmd_output("ppc64_cpu --cores-on")
++		self.add_cmd_output("ppc64_cpu --run-mode")
++		self.add_cmd_output("ppc64_cpu --frequency")
++		self.add_cmd_output("ppc64_cpu --dscr")
++
++	if ispSeries:
++		self.add_copy_spec("/proc/ppc64/lparcfg")
++		self.add_copy_spec("/proc/ppc64/eeh")
++		self.add_copy_spec("/proc/ppc64/systemcfg")
++		self.add_cmd_output("lscfg -vp")
++		self.add_cmd_output("lsmcode -A")
++		self.add_cmd_output("lsvpd --debug")
++		self.add_cmd_output("lsvio -des")
++		self.add_cmd_output("servicelog --dump")
++		self.add_cmd_output("servicelog_notify --list")
++		self.add_cmd_output("usysattn")
++		self.add_cmd_output("usysident")
++		self.add_cmd_output("serv_config -l")
++		self.add_cmd_output("bootlist -m both -r")
++		self.add_cmd_output("lparstat -i")
++
++	if isPowerNV:
++		self.add_copy_spec("/proc/ppc64/")
diff --git a/sos-add-rhsm-debug-to-yum.patch b/sos-add-rhsm-debug-to-yum.patch
new file mode 100644
index 0000000..43335a6
--- /dev/null
+++ b/sos-add-rhsm-debug-to-yum.patch
@@ -0,0 +1,21 @@
+commit eaa0d9442972a38635967d855c57bbfbe6ba7023
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Feb 3 13:03:04 2014 +0000
+
+    Add rhsm-debug collection to yum plugin
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py
+index 867302c..a9ae4e4 100644
+--- a/sos/plugins/yum.py
++++ b/sos/plugins/yum.py
+@@ -48,6 +48,8 @@ class Yum(Plugin, RedHatPlugin):
+             "/var/log/rhsm/rhsmcertd.log"])
+         self.add_cmd_output("subscription-manager list --installed")
+         self.add_cmd_output("subscription-manager list --consumed")
++        self.add_cmd_output("rhsm-debug system --destination %s"
++                % self.get_cmd_dir())
+ 
+         if self.get_option("yumlist"):
+             # List various information about available packages
diff --git a/sos-call-rhsm-debug-with-sos.patch b/sos-call-rhsm-debug-with-sos.patch
new file mode 100644
index 0000000..5b221aa
--- /dev/null
+++ b/sos-call-rhsm-debug-with-sos.patch
@@ -0,0 +1,23 @@
+commit 23f9f34afc7f87bf72683909ca947a82b50cad4e
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Thu Mar 20 18:56:58 2014 +0000
+
+    Call rhsm-debug with the --sos switch
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py
+index 81788f1..9953a50 100644
+--- a/sos/plugins/yum.py
++++ b/sos/plugins/yum.py
+@@ -48,8 +48,8 @@ class Yum(Plugin, RedHatPlugin):
+             "/var/log/rhsm/rhsmcertd.log"])
+         self.add_cmd_output("subscription-manager list --installed")
+         self.add_cmd_output("subscription-manager list --consumed")
+-        self.add_cmd_output("rhsm-debug system --no-archive --destination %s"
+-                % self.get_cmd_dir())
++        self.add_cmd_output("rhsm-debug system --sos --no-archive --destination %s"
++                             % self.get_cmd_dir())
+ 
+         if self.get_option("yumlist"):
+             # List various information about available packages
diff --git a/sos-check-for-usable-temporary-directory.patch b/sos-check-for-usable-temporary-directory.patch
new file mode 100644
index 0000000..e91e849
--- /dev/null
+++ b/sos-check-for-usable-temporary-directory.patch
@@ -0,0 +1,29 @@
+commit 0c9eef9d1270b9197a609ac46fdd5837c04a90dd
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Wed Oct 30 12:02:51 2013 +0000
+
+    Check for usable temporary directory
+    
+    A user may override the sos temporary directory via --tmp-dir to
+    a non-existent or unwritable location. Check for this before
+    initialising temporary files and exit with an error message.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index 88c6730..3fb60c7 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -534,6 +534,12 @@ class SoSReport(object):
+         self.policy = sos.policies.load()
+         self._is_root = self.policy.is_root()
+         self.tmpdir = self.policy.get_tmp_dir(self.opts.tmp_dir)
++        if not os.path.isdir(self.tmpdir) \
++        or not os.access(self.tmpdir, os.W_OK):
++            # write directly to stderr as logging is not initialised yet
++            sys.stderr.write("temporary directory %s " % self.tmpdir \
++                        + "does not exist or is not writable\n")
++            self._exit(1)
+         self.tempfile_util = TempFileUtil(self.tmpdir)
+         self._set_directories()
+ 
diff --git a/sos-cluster-collect-crm_report.patch b/sos-cluster-collect-crm_report.patch
new file mode 100644
index 0000000..e9e7fe1
--- /dev/null
+++ b/sos-cluster-collect-crm_report.patch
@@ -0,0 +1,28 @@
+commit 89a479f315302e87267ec17e1b5d8e5f4b6d8a19
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Wed Aug 14 18:36:25 2013 +0100
+
+    Add crm_report support to cluster plug-in
+    
+    Recent cluster stacks using the pacemaker stack include a
+    crm_report script to generate debugging information for the
+    cluster.
+    
+    Call it in single-node mode in the cluster module.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py
+index 0ed3cb4..809f6fd 100644
+--- a/sos/plugins/cluster.py
++++ b/sos/plugins/cluster.py
+@@ -82,6 +82,9 @@ class Cluster(Plugin, RedHatPlugin):
+         self.add_cmd_output("dlm_tool dump")
+         self.add_cmd_output("dlm_tool ls -n")
+         self.add_cmd_output("mkqdisk -L")
++        crm_dest = os.path.join(self.cInfo['cmddir'],
++                                self.name(), 'crm_report')
++        self.collectExtOutput("crm_report -S --dest %s" % crm_dest)
+ 
+     def do_lockdump(self):
+         status, output, time = self.call_ext_prog("dlm_tool ls")
diff --git a/sos-cluster-plugin-add-obfuscation-of-luci-secrets.patch b/sos-cluster-plugin-add-obfuscation-of-luci-secrets.patch
new file mode 100644
index 0000000..49fa317
--- /dev/null
+++ b/sos-cluster-plugin-add-obfuscation-of-luci-secrets.patch
@@ -0,0 +1,28 @@
+commit 08ddb0559f29f3525c3b43bf59cc79467e0f75fb
+Author: Jan Pokorný <jpokorny at redhat.com>
+Date:   Sat Jul 20 09:16:13 2013 +0200
+
+    cluster plugin: restrict data collected for luci
+    
+    Notably, avoid server cert being added.  On the other hand, allow
+    collection of rotated log files for luci.
+    
+    Signed-off-by: Jan Pokorný <jpokorny at redhat.com>
+
+diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py
+index b9fa8b3..50e0e0b 100644
+--- a/sos/plugins/cluster.py
++++ b/sos/plugins/cluster.py
+@@ -46,9 +46,10 @@ class Cluster(Plugin, RedHatPlugin):
+         self.add_copy_spec("/etc/sysconfig/cman")
+         self.add_copy_spec("/etc/fence_virt.conf")
+         self.add_copy_spec("/var/lib/ricci")
+-        self.add_copy_spec("/var/lib/luci")
++        self.add_copy_spec("/var/lib/luci/data/luci.db")
++        self.add_copy_spec("/var/lib/luci/etc")
+         self.add_copy_spec("/var/log/cluster")
+-        self.add_copy_spec("/var/log/luci/luci.log")
++        self.add_copy_spec("/var/log/luci")
+         self.add_copy_spec("/etc/fence_virt.conf")
+ 
+         if self.get_option('gfslockdump'):
diff --git a/sos-collect-proc-self-mountstats.patch b/sos-collect-proc-self-mountstats.patch
new file mode 100644
index 0000000..2098e2c
--- /dev/null
+++ b/sos-collect-proc-self-mountstats.patch
@@ -0,0 +1,21 @@
+commit 78909be8385a74e807b705821296a94cb09cb8ca
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Aug 12 18:33:49 2013 +0100
+
+    Collect /proc/self/mountstats and /proc/self/mountinfo
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/filesys.py b/sos/plugins/filesys.py
+index 0ca3166..b8d6bab 100644
+--- a/sos/plugins/filesys.py
++++ b/sos/plugins/filesys.py
+@@ -31,6 +31,8 @@ class Filesys(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+             "/proc/filesystems",
+             "/etc/fstab",
+             "/proc/self/mounts",
++            "/proc/self/mountinfo",
++            "/proc/self/mountstats",
+             "/proc/mounts"
+         ])
+         self.add_cmd_output("mount -l", root_symlink = "mount")
diff --git a/sos-collect-saved-vmcore-dmesg.patch b/sos-collect-saved-vmcore-dmesg.patch
new file mode 100644
index 0000000..05c82cb
--- /dev/null
+++ b/sos-collect-saved-vmcore-dmesg.patch
@@ -0,0 +1,43 @@
+commit 557a5397304327abe2039229a2bd23bb489ea879
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Aug 13 18:46:47 2013 +0100
+
+    Collect saved vmcore-dmesg.txt files in kdump plug-in
+    
+    Recent versions of kexec-utils automatically generate a text
+    file containing the dmesg buffer of the captured vmcore.
+    
+    This is useful for first-fault debugging and should be included.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/kdump.py b/sos/plugins/kdump.py
+index 73e5d5e..81ce574 100644
+--- a/sos/plugins/kdump.py
++++ b/sos/plugins/kdump.py
+@@ -23,7 +23,7 @@ class KDump(Plugin):
+     def setup(self):
+         self.add_copy_specs([
+             "/proc/cmdline"
+-            ])
++        ])
+ 
+ class RedHatKDump(KDump, RedHatPlugin):
+     """Kdump related information for Red Hat distributions
+@@ -35,7 +35,9 @@ class RedHatKDump(KDump, RedHatPlugin):
+     def setup(self):
+         self.add_copy_specs([
+             "/etc/kdump.conf",
+-            "/etc/udev/rules.d/*kexec.rules"])
++            "/etc/udev/rules.d/*kexec.rules",
++            "/var/crash/*/vmcore-dmesg.txt"
++        ])
+ 
+ class DebianKDump(KDump, DebianPlugin, UbuntuPlugin):
+     """Kdump related information for Debian distributions
+@@ -47,4 +49,4 @@ class DebianKDump(KDump, DebianPlugin, UbuntuPlugin):
+     def setup(self):
+         self.add_copy_specs([
+             "/etc/default/kdump-tools"
+-            ])
++        ])
diff --git a/sos-collect-var-log-squid.patch b/sos-collect-var-log-squid.patch
new file mode 100644
index 0000000..74c155b
--- /dev/null
+++ b/sos-collect-var-log-squid.patch
@@ -0,0 +1,20 @@
+commit 8d45d18afb87dbe7b1d864fabd36c58fad905f82
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Aug 12 20:31:51 2013 +0100
+
+    Collect /var/log/squid in squid plug-in
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/squid.py b/sos/plugins/squid.py
+index 254a1be..4f6310f 100644
+--- a/sos/plugins/squid.py
++++ b/sos/plugins/squid.py
+@@ -25,5 +25,6 @@ class Squid(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+     packages = ('squid',)
+ 
+     def setup(self):
+-        self.add_copy_spec_limit("/etc/squid/squid.conf",
++        self.add_copy_spec("/etc/squid/squid.conf")
++        self.add_copy_spec_limit("/var/log/squid",
+                         sizelimit=self.get_option('logsize'))
diff --git a/sos-correct-log-and-message-levels.patch b/sos-correct-log-and-message-levels.patch
new file mode 100644
index 0000000..fb1ac2f
--- /dev/null
+++ b/sos-correct-log-and-message-levels.patch
@@ -0,0 +1,87 @@
+commit c8ea3f5e17e48c577d8f6dde6ac0b782b72f98d6
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Nov 18 12:52:40 2013 +0000
+
+    Change default console log level to WARNING to match sos-2.2
+    
+    Commit 6ea48cb changed the default log level for console output
+    from WARNING to ERROR and reclassified several messages.
+    
+    This causes plug-in validation messages to be silent at the
+    default verbosity.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index 4ea5f95..595015f 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -669,7 +669,7 @@ class SoSReport(object):
+             elif self.opts.verbosity > 0:
+                 console.setLevel(logging.INFO)
+             else:
+-                console.setLevel(logging.ERROR)
++                console.setLevel(logging.WARNING)
+             self.soslog.addHandler(console)
+ 
+         # ui log
+commit c2ab28f7fb159f149314a83f2493739f2d2aa88b
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Nov 18 13:02:19 2013 +0000
+
+    Reclasify 'error' messages as 'warning'
+    
+    Several log messages used the 'error' level when reporting an
+    event that is not necessarily an error (and does not prevent sos
+    from continuing).
+    
+    Reclassify these to the 'warning' log level instead.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py
+index 1afe9df..f96fe6c 100644
+--- a/sos/plugins/kernel.py
++++ b/sos/plugins/kernel.py
+@@ -32,7 +32,7 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+             modules = os.listdir(self.sys_module)
+             self.add_cmd_output("modinfo " + " ".join(modules))
+         except OSError:
+-            self.soslog.error("could not list %s" % self.sys_module)
++            self.soslog.warning("could not list %s" % self.sys_module)
+ 
+         self.add_cmd_output("dmesg")
+         self.add_cmd_output("sysctl -a")
+diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py
+index 570262a..1086208 100644
+--- a/sos/plugins/sar.py
++++ b/sos/plugins/sar.py
+@@ -47,7 +47,7 @@ class Sar(Plugin,):
+         try:
+             dirList = os.listdir(self.sa_path)
+         except:
+-            self.soslog.error("sar: could not list /var/log/sa")
++            self.soslog.warning("sar: could not list /var/log/sa")
+             return
+         # find all the sa file that don't have an existing sar file
+         for fname in dirList:
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index 595015f..1c81af9 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -772,13 +772,13 @@ class SoSReport(object):
+ 
+                 for plugin_class in plugin_classes:
+                     if not self.policy.validatePlugin(plugin_class):
+-                        self.soslog.debug(_("plugin %s does not validate, skipping") % plug)
++                        self.soslog.warning(_("plugin %s does not validate, skipping") % plug)
+                         if self.opts.verbosity > 0:
+                             self._skip(plugin_class, _("does not validate"))
+                         continue
+ 
+                     if plugin_class.requires_root and not self._is_root:
+-                        self.soslog.debug(_("plugin %s requires root permissions to execute, skipping") % plug)
++                        self.soslog.info(_("plugin %s requires root permissions to execute, skipping") % plug)
+                         self._skip(plugin_class, _("requires root"))
+                         continue
+ 
diff --git a/sos-do-not-attempt-to-read-use-gss-proxy.patch b/sos-do-not-attempt-to-read-use-gss-proxy.patch
new file mode 100644
index 0000000..40a89a8
--- /dev/null
+++ b/sos-do-not-attempt-to-read-use-gss-proxy.patch
@@ -0,0 +1,35 @@
+commit 36140249bcab17d1a3a69467208ca25af85a75f1
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Wed Aug 14 15:59:45 2013 +0100
+
+    Do not attempt to read use-gss-proxy file in procfs
+    
+    The networking plug-in scoops up /proc/net. There are some pseudo-
+    files in here that we should avoid touching. These either have
+    side-effects or hang the reading process.
+    
+    Add a forbidden path for the /proc/net/rpc/*/{channel,flush}
+    files as these will cause side-effects for RPC applications
+    running on the host.
+    
+    Forward port of commit 61585d4 on rhel-6 branch.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+    
+    Conflicts:
+    	sos/plugins/networking.py
+
+diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py
+index 90b740c..90e1b58 100644
+--- a/sos/plugins/networking.py
++++ b/sos/plugins/networking.py
+@@ -80,6 +80,9 @@ class Networking(Plugin):
+             "/etc/NetworkManager/NetworkManager.conf",
+             "/etc/NetworkManager/system-connections",
+             "/etc/dnsmasq*"])
++        self.add_forbidden_path("/proc/net/rpc/use-gss-proxy")
++        self.add_forbidden_path("/proc/net/rpc/*/channel")
++        self.add_forbidden_path("/proc/net/rpc/*/flush")
+ 
+         ip_addr_file=self.get_cmd_output_now("ip -o addr", root_symlink = "ip_addr")
+         ip_addr_out=self.call_ext_prog("ip -o addr")
diff --git a/sos-fix-alloptions.patch b/sos-fix-alloptions.patch
new file mode 100644
index 0000000..1f4b963
--- /dev/null
+++ b/sos-fix-alloptions.patch
@@ -0,0 +1,35 @@
+commit d1bedc1ef48f6abe6f582336e275468a1e3634b9
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Wed Oct 30 12:22:03 2013 +0000
+
+    Fix --alloptions
+    
+    During the re-organisation of sosreport.py the code to apply all
+    boolean options to plug-ins was factored out into its own
+    function, _set_all_options() however this was never called from
+    the main execute() method. Fix this to allow the option to work
+    as previously.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index 3fb60c7..1b13826 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -290,7 +290,7 @@ class SoSOptions(object):
+     @property
+     def usealloptions(self):
+         if self._options != None:
+-            return _options.usealloptions
++            return self._options.usealloptions
+         return self._usealloptions
+ 
+     @usealloptions.setter
+@@ -1136,6 +1136,7 @@ class SoSReport(object):
+             self.policy.set_commons(self.get_commons())
+             self.print_header()
+             self.load_plugins()
++            self._set_all_options()
+             self._set_tunables()
+             self._check_for_unknown_plugins()
+             self._set_plugin_options()
diff --git a/sos-fix-anacron-checks.patch b/sos-fix-anacron-checks.patch
new file mode 100644
index 0000000..f76b94d
--- /dev/null
+++ b/sos-fix-anacron-checks.patch
@@ -0,0 +1,28 @@
+commit 4b20ae8823032918df1f1aee1c2b649d8c316f35
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Mar 3 13:56:23 2014 +0000
+
+    Replace package check with file check in anacron
+    
+    The anacron facility may be provided by packages named 'anacron',
+    'chronie-anacron' etc. They all use a common /etc/anacrontab file
+    so check for this instead.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/anacron.py b/sos/plugins/anacron.py
+index 04b0dcb..b337c18 100644
+--- a/sos/plugins/anacron.py
++++ b/sos/plugins/anacron.py
+@@ -20,7 +20,9 @@ class Anacron(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+ 
+     plugin_name = 'anacron'
+ 
+-    packages = ('anacron',)
++    # anacron may be provided by anacron, cronie-anacron etc.
++    # just look for the configuration file which is common
++    files = ('/etc/anacrontab',)
+ 
+     def setup(self):
+-        self.add_copy_spec("/etc/anacrontab")
++        self.add_copy_specs(list(self.files))
diff --git a/sos-fix-cluster-crm_report.patch b/sos-fix-cluster-crm_report.patch
new file mode 100644
index 0000000..dea4055
--- /dev/null
+++ b/sos-fix-cluster-crm_report.patch
@@ -0,0 +1,72 @@
+From 186b3317b1e8562bbbd7dddd191b8ab73d664d5c Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Fri, 31 Jan 2014 15:08:28 +0000
+Subject: [PATCH] Fix cluster module crm_report support
+
+The cluster plugin used an obsolete sos-2.2 method to determine
+the command output directory. This causes an excaption at runtime
+since the referenced properties no longer exist.
+
+The crm_report script also expects a --from date and will not
+collect data unless this is passed. Default to passing a value 72
+hours before the current time and add a 'crm_from' option to the
+cluster module to allow the user to override this.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/cluster.py | 27 +++++++++++++++++++--------
+ 1 file changed, 19 insertions(+), 8 deletions(-)
+
+diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py
+index 50e0e0b..c2ce42b 100644
+--- a/sos/plugins/cluster.py
++++ b/sos/plugins/cluster.py
+@@ -13,16 +13,17 @@
+ ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ 
+ from sos.plugins import Plugin, RedHatPlugin
+-import re
++import re, os
+ from glob import glob
++from datetime import datetime, timedelta
+ 
+ class Cluster(Plugin, RedHatPlugin):
+     """cluster suite and GFS related information
+     """
+ 
+     plugin_name = 'cluster'
+-    option_list = [("gfslockdump",
+-                    'gather output of gfs lockdumps', 'slow', False),
++    option_list = [("gfslockdump", 'gather output of gfs lockdumps', 'slow', False),
++                    ("crm_from", 'specify the --from parameter passed to crm_report', 'fast', False),
+                     ('lockdump', 'gather dlm lockdumps', 'slow', False)]
+ 
+     packages = [
+@@ -83,9 +84,21 @@ class Cluster(Plugin, RedHatPlugin):
+         self.add_cmd_output("dlm_tool dump")
+         self.add_cmd_output("dlm_tool ls -n")
+         self.add_cmd_output("mkqdisk -L")
+-        crm_dest = os.path.join(self.cInfo['cmddir'],
+-                                self.name(), 'crm_report')
+-        self.collectExtOutput("crm_report -S --dest %s" % crm_dest)
++        # crm_report needs to be given a --from "YYYY-MM-DD HH:MM:SS" start
++        # time in order to collect data.
++        crm_from = (datetime.today()
++                    - timedelta(hours=72)).strftime("%Y-%m-%d %H:%m:%S")
++        if self.get_option('crm_from') != False:
++            if re.match(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}',
++                        str(self.getOption('crm_from'))):
++                crm_from = self.getOption('crm_from')
++            else:
++                self.soslog.error("crm_from parameter '%s' is not a valid date"
++                            % self.getOption('crm_from'))
++
++        crm_dest = os.path.join(self.get_cmd_dir(), 'crm_report')
++        self.add_cmd_output('crm_report -S -d --dest %s --from "%s"'
++                    % (crm_dest, crm_from))
+ 
+     def do_lockdump(self):
+         status, output, time = self.call_ext_prog("dlm_tool ls")
+-- 
+1.7.11.7
+
diff --git a/sos-fix-cluster-get_option-use.patch b/sos-fix-cluster-get_option-use.patch
new file mode 100644
index 0000000..a8412c7
--- /dev/null
+++ b/sos-fix-cluster-get_option-use.patch
@@ -0,0 +1,32 @@
+From 50c2821c6211a06ee356d4d8d2f0e7573e1a8159 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Mon, 3 Feb 2014 11:48:46 +0000
+Subject: [PATCH] Fix get_option() use in cluster plugin
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/cluster.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py
+index 0fc4ded..eeacdab 100644
+--- a/sos/plugins/cluster.py
++++ b/sos/plugins/cluster.py
+@@ -90,11 +90,11 @@ class Cluster(Plugin, RedHatPlugin):
+                     - timedelta(hours=72)).strftime("%Y-%m-%d %H:%m:%S")
+         if self.get_option('crm_from') != False:
+             if re.match(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}',
+-                        str(self.getOption('crm_from'))):
+-                crm_from = self.getOption('crm_from')
++                        str(self.get_option('crm_from'))):
++                crm_from = self.get_option('crm_from')
+             else:
+                 self.soslog.error("crm_from parameter '%s' is not a valid date"
+-                            % self.getOption('crm_from'))
++                            % self.get_option('crm_from'))
+ 
+         crm_dest = os.path.join(self.get_cmd_dir(), 'crm_report')
+         self.add_cmd_output('crm_report -S -d --dest %s --from "%s"'
+-- 
+1.7.11.7
+
diff --git a/sos-fix-command-output-substitution-exception.patch b/sos-fix-command-output-substitution-exception.patch
new file mode 100644
index 0000000..0daf875
--- /dev/null
+++ b/sos-fix-command-output-substitution-exception.patch
@@ -0,0 +1,141 @@
+From c6e2ab3f1e941ececc7a461fd46a1a40041ad2b5 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Sun, 6 Oct 2013 15:01:23 +0100
+Subject: [PATCH 1/3] Fix exception in command output substitution
+
+If an attempt is made to apply command output substitution via
+Plugin.do_cmd_output_sub() and no output has been collected (i.e.
+called['file'] == None) an exception is thrown by os.path.join().
+
+The exception is also not logged properly due to an attempt in
+the do_cmd_output_sub() exception handler to access an unbound
+local variable (path - the exception occurs before it is
+assigned).
+
+Fix both of these by checking for an empty file entry and avoiding
+access to the path variable from the exception handler.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/__init__.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
+index 4a72161..fc3a851 100644
+--- a/sos/plugins/__init__.py
++++ b/sos/plugins/__init__.py
+@@ -180,6 +180,9 @@ class Plugin(object):
+ 
+         try:
+             for called in self.executed_commands:
++                # was anything collected?
++                if called['file'] == None:
++                    continue
+                 if fnmatch.fnmatch(called['exe'], globstr):
+                     path = os.path.join(self.commons['cmddir'], called['file'])
+                     self.soslog.debug("applying substitution to %s" % path)
+@@ -192,7 +195,7 @@ class Plugin(object):
+                         replacements = 0
+         except Exception, e:
+             msg = 'regex substitution failed for %s in plugin %s with: "%s"'
+-            self.soslog.error(msg % (path, self.name(), e))
++            self.soslog.error(msg % (called['exe'], self.name(), e))
+             replacements = 0
+         if self.commons['cmdlineopts'].profiler:
+             time_passed = time() - start_time
+-- 
+1.7.11.7
+
+
+From dafcbf33022ee2be24109c6c90bae97a1a4a2077 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Tue, 11 Feb 2014 16:53:16 +0000
+Subject: [PATCH 2/3] Fix command output substitution exception
+
+If a comand has a substitution registered via do_cmd_output_sub()
+but no data was collected (e.g. command not found) the postproc
+code will throw an exception as the return value ('replacements')
+is never assigned.
+
+Initialise replacements to None before scanning the list of run
+commands and return this if no substitutions were made.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+Conflicts:
+	sos/plugins/__init__.py
+---
+ sos/plugins/__init__.py | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
+index fc3a851..2bf8d98 100644
+--- a/sos/plugins/__init__.py
++++ b/sos/plugins/__init__.py
+@@ -178,6 +178,7 @@ class Plugin(object):
+         if not self.executed_commands:
+             return 0
+ 
++        replacements = None
+         try:
+             for called in self.executed_commands:
+                 # was anything collected?
+@@ -191,12 +192,12 @@ class Plugin(object):
+                             regexp, subst, readable.read())
+                     if replacements:
+                         self.archive.add_string(result, path)
+-                    else:
+-                        replacements = 0
+-        except Exception, e:
++
++        except Exception as e:
+             msg = 'regex substitution failed for %s in plugin %s with: "%s"'
+             self.soslog.error(msg % (called['exe'], self.name(), e))
+-            replacements = 0
++            replacements = None
++
+         if self.commons['cmdlineopts'].profiler:
+             time_passed = time() - start_time
+             self.proflog.debug("subst: %-75s time: %f"
+-- 
+1.7.11.7
+
+
+From 59e7695c52ef77b9045e0f1737672728e6b0275a Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Tue, 11 Feb 2014 16:56:37 +0000
+Subject: [PATCH 3/3] Improve error message when cluster.crm_from is invalid
+
+If a user passes a non-date string value as the crm_from parameter
+of the cluster plugin an error message is logged:
+
+  crm_from parameter 'True' is not a valid date
+
+The plugin continues to run and uses the default value (T-72hrs)
+as the value of crm_from. Make this clear in the message displayed
+to users:
+
+  crm_from parameter 'True' is not a valid date: using default
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/cluster.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py
+index eeacdab..8d73dc1 100644
+--- a/sos/plugins/cluster.py
++++ b/sos/plugins/cluster.py
+@@ -93,7 +93,8 @@ class Cluster(Plugin, RedHatPlugin):
+                         str(self.get_option('crm_from'))):
+                 crm_from = self.get_option('crm_from')
+             else:
+-                self.soslog.error("crm_from parameter '%s' is not a valid date"
++                self.soslog.error(
++                    "crm_from parameter '%s' is not a valid date: using default"
+                             % self.get_option('crm_from'))
+ 
+         crm_dest = os.path.join(self.get_cmd_dir(), 'crm_report')
+-- 
+1.7.11.7
+
diff --git a/sos-fix-config-file-regression.patch b/sos-fix-config-file-regression.patch
new file mode 100644
index 0000000..1952406
--- /dev/null
+++ b/sos-fix-config-file-regression.patch
@@ -0,0 +1,51 @@
+commit ef485ea1d610a0679f86b39e39e7955f00b4351d
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Wed Oct 30 15:05:56 2013 +0000
+
+    Fix config file regression
+    
+    Changes in the organisation of sos in commit 6ea48cb broke the
+    reading of custom configuration files (either the default
+    /etc/sos.conf or one specified on the command line using
+    --config-file):
+    
+    Traceback (most recent call last):
+      File "/usr/sbin/sosreport", line 23, in <module>
+        main(sys.argv[1:])
+      File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1167, in main
+        sos.execute()
+      File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1133, in execute
+        self._set_tunables()
+      File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 798, in _set_tunables
+        if not opt.split('.')[0] in self.disabled:
+    AttributeError: 'SoSReport' object has no attribute 'disabled'
+    
+    The code attempts to reference the obsolete 'disabled' list of
+    plug-ins (rather than calling self._get_disabled_plugins()) and
+    failed to initialise the plugopts list to an empty deque.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index 1b13826..afe61f2 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -465,7 +465,8 @@ class SoSOptions(object):
+                              help="enable these plugins only", default = deque())
+         parser.add_option("-k", "--plugin-option", action="append",
+                              dest="plugopts", type="string",
+-                             help="plugin options in plugname.option=value format (see -l)")
++                             help="plugin options in plugname.option=value format (see -l)",
++                             default = deque())
+         parser.add_option("-a", "--alloptions", action="store_true",
+                              dest="usealloptions", default=False,
+                              help="enable all options for loaded plugins")
+@@ -801,7 +802,7 @@ class SoSReport(object):
+                 self.opts.plugopts = deque()
+ 
+             for opt, val in self.config.items("tunables"):
+-                if not opt.split('.')[0] in self.disabled:
++                if not opt.split('.')[0] in self._get_disabled_plugins():
+                     self.opts.plugopts.append(opt + "=" + val)
+         if self.opts.plugopts:
+             opts = {}
diff --git a/sos-fix-dash-dash-build-regressions.patch b/sos-fix-dash-dash-build-regressions.patch
new file mode 100644
index 0000000..b7a7d45
--- /dev/null
+++ b/sos-fix-dash-dash-build-regressions.patch
@@ -0,0 +1,98 @@
+diff -up sos-3.0/sos/plugins/__init__.py.orig sos-3.0/sos/plugins/__init__.py
+diff -up sos-3.0/sos/policies/__init__.py.orig sos-3.0/sos/policies/__init__.py
+--- sos-3.0/sos/policies/__init__.py.orig	2013-11-14 15:24:08.058501213 +0000
++++ sos-3.0/sos/policies/__init__.py	2013-11-14 15:24:37.410610397 +0000
+@@ -252,26 +252,32 @@ No changes will be made to system config
+         to use"""
+         return "md5"
+ 
+-    def display_results(self, final_filename=None):
++    def display_results(self, final_filename=None, build=False):
+ 
+         # make sure a report exists
+         if not final_filename:
+            return False
+ 
+-        # store checksum into file
+-        fp = open(final_filename + "." + get_hash_name(), "w")
+-        checksum = self._create_checksum(final_filename)
+-        if checksum:
+-            fp.write(checksum + "\n")
+-        fp.close()
+-
+         self._print()
+-        self._print(_("Your sosreport has been generated and saved in:\n  %s") % final_filename)
++
++        if not build:
++            # store checksum into file
++            fp = open(final_filename + "." + get_hash_name(), "w")
++            checksum = self._create_checksum(final_filename)
++            if checksum:
++                fp.write(checksum + "\n")
++            fp.close()
++
++            self._print(_("Your sosreport has been generated and saved in:\n  %s") % final_filename)
++        else:
++            checksum = None
++            self._print(_("sosreport build tree is located at : %s" % final_filename))
++
+         self._print()
+         if checksum:
+             self._print(_("The checksum is: ") + checksum)
+             self._print()
+-        self._print(_("Please send this file to your support representative."))
++            self._print(_("Please send this file to your support representative."))
+         self._print()
+ 
+     def upload_results(self, final_filename):
+diff -up sos-3.0/sos/sosreport.py.orig sos-3.0/sos/sosreport.py
+--- sos-3.0/sos/sosreport.py.orig	2013-11-14 15:23:59.718470188 +0000
++++ sos-3.0/sos/sosreport.py	2013-11-14 15:26:54.935121843 +0000
+@@ -204,6 +204,7 @@ class SoSOptions(object):
+     _usealloptions = False
+     _upload = False
+     _batch = False
++    _build = False
+     _verbosity = 0
+     _quiet = False
+     _debug = False
+@@ -1111,11 +1112,12 @@ class SoSReport(object):
+                     raise
+ 
+     def final_work(self):
+-
++        # this must come before archive creation to ensure that log
++        # files are closed and cleaned up at exit.
++        self._finish_logging()
+         # package up the results for the support organization
+         if not self.opts.build:
+-            self.ui_log.info(_("Creating compressed archive..."))
+-
++            print _("Creating compressed archive...")
+             # compression could fail for a number of reasons
+             try:
+                 final_filename = self.archive.finalize(self.opts.compression_type)
+@@ -1125,17 +1127,14 @@ class SoSReport(object):
+                 else:
+                     return False
+ 
+-            # automated submission will go here
+-            if not self.opts.upload:
+-                self.policy.display_results(final_filename)
+-            else:
+-                self.policy.upload_results(final_filename)
+-
+         else:
+-            self.ui_log.info(_("\n  sosreport build tree is located at : %s\n"
+-                            % self.archive.get_archive_path()))
++            final_filename = self.archive.get_archive_path()
+ 
+-        self._finish_logging()
++        # automated submission will go here
++        if not self.opts.upload:
++            self.policy.display_results(final_filename, build = self.opts.build)
++        else:
++            self.policy.upload_results(final_filename)
+ 
+         self.tempfile_util.clean()
+ 
diff --git a/sos-fix-fd-leaks-on-popen.patch b/sos-fix-fd-leaks-on-popen.patch
new file mode 100644
index 0000000..232a181
--- /dev/null
+++ b/sos-fix-fd-leaks-on-popen.patch
@@ -0,0 +1,74 @@
+commit 4f7231a897fb65aaf6ec7f079784ff9d3da44266
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Feb 4 11:37:15 2014 +0000
+
+    Ensure unused fds are closed when calling subprocesses via Popen
+    
+    When sos communicates with a child process using Popen all IO
+    takes place on stdin/stdout/stderr (or a subset). No other open
+    file descriptors should be inherited by the child.
+    
+    Make all calls to Popen set close_fds=True.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/archive.py b/sos/archive.py
+index 28bf197..67270db 100644
+--- a/sos/archive.py
++++ b/sos/archive.py
+@@ -250,8 +250,12 @@ class TarFileArchive(FileCacheArchive):
+             if cmd != "gzip":
+                 cmd = "%s -1" % cmd
+             try:
+-                command = shlex.split("%s %s" % (cmd,self.name()))
+-                p = Popen(command, stdout=PIPE, stderr=PIPE, bufsize=-1)
++                command = shlex.split("%s %s" % (cmd, self.name()))
++                p = Popen(command,
++                          stdout=PIPE,
++                          stderr=PIPE,
++                          bufsize=-1,
++                          close_fds=True)
+                 stdout, stderr = p.communicate()
+                 if stdout:
+                     log.info(stdout)
+diff --git a/sos/plugins/emc.py b/sos/plugins/emc.py
+index 89d0734..f73bccd 100644
+--- a/sos/plugins/emc.py
++++ b/sos/plugins/emc.py
+@@ -196,7 +196,8 @@ class Emc(Plugin, RedHatPlugin):
+             while CLARiiON_IP_loop == "stay_in":
+                 ans = raw_input("CLARiiON SP IP Address or [Enter] to exit: ")
+                 ## Check to make sure the CLARiiON SP IP address provided is valid
+-                p = Popen("navicli -h %s getsptime" % (ans,), shell=True, stdout=PIPE, stderr=PIPE)
++                p = Popen("navicli -h %s getsptime" % (ans,),
++                            shell=True, stdout=PIPE, stderr=PIPE, close_fds=True)
+                 out, err = p.communicate()
+                 if p.returncode == 0:
+                     CLARiiON_IP_address_list.append(ans)
+diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
+index 5b3a446..4e5b363 100644
+--- a/sos/policies/redhat.py
++++ b/sos/policies/redhat.py
+@@ -68,7 +68,8 @@ class RedHatPolicy(LinuxPolicy):
+                   shell=True,
+                   stdout=PIPE,
+                   stderr=PIPE,
+-                  bufsize=-1)
++                  bufsize=-1,
++                  close_fds=True)
+         out, err = p.communicate()
+         if err:
+             return ret
+diff --git a/sos/utilities.py b/sos/utilities.py
+index fcc78c5..f1728fd 100644
+--- a/sos/utilities.py
++++ b/sos/utilities.py
+@@ -159,7 +159,7 @@ def sos_get_command_output(command, timeout=300):
+ 
+         p = Popen(command, shell=True,
+                 stdout=PIPE, stderr=STDOUT,
+-                bufsize=-1, env = cmd_env)
++                bufsize=-1, env = cmd_env, close_fds = True)
+         stdout, stderr = p.communicate()
+         return (p.returncode, stdout, 0)
+     else:
diff --git a/sos-fix-gluster-volume-name-extraction.patch b/sos-fix-gluster-volume-name-extraction.patch
new file mode 100644
index 0000000..288f8e0
--- /dev/null
+++ b/sos-fix-gluster-volume-name-extraction.patch
@@ -0,0 +1,26 @@
+commit 8447dec1831feb4d93bf8d300880f87765efb1c8
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Feb 10 15:07:36 2014 +0000
+
+    Fix gluster volume name extraction
+    
+    The get_volume_names() function in the gluster plugin tries to
+    extract volume names from the output of the "gluster volume info"
+    command using a slice range. The range start should be 12 to
+    account for the "Volume Name:" label at the start of the line.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py
+index 02dbac3..4286b59 100644
+--- a/sos/plugins/gluster.py
++++ b/sos/plugins/gluster.py
+@@ -39,7 +39,7 @@ class Gluster(Plugin, RedHatPlugin):
+         for line in fp.readlines():
+             if not line.startswith("Volume Name:"):
+                 continue
+-            volname = line[14:-1]
++            volname = line[12:-1]
+             out.append(volname)
+         fp.close()
+         return out
diff --git a/sos-fix-ldap-postproc.patch b/sos-fix-ldap-postproc.patch
new file mode 100644
index 0000000..4afb202
--- /dev/null
+++ b/sos-fix-ldap-postproc.patch
@@ -0,0 +1,187 @@
+From 2fd64785d330f6ff8090b9b01f15b7f75ab57e41 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Tue, 13 Aug 2013 14:54:20 +0100
+Subject: [PATCH 1/4] Improve readability of add_copy_specs() usage in ldap.py
+
+Use multi-line style for add_copy_specs() invocations in the ldap
+plug-in per the recommendations in Issue #173.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/ldap.py | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py
+index b16b7b3..4d33076 100644
+--- a/sos/plugins/ldap.py
++++ b/sos/plugins/ldap.py
+@@ -1,4 +1,4 @@
+-### This program is free software; you can redistribute it and/or modify
++## This program is free software; you can redistribute it and/or modify
+ ## it under the terms of the GNU General Public License as published by
+ ## the Free Software Foundation; either version 2 of the License, or
+ ## (at your option) any later version.
+@@ -49,7 +49,10 @@ class RedHatLdap(Ldap, RedHatPlugin):
+ 
+     def setup(self):
+         super(RedHatLdap, self).setup()
+-        self.add_copy_specs(["/etc/openldap", "/etc/nslcd.conf"])
++        self.add_copy_specs([
++                "/etc/openldap",
++                "/etc/nslcd.conf"
++        ])
+ 
+     def postproc(self):
+         self.do_file_sub("/etc/nslcd.conf", r"(\s*bindpw\s*)\S+", r"\1***")
+@@ -66,7 +69,11 @@ class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin):
+ 
+         ldap_search = "ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// "
+ 
+-        self.add_copy_specs(["/etc/ldap/ldap.conf", "/etc/slapd.conf", "/etc/ldap/slapd.d"])
++        self.add_copy_specs([
++            "/etc/ldap/ldap.conf",
++            "/etc/slapd.conf",
++            "/etc/ldap/slapd.d"
++        ])
+ 
+         self.add_cmd_output("ldapsearch -x -b '' -s base 'objectclass=*'")
+         self.add_cmd_output(ldap_search + "-b cn=config '(!(objectClass=olcSchemaConfig))'",
+-- 
+1.7.11.7
+
+
+From a4a686eb589f0d54bc3808ce57c792356aa36106 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Tue, 13 Aug 2013 15:19:02 +0100
+Subject: [PATCH 2/4] Add pam_ldap.conf collection to ldap plug-in
+
+Add the pam_ldap.conf file to the data collected by the ldap
+plug-in and tidy up substitution strings for this plug-in.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/ldap.py | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py
+index 4d33076..361de73 100644
+--- a/sos/plugins/ldap.py
++++ b/sos/plugins/ldap.py
+@@ -39,23 +39,28 @@ class Ldap(Plugin):
+         self.add_copy_spec("/etc/ldap.conf")
+ 
+     def postproc(self):
+-        self.do_file_sub("/etc/ldap.conf", r"(\s*bindpw\s*)\S+", r"\1***")
++        self.do_file_sub("/etc/ldap.conf", r"(\s*bindpw\s*)\S+", r"\1******")
+ 
+ class RedHatLdap(Ldap, RedHatPlugin):
+     """LDAP related information for RedHat based distribution
+     """
+ 
+     packages = ('openldap', 'nss-pam-ldapd')
++    files = ('/etc/ldap.conf', '/etc/pam_ldap.conf')
+ 
+     def setup(self):
+         super(RedHatLdap, self).setup()
+         self.add_copy_specs([
+                 "/etc/openldap",
+-                "/etc/nslcd.conf"
++                "/etc/nslcd.conf",
++                "/etc/pam_ldap.conf"
+         ])
+ 
+     def postproc(self):
+-        self.do_file_sub("/etc/nslcd.conf", r"(\s*bindpw\s*)\S+", r"\1***")
++        self.do_file_sub("/etc/nslcd.conf",
++                        r"(\s*bindpw\s*)\S+", r"\1********")
++        self.do_file_sub("/etc/pam_ldap.conf",
++                        r"(\s*bindpw\s*)\S+", r"\1********")
+ 
+ class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin):
+     """LDAP related information for Debian based distribution
+@@ -86,4 +91,4 @@ class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin):
+     def postproc(self):
+         self.do_cmd_output_sub(
+         "ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(!(objectClass=olcSchemaConfig))'",
+-            r"(olcRootPW\: \s*)\S+", r"\1***")
++            r"(olcRootPW\: \s*)\S+", r"\1********")
+-- 
+1.7.11.7
+
+
+From cfb53a07ba72a311d2962e0bd73cf74430a4cad8 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Fri, 31 Jan 2014 15:25:15 +0000
+Subject: [PATCH 3/4] Remove obsolete diagnostics code from ldap plugin
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/ldap.py | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py
+index 361de73..f1032a9 100644
+--- a/sos/plugins/ldap.py
++++ b/sos/plugins/ldap.py
+@@ -22,18 +22,6 @@ class Ldap(Plugin):
+     plugin_name = "ldap"
+     ldap_conf = "/etc/openldap/ldap.conf"
+ 
+-    def get_ldap_opts(self):
+-        # capture /etc/openldap/ldap.conf options in dict
+-        # FIXME: possibly not hardcode these options in?
+-        ldapopts=["URI","BASE","TLS_CACERTDIR"]
+-        results={}
+-        tmplist=[]
+-        for i in ldapopts:
+-            t=self.do_regex_find_all(r"^(%s)\s+(.*)" % i,self.ldap_conf)
+-            for x in t:
+-                results[x[0]]=x[1].rstrip("\n")
+-        return results
+-
+     def setup(self):
+         super(Ldap, self).setup()
+         self.add_copy_spec("/etc/ldap.conf")
+-- 
+1.7.11.7
+
+
+From e1a30a6d63a376d892a10d9cec89b312356ba9c2 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Fri, 31 Jan 2014 15:43:44 +0000
+Subject: [PATCH 4/4] Ensure superclass postproc method is called in ldap
+ plugin
+
+Since the ldap plugins add files and post-processing methods at
+multiple class levels (Ldap, RedHatLdap etc.) derived classes
+must explicitly call their parent class's postproc() method to
+apply all substitutions to collected data.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/ldap.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py
+index f1032a9..79d8394 100644
+--- a/sos/plugins/ldap.py
++++ b/sos/plugins/ldap.py
+@@ -45,6 +45,7 @@ class RedHatLdap(Ldap, RedHatPlugin):
+         ])
+ 
+     def postproc(self):
++        super(RedHatLdap, self).postproc()
+         self.do_file_sub("/etc/nslcd.conf",
+                         r"(\s*bindpw\s*)\S+", r"\1********")
+         self.do_file_sub("/etc/pam_ldap.conf",
+@@ -77,6 +78,7 @@ class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin):
+             suggest_filename="access_control_lists")
+ 
+     def postproc(self):
++        super(RedHatLdap, self).postproc()
+         self.do_cmd_output_sub(
+         "ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(!(objectClass=olcSchemaConfig))'",
+             r"(olcRootPW\: \s*)\S+", r"\1********")
+-- 
+1.7.11.7
+
diff --git a/sos-fix-multiple-plugin-opts.patch b/sos-fix-multiple-plugin-opts.patch
new file mode 100644
index 0000000..9644c35
--- /dev/null
+++ b/sos-fix-multiple-plugin-opts.patch
@@ -0,0 +1,35 @@
+commit b98878d0843b8da9c1c963dc855889ec104bb5df
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Nov 18 13:05:00 2013 +0000
+
+    Revert change to --plugin-options parser action
+    
+    Commit 6ea48cb changed the action for the -k/--plugin-option
+    command line argument from 'extend' to 'append'. This breaks the
+    handling of options that are chained with a ',':
+    
+     logs.logsize              1,logs.all_logs max size (MiB) to collect per syslog file
+     logs.all_logs             off             collect all log files defined in syslog.conf
+    
+    vs:
+    
+     logs.logsize              1               max size (MiB) to collect per syslog file
+     logs.all_logs             on              collect all log files defined in syslog.conf
+    
+    Revert to an 'append' action for this switch.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index 48bb3af..4ea5f95 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -477,7 +477,7 @@ class SoSOptions(object):
+         parser.add_option("-o", "--only-plugins", action="extend",
+                              dest="onlyplugins", type="string",
+                              help="enable these plugins only", default = deque())
+-        parser.add_option("-k", "--plugin-option", action="append",
++        parser.add_option("-k", "--plugin-option", action="extend",
+                              dest="plugopts", type="string",
+                              help="plugin options in plugname.option=value format (see -l)",
+                              default = deque())
diff --git a/sos-fix-rhel_version-problems.patch b/sos-fix-rhel_version-problems.patch
new file mode 100644
index 0000000..5cce11c
--- /dev/null
+++ b/sos-fix-rhel_version-problems.patch
@@ -0,0 +1,186 @@
+commit c8fb8ff10de13b9f39044e2196976b15343a4d8e
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Wed Aug 14 18:22:28 2013 +0100
+
+    Remove obsolete checks and exception handling from s390 plug-in
+    
+    The s390 plug-in has some strange checks on the distribution
+    version before collecting a couple of s390-specific commands. The
+    entire code block is also wrapped in try/except.
+    
+    Remove this: all add_cmd_output() succeed without exceptions even
+    if the command does not exist or cannot be run. The exception
+    handling also does nothing useful.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/s390.py b/sos/plugins/s390.py
+index 7254649..ed9546b 100644
+--- a/sos/plugins/s390.py
++++ b/sos/plugins/s390.py
+@@ -58,14 +58,10 @@ class S390(Plugin, RedHatPlugin):
+         self.add_cmd_output("find /sys -type f")
+         self.add_cmd_output("find /proc/s390dbf -type f")
+         self.add_cmd_output("qethconf list_all")
++        self.add_cmd_output("lsqeth")
++        self.add_cmd_output("lszfcp")
+         ret, dasd_dev, rtime = self.call_ext_prog("ls /dev/dasd?")
+         for x in dasd_dev.split('\n'):
+             self.add_cmd_output("dasdview -x -i -j -l -f %s" % (x,))
+             self.add_cmd_output("fdasd -p %s" % (x,))
+-        try:
+-            rhelver = self.policy().rhel_version()
+-            if rhelver == 5:
+-                self.add_cmd_output("lsqeth")
+-                self.add_cmd_output("lszfcp")
+-        except:
+-            rhelver = None
++
+commit 27ce4dcc524c0af2ed8c2e8449ed9783e35c174e
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Wed Aug 14 18:26:08 2013 +0100
+
+    Remove legacy system support from cluster plug-in
+    
+    The cluster plug-in attempted to support three prior generations
+    of cluster components in a single plug-in. These will never be
+    required today since all current versions where sos-3.x would be
+    used are all using much later packages.
+    
+    Remove this code and simplify the overall plug-in organisation.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py
+index 8a3432e..0ed3cb4 100644
+--- a/sos/plugins/cluster.py
++++ b/sos/plugins/cluster.py
+@@ -25,28 +25,19 @@ class Cluster(Plugin, RedHatPlugin):
+                     'gather output of gfs lockdumps', 'slow', False),
+                     ('lockdump', 'gather dlm lockdumps', 'slow', False)]
+ 
+-    def check_enabled(self):
+-        rhelver = self.policy().rhel_version()
+-        if rhelver == 4:
+-            self.packages = [ "ccs", "cman", "cman-kernel", "magma",
+-                              "magma-plugins", "rgmanager", "fence", "dlm",
+-                              "dlm-kernel", "gulm", "GFS", "GFS-kernel",
+-                              "lvm2-cluster" ]
+-        elif rhelver == 5:
+-            self.packages = [ "rgmanager", "luci", "ricci",
+-                              "system-config-cluster", "gfs-utils", "gnbd",
+-                              "kmod-gfs", "kmod-gnbd", "lvm2-cluster",
+-                              "gfs2-utils" ]
+-
+-        elif rhelver == 6:
+-            self.packages = [ "ricci", "corosync", "openais",
+-                              "cman", "clusterlib", "fence-agents" ]
+-
+-        self.files = [ "/etc/cluster/cluster.conf" ]
+-        return Plugin.check_enabled(self)
++    packages = [
++        "ricci",
++        "corosync",
++        "openais",
++        "cman",
++        "clusterlib",
++        "fence-agents",
++        "pacemaker"
++    ]
++
++    files = [ "/etc/cluster/cluster.conf" ]
+ 
+     def setup(self):
+-        rhelver = self.policy().rhel_version()
+ 
+         self.add_copy_spec("/etc/cluster.conf")
+         self.add_copy_spec("/etc/cluster.xml")
+@@ -61,13 +52,13 @@ class Cluster(Plugin, RedHatPlugin):
+         self.add_copy_spec("/etc/fence_virt.conf")
+ 
+         if self.get_option('gfslockdump'):
+-          self.do_gfslockdump()
++            self.do_gfslockdump()
+ 
+         if self.get_option('lockdump'):
+-          self.do_lockdump()
++            self.do_lockdump()
+ 
+         self.add_cmd_output("rg_test test "
+-                        + "/etc/cluster/cluster.conf" )
++                            + "/etc/cluster/cluster.conf" )
+         self.add_cmd_output("fence_tool ls -n")
+         self.add_cmd_output("gfs_control ls -n")
+         self.add_cmd_output("dlm_tool log_plock")
+@@ -80,56 +71,23 @@ class Cluster(Plugin, RedHatPlugin):
+         self.add_cmd_output("ccs_tool lsnode")
+         self.add_cmd_output("ipvsadm -L")
+ 
+-        if rhelver is 4:
+-            self.add_copy_spec("/proc/cluster/*")
+-            self.add_cmd_output("cman_tool nodes")
+-
+-        if rhelver is not 4: # 5+
+-            self.add_cmd_output("cman_tool -a nodes")
+-
+-        if rhelver is 5:
+-            self.add_cmd_output("group_tool -v")
+-            self.add_cmd_output("group_tool dump fence")
+-            self.add_cmd_output("group_tool dump gfs")
+-
+-        if rhelver not in (4,5): # 6+
+-            self.add_cmd_output("corosync-quorumtool -l")
+-            self.add_cmd_output("corosync-quorumtool -s")
+-            self.add_cmd_output("corosync-cpgtool")
+-            self.add_cmd_output("corosync-objctl")
+-            self.add_cmd_output("group_tool ls -g1")
+-            self.add_cmd_output("gfs_control ls -n")
+-            self.add_cmd_output("gfs_control dump")
+-            self.add_cmd_output("fence_tool dump")
+-            self.add_cmd_output("dlm_tool dump")
+-            self.add_cmd_output("dlm_tool ls -n")
+-            self.add_cmd_output("mkqdisk -L")
++        self.add_cmd_output("corosync-quorumtool -l")
++        self.add_cmd_output("corosync-quorumtool -s")
++        self.add_cmd_output("corosync-cpgtool")
++        self.add_cmd_output("corosync-objctl")
++        self.add_cmd_output("group_tool ls -g1")
++        self.add_cmd_output("gfs_control ls -n")
++        self.add_cmd_output("gfs_control dump")
++        self.add_cmd_output("fence_tool dump")
++        self.add_cmd_output("dlm_tool dump")
++        self.add_cmd_output("dlm_tool ls -n")
++        self.add_cmd_output("mkqdisk -L")
+ 
+     def do_lockdump(self):
+-        rhelver = self.policy().rhel_version()
+-
+-        if rhelver is 4:
+-            status, output, time = self.call_ext_prog("cman_tool services")
+-            for lockspace in re.compile(r'^DLM Lock Space:\s*"([^"]*)".*$',
+-                    re.MULTILINE).findall(output):
+-                self.call_ext_prog("echo %s > /proc/cluster/dlm_locks" 
+-                        % lockspace)
+-                self.get_cmd_output_now("cat /proc/cluster/dlm_locks",
+-                        suggest_filename = "dlm_locks_%s" % lockspace)
+-
+-        if rhelver is 5:
+-            status, output, time = self.call_ext_prog("group_tool")
+-            for lockspace in re.compile(r'^dlm\s+[^\s]+\s+([^\s]+)$',
+-                    re.MULTILINE).findall(output):
+-                self.add_cmd_output("dlm_tool lockdebug '%s'" % lockspace,
+-                        suggest_filename = "dlm_locks_%s" % lockspace)
+-
+-        else: # RHEL6 or recent Fedora
+-            status, output, time = self.call_ext_prog("dlm_tool ls")
+-            for lockspace in re.compile(r'^name\s+([^\s]+)$',
+-                    re.MULTILINE).findall(output):
+-                self.add_cmd_output("dlm_tool lockdebug -svw '%s'"
+-                        % lockspace,
++        status, output, time = self.call_ext_prog("dlm_tool ls")
++        for lockspace in re.compile(r'^name\s+([^\s]+)$',
++                re.MULTILINE).findall(output):
++            self.add_cmd_output("dlm_tool lockdebug -svw '%s'" % lockspace,
+                         suggest_filename = "dlm_locks_%s" % lockspace)
+ 
+     def do_gfslockdump(self):
diff --git a/sos-fix-traceback-when-sar-module.patch b/sos-fix-traceback-when-sar-module.patch
new file mode 100644
index 0000000..248fa36
--- /dev/null
+++ b/sos-fix-traceback-when-sar-module.patch
@@ -0,0 +1,48 @@
+commit e53f06e9a50b16a204d27049b83c3a32505a4ab6
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Thu Nov 7 17:48:03 2013 +0000
+
+    Fix traceback when sar module is force-enabled
+    
+    Forward port of the following sos-2.2 fix:
+    
+    commit d4e3bcc3ed247d8d9a1228c3661b6456f534daf4
+    Author: Bryn M. Reeves <bmr at redhat.com>
+    Date:   Mon Aug 12 18:42:48 2013 +0100
+    
+        Fix traceback when sar module is force-enabled
+    
+        The sar plug-in assumes that when it runs the /var/lib/sa
+        directory and binaries exist (they are part of checkenabled() for
+        this module).
+    
+        This leads to a traceback when the plug-in lists a non-existent
+        directory on hosts where sar is not installed but '-o sar' is
+        specified on the command line.
+    
+        Catch the exception and exit gracefully.
+    
+        (Edited by bmr to improve error message logged).
+    
+        Signed-off-by: David Kutálek <dkutalek at redhat.com>
+        Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py
+index 4f89b53..570262a 100644
+--- a/sos/plugins/sar.py
++++ b/sos/plugins/sar.py
+@@ -43,8 +43,12 @@ class Sar(Plugin,):
+         self.add_copy_spec_limit("/var/log/sa/sar[0-9]*",
+                                  sizelimit = self.sa_size)
+         self.add_copy_spec_limit("/var/log/sa/sa[0-9]*",
+-                                 sizelimit = self.sa_size)
+-        dirList = os.listdir(self.sa_path)
++                              sizelimit = self.sa_size)
++        try:
++            dirList = os.listdir(self.sa_path)
++        except:
++            self.soslog.error("sar: could not list /var/log/sa")
++            return
+         # find all the sa file that don't have an existing sar file
+         for fname in dirList:
+             if fname[0:2] == 'sa' and fname[2] != 'r':
diff --git a/sos-fix-typo-in-yum-add_forbidden_paths.patch b/sos-fix-typo-in-yum-add_forbidden_paths.patch
new file mode 100644
index 0000000..56cc21c
--- /dev/null
+++ b/sos-fix-typo-in-yum-add_forbidden_paths.patch
@@ -0,0 +1,26 @@
+commit dedffd8549bcaf4688f090d800bff7f4ed7b9d43
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Nov 12 13:44:09 2013 +0000
+
+    Fix typo in yum add_forbidden_paths()
+    
+    The PKI files that should be omitted are in /etc/pki/entitlement,
+    not /etc/pki/entitlements as the plug-in currently uses.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py
+index 6d473c9..5abf06f 100644
+--- a/sos/plugins/yum.py
++++ b/sos/plugins/yum.py
+@@ -39,8 +39,8 @@ class Yum(Plugin, RedHatPlugin):
+         self.add_cmd_output("yum -C repolist")
+ 
+         # candlepin info
+-        self.add_forbidden_path("/etc/pki/entitlements/key.pem")
+-        self.add_forbidden_path("/etc/pki/entitlements/*-key.pem")
++        self.add_forbidden_path("/etc/pki/entitlement/key.pem")
++        self.add_forbidden_path("/etc/pki/entitlement/*-key.pem")
+         self.add_copy_specs([
+             "/etc/pki/product/*.pem",
+             "/etc/pki/consumer/cert.pem",
diff --git a/sos-fix-verbose-file-logging.patch b/sos-fix-verbose-file-logging.patch
new file mode 100644
index 0000000..12100fe
--- /dev/null
+++ b/sos-fix-verbose-file-logging.patch
@@ -0,0 +1,38 @@
+commit 23cdbd97a6bd2e44d87f01d6bf90b66667c4d7be
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Feb 3 12:09:57 2014 +0000
+
+    Fix verbose file logging
+    
+    Prior versions of sos enable debug logging to the embedded log
+    file (sos_logs/sos.log) when a single '-v' is given. Restore this
+    behaviour and ensure that command-not-found messages are reported
+    at 'info' rather than 'warning' level.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
+index 681299a..b4768b0 100644
+--- a/sos/plugins/__init__.py
++++ b/sos/plugins/__init__.py
+@@ -482,7 +482,7 @@ class Plugin(object):
+             self.soslog.warning("command '%s' timed out after %ds"
+                     % (prog, timeout))
+         if status == 127:
+-            self.soslog.warning("could not run '%s': command not found" % prog)
++            self.soslog.info("could not run '%s': command not found" % prog)
+         return (status, output, runtime)
+ 
+     def call_ext_prog(self, prog, timeout=300):
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index fb3aea7..22e0ab2 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -651,6 +651,7 @@ class SoSReport(object):
+                 flog.setLevel(logging.DEBUG)
+             elif self.opts.verbosity > 0:
+                 console.setLevel(logging.INFO)
++                flog.setLevel(logging.DEBUG)
+             else:
+                 console.setLevel(logging.WARNING)
+             self.soslog.addHandler(console)
diff --git a/sos-gluster-include-geo-replication.patch b/sos-gluster-include-geo-replication.patch
new file mode 100644
index 0000000..3ae6a15
--- /dev/null
+++ b/sos-gluster-include-geo-replication.patch
@@ -0,0 +1,70 @@
+From e05bfa7444cacc91972dfbf766f0a9495a7715fb Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Mon, 3 Feb 2014 14:36:46 +0000
+Subject: [PATCH 1/2] Make get_cmd_output_now() behaviour match 2.2
+
+The equivalent method in sos-2.2, collectOutputNow() returned an
+absolute path to the collected file. Since the archive changes in
+3.0 this now returns a path relative to the root of the archive.
+
+This breaks existing users of the interface that try to open and
+process the content of the collected file (e.g. gluster).
+
+Return a join of the archive path and file path to the caller.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
+index b4768b0..4a72161 100644
+--- a/sos/plugins/__init__.py
++++ b/sos/plugins/__init__.py
+@@ -572,7 +572,7 @@ class Plugin(object):
+             time_passed = time() - start_time
+             self.proflog.debug("output: %-75s time: %f" % (exe, time_passed))
+ 
+-        return outfn
++        return os.path.join(self.archive.get_archive_path(), outfn)
+ 
+     # For adding output
+     def add_alert(self, alertstring):
+-- 
+1.7.11.7
+
+
+From febb52040123293b9de01bc86c4f5c485e3bfc77 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Mon, 3 Feb 2014 15:17:55 +0000
+Subject: [PATCH 2/2] Include geo-replication status in gluster plugin
+
+Add the output of 'gluster volume geo-replication status' for
+each discovered gluster volume to the report.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/gluster.py | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py
+index 7c54fa0..02dbac3 100644
+--- a/sos/plugins/gluster.py
++++ b/sos/plugins/gluster.py
+@@ -102,6 +102,13 @@ class Gluster(Plugin, RedHatPlugin):
+         self.add_copy_spec('/tmp/glusterdump.options')
+         self.add_copy_spec(self.statedump_dir)
+ 
++        volume_file = self.get_cmd_output_now("gluster volume info",
++                        "gluster_volume_info")
++        if volume_file:
++            for volname in self.get_volume_names(volume_file):
++                self.add_cmd_output("gluster volume geo-replication %s status"
++                                    % volname)
++
+         self.add_cmd_output("gluster volume status")
+         # collect this last as some of the other actions create log entries
+         self.add_copy_spec("/var/log/glusterfs")
+-- 
+1.7.11.7
+
diff --git a/sos-include-etc-yaboot-conf-in-boot.patch b/sos-include-etc-yaboot-conf-in-boot.patch
new file mode 100644
index 0000000..59fa097
--- /dev/null
+++ b/sos-include-etc-yaboot-conf-in-boot.patch
@@ -0,0 +1,20 @@
+commit 04f6b8233c52cf852d6f002bc2983e7cfac7d60e
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Fri Oct 4 13:46:27 2013 +0100
+
+    Include /etc/yaboot.conf in boot plug-in
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/boot.py b/sos/plugins/boot.py
+index 6e62eac..bf50120 100644
+--- a/sos/plugins/boot.py
++++ b/sos/plugins/boot.py
+@@ -31,6 +31,7 @@ class Boot(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+             "/etc/milo.conf",
+             "/etc/silo.conf",
+             "/boot/efi/efi/redhat/elilo.conf",
++            "/etc/yaboot.conf",
+             "/boot/yaboot.conf"
+         ])
+         self.add_cmd_output("ls -lanR /boot")
diff --git a/sos-include-openhpi-config.patch b/sos-include-openhpi-config.patch
new file mode 100644
index 0000000..0a95010
--- /dev/null
+++ b/sos-include-openhpi-config.patch
@@ -0,0 +1,116 @@
+From c1e37e41831c8a9ce8c9901d604421b8b19a20e1 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Mon, 12 Aug 2013 20:11:29 +0100
+Subject: [PATCH 1/3] Add new plug-in to gather OpenHPI configuration
+
+New plug-in to collect OpenHPI configuration files. These files
+may contain passwords; a regex substitution rule has been added
+based on information from the reporter but this needs testing
+with a range of actual configuration files.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/openhpi.py | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+ create mode 100644 sos/plugins/openhpi.py
+
+diff --git a/sos/plugins/openhpi.py b/sos/plugins/openhpi.py
+new file mode 100644
+index 0000000..bb35206
+--- /dev/null
++++ b/sos/plugins/openhpi.py
+@@ -0,0 +1,34 @@
++### This program is free software; you can redistribute it and/or modify
++## it under the terms of the GNU General Public License as published by
++## the Free Software Foundation; either version 2 of the License, or
++## (at your option) any later version.
++
++## This program is distributed in the hope that it will be useful,
++## but WITHOUT ANY WARRANTY; without even the implied warranty of
++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++## GNU General Public License for more details.
++
++## You should have received a copy of the GNU General Public License
++## along with this program; if not, write to the Free Software
++## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++from sos.plugins import Plugin, RedHatPlugin
++import os
++
++class OpenHPI(Plugin, RedHatPlugin):
++    """OpenHPI related information
++    """
++
++    plugin_name = 'openhpi'
++
++    def setup(self):
++        self.add_copy_specs([
++            "/etc/openhpi/openhpi.conf",
++            "/etc/openhpi/openhpiclient.conf"
++        ])
++
++    def postproc(self):
++        self.do_file_sub("/etc/openhpi/openhpi.conf"
++                        r'([Pp]assw(or)?d|[Pp]assphrase)[[:space:]]+\=[[:space:]]"(.*)"',
++                        r"\1******")
++
+-- 
+1.7.11.7
+
+
+From a2be6462e40acc48c4271b2faddc4e9a03187712 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Mon, 12 Aug 2013 20:15:25 +0100
+Subject: [PATCH 2/3] Add file substitution rule for openhpiclient.conf
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/openhpi.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/sos/plugins/openhpi.py b/sos/plugins/openhpi.py
+index bb35206..a75f016 100644
+--- a/sos/plugins/openhpi.py
++++ b/sos/plugins/openhpi.py
+@@ -31,4 +31,7 @@ class OpenHPI(Plugin, RedHatPlugin):
+         self.do_file_sub("/etc/openhpi/openhpi.conf"
+                         r'([Pp]assw(or)?d|[Pp]assphrase)[[:space:]]+\=[[:space:]]"(.*)"',
+                         r"\1******")
++        self.do_file_sub("/etc/openhpi/openhpiclient.conf"
++                        r'([Pp]assw(or)?d|[Pp]assphrase)[[:space:]]+\=[[:space:]]"(.*)"',
++                        r"\1******")
+ 
+-- 
+1.7.11.7
+
+
+From a70afd9562a3ba9ad193fa25c6079c45533b9887 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Thu, 7 Nov 2013 18:17:18 +0000
+Subject: [PATCH 3/3] Fix regex substitution in openhpi plug-in
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/openhpi.py | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/sos/plugins/openhpi.py b/sos/plugins/openhpi.py
+index a75f016..dbe004d 100644
+--- a/sos/plugins/openhpi.py
++++ b/sos/plugins/openhpi.py
+@@ -28,10 +28,6 @@ class OpenHPI(Plugin, RedHatPlugin):
+         ])
+ 
+     def postproc(self):
+-        self.do_file_sub("/etc/openhpi/openhpi.conf"
+-                        r'([Pp]assw(or)?d|[Pp]assphrase)[[:space:]]+\=[[:space:]]"(.*)"',
+-                        r"\1******")
+-        self.do_file_sub("/etc/openhpi/openhpiclient.conf"
+-                        r'([Pp]assw(or)?d|[Pp]assphrase)[[:space:]]+\=[[:space:]]"(.*)"',
+-                        r"\1******")
++        self.do_file_sub("/etc/openhpi/openhpi.conf",
++                        r'(\s*[Pp]ass.*\s*=\s*).*', r'\1********')
+ 
+-- 
+1.7.11.7
+
diff --git a/sos-log-command-timeouts.patch b/sos-log-command-timeouts.patch
new file mode 100644
index 0000000..1790bfc
--- /dev/null
+++ b/sos-log-command-timeouts.patch
@@ -0,0 +1,71 @@
+commit b4c768e38289e2cd85d09a1f465b233ba676b281
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Nov 26 18:35:37 2013 +0000
+
+    Log a warning when external commands time out
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
+index e25f035..b86351f 100644
+--- a/sos/plugins/__init__.py
++++ b/sos/plugins/__init__.py
+@@ -476,12 +476,21 @@ class Plugin(object):
+             if filespec not in self.copy_paths:
+                 self.copy_paths.append((filespec, sub))
+ 
++    def get_command_output(self, prog, timeout=300):
++        (status, output, runtime) = sos_get_command_output(prog, timeout)
++        if status == 124:
++            self.soslog.warning("command %s timed out after %ds"
++                    % (prog, timeout))
++        if status == 127:
++            self.soslog.warning("could not run '%s': command not found" % prog)
++        return (status, output, runtime)
++
+     def call_ext_prog(self, prog, timeout=300):
+         """Execute a command independantly of the output gathering part of
+         sosreport.
+         """
+         # pylint: disable-msg = W0612
+-        return sos_get_command_output(prog, timeout)
++        return self.get_command_output(prog, timeout)
+ 
+     def check_ext_prog(self, prog):
+         """Execute a command independently of the output gathering part of
+@@ -541,9 +550,8 @@ class Plugin(object):
+             start_time = time()
+ 
+         # pylint: disable-msg = W0612
+-        status, shout, runtime = sos_get_command_output(exe, timeout=timeout)
++        status, shout, runtime = self.get_command_output(exe, timeout=timeout)
+         if (status == 127):
+-            self.soslog.debug("could not run '%s': command not found" % exe)
+             return None
+ 
+         if suggest_filename:
+commit 4787ffa73970048eacc576081d4e35671d0fc408
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Nov 26 18:39:43 2013 +0000
+
+    Make command quoting in log messages consistent
+    
+    The last commit adds a log message for commands that time out but
+    is inconsistent with other messages that include an external
+    command string. Quote the command for better readability.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
+index b86351f..681299a 100644
+--- a/sos/plugins/__init__.py
++++ b/sos/plugins/__init__.py
+@@ -479,7 +479,7 @@ class Plugin(object):
+     def get_command_output(self, prog, timeout=300):
+         (status, output, runtime) = sos_get_command_output(prog, timeout)
+         if status == 124:
+-            self.soslog.warning("command %s timed out after %ds"
++            self.soslog.warning("command '%s' timed out after %ds"
+                     % (prog, timeout))
+         if status == 127:
+             self.soslog.warning("could not run '%s': command not found" % prog)
diff --git a/sos-make-ethernet-detection-more-robust.patch b/sos-make-ethernet-detection-more-robust.patch
new file mode 100644
index 0000000..16c14c5
--- /dev/null
+++ b/sos-make-ethernet-detection-more-robust.patch
@@ -0,0 +1,90 @@
+commit 6fe3c9195b958e3b24a2dbf1768a45a459795f07
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Fri Nov 15 13:40:17 2013 +0000
+
+    Make ethernet interface detection more robust
+    
+    The networking module parses the link information in the output
+    of the 'ip -o addr' command to determine a list of ethernet
+    interfaces on which to run ethtool.
+    
+    An upstream change in the iproute package appears to have
+    introduced a regression in the output of this command which causes
+    link information to not be displayed:
+    
+    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\    link/ether 52:54:00:ce:9d:6d brd ff:ff:ff:ff:ff:ff
+    2: eth0    inet 192.168.122.31/24 brd 192.168.122.255 scope global eth0\       valid_lft forever preferred_lft forever
+    2: eth0    inet6 fe80::5054:ff:fece:9d6d/64 scope link \       valid_lft forever preferred_lft forever
+    
+    vs:
+    
+    2: eth0    inet 192.168.122.31/24 brd 192.168.122.255 scope global eth0\       valid_lft forever preferred_lft forever
+    2: eth0    inet6 fe80::5054:ff:fece:9d6d/64 scope link \       valid_lft forever preferred_lft forever
+    
+    This breaks detection of ethernet interfaces and all ethtool data
+    collection.
+    
+    This was introduced in the following iproute commit:
+    
+        commit af9d406f99853848054162ed7aefbe71dc03e433
+        Author: Mike Frysinger <vapier at gentoo.org>
+        Date:   Mon Aug 13 08:09:52 2012 -0700
+    
+            Fix regression with 'ip address show'
+    
+    Which appears to fix a different problem (i.e. the change to link
+    info was unintended).
+    
+    Make this more robust by switching the networking module to use
+    'ip -o link' instead which explicitly requests the required
+    information.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py
+index 9724a4f..64fb962 100644
+--- a/sos/plugins/networking.py
++++ b/sos/plugins/networking.py
+@@ -41,16 +41,16 @@ class Networking(Plugin):
+             out.append(br_name)
+         return out
+ 
+-    def get_interface_name(self,ip_addr_out):
+-        """Return a dictionary for which key are interface name according to the
+-        output of ifconifg-a stored in ifconfig_file.
++    def get_eth_interfaces(self,ip_link_out):
++        """Return a dictionary for which keys are ethernet interface
++        names taken from the output of "ip -o link".
+         """
+         out={}
+-        for line in ip_addr_out[1].splitlines():
++        for line in ip_link_out[1].splitlines():
+             match=re.match('.*link/ether', line)
+             if match:
+-                int=match.string.split(':')[1].lstrip()
+-                out[int]=True
++                iface=match.string.split(':')[1].lstrip()
++                out[iface]=True
+         return out
+ 
+     def collect_iptable(self,tablename):
+@@ -85,7 +85,6 @@ class Networking(Plugin):
+         self.add_forbidden_path("/proc/net/rpc/*/flush")
+ 
+         ip_addr_file=self.get_cmd_output_now("ip -o addr", root_symlink = "ip_addr")
+-        ip_addr_out=self.call_ext_prog("ip -o addr")
+         self.add_cmd_output("route -n", root_symlink = "route")
+         self.collect_iptable("filter")
+         self.collect_iptable("nat")
+@@ -101,8 +100,9 @@ class Networking(Plugin):
+         self.add_cmd_output("ip mroute show")
+         self.add_cmd_output("ip maddr show")
+         self.add_cmd_output("ip neigh show")
+-        if ip_addr_out:
+-            for eth in self.get_interface_name(ip_addr_out):
++        ip_link_out=self.call_ext_prog("ip -o link")
++        if ip_link_out:
++            for eth in self.get_eth_interfaces(ip_link_out):
+                 self.add_cmd_output("ethtool "+eth)
+                 self.add_cmd_output("ethtool -i "+eth)
+                 self.add_cmd_output("ethtool -k "+eth)
diff --git a/sos-nis-add-domainname-output.patch b/sos-nis-add-domainname-output.patch
new file mode 100644
index 0000000..82c5301
--- /dev/null
+++ b/sos-nis-add-domainname-output.patch
@@ -0,0 +1,17 @@
+commit 1aa497258ebb8c85eed9d38ba19173c054b77043
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Nov 5 16:16:33 2013 +0000
+
+    Add domainname output to the NIS plug-in
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/nis.py b/sos/plugins/nis.py
+index 5439b8f..baa71e8 100644
+--- a/sos/plugins/nis.py
++++ b/sos/plugins/nis.py
+@@ -29,3 +29,4 @@ class Nis(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+     def setup(self):
+         self.add_copy_spec("/etc/yp*.conf")
+         self.add_copy_spec("/var/yp/*")
++        self.add_cmd_output("domainname")
diff --git a/sos-normalise-tmp-dir-path.patch b/sos-normalise-tmp-dir-path.patch
new file mode 100644
index 0000000..b9ebb1b
--- /dev/null
+++ b/sos-normalise-tmp-dir-path.patch
@@ -0,0 +1,31 @@
+commit 2b2fa228391a0188a375a9e3c1e8f03f69c7eafd
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Thu Nov 7 16:27:44 2013 +0000
+
+    Normalize temporary directory path
+    
+    The archive and temporary file handling classes expect to operate
+    on absolute paths. If a user specifies a relative path via the
+    command line --tmp-dir switch it must be normalized before being
+    passed to these classes to provide correct behaviour. Failing to
+    do this causes a variety of errors: the final archive cannot be
+    created since the path is constructed incorrectly and temporary
+    files are not cleaned up since they are not at the "expected"
+    location.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index 2451439..b1f2e1d 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -534,7 +534,8 @@ class SoSReport(object):
+         self._read_config()
+         self.policy = sos.policies.load()
+         self._is_root = self.policy.is_root()
+-        self.tmpdir = self.policy.get_tmp_dir(self.opts.tmp_dir)
++        self.tmpdir = os.path.abspath(
++            self.policy.get_tmp_dir(self.opts.tmp_dir))
+         if not os.path.isdir(self.tmpdir) \
+         or not os.access(self.tmpdir, os.W_OK):
+             # write directly to stderr as logging is not initialised yet
diff --git a/sos-pass-no-archive-to-rhsm-debug.patch b/sos-pass-no-archive-to-rhsm-debug.patch
new file mode 100644
index 0000000..363d3f8
--- /dev/null
+++ b/sos-pass-no-archive-to-rhsm-debug.patch
@@ -0,0 +1,26 @@
+commit d5cbe4470b7bd6019b20e8c9d1de478fac622aad
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Feb 4 15:43:56 2014 +0000
+
+    Pass --no-archive to rhsm-debug script
+    
+    Versions of subscription-manager since 1.10.11-2.el7 support the
+    --no-archive option to disable creation of a zip archive. Pass
+    this to the script to have the output stored in a directory in
+    the archive.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py
+index a9ae4e4..81788f1 100644
+--- a/sos/plugins/yum.py
++++ b/sos/plugins/yum.py
+@@ -48,7 +48,7 @@ class Yum(Plugin, RedHatPlugin):
+             "/var/log/rhsm/rhsmcertd.log"])
+         self.add_cmd_output("subscription-manager list --installed")
+         self.add_cmd_output("subscription-manager list --consumed")
+-        self.add_cmd_output("rhsm-debug system --destination %s"
++        self.add_cmd_output("rhsm-debug system --no-archive --destination %s"
+                 % self.get_cmd_dir())
+ 
+         if self.get_option("yumlist"):
diff --git a/sos-remove-anaconda-ks-cfg-from-general.patch b/sos-remove-anaconda-ks-cfg-from-general.patch
new file mode 100644
index 0000000..4b5c4e1
--- /dev/null
+++ b/sos-remove-anaconda-ks-cfg-from-general.patch
@@ -0,0 +1,33 @@
+From 8945cfd19c3d06d6cb79774a5d070016482f6976 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr at redhat.com>
+Date: Tue, 26 Nov 2013 17:33:51 +0000
+Subject: [PATCH] Do not collect anaconda-ks.cfg in general plug-in
+
+The anaconda kickstart file is Red Hat specific and should not
+be collected in the general plugin. It may also contain plaintext
+or encrypted passwords - these are handled properly in the
+anaconda plugin itself but are missing from the copy in general.
+
+Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+---
+ sos/plugins/general.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sos/plugins/general.py b/sos/plugins/general.py
+index d7059e6..a6964c4 100644
+--- a/sos/plugins/general.py
++++ b/sos/plugins/general.py
+@@ -33,8 +33,8 @@ class General(Plugin):
+             "/etc/hostid",
+             "/var/lib/dbus/machine-id",
+             "/etc/exports",
+-            "/etc/localtime",
+-            "/root/anaconda-ks.cfg"])
++            "/etc/localtime"
++        ])
+ 
+         self.add_cmd_output("hostname", root_symlink="hostname")
+         self.add_cmd_output("date", root_symlink="date")
+-- 
+1.7.11.7
+
diff --git a/sos-remove-logs-debug-statements.patch b/sos-remove-logs-debug-statements.patch
new file mode 100644
index 0000000..690c1ea
--- /dev/null
+++ b/sos-remove-logs-debug-statements.patch
@@ -0,0 +1,34 @@
+commit 3304589f0e643b9f43dbc0fd042f747d0e4c27c2
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Wed Nov 13 19:02:05 2013 +0000
+
+    Remove debug statements from logs plugin
+    
+    The 'all_logs' path of the logs plugin has three leftover debug
+    print statements. Remove them to avoid cluttering the console
+    output when the option is used.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+    
+    Conflicts:
+    	sos/plugins/logs.py
+
+diff --git a/sos/plugins/logs.py b/sos/plugins/logs.py
+index 8359e06..7e7545f 100644
+--- a/sos/plugins/logs.py
++++ b/sos/plugins/logs.py
+@@ -38,14 +38,11 @@ class Logs(Plugin):
+         self.add_copy_spec_limit("/var/log/boot*", sizelimit = self.limit)
+ 
+         if self.get_option('all_logs'):
+-            print "doing all_logs..."
+             logs = self.do_regex_find_all("^\S+\s+(-?\/.*$)\s+",
+                                 "/etc/syslog.conf")
+-            print logs
+             if self.policy().pkg_by_name("rsyslog") \
+               or os.path.exists("/etc/rsyslog.conf"):
+                 logs += self.do_regex_find_all("^\S+\s+(-?\/.*$)\s+", "/etc/rsyslog.conf")
+-                print logs
+             for i in logs:
+                 if i.startswith("-"):
+                     i = i[1:]
diff --git a/sos-remove-pipe-communicate-newline-workaround.patch b/sos-remove-pipe-communicate-newline-workaround.patch
new file mode 100644
index 0000000..fa76a4e
--- /dev/null
+++ b/sos-remove-pipe-communicate-newline-workaround.patch
@@ -0,0 +1,29 @@
+commit 25bd83cda4ef1a5c89d95282c9f8fdc6cb9181d5
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Oct 15 17:26:12 2013 +0100
+
+    Remove obsolete workaround for newline added by pipe.communicate()
+    
+    Older versions of the python runtime would add a newline to output
+    obtained via pipe.communicate(). Current versions do not leading
+    to output being stored in reports without a trailing newline
+    character.
+    
+    Remove the workaround to ensure that stored content matches that
+    obtained via simple shell redirection ("/some/command > file").
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/utilities.py b/sos/utilities.py
+index 4279b12..fcc78c5 100644
+--- a/sos/utilities.py
++++ b/sos/utilities.py
+@@ -161,8 +161,6 @@ def sos_get_command_output(command, timeout=300):
+                 stdout=PIPE, stderr=STDOUT,
+                 bufsize=-1, env = cmd_env)
+         stdout, stderr = p.communicate()
+-        # hack to delete trailing '\n' added by p.communicate()
+-        if stdout[-1:] == '\n': stdout = stdout[:-1]
+         return (p.returncode, stdout, 0)
+     else:
+         return (127, "", 0)
diff --git a/sos-remove-rhel_version-from-yum-plugin.patch b/sos-remove-rhel_version-from-yum-plugin.patch
new file mode 100644
index 0000000..83595c2
--- /dev/null
+++ b/sos-remove-rhel_version-from-yum-plugin.patch
@@ -0,0 +1,21 @@
+commit ce04c7d20ccaec04d79d625446960195229a8953
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Fri Jan 24 15:24:28 2014 +0000
+
+    Remove obsolete rhel_version() usage from yum plugin
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py
+index 5abf06f..867302c 100644
+--- a/sos/plugins/yum.py
++++ b/sos/plugins/yum.py
+@@ -26,8 +26,6 @@ class Yum(Plugin, RedHatPlugin):
+                   ("yumdebug", "gather yum debugging data", "slow", False)]
+ 
+     def setup(self):
+-        rhelver = self.policy().rhel_version()
+-
+         # Pull all yum related information
+         self.add_copy_specs([
+             "/etc/yum",
diff --git a/sos-remove-upload-option.patch b/sos-remove-upload-option.patch
new file mode 100644
index 0000000..01fa7ac
--- /dev/null
+++ b/sos-remove-upload-option.patch
@@ -0,0 +1,236 @@
+commit 26bd7ddd523af051916954723f3edb2ab6bd297e
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Fri Jan 24 15:13:22 2014 +0000
+
+    Remove --upload option
+    
+    The --upload option has a lot of limitations and has not been
+    widely used. Recent trends are to handle uploading data in
+    higher-level tools (e.g. redhat-support-tool or web based
+    management UIs) and the python ftp library does not support
+    modern requirements like HTTP proxy traversal or encryption.
+    
+    Fixes Issue #217
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+    
+    Conflicts:
+    	sos/policies/__init__.py
+
+diff --git a/man/en/sos.conf.5 b/man/en/sos.conf.5
+index dc10b1b..b40a48e 100644
+--- a/man/en/sos.conf.5
++++ b/man/en/sos.conf.5
+@@ -6,26 +6,31 @@ sos.conf \- sosreport configuration
+ sosreport uses a configuration file at /etc/sos.conf.
+ .SH PARAMETERS
+ .sp
+-There are 3 sections of configuration in the sosreport configuration file: general,
+-plugins, and tunables.
+-.SH [general] OPTIONS
+-.sp
+-.in
+-ftp_upload_url Default ftp server to send reports.
+-.in
+-gpg_keyring Default gpgkey.
+-.in
+-gpg_recipient GPG recipient
+-.in
+-smtp_server Mail server
+-.SH [plugins] OPTIONS
+-.sp
+-.in
++There are two sections in the sosreport configuration file:
++plugins, and tunables. Options are set using 'ini'-style
++\fBname = value\fP pairs.
++
++Some options accept a comma separated list of values.
++
++.TP
++\fB[plugins]\fP
+ disable Comma separated list of plugins to disable.
+-.SH [tunables] OPTIONS
++.TP
++\fB[tunables]\fP
++plugin.option Alter available options for defined plugin.
++.SH EXAMPLES
++To disable the 'general' and 'filesys' plugins:
++.LP
++[plugins]
++.br
++disable = general, filesys
+ .sp
+-.in
+-(plugin, option) Alter available options for defined plugin.
++To disable rpm package verification in the RPM plugin:
++.LP
++[tunables]
++.br
++rpm.rpmva = off
++.br
+ .SH FILES
+ .sp
+ /etc/sos.conf
+diff --git a/man/en/sosreport.1 b/man/en/sosreport.1
+index 87a099e..c800576 100644
+--- a/man/en/sosreport.1
++++ b/man/en/sosreport.1
+@@ -10,7 +10,7 @@ sosreport \- Collect and package diagnostic and support data
+           [-a|--alloptions] [-v|--verbose]\fR
+           [--report] [--config-file conf] [--batch]\fR
+           [--build] [--name name] [--ticket-number number]
+-          [--debug] [--upload] [--tmp-dir directory]\fR
++          [--debug] [--tmp-dir directory]\fR
+           [--profile] [--help]\fR
+ .SH DESCRIPTION
+ \fBsosreport\fR generates a compressed tar archive of diagnostic
+@@ -50,9 +50,6 @@ specified value in the plug-in PLUGNAME.
+ .B \-a, \--alloptions
+ Set all boolean options to True for all enabled plug-ins.
+ .TP
+-.B \--upload FTP_SERVER
+-Upload the report to the configured destination.
+-.TP
+ .B \-v, \--verbose
+ Increase logging verbosity. May be specified multiple times to enable
+ additional debugging messages.
+diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
+index b681e77..47ace5c 100644
+--- a/sos/policies/__init__.py
++++ b/sos/policies/__init__.py
+@@ -280,79 +280,6 @@ No changes will be made to system configuration.
+             self._print(_("Please send this file to your support representative."))
+         self._print()
+ 
+-    def upload_results(self, final_filename):
+-
+-        # make sure a report exists
+-        if not final_filename:
+-            return False
+-
+-        self._print()
+-        # make sure it's readable
+-        try:
+-            fp = open(final_filename, "r")
+-        except:
+-            return False
+-
+-        # read ftp URL from configuration
+-        if self.commons['cmdlineopts'].upload:
+-            upload_url = self.commons['cmdlineopts'].upload
+-        else:
+-            try:
+-               upload_url = self.commons['config'].get("general", "ftp_upload_url")
+-            except:
+-               self._print(_("No URL defined in config file."))
+-               return
+-
+-        from urlparse import urlparse
+-        url = urlparse(upload_url)
+-
+-        if url[0] != "ftp":
+-            self._print(_("Cannot upload to specified URL."))
+-            return
+-
+-        # extract username and password from URL, if present
+-        if url[1].find("@") > 0:
+-            username, host = url[1].split("@", 1)
+-            if username.find(":") > 0:
+-                username, passwd = username.split(":", 1)
+-            else:
+-                passwd = None
+-        else:
+-            username, passwd, host = None, None, url[1]
+-
+-        # extract port, if present
+-        if host.find(":") > 0:
+-            host, port = host.split(":", 1)
+-            port = int(port)
+-        else:
+-            port = 21
+-
+-        path = url[2]
+-
+-        try:
+-            from ftplib import FTP
+-            upload_name = os.path.basename(final_filename)
+-
+-            ftp = FTP()
+-            ftp.connect(host, port)
+-            if username and passwd:
+-                ftp.login(username, passwd)
+-            else:
+-                ftp.login()
+-            ftp.cwd(path)
+-            ftp.set_pasv(True)
+-            ftp.storbinary('STOR %s' % upload_name, fp)
+-            ftp.quit()
+-        except Exception, e:
+-            self._print(_("There was a problem uploading your report to Red Hat support. " + str(e)))
+-        else:
+-            self._print(_("Your report was successfully uploaded to %s with name:" % (upload_url,)))
+-            self._print("  " + upload_name)
+-            self._print()
+-            self._print(_("Please communicate this name to your support representative."))
+-            self._print()
+-
+-        fp.close()
+ 
+     def _print(self, msg=None):
+         """A wrapper around print that only prints if we are not running in
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index 1c81af9..fb3aea7 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -202,7 +202,6 @@ class SoSOptions(object):
+     _onlyplugins = []
+     _plugopts = []
+     _usealloptions = False
+-    _upload = False
+     _batch = False
+     _build = False
+     _verbosity = 0
+@@ -302,19 +301,6 @@ class SoSOptions(object):
+         self._usealloptions = value
+ 
+     @property
+-    def upload(self):
+-        if self._options != None:
+-            return self._options.upload
+-        return self._upload
+-
+-    @upload.setter
+-    def upload(self, value):
+-        self._check_options_initialized()
+-        if not isinstance(value, bool):
+-            raise TypeError("SoSOptions.upload expects a boolean")
+-        self._upload = value
+-
+-    @property
+     def batch(self):
+         if self._options != None:
+             return self._options.batch
+@@ -484,9 +470,6 @@ class SoSOptions(object):
+         parser.add_option("-a", "--alloptions", action="store_true",
+                              dest="usealloptions", default=False,
+                              help="enable all options for loaded plugins")
+-        parser.add_option("-u", "--upload", action="store",
+-                             dest="upload", default=False,
+-                             help="upload the report to an ftp server")
+         parser.add_option("--batch", action="store_true",
+                              dest="batch", default=False,
+                              help="batch mode - do not prompt interactively")
+@@ -1130,12 +1113,7 @@ class SoSReport(object):
+         else:
+             final_filename = self.archive.get_archive_path()
+ 
+-        # automated submission will go here
+-        if not self.opts.upload:
+-            self.policy.display_results(final_filename, build = self.opts.build)
+-        else:
+-            self.policy.upload_results(final_filename)
+-
++        self.policy.display_results(final_filename, build = self.opts.build)
+         self.tempfile_util.clean()
+ 
+         return True
diff --git a/sos-remove-useless-os-path-check-for-brctl.patch b/sos-remove-useless-os-path-check-for-brctl.patch
new file mode 100644
index 0000000..eb08c01
--- /dev/null
+++ b/sos-remove-useless-os-path-check-for-brctl.patch
@@ -0,0 +1,37 @@
+commit 923a68777927eaaee3c5fa289053ac3a87d353f9
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Oct 15 17:00:09 2013 +0100
+
+    Remove useless os.path.exists check for brctl executable
+    
+    The networking module previously checked that its hard-coded path
+    for the brctl command existed before collecting output. This was
+    missed in the conversion to using policy defined PATH search for
+    external commands in commit e0d132e.
+    
+    Similar problems were fixed in commits 8b10cb0, 374da99, 8883155.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py
+index 90e1b58..9724a4f 100644
+--- a/sos/plugins/networking.py
++++ b/sos/plugins/networking.py
+@@ -111,12 +111,11 @@ class Networking(Plugin):
+                 self.add_cmd_output("ethtool -c "+eth)
+                 self.add_cmd_output("ethtool -g "+eth)
+ 
+-        if os.path.exists("brctl"):
+-            brctl_file=self.add_cmd_output("brctl show")
+-            brctl_out=self.call_ext_prog("brctl show")
+-            if brctl_out:
+-                for br_name in self.get_bridge_name(brctl_out):
+-                    self.add_cmd_output("brctl showstp "+br_name)
++        brctl_file=self.add_cmd_output("brctl show")
++        brctl_out=self.call_ext_prog("brctl show")
++        if brctl_out:
++            for br_name in self.get_bridge_name(brctl_out):
++                self.add_cmd_output("brctl showstp "+br_name)
+ 
+         if self.get_option("traceroute"):
+             self.add_cmd_output("/bin/traceroute -n %s" % self.trace_host)
diff --git a/sos-remove-version-checks-in-gluster.patch b/sos-remove-version-checks-in-gluster.patch
new file mode 100644
index 0000000..4a9a58a
--- /dev/null
+++ b/sos-remove-version-checks-in-gluster.patch
@@ -0,0 +1,40 @@
+commit 038609bacd8fc6a21eb50f7722f13baa5884a6bb
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Oct 29 16:03:03 2013 +0000
+
+    Remove version checks in gluster plug-in
+    
+    Current distributions do not include the legac package versions
+    that the plug-in was checking for.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py
+index a535d79..7c54fa0 100644
+--- a/sos/plugins/gluster.py
++++ b/sos/plugins/gluster.py
+@@ -80,22 +80,8 @@ class Gluster(Plugin, RedHatPlugin):
+     def setup(self):
+         self.add_cmd_output("gluster peer status")
+ 
+-        # check package version handling rename of glusterfs-core -> glusterfs
+-        pkg = self.policy().pkg_by_name("glusterfs-core");
+-        if not pkg:
+-            pkg = self.policy().pkg_by_name("glusterfs");
+-            # need to handle "no package" case for users who enable with -e/-o
+-            if not pkg:
+-                return
+-
+-        gluster_major = int((pkg["version"])[:1])
+-        gluster_minor = int((pkg["version"])[2:3])
+-        if (gluster_major == 3) and (gluster_minor <= 2):
+-            self.add_copy_spec("/etc/glusterd/")
+-            self.add_forbidden_path("/etc/glusterd/geo-replication/secret.pem")
+-        else:
+-            self.add_copy_spec("/var/lib/glusterd/")
+-            self.add_forbidden_path("/var/lib/glusterd/geo-replication/secret.pem")
++        self.add_copy_spec("/var/lib/glusterd/")
++        self.add_forbidden_path("/var/lib/glusterd/geo-replication/secret.pem")
+ 
+         # collect unified file and object storage configuration
+         self.add_copy_spec("/etc/swift/")
diff --git a/sos-restore-build-command-line-option.patch b/sos-restore-build-command-line-option.patch
new file mode 100644
index 0000000..06ec542
--- /dev/null
+++ b/sos-restore-build-command-line-option.patch
@@ -0,0 +1,187 @@
+commit b65606177be6210f3f0501e5689cdbb107e0f2f7
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Nov 5 16:07:23 2013 +0000
+
+    Restore --build command line option
+    
+    Releases of sos prior to 3.0 included the '--build' option to
+    disable creation of a compressed archive and to leave the
+    temporary build tree in place. This was removed with the
+    reorganisation of the archive classes to support in-line
+    archiving. Since all supported policies are now using an archive
+    that derives from FileCacheArchive (commit 0178d5f) the option
+    can be re-introduced.
+    
+    Archive classes that do not accumulate files in a temporary
+    directory will return the path to the in-progress archive file.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/archive.py b/sos/archive.py
+index 4291660..28bf197 100644
+--- a/sos/archive.py
++++ b/sos/archive.py
+@@ -65,6 +65,15 @@ class Archive(object):
+         to be included in the generated archive."""
+         raise NotImplementedError
+ 
++    def get_archive_path(self):
++        """Return a string representing the path to the temporary
++        archive. For archive classes that implement in-line handling
++        this will be the archive file itself. Archives that use a
++        directory based cache prior to packaging should return the
++        path to the temporary directory where the report content is
++        located"""
++        pass
++
+     def cleanup(self):
+         """Clean up any temporary resources used by an Archive class."""
+         pass
+@@ -81,7 +90,7 @@ class FileCacheArchive(Archive):
+ 
+     _tmp_dir = ""
+     _archive_root = ""
+-    _archive_path = ""
++    _archive_name = ""
+     
+     def __init__(self, name, tmpdir):
+         self._name = name
+@@ -146,6 +155,9 @@ class FileCacheArchive(Archive):
+     def get_tmp_dir(self):
+         return self._archive_root
+ 
++    def get_archive_path(self):
++        return self._archive_root
++
+     def makedirs(self, path, mode=0700):
+         self._makedirs(self.dest_path(path))
+         self.log.debug("created directory at %s in FileCacheArchive %s"
+@@ -162,8 +174,8 @@ class FileCacheArchive(Archive):
+         self.log.debug("finalizing archive %s" % self._archive_root)
+         self._build_archive()
+         self.cleanup()
+-        self.log.debug("built archive at %s (size=%d)" % (self._archive_path,
+-        os.stat(self._archive_path).st_size))
++        self.log.debug("built archive at %s (size=%d)" % (self._archive_name,
++        os.stat(self._archive_name).st_size))
+         return self._compress()
+ 
+ class TarFileArchive(FileCacheArchive):
+@@ -174,7 +186,7 @@ class TarFileArchive(FileCacheArchive):
+     def __init__(self, name, tmpdir):
+         super(TarFileArchive, self).__init__(name, tmpdir)
+         self._suffix = "tar"
+-        self._archive_path = os.path.join(tmpdir, self.name())
++        self._archive_name = os.path.join(tmpdir, self.name())
+ 
+     def set_tarinfo_from_stat(self, tar_info, fstat, mode=None):
+         tar_info.mtime = fstat.st_mtime
+@@ -218,7 +230,7 @@ class TarFileArchive(FileCacheArchive):
+         old_pwd = os.getcwd()
+         old_umask = os.umask(0077)
+         os.chdir(self._tmp_dir)
+-        tar = tarfile.open(self._archive_path, mode="w")
++        tar = tarfile.open(self._archive_name, mode="w")
+         tar.add(os.path.split(self._name)[1], filter=self.copy_permissions_filter)
+         tar.close()
+         os.umask(old_umask)
+diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
+index 983842d..6de93fb 100644
+--- a/sos/policies/__init__.py
++++ b/sos/policies/__init__.py
+@@ -205,12 +205,6 @@ No changes will be made to system configuration.
+         """
+         pass
+ 
+-    def package_results(self, package_name):
+-        """
+-        This function is called prior to packaging.
+-        """
+-        pass
+-
+     def post_work(self):
+         """
+         This function is called after the sosreport has been generated.
+@@ -476,5 +470,3 @@ class LinuxPolicy(Policy):
+         
+         return
+ 
+-    def package_results(self, archive_filename):
+-        self._print(_("Creating compressed archive..."))
+diff --git a/sos/sosreport.py b/sos/sosreport.py
+index 49e9d92..42be3ee 100644
+--- a/sos/sosreport.py
++++ b/sos/sosreport.py
+@@ -327,6 +327,19 @@ class SoSOptions(object):
+         self._batch = value
+ 
+     @property
++    def build(self):
++        if self._options != None:
++            return self._options.build
++        return self._build
++
++    @build.setter
++    def build(self):
++        self._check_options_initialized()
++        if not isinstance(value, bool):
++            raise TypeError("SoSOptions.build expects a boolean")
++        self._build = value
++
++    @property
+     def verbosity(self):
+         if self._options != None:
+             return self._options.verbosity
+@@ -476,6 +489,9 @@ class SoSOptions(object):
+         parser.add_option("--batch", action="store_true",
+                              dest="batch", default=False,
+                              help="batch mode - do not prompt interactively")
++        parser.add_option("--build", action="store_true", \
++                             dest="build", default=False, \
++                             help="keep sos tree available and dont package results")
+         parser.add_option("-v", "--verbose", action="count",
+                              dest="verbosity",
+                              help="increase verbosity")
+@@ -1097,24 +1113,29 @@ class SoSReport(object):
+     def final_work(self):
+ 
+         # package up the results for the support organization
+-        self.policy.package_results(self.archive.name())
++        if not self.opts.build:
++            self.ui_log.info(_("Creating compressed archive..."))
+ 
+-        self._finish_logging()
++            # compression could fail for a number of reasons
++            try:
++                final_filename = self.archive.finalize(self.opts.compression_type)
++            except:
++                if self.opts.debug:
++                    raise
++                else:
++                    return False
+ 
+-        # compression could fail for a number of reasons
+-        try:
+-            final_filename = self.archive.finalize(self.opts.compression_type)
+-        except:
+-            if self.opts.debug:
+-                raise
++            # automated submission will go here
++            if not self.opts.upload:
++                self.policy.display_results(final_filename)
+             else:
+-                return False
++                self.policy.upload_results(final_filename)
+ 
+-        # automated submission will go here
+-        if not self.opts.upload:
+-            self.policy.display_results(final_filename)
+         else:
+-            self.policy.upload_results(final_filename)
++            self.ui_log.info(_("\n  sosreport build tree is located at : %s\n"
++                            % self.archive.get_archive_path()))
++
++        self._finish_logging()
+ 
+         self.tempfile_util.clean()
+ 
diff --git a/sos-restrict-wbinfo-collection-to-the-current-domain.patch b/sos-restrict-wbinfo-collection-to-the-current-domain.patch
new file mode 100644
index 0000000..2bde947
--- /dev/null
+++ b/sos-restrict-wbinfo-collection-to-the-current-domain.patch
@@ -0,0 +1,36 @@
+commit 10cc09bf4d84d76cbcceccc6f3246bd9f8e9bd93
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Jul 30 17:42:40 2013 +0100
+
+    Restrict wbinfo collection to the current domain.
+    
+    The samba module calls the wbinfo command to collect user and
+    group information. This by default will search all domains to
+    which the host has access. In a large AD environment with a number
+    of trusted domains this causes the winbindd process to consume
+    excessive CPU and memory resources.
+    
+    The Samba developers have commented that fixing this would require
+    a complete rewrite of the winbind protocol and wbinfo client.
+    
+    Since listing out the _entire_ set of visible users is unlikely
+    to be of any use anyway pass the --domain='.' option to restrict
+    the search to the current domain of the system.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/samba.py b/sos/plugins/samba.py
+index d4e2fe8..f3a44b7 100644
+--- a/sos/plugins/samba.py
++++ b/sos/plugins/samba.py
+@@ -23,8 +23,8 @@ class Samba(Plugin):
+         self.add_copy_specs([
+             "/etc/samba",
+             "/var/log/samba/*",])
+-        self.add_cmd_output("wbinfo -g")
+-        self.add_cmd_output("wbinfo -u")
++        self.add_cmd_output("wbinfo --domain='.' -g")
++        self.add_cmd_output("wbinfo --domain='.' -u")
+         self.add_cmd_output("testparm -s -v")
+ 
+ 
diff --git a/sos-rhevm-treat-vdsmlogs-as-string.patch b/sos-rhevm-treat-vdsmlogs-as-string.patch
new file mode 100644
index 0000000..2c60fb9
--- /dev/null
+++ b/sos-rhevm-treat-vdsmlogs-as-string.patch
@@ -0,0 +1,28 @@
+commit 3d4afc252c9b65f350285d166d625067ee945934
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Feb 3 12:26:45 2014 +0000
+
+    Always treat rhevm vdsmlogs option as string
+    
+    The rhevm plugin has a 'vdsmlogs' option to pass in a set of log
+    files to be collected. When run with '-a' (or with
+    '-krhevm.vdsmlogs) this evaluates to 'True' (a bool) and causes
+    an exception when this is passed to add_copy_specs().
+    
+    Always treat the value as a string.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/rhevm.py b/sos/plugins/rhevm.py
+index 39b32f4..8068e05 100644
+--- a/sos/plugins/rhevm.py
++++ b/sos/plugins/rhevm.py
+@@ -13,7 +13,7 @@ class RhevM(Plugin, RedHatPlugin):
+         self.add_copy_spec("/etc/rhevm")
+         self.add_copy_spec("/var/log/rhevm")
+         if self.get_option("vdsmlogs"):
+-            self.add_copy_spec(self.get_option("vdsmlogs"))
++            self.add_copy_spec(str(self.get_option("vdsmlogs")))
+ 
+     def postproc(self):
+         """
diff --git a/sos-rpm-restricted-verify.patch b/sos-rpm-restricted-verify.patch
new file mode 100644
index 0000000..daa343c
--- /dev/null
+++ b/sos-rpm-restricted-verify.patch
@@ -0,0 +1,98 @@
+commit 1b3fc3f029ed3ab1dcbfeaaaa8fe1616dbc3744f
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Jul 30 19:30:13 2013 +0100
+
+    Add restricted rpm verify
+    
+    Add a default call to rpm -V/--verify for a targeted subset of
+    packages. This greatly reduces the time taken relative to rpm -Va
+    while still capturing important diagnostic information.
+    
+    In future this capability could be made a feature of the
+    PackageManager class interface and available to all ports/modules.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py
+index 9d44fde..a315018 100644
+--- a/sos/plugins/rpm.py
++++ b/sos/plugins/rpm.py
+@@ -23,6 +23,8 @@ class Rpm(Plugin, RedHatPlugin):
+     option_list = [("rpmq", "queries for package information via rpm -q", "fast", True),
+                   ("rpmva", "runs a verify on all packages", "slow", False)]
+ 
++    verify_list = [ 'kernel', 'glibc', 'pam_.*' ]
++
+     def setup(self):
+         self.add_copy_spec("/var/log/rpmpkgs")
+ 
+@@ -36,3 +38,9 @@ class Rpm(Plugin, RedHatPlugin):
+ 
+         if self.get_option("rpmva"):
+             self.add_cmd_output("rpm -Va", root_symlink = "rpm-Va", timeout = 3600)
++        else:
++            pkgs_by_regex = self.policy().package_manager.all_pkgs_by_name_regex
++            verify_list = map(pkgs_by_regex, self.verify_list)
++            for pkg_list in verify_list:
++                for pkg in pkg_list:
++                    self.add_cmd_output("rpm -V %s" % pkg)
+commit 1a73d5932a3f8153a9d1440c931823720e7e6245
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Aug 13 21:54:27 2013 +0100
+
+    Add new patterns to the RPM plug-in verify list
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py
+index a315018..71f36a0 100644
+--- a/sos/plugins/rpm.py
++++ b/sos/plugins/rpm.py
+@@ -23,7 +23,13 @@ class Rpm(Plugin, RedHatPlugin):
+     option_list = [("rpmq", "queries for package information via rpm -q", "fast", True),
+                   ("rpmva", "runs a verify on all packages", "slow", False)]
+ 
+-    verify_list = [ 'kernel', 'glibc', 'pam_.*' ]
++    verify_list = [
++        'kernel', 'glibc', 'initscripts',
++        'pam_.*',
++        'java.*', 'perl.*',
++        'rpm', 'yum',
++        'spacewalk.*',
++    ]
+ 
+     def setup(self):
+         self.add_copy_spec("/var/log/rpmpkgs")
+commit ffcde57daa6f6cbbfd9cb588ab64eb485d07d9ca
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Wed Oct 16 19:12:58 2013 +0100
+
+    Verify fewer packages in rpm plug-in
+    
+    The current default set of packages to verify includes debuginfo
+    and devel subpackages. Filter these out to reduce the time spent
+    running rpm -V.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py
+index 71f36a0..55c8019 100644
+--- a/sos/plugins/rpm.py
++++ b/sos/plugins/rpm.py
+@@ -24,7 +24,7 @@ class Rpm(Plugin, RedHatPlugin):
+                   ("rpmva", "runs a verify on all packages", "slow", False)]
+ 
+     verify_list = [
+-        'kernel', 'glibc', 'initscripts',
++        'kernel$', 'glibc', 'initscripts',
+         'pam_.*',
+         'java.*', 'perl.*',
+         'rpm', 'yum',
+@@ -49,4 +49,7 @@ class Rpm(Plugin, RedHatPlugin):
+             verify_list = map(pkgs_by_regex, self.verify_list)
+             for pkg_list in verify_list:
+                 for pkg in pkg_list:
++                    if 'debuginfo' in pkg \
++                    or pkg.endswith('-debuginfo-common'):
++                        continue
+                     self.add_cmd_output("rpm -V %s" % pkg)
diff --git a/sos-strip-trailing-newline.patch b/sos-strip-trailing-newline.patch
new file mode 100644
index 0000000..e675d66
--- /dev/null
+++ b/sos-strip-trailing-newline.patch
@@ -0,0 +1,25 @@
+commit dc1e011f3035646c81b54c265dff638ffe282ff1
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Tue Aug 6 21:53:41 2013 +0100
+
+    Strip trailing newline from command output
+    
+    This commit brings sos-3.x behaviour into line with earlier
+    releases and produces captured command output that is consistent
+    with typical shell redirection use.
+    
+    Resolves: bz971420
+
+diff --git a/sos/utilities.py b/sos/utilities.py
+index fcc78c5..4279b12 100644
+--- a/sos/utilities.py
++++ b/sos/utilities.py
+@@ -161,6 +161,8 @@ def sos_get_command_output(command, timeout=300):
+                 stdout=PIPE, stderr=STDOUT,
+                 bufsize=-1, env = cmd_env)
+         stdout, stderr = p.communicate()
++        # hack to delete trailing '\n' added by p.communicate()
++        if stdout[-1:] == '\n': stdout = stdout[:-1]
+         return (p.returncode, stdout, 0)
+     else:
+         return (127, "", 0)
diff --git a/sos-update-sos-ui-text.patch b/sos-update-sos-ui-text.patch
new file mode 100644
index 0000000..c85f620
--- /dev/null
+++ b/sos-update-sos-ui-text.patch
@@ -0,0 +1,103 @@
+commit 93ddb343c48d7158f34c0e5e8f016b2798a078e8
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Fri Jan 24 15:42:53 2014 +0000
+
+    Tidy up formatting of UI preamble text
+    
+    The formatting of the template preamble used a narrow terminal
+    width since there is no native python method for obtaining the
+    actual terminal geometry and the common methods for doing this
+    are non-portable (e.g. Windows specific ioctls or shelling out
+    to stty).
+    
+    This causes the top of the message to scroll off the screen on
+    a standard 80x25 terminal (e.g. putty or a non-resized
+    gnome-terminal or xterm window).
+    
+    Remove the paragraph indentation and increase the assumed width
+    from 58 to 72 chars. This causes the message to fill a standard
+    80x25 terminal without scrolling.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
+index 47ace5c..c9cfd21 100644
+--- a/sos/policies/__init__.py
++++ b/sos/policies/__init__.py
+@@ -115,17 +115,21 @@ class PackageManager(object):
+ class Policy(object):
+ 
+     msg = _("""\
+-This command will collect system configuration and diagnostic information \
+-from this %(distro)s system. An archive containing the collected information \
+-will be generated in %(tmpdir)s.
++This command will collect diagnostic and configuration \
++information from this %(distro)s system and installed \
++applications.
+ 
+-For more information on %(vendor)s visit:
++An archive containing the collected information will be \
++generated in %(tmpdir)s and may be provided to a %(vendor)s \
++support representative.
+ 
++Any information provided to %(vendor)s will be treated in \
++accordance with the published support policies at:\n
+   %(vendor_url)s
+ 
+-The generated archive may contain data considered sensitive and its content \
+-should be reviewed by the originating organization before being passed to \
+-any third party.
++The generated archive may contain data considered sensitive \
++and its content should be reviewed by the originating \
++organization before being passed to any third party.
+ 
+ No changes will be made to system configuration.
+ %(vendor_text)s
+@@ -296,14 +300,14 @@ No changes will be made to system configuration.
+         the user in non-batch mode. If your policy sets self.distro that
+         text will be substituted accordingly. You can also override this
+         method to do something more complicated."""
+-        width = 58
++        width = 72
+         _msg = self.msg % {'distro': self.distro, 'vendor': self.vendor,
+                     'vendor_url': self.vendor_url,
+                     'vendor_text': self.vendor_text,
+                     'tmpdir': self.commons['tmpdir']}
+         _fmt = ""
+         for line in _msg.splitlines():
+-            _fmt = _fmt + fill("  " + line, width, replace_whitespace = False) + '\n'
++            _fmt = _fmt + fill(line, width, replace_whitespace = False) + '\n'
+         return _fmt
+ 
+ 
+diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
+index 9321815..5b3a446 100644
+--- a/sos/policies/redhat.py
++++ b/sos/policies/redhat.py
+@@ -91,26 +91,6 @@ class RedHatPolicy(LinuxPolicy):
+         return self.host_name()
+ 
+ class RHELPolicy(RedHatPolicy):
+-
+-    msg = _("""\
+-This command will collect system configuration and diagnostic information \
+-from this %(distro)s system. An archive containing the collected information \
+-will be generated in %(tmpdir)s and may be provided to a %(vendor)s support \
+-representative or used for local diagnostic or recording purposes.
+-
+-Any information provided to %(vendor)s will be treated in strict confidence \
+-in accordance with the published support policies at:
+-
+-  %(vendor_url)s
+-
+-The generated archive may contain data considered sensitive and its content \
+-should be reviewed by the originating organization before being passed to \
+-any third party.
+-
+-No changes will be made to system configuration.
+-%(vendor_text)s
+-""")
+-
+     distro = "Red Hat Enterprise Linux"
+     vendor = "Red Hat"
+     vendor_url = "https://access.redhat.com/support/"
diff --git a/sos.spec b/sos.spec
index a6d74c8..2e8b0eb 100644
--- a/sos.spec
+++ b/sos.spec
@@ -3,7 +3,7 @@
 Summary: A set of tools to gather troubleshooting information from a system
 Name: sos
 Version: 3.0
-Release: 2%{?dist}
+Release: 23%{?dist}
 Group: Applications/System
 Source0: https://people.redhat.com/breeves/sos/releases/sos-3.0.tar.gz
 License: GPLv2+
@@ -18,6 +18,61 @@ Requires: tar
 Requires: bzip2
 Requires: xz
 Patch0: sos-silence-could-not-run.patch
+Patch1: sos-strip-trailing-newline.patch
+Patch2: sos-fix-rhel_version-problems.patch
+Patch3: sos-cluster-collect-crm_report.patch
+Patch4: sos-No-TTY-should-not-imply-batch-mode.patch
+Patch5: sos-Do-not-exit-on-interactive-mode-read-exceptions.patch
+Patch6: sos-Fix-policy-classes-for--tmp-dir.patch
+Patch7: sos-Added-XFS-plugin.patch
+Patch8: sos-cluster-plugin-add-obfuscation-of-luci-secrets.patch
+Patch9: sos-restrict-wbinfo-collection-to-the-current-domain.patch
+Patch10: sos-do-not-attempt-to-read-use-gss-proxy.patch
+Patch11: sos-include-etc-yaboot-conf-in-boot.patch
+Patch12: sos-remove-useless-os-path-check-for-brctl.patch
+Patch13: sos-rpm-restricted-verify.patch
+Patch14: sos-remove-pipe-communicate-newline-workaround.patch
+Patch15: sos-add-file-size-restriction-to-sar.patch
+Patch16: sos-remove-version-checks-in-gluster.patch
+Patch17: sos-check-for-usable-temporary-directory.patch
+Patch18: sos-fix-alloptions.patch
+Patch19: sos-fix-config-file-regression.patch
+Patch20: sos-add-powerpc-plugin.patch
+Patch21: sos-collect-proc-self-mountstats.patch
+Patch22: sos-collect-var-log-squid.patch
+Patch23: sos-nis-add-domainname-output.patch
+Patch24: sos-normalise-tmp-dir-path.patch
+Patch25: sos-collect-saved-vmcore-dmesg.patch
+Patch26: sos-restore-build-command-line-option.patch
+Patch27: sos-add-nfs-client-plugin.patch
+Patch28: sos-fix-traceback-when-sar-module.patch
+Patch29: sos-fix-typo-in-yum-add_forbidden_paths.patch
+Patch30: sos-add-krb5-plugin-and-klist.patch
+Patch31: sos-fix-dash-dash-build-regressions.patch
+Patch32: sos-remove-logs-debug-statements.patch
+Patch33: sos-make-ethernet-detection-more-robust.patch
+Patch34: sos-fix-multiple-plugin-opts.patch
+Patch35: sos-correct-log-and-message-levels.patch
+Patch36: sos-log-command-timeouts.patch
+Patch37: sos-remove-upload-option.patch
+Patch38: sos-update-sos-ui-text.patch
+Patch39: sos-include-openhpi-config.patch
+Patch40: sos-fix-cluster-crm_report.patch
+Patch41: sos-fix-ldap-postproc.patch
+Patch42: sos-remove-anaconda-ks-cfg-from-general.patch
+Patch43: sos-fix-cluster-get_option-use.patch
+Patch44: sos-fix-verbose-file-logging.patch
+Patch45: sos-rhevm-treat-vdsmlogs-as-string.patch
+Patch46: sos-add-rhsm-debug-to-yum.patch
+Patch47: sos-gluster-include-geo-replication.patch
+Patch48: sos-pass-no-archive-to-rhsm-debug.patch
+Patch49: sos-fix-fd-leaks-on-popen.patch
+Patch50: sos-fix-gluster-volume-name-extraction.patch
+Patch51: sos-add-distupgrade-plugin.patch
+Patch52: sos-fix-command-output-substitution-exception.patch
+Patch53: sos-remove-rhel_version-from-yum-plugin.patch
+Patch54: sos-fix-anacron-checks.patch
+Patch55: sos-call-rhsm-debug-with-sos.patch
 
 %description
 Sos is a set of tools that gathers information about system
@@ -28,6 +83,62 @@ support technicians and developers.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
+%patch17 -p1
+%patch18 -p1
+%patch19 -p1
+%patch20 -p1
+%patch21 -p1
+%patch22 -p1
+%patch23 -p1
+%patch24 -p1
+%patch25 -p1
+%patch26 -p1
+%patch27 -p1
+%patch28 -p1
+%patch29 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
+%patch35 -p1
+%patch36 -p1
+%patch37 -p1
+%patch38 -p1
+%patch39 -p1
+%patch40 -p1
+%patch41 -p1
+%patch42 -p1
+%patch43 -p1
+%patch44 -p1
+%patch45 -p1
+%patch46 -p1
+%patch47 -p1
+%patch48 -p1
+%patch49 -p1
+%patch50 -p1
+%patch51 -p1
+%patch52 -p1
+%patch53 -p1
+%patch54 -p1
+%patch55 -p1
+
 %build
 make
 
@@ -50,6 +161,100 @@ rm -rf ${RPM_BUILD_ROOT}
 %config(noreplace) %{_sysconfdir}/sos.conf
 
 %changelog
+* Thu Mar 20 2014 Bryn M. Reeves <bmr at redhat.com> = 3.0-23
+- Call rhsm-debug with the --sos switch
+
+* Mon Mar 03 2014 Bryn M. Reeves <bmr at redhat.com> = 3.0-22
+- Fix package check in anacron plugin
+
+* Wed Feb 12 2014 Bryn M. Reeves <bmr at redhat.com> = 3.0-21
+- Remove obsolete rhel_version() usage from yum plugin
+
+* Tue Feb 11 2014 Bryn M. Reeves <bmr at redhat.com> = 3.0-20
+- Prevent unhandled exception during command output substitution
+
+* Mon Feb 10 2014 Bryn M. Reeves <bmr at redhat.com> = 3.0-19
+- Fix generation of volume names in gluster plugin
+- Add distupgrade plugin
+
+* Tue Feb 04 2014 Bryn M. Reeves <bmr at redhat.com> = 3.0-18
+- Prevent file descriptor leaks when using Popen
+- Disable zip archive creation when running rhsm-debug
+- Include volume geo-replication status in gluster plugin
+
+* Mon Feb 03 2014 Bryn M. Reeves <bmr at redhat.com> = 3.0-17
+- Fix get_option use in cluster plugin
+- Fix debug logging to file when given '-v'
+- Always treat rhevm plugin's vdsmlogs option as a string
+- Run the rhsm-debug script from yum plugin
+
+* Fri Jan 31 2014 Bryn M. Reeves <bmr at redhat.com> = 3.0-16
+- Add new plugin to collect OpenHPI configuration
+- Fix cluster plugin crm_report support
+- Fix file postprocessing in ldap plugin
+- Remove collection of anaconda-ks.cfg from general plugin
+
+* Fri Jan 24 2014 Bryn M. Reeves <bmr at redhat.com> = 3.0-15
+- Remove debug statements from logs plugin
+- Make ethernet interface detection more robust
+- Fix specifying multiple plugin options on the command line
+- Make log and message levels match previous versions
+- Log a warning message when external commands time out
+- Remove --upload command line option
+- Update sos UI text to match upstream
+
+* Fri Dec 27 2013 Daniel Mach <dmach at redhat.com> = 3.0-14
+- Mass rebuild 2013-12-27
+
+* Thu Nov 14 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-13
+- Fix regressions introduced with --build option
+
+* Tue Nov 12 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-12
+- Fix typo in yum plug-in add_forbidden_paths
+- Add krb5 plug-in and drop collection of krb5.keytab
+
+* Fri Nov  8 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-10
+- Add nfs client plug-in
+- Fix traceback when sar module force-enabled
+
+* Thu Nov  7 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-9
+- Restore --build command line option
+- Collect saved vmcore-dmesg.txt files
+- Normalize temporary directory paths
+
+* Tue Nov  5 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-7
+- Add domainname output to NIS plug-in
+- Collect /var/log/squid in squid plug-in
+- Collect mountstats and mountinfo in filesys plug-in
+- Add PowerPC plug-in from upstream
+
+* Thu Oct 31 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-6
+- Remove version checks in gluster plug-in
+- Check for usable temporary directory
+- Fix --alloptions command line option
+- Fix configuration fail regression
+
+* Wed Oct 30 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-5
+- Include /etc/yaboot.conf in boot plug-in
+- Fix collection of brctl output in networking plug-in
+- Verify limited set of RPM packages by default
+- Do not strip newlines from command output
+- Limit default sar data collection
+
+* Thu Oct 3 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-4
+- Do not attempt to read RPC pseudo files in networking plug-in
+- Restrict wbinfo collection to the current domain
+- Add obfuscation of luci secrets to cluster plug-in
+- Add XFS plug-in
+- Fix policy class handling of --tmp-dir
+- Do not set batch mode if stdin is not a TTY
+- Attempt to continue when reading bad input in interactive mode
+
+* Wed Aug 14 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-3
+- Add crm_report support to cluster plug-in
+- Fix rhel_version() usage in cluster and s390 plug-ins
+- Strip trailing newline from command output
+
 * Mon Jun 10 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-2
 - Silence 'could not run' messages at default verbosity
 - New upstream release


More information about the scm-commits mailing list