From 636e9dd29d86028cfffc30c8f41c514446447d9d Mon Sep 17 00:00:00 2001 From: Sergey Cherevko Date: Tue, 24 Dec 2024 18:13:23 +0300 Subject: [PATCH] Added MSVSphere policy implementation --- ...-Add-MSVSphere-policy-implementation.patch | 55 +++++++++++++++++++ SPECS/sos.spec | 8 ++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0001-Add-MSVSphere-policy-implementation.patch diff --git a/SOURCES/0001-Add-MSVSphere-policy-implementation.patch b/SOURCES/0001-Add-MSVSphere-policy-implementation.patch new file mode 100644 index 0000000..12ad3c0 --- /dev/null +++ b/SOURCES/0001-Add-MSVSphere-policy-implementation.patch @@ -0,0 +1,55 @@ +From a9de62e64652cfb3d92352b70da8bcd6df7b1b80 Mon Sep 17 00:00:00 2001 +From: Eugene Zamriy +Date: Sat, 1 Apr 2023 00:38:19 +0300 +Subject: [PATCH] Add MSVSphere policy implementation + +--- + sos/policies/distros/msvsphere.py | 36 +++++++++++++++++++++++++++++++ + 1 file changed, 36 insertions(+) + create mode 100644 sos/policies/distros/msvsphere.py + +diff --git a/sos/policies/distros/msvsphere.py b/sos/policies/distros/msvsphere.py +new file mode 100644 +index 0000000..41ae374 +--- /dev/null ++++ b/sos/policies/distros/msvsphere.py +@@ -0,0 +1,36 @@ ++# Copyright (C) Eugene Zamriy ++ ++# This file is part of the sos project: https://github.com/sosreport/sos ++# ++# This copyrighted material is made available to anyone wishing to use, ++# modify, copy, or redistribute it subject to the terms and conditions of ++# version 2 of the GNU General Public License. ++# ++# See the LICENSE file in the source distribution for further information. ++ ++from sos.policies.distros.redhat import RedHatPolicy, OS_RELEASE ++import os ++ ++ ++class MSVSpherePolicy(RedHatPolicy): ++ ++ distro = 'MSVSphere' ++ ++ vendor = 'LLC "NCSD"' ++ ++ vendor_urls = [ ++ ('Distribution Website', 'https://msvsphere-os.ru'), ++ ('Vendor Website', 'http://ncpr.su/') ++ ] ++ ++ @classmethod ++ def check(cls, remote=''): ++ if remote: ++ return cls.distro in remote ++ elif not os.path.exists(OS_RELEASE): ++ return False ++ with open(OS_RELEASE, 'r') as fd: ++ for line in fd: ++ if line.startswith('NAME') and 'MSVSphere' in line: ++ return True ++ return False +-- +2.43.5 + diff --git a/SPECS/sos.spec b/SPECS/sos.spec index 40eff1c..a26ed46 100644 --- a/SPECS/sos.spec +++ b/SPECS/sos.spec @@ -5,7 +5,7 @@ Summary: A set of tools to gather troubleshooting information from a system Name: sos Version: 4.7.2 -Release: 2%{?dist} +Release: 2%{?dist}.inferit Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source1: sos-audit-%{auditversion}.tgz @@ -23,6 +23,8 @@ Recommends: python3-pyyaml Conflicts: vdsm < 4.40 Obsoletes: sos-collector <= 1.9 Patch0: sos-RHEL-22732-reverted.patch +# MSVSphere patches +Patch1001: 0001-Add-MSVSphere-policy-implementation.patch %description Sos is a set of tools that gathers information about system @@ -34,6 +36,7 @@ support technicians and developers. %setup -qn %{name}-%{version} %setup -T -D -a1 -q %patch0 -p1 -R +%patch1001 -p1 %build %py3_build @@ -106,6 +109,9 @@ of the system. Currently storage and filesystem commands are audited. %changelog +* Tue Dec 24 2024 Sergey Cherevko - 4.7.2-2.inferit +- Added MSVSphere policy implementation + * Tue Nov 26 2024 MSVSphere Packaging Team - 4.7.2-2 - Rebuilt for MSVSphere 10