aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornavid <navid@ef72aa8b-4018-0410-8976-d6e080ef94d8>2007-12-14 10:36:15 +0000
committernavid <navid@ef72aa8b-4018-0410-8976-d6e080ef94d8>2007-12-14 10:36:15 +0000
commit668647b482aeaaf0faeed8bb901d124185da2eee (patch)
tree6766ee66104be38934c6ddff30dea6db417d5286
parente201c1810c4b84f18efbde98bfe00845739ffaa5 (diff)
downloadsos-668647b482aeaaf0faeed8bb901d124185da2eee.tar.gz
added languages to rpm package
only obsolete sysreport if dist == rhel activate workaround in xen plugin for BZ#371251 sos-internal.spec clean-up (as sos-html-logs was removed from source) git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@473 ef72aa8b-4018-0410-8976-d6e080ef94d8
-rw-r--r--src/lib/sos/plugins/xen.py5
-rwxr-xr-xsrc/lib/sos/policyredhat.py1
-rw-r--r--src/setup.py78
-rw-r--r--src/sos-internal.spec13
-rw-r--r--src/sos.spec13
5 files changed, 95 insertions, 15 deletions
diff --git a/src/lib/sos/plugins/xen.py b/src/lib/sos/plugins/xen.py
index d6daec63..89ed359f 100644
--- a/src/lib/sos/plugins/xen.py
+++ b/src/lib/sos/plugins/xen.py
@@ -68,7 +68,10 @@ class xen(sos.plugintools.PluginBase):
self.collectExtOutput("/usr/sbin/xm info")
self.collectExtOutput("/usr/sbin/brctl show")
self.domCollectProc()
- self.addCopySpec("/sys/hypervisor")
+ # work-around for BZ#371251 which eventually needs to be fixed in xen
+ status, output = commands.getstatusoutput("/sbin/service xend status &> /dev/null")
+ if status == 0:
+ self.addCopySpec("/sys/hypervisor")
# FIXME: we *might* want to collect things in /sys/bus/xen*,
# /sys/class/xen*, /sys/devices/xen*, /sys/modules/blk*,
# /sys/modules/net*, but I've never heard of them actually being
diff --git a/src/lib/sos/policyredhat.py b/src/lib/sos/policyredhat.py
index c8bec998..a10e7dfb 100755
--- a/src/lib/sos/policyredhat.py
+++ b/src/lib/sos/policyredhat.py
@@ -363,5 +363,6 @@ class SosPolicy:
print " " + upload_name
print
print _("Please communicate this name to your support representative.")
+ print
fp.close()
diff --git a/src/setup.py b/src/setup.py
index 8745c857..d34ae6c8 100644
--- a/src/setup.py
+++ b/src/setup.py
@@ -9,6 +9,82 @@ setup(
packages = ['sos', 'sos.plugins'],
scripts = [],
package_dir = {'': 'lib',},
- data_files = [ ('/etc', [ 'sos.conf']), ('/usr/sbin', ['sosreport', 'extras/sysreport/sysreport.legacy']), ('/usr/bin', ['extras/rh-upload-core']), ('/usr/share/sysreport', ['extras/sysreport/text.xsl', 'extras/sysreport/functions', 'extras/sysreport/sysreport-fdisk']), ('/usr/share/man/man1', ['sosreport.1']), ('/usr/share/locale/en', []), ('/usr/share/locale/it', []), ('/usr/share/locale/en/LC_MESSAGES', ['locale/en/LC_MESSAGES/sos.mo']), ('/usr/share/locale/it/LC_MESSAGES', ['locale/it/LC_MESSAGES/sos.mo']), ('/usr/share/locale/fr/LC_MESSAGES', ['locale/fr/LC_MESSAGES/sos.mo']), ('/usr/share/locale/ar/LC_MESSAGES', ['locale/ar/LC_MESSAGES/sos.mo'])
+ data_files = [ ('/etc', [ 'sos.conf']), ('/usr/sbin', ['sosreport', 'extras/sysreport/sysreport.legacy']), ('/usr/bin', ['extras/rh-upload-core']), ('/usr/share/sysreport', ['extras/sysreport/text.xsl', 'extras/sysreport/functions', 'extras/sysreport/sysreport-fdisk']), ('/usr/share/man/man1', ['sosreport.1']),
+ ('/usr/share/locale/af/LC_MESSAGES', ['locale/af/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/am/LC_MESSAGES', ['locale/am/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ar/LC_MESSAGES', ['locale/ar/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/as/LC_MESSAGES', ['locale/as/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/be/LC_MESSAGES', ['locale/be/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/bg/LC_MESSAGES', ['locale/bg/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/bn/LC_MESSAGES', ['locale/bn/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/bn_IN/LC_MESSAGES', ['locale/bn_IN/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/bs/LC_MESSAGES', ['locale/bs/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ca/LC_MESSAGES', ['locale/ca/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/cs/LC_MESSAGES', ['locale/cs/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/cy/LC_MESSAGES', ['locale/cy/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/da/LC_MESSAGES', ['locale/da/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/de/LC_MESSAGES', ['locale/de/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/el/LC_MESSAGES', ['locale/el/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/en/LC_MESSAGES', ['locale/en/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/en_GB/LC_MESSAGES', ['locale/en_GB/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/es/LC_MESSAGES', ['locale/es/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/et/LC_MESSAGES', ['locale/et/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/eu_ES/LC_MESSAGES', ['locale/eu_ES/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/fa/LC_MESSAGES', ['locale/fa/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/fi/LC_MESSAGES', ['locale/fi/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/fr/LC_MESSAGES', ['locale/fr/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/gl/LC_MESSAGES', ['locale/gl/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/gu/LC_MESSAGES', ['locale/gu/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/he/LC_MESSAGES', ['locale/he/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/hi/LC_MESSAGES', ['locale/hi/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/hr/LC_MESSAGES', ['locale/hr/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/hu/LC_MESSAGES', ['locale/hu/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/hy/LC_MESSAGES', ['locale/hy/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/id/LC_MESSAGES', ['locale/id/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ilo/LC_MESSAGES', ['locale/ilo/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/is/LC_MESSAGES', ['locale/is/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/it/LC_MESSAGES', ['locale/it/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ja/LC_MESSAGES', ['locale/ja/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ka/LC_MESSAGES', ['locale/ka/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/kn/LC_MESSAGES', ['locale/kn/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ko/LC_MESSAGES', ['locale/ko/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ku/LC_MESSAGES', ['locale/ku/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/lo/LC_MESSAGES', ['locale/lo/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/lt/LC_MESSAGES', ['locale/lt/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/lv/LC_MESSAGES', ['locale/lv/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/mk/LC_MESSAGES', ['locale/mk/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ml/LC_MESSAGES', ['locale/ml/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/mr/LC_MESSAGES', ['locale/mr/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ms/LC_MESSAGES', ['locale/ms/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/my/LC_MESSAGES', ['locale/my/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/nb/LC_MESSAGES', ['locale/nb/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/nl/LC_MESSAGES', ['locale/nl/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/nn/LC_MESSAGES', ['locale/nn/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/no/LC_MESSAGES', ['locale/no/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/nso/LC_MESSAGES', ['locale/nso/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/or/LC_MESSAGES', ['locale/or/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/pa/LC_MESSAGES', ['locale/pa/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/pl/LC_MESSAGES', ['locale/pl/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/pt/LC_MESSAGES', ['locale/pt/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/pt_BR/LC_MESSAGES', ['locale/pt_BR/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ro/LC_MESSAGES', ['locale/ro/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ru/LC_MESSAGES', ['locale/ru/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/si/LC_MESSAGES', ['locale/si/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/sk/LC_MESSAGES', ['locale/sk/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/sl/LC_MESSAGES', ['locale/sl/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/sq/LC_MESSAGES', ['locale/sq/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/sr/LC_MESSAGES', ['locale/sr/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/sr@latin/LC_MESSAGES', ['locale/sr@latin/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/sv/LC_MESSAGES', ['locale/sv/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ta/LC_MESSAGES', ['locale/ta/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/te/LC_MESSAGES', ['locale/te/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/th/LC_MESSAGES', ['locale/th/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/tr/LC_MESSAGES', ['locale/tr/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/uk/LC_MESSAGES', ['locale/uk/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/ur/LC_MESSAGES', ['locale/ur/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/vi/LC_MESSAGES', ['locale/vi/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/zh_CN/LC_MESSAGES', ['locale/zh_CN/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/zh_TW/LC_MESSAGES', ['locale/zh_TW/LC_MESSAGES/sos.mo']),
+ ('/usr/share/locale/zu/LC_MESSAGES', ['locale/zu/LC_MESSAGES/sos.mo']),
]
)
diff --git a/src/sos-internal.spec b/src/sos-internal.spec
index 2406175e..603508fb 100644
--- a/src/sos-internal.spec
+++ b/src/sos-internal.spec
@@ -17,8 +17,6 @@ License: GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildArch: noarch
Url: https://hosted.fedoraproject.org/projects/sos
-Requires: python-cherrypy
-Requires: python-sqlite2
%description
Sos is a set of tools that gathers information about system
@@ -35,14 +33,6 @@ rm -rf ${RPM_BUILD_ROOT}
cd sos-%{version}
install -D -m755 extras/sos-open ${RPM_BUILD_ROOT}/usr/bin/sos-open
-install -D -m755 extras/sos-html-logs/sos-html-logs ${RPM_BUILD_ROOT}/usr/bin/sos-html-logs
-
-mkdir -p ${RPM_BUILD_ROOT}/%{python_sitelib}/soshtmllogs/parsers
-install -D -m644 extras/sos-html-logs/lib/*.py -t ${RPM_BUILD_ROOT}/%{python_sitelib}/soshtmllogs
-install -D -m644 extras/sos-html-logs/lib/parsers/*.py extras/sos-html-logs/lib/parsers/*.rules -t ${RPM_BUILD_ROOT}/%{python_sitelib}/soshtmllogs/parsers
-
-mkdir -p ${RPM_BUILD_ROOT}/usr/share
-cp -r extras/sos-html-logs/share ${RPM_BUILD_ROOT}/usr/share/sos-html-logs
install -D -m644 %{SOURCE1} ${RPM_BUILD_ROOT}/usr/share/sos/rhsupport.pub
install -D -m600 %{SOURCE2} ${RPM_BUILD_ROOT}/usr/share/sos/rhsupport.key
@@ -60,10 +50,7 @@ echo "done."
%defattr(-,root,root,-)
/usr/share/sos/rhsupport.pub
/usr/share/sos/rhsupport.key
-/usr/bin/sos-html-logs
/usr/bin/sos-open
-/%{python_sitelib}/soshtmllogs
-/usr/share/sos-html-logs
%changelog
* Wed Sep 4 2007 Navid Sheikhol-Eslami <navid at redhat dot com> - 1.0
diff --git a/src/sos.spec b/src/sos.spec
index 69107896..3b3f8534 100644
--- a/src/sos.spec
+++ b/src/sos.spec
@@ -23,8 +23,10 @@ BuildArch: noarch
Url: https://hosted.fedoraproject.org/projects/sos
BuildRequires: python-devel
Requires: libxml2-python
+%if 0%{?rhel}
Provides: sysreport = 1.4.3-13
Obsoletes: sysreport
+%endif
%description
Sos is a set of tools that gathers information about system
@@ -42,7 +44,16 @@ python setup.py build
rm -rf ${RPM_BUILD_ROOT}
install -D -m644 %{SOURCE1} ${RPM_BUILD_ROOT}/usr/share/sos/rhsupport.pub
python setup.py install --optimize 1 --root=$RPM_BUILD_ROOT
+
+%if 0%{?rhel}
ln -s /usr/sbin/sosreport $RPM_BUILD_ROOT/usr/sbin/sysreport
+%endif
+%if ! 0%{?rhel}
+rm -f $RPM_BUILD_ROOT/usr/sbin/sysreport.legacy
+rm -f $RPM_BUILD_ROOT/usr/share/sysreport/functions
+rm -f $RPM_BUILD_ROOT/usr/share/sysreport/sysreport-fdisk
+rm -f $RPM_BUILD_ROOT/usr/share/sysreport/text.xsl
+%endif
%clean
rm -rf ${RPM_BUILD_ROOT}
@@ -52,9 +63,11 @@ rm -rf ${RPM_BUILD_ROOT}
%{_sbindir}/sosreport
/usr/share/sos/rhsupport.pub
/usr/bin/rh-upload-core
+%if 0%{?rhel}
/usr/sbin/sysreport
/usr/sbin/sysreport.legacy
/usr/share/sysreport
+%endif
%{python_sitelib}/sos/
%{_mandir}/man1/sosreport.1*
%{_localedir}/*/LC_MESSAGES/sos.mo