[node-patches] Change in ovirt-node[ovirt-3.5]: recipe: Add patch for sos-3.2

fabiand at redhat.com fabiand at redhat.com
Tue Mar 3 13:32:31 UTC 2015


Fabian Deutsch has uploaded a new change for review.

Change subject: recipe: Add patch for sos-3.2
......................................................................

recipe: Add patch for sos-3.2

Change-Id: I81ce38fe525f3e9ee48271db142ea703c1ba863f
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1197302
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
(cherry picked from commit e7e706ad17e2004c2b812375dc6039200c1f9e8a)
---
M recipe/common-post.ks
1 file changed, 37 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/27/38327/1

diff --git a/recipe/common-post.ks b/recipe/common-post.ks
index 7b3a55b..767c83c 100644
--- a/recipe/common-post.ks
+++ b/recipe/common-post.ks
@@ -229,7 +229,43 @@
 # sosreport fixups for node image:
 echo "use .pyc for plugins enumeration, .py is blacklisted"
 # include *-release
-if [[ $(rpm -E "%{?fedora}") = 20 ]] ||
+if [[ $(rpm -q sos) =~ sos-3.2 ]]; then
+patch --fuzz 3 -d /usr/lib/python2.7/site-packages/sos -p0 <<  \EOF_sos_patch
+index 341d268..51883fa 100644
+--- a/sos/plugins/general.py
++++ b/sos/plugins/general.py
+@@ -45,8 +45,7 @@ class RedHatGeneral(General, RedHatPlugin):
+         super(RedHatGeneral, self).setup()
+ 
+         self.add_copy_spec([
+-            "/etc/redhat-release",
+-            "/etc/fedora-release",
++            "/etc/*-release",
+             "/var/log/up2date"
+         ])
+ 
+index 7c06781..05e193e 100644
+--- a/sos/utilities.py
++++ b/sos/utilities.py
+@@ -207,13 +207,13 @@ class ImporterHelper(object):
+         plugins = [self._plugin_name(plugin)
+                    for plugin in list_
+                    if "__init__" not in plugin
+-                   and plugin.endswith(".py")]
++                   and plugin.endswith(".pyc")]
+         plugins.sort()
+         return plugins
+ 
+     def _find_plugins_in_dir(self, path):
+         if os.path.exists(path):
+-            py_files = list(find("*.py", path))
++            py_files = list(find("*.pyc", path))
+             pnames = self._get_plugins_from_list(py_files)
+             if pnames:
+                 return pnames
+EOF_sos_patch
+
+elif [[ $(rpm -E "%{?fedora}") = 20 ]] ||
     [[ $(rpm -E "%{?rhel}") = 7 ]] ||
     [[ $(rpm -E "%{?centos}") = 7 ]]; then
 patch --fuzz 3 -d /usr/lib/python2.7/site-packages/sos -p0 <<  \EOF_sos_patch


-- 
To view, visit https://gerrit.ovirt.org/38327
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81ce38fe525f3e9ee48271db142ea703c1ba863f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>



More information about the node-patches mailing list