!30 Fix sos command failed in sos 4.0
From: @weidongkl Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
1b025d40a0
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
|
||||
|
||||
6
sos.spec
6
sos.spec
@ -2,7 +2,7 @@
|
||||
|
||||
Name: sos
|
||||
Version: 4.0
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: A set of tools to gather troubleshooting information from a system
|
||||
License: GPLv2+
|
||||
URL: https://github.com/sosreport/sos
|
||||
@ -11,6 +11,7 @@ Source0: https://github.com/sosreport/sos/archive/%{version}.tar.gz#/%{nam
|
||||
Patch6000: backport-Fix-dict-order-py38-incompatibility.patch
|
||||
Patch9000: openEuler-add-openEuler-policy.patch
|
||||
Patch9001: add-uniontech-os-support.patch
|
||||
Patch9002: Fix-sos-command-failed-in-sos-4.0.patch
|
||||
|
||||
BuildRequires: python3-devel gettext
|
||||
Requires: libxml2-python3 bzip2 xz python3-rpm tar python3-pexpect
|
||||
@ -59,6 +60,9 @@ install -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
- add UnionTech policy
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user