Compare commits
10 Commits
9d80ae31d9
...
b541ec0eab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b541ec0eab | ||
|
|
d47d7f55da | ||
|
|
2d42e9ba1b | ||
|
|
934527a849 | ||
|
|
bb527174fc | ||
|
|
49546400c1 | ||
|
|
dbd382bd78 | ||
|
|
b6c31e1b27 | ||
|
|
1b025d40a0 | ||
|
|
daff78541f |
BIN
4.5.6.tar.gz
Normal file
BIN
4.5.6.tar.gz
Normal file
Binary file not shown.
46
Fix-sos-command-failed-in-sos-4.0.patch
Normal file
46
Fix-sos-command-failed-in-sos-4.0.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
From e024511400e23d28b47c25df79ab162d8e1991ae Mon Sep 17 00:00:00 2001
|
||||||
|
From: wei dong <weidong@uniontech.com>
|
||||||
|
Date: Tue, 22 Feb 2022 10:24:18 +0800
|
||||||
|
Subject: [PATCH] Fix sos command failed in sos 4.0
|
||||||
|
|
||||||
|
Signed-off-by: wei dong <weidong@uniontech.com>
|
||||||
|
---
|
||||||
|
sos/policies/uniontech.py | 16 ++++++++++------
|
||||||
|
1 file changed, 10 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sos/policies/uniontech.py b/sos/policies/uniontech.py
|
||||||
|
index cd30136..535335b 100644
|
||||||
|
--- a/sos/policies/uniontech.py
|
||||||
|
+++ b/sos/policies/uniontech.py
|
||||||
|
@@ -1,6 +1,3 @@
|
||||||
|
-from __future__ import print_function
|
||||||
|
-
|
||||||
|
-from sos.plugins import RedHatPlugin
|
||||||
|
from sos.policies.redhat import RedHatPolicy, OS_RELEASE
|
||||||
|
import os
|
||||||
|
|
||||||
|
@@ -10,11 +7,18 @@ class UnionTechPolicy(RedHatPolicy):
|
||||||
|
vendor = "the UnionTech Project"
|
||||||
|
vendor_url = "https://www.chinauos.com/"
|
||||||
|
|
||||||
|
- def __init__(self, sysroot=None):
|
||||||
|
- super(UnionTechPolicy, self).__init__(sysroot=sysroot)
|
||||||
|
+ def __init__(self, sysroot=None, init=None, probe_runtime=True,
|
||||||
|
+ remote_exec=None):
|
||||||
|
+ super(UnionTechPolicy, self).__init__(sysroot=sysroot, init=init,
|
||||||
|
+ probe_runtime=probe_runtime,
|
||||||
|
+ remote_exec=remote_exec)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
- def check(cls):
|
||||||
|
+ def check(cls, remote=''):
|
||||||
|
+
|
||||||
|
+ if remote:
|
||||||
|
+ return cls.distro in remote
|
||||||
|
+
|
||||||
|
if not os.path.exists(OS_RELEASE):
|
||||||
|
return False
|
||||||
|
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
53
add-Kylin-OS-support.patch
Normal file
53
add-Kylin-OS-support.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From 143db4a9516bd0e1c4c4b1e8a7aa91c04ee1699e Mon Sep 17 00:00:00 2001
|
||||||
|
From: jxy_git <jiangxinyu@kylinos.cn>
|
||||||
|
Date: Mon, 6 Nov 2023 17:31:38 +0800
|
||||||
|
Subject: [PATCH] add Kylin OS support
|
||||||
|
|
||||||
|
---
|
||||||
|
sos/policies/Kylin.py | 34 ++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 34 insertions(+)
|
||||||
|
create mode 100644 sos/policies/Kylin.py
|
||||||
|
|
||||||
|
diff --git a/sos/policies/Kylin.py b/sos/policies/Kylin.py
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..dbbb229
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/sos/policies/Kylin.py
|
||||||
|
@@ -0,0 +1,34 @@
|
||||||
|
+from sos.policies.redhat import RedHatPolicy, OS_RELEASE
|
||||||
|
+import os
|
||||||
|
+
|
||||||
|
+class KylinPolicy(RedHatPolicy):
|
||||||
|
+
|
||||||
|
+ distro = "Kylin Linux Advanced Server"
|
||||||
|
+ vendor = "Kylin"
|
||||||
|
+ vendor_urls = [
|
||||||
|
+ ('Distribution Website', 'https://www.kylinos.cn/'),
|
||||||
|
+ ('Vendor Website', 'https://www.kylinos.cn/')
|
||||||
|
+ ]
|
||||||
|
+
|
||||||
|
+ def __init__(self, sysroot=None, init=None, probe_runtime=True,
|
||||||
|
+ remote_exec=None):
|
||||||
|
+ super(KylinPolicy, self).__init__(sysroot=sysroot, init=init,
|
||||||
|
+ probe_runtime=probe_runtime,
|
||||||
|
+ remote_exec=remote_exec)
|
||||||
|
+
|
||||||
|
+ @classmethod
|
||||||
|
+ def check(cls, remote=''):
|
||||||
|
+
|
||||||
|
+ if remote:
|
||||||
|
+ return cls.distro in remote
|
||||||
|
+
|
||||||
|
+ if not os.path.exists(OS_RELEASE):
|
||||||
|
+ return False
|
||||||
|
+
|
||||||
|
+ with open(OS_RELEASE, 'r') as f:
|
||||||
|
+ for line in f:
|
||||||
|
+ if line.startswith('NAME'):
|
||||||
|
+ if 'Kylin Linux' in line:
|
||||||
|
+ return True
|
||||||
|
+ return False
|
||||||
|
+
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
49
add-KylinSec-OS-support.patch
Normal file
49
add-KylinSec-OS-support.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From bf2a712488b3c980342293439400f5c4f476fa6c Mon Sep 17 00:00:00 2001
|
||||||
|
From: liuxingxiang <liuxingxiang@kylinsec.com.cn>
|
||||||
|
Date: Wed, 23 Feb 2022 09:39:22 +0800
|
||||||
|
Subject: [PATCH 1/1] add KylinSec OS support
|
||||||
|
|
||||||
|
---
|
||||||
|
sos/policies/KylinSec.py | 30 ++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 30 insertions(+)
|
||||||
|
create mode 100644 sos/policies/KylinSec.py
|
||||||
|
|
||||||
|
diff --git a/sos/policies/KylinSec.py b/sos/policies/KylinSec.py
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..bf0b6f3
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/sos/policies/KylinSec.py
|
||||||
|
@@ -0,0 +1,30 @@
|
||||||
|
+from sos.policies.redhat import RedHatPolicy, OS_RELEASE
|
||||||
|
+import os
|
||||||
|
+
|
||||||
|
+class KylinSecPolicy(RedHatPolicy):
|
||||||
|
+
|
||||||
|
+ distro = "KylinSec"
|
||||||
|
+ vendor = "KylinSec"
|
||||||
|
+ vendor_url = "http://www.kylinsec.com.cn/"
|
||||||
|
+
|
||||||
|
+ def __init__(self, sysroot=None, init=None, probe_runtime=True,
|
||||||
|
+ remote_exec=None):
|
||||||
|
+ super(KylinSecPolicy, self).__init__(sysroot=sysroot, init=init,
|
||||||
|
+ probe_runtime=probe_runtime,
|
||||||
|
+ remote_exec=remote_exec)
|
||||||
|
+
|
||||||
|
+ @classmethod
|
||||||
|
+ def check(cls, remote=''):
|
||||||
|
+
|
||||||
|
+ if remote:
|
||||||
|
+ return cls.distro in remote
|
||||||
|
+
|
||||||
|
+ if not os.path.exists(OS_RELEASE):
|
||||||
|
+ return False
|
||||||
|
+
|
||||||
|
+ with open(OS_RELEASE, 'r') as f:
|
||||||
|
+ for line in f:
|
||||||
|
+ if line.startswith('NAME'):
|
||||||
|
+ if 'KylinSec OS' in line:
|
||||||
|
+ return True
|
||||||
|
+ return False
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
From 1d7bab6c7ce3f78758113ca3cdf3e9fa1762df24 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Eric Desrochers <eric.desrochers@canonical.com>
|
|
||||||
Date: Wed, 19 Aug 2020 17:44:07 -0400
|
|
||||||
Subject: [PATCH] [options] Fix dict order py38 incompatibility
|
|
||||||
|
|
||||||
python-3.8 dict changes introduce a traceback during our config file
|
|
||||||
parsing for options with `-` characters in them.
|
|
||||||
|
|
||||||
Fix this by changing an iteration of the dict keys from `dict.keys()`
|
|
||||||
that returns a dict_keys view, to `list(dict)` which returns a list copy
|
|
||||||
of the keys.
|
|
||||||
|
|
||||||
Closes: #2206
|
|
||||||
Resolves: #2207
|
|
||||||
|
|
||||||
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>
|
|
||||||
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
||||||
---
|
|
||||||
sos/options.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/sos/options.py b/sos/options.py
|
|
||||||
index 3a2b4292f..ba3db1303 100644
|
|
||||||
--- a/sos/options.py
|
|
||||||
+++ b/sos/options.py
|
|
||||||
@@ -186,7 +186,7 @@ def _update_from_section(section, config):
|
|
||||||
if 'verbose' in odict.keys():
|
|
||||||
odict['verbosity'] = int(odict.pop('verbose'))
|
|
||||||
# convert options names
|
|
||||||
- for key in odict.keys():
|
|
||||||
+ for key in list(odict):
|
|
||||||
if '-' in key:
|
|
||||||
odict[key.replace('-', '_')] = odict.pop(key)
|
|
||||||
# set the values according to the config file
|
|
||||||
BIN
sos-4.0.tar.gz
BIN
sos-4.0.tar.gz
Binary file not shown.
37
sos.spec
37
sos.spec
@ -1,19 +1,23 @@
|
|||||||
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
|
|
||||||
Name: sos
|
Name: sos
|
||||||
Version: 4.0
|
Version: 4.5.6
|
||||||
Release: 4
|
Release: 2
|
||||||
Summary: A set of tools to gather troubleshooting information from a system
|
Summary: A set of tools to gather troubleshooting information from a system
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/sosreport/sos
|
URL: https://github.com/sosreport/sos
|
||||||
Source0: https://github.com/sosreport/sos/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/sosreport/sos/archive/%{version}.tar.gz
|
||||||
|
|
||||||
Patch6000: backport-Fix-dict-order-py38-incompatibility.patch
|
|
||||||
Patch9000: openEuler-add-openEuler-policy.patch
|
Patch9000: openEuler-add-openEuler-policy.patch
|
||||||
Patch9001: add-uniontech-os-support.patch
|
Patch9001: add-uniontech-os-support.patch
|
||||||
|
Patch9002: Fix-sos-command-failed-in-sos-4.0.patch
|
||||||
|
Patch9003: add-KylinSec-OS-support.patch
|
||||||
|
Patch9004: add-Kylin-OS-support.patch
|
||||||
|
|
||||||
BuildRequires: python3-devel gettext
|
BuildRequires: python3-devel gettext
|
||||||
Requires: libxml2-python3 bzip2 xz python3-rpm tar python3-pexpect
|
Requires: bzip2 xz python3-rpm tar python3-pexpect
|
||||||
|
Requires: python3-magic
|
||||||
|
Recommends: python3-pyyaml
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -38,9 +42,13 @@ install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/groups.d
|
|||||||
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/extras.d
|
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/extras.d
|
||||||
install -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
install -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
||||||
|
|
||||||
|
rm -rf ${RPM_BUILD_ROOT}/usr/config/
|
||||||
|
|
||||||
%find_lang %{name} || echo 0
|
%find_lang %{name} || echo 0
|
||||||
|
|
||||||
%files -f %{name}.lang
|
# internationalization is currently broken. Uncomment this line once fixed.
|
||||||
|
#%%files -f %%{name}.lang
|
||||||
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%config(noreplace) %{_sysconfdir}/sos/sos.conf
|
%config(noreplace) %{_sysconfdir}/sos/sos.conf
|
||||||
@ -59,13 +67,28 @@ install -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
|||||||
%{_mandir}/man5/*
|
%{_mandir}/man5/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 06 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 4.5.6-2
|
||||||
|
- add Kylin policy
|
||||||
|
|
||||||
|
* Thu Jul 27 2023 dillon chen < dillon.chen@gmail.com> - 4.5.6-1
|
||||||
|
- update to 4.5.6
|
||||||
|
|
||||||
|
* Sun Oct 9 2022 dillon chen < dillon.chen@gmail.com> - 4.4-1
|
||||||
|
- update to 4.4
|
||||||
|
|
||||||
|
* Wed Feb 23 2022 liuxingxiang <liuxingxiang@kylinsec.com.cn> - 4.0-6
|
||||||
|
- add KylinSec policy
|
||||||
|
|
||||||
|
* Tue Feb 22 2022 weidong <weidong@uniontech.com> - 4.0-5
|
||||||
|
- Fix sos command failed in sos 4.0
|
||||||
|
|
||||||
* Mon Jul 19 2021 liugang <liuganga@uniontech.com> - 4.0-4
|
* Mon Jul 19 2021 liugang <liuganga@uniontech.com> - 4.0-4
|
||||||
- add UnionTech policy
|
- add UnionTech policy
|
||||||
|
|
||||||
* Mon Mar 08 2021 shixuantong <shixuantong@huawei.com> - 4.0-3
|
* Mon Mar 08 2021 shixuantong <shixuantong@huawei.com> - 4.0-3
|
||||||
- add openEuler policy
|
- add openEuler policy
|
||||||
|
|
||||||
* Tue Mar 03 2021 shixuantong <shixuantong@huawei.com> - 4.0-2
|
* Wed Mar 03 2021 shixuantong <shixuantong@huawei.com> - 4.0-2
|
||||||
- fix unable to read configure file /etc/sos/sos.conf issue
|
- fix unable to read configure file /etc/sos/sos.conf issue
|
||||||
|
|
||||||
* Tue Feb 02 2021 shixuantong <shixuantong@huawei.com> - 4.0-1
|
* Tue Feb 02 2021 shixuantong <shixuantong@huawei.com> - 4.0-1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user