From a04768af627a8531fb443ccb2d1fcef6df37c515 Mon Sep 17 00:00:00 2001 From: Sergey Cherevko Date: Tue, 15 Aug 2023 10:26:54 +0300 Subject: [PATCH] Added MSVSphere policy implementation --- ...-Add-MSVSphere-policy-implementation.patch | 55 +++++++++++++++++++ SPECS/sos.spec | 10 +++- 2 files changed, 63 insertions(+), 2 deletions(-) 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..3c96e31 --- /dev/null +++ b/SOURCES/0001-Add-MSVSphere-policy-implementation.patch @@ -0,0 +1,55 @@ +From 962bdc46472a45c0dd0dacbf358fe78427346783 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..12abf55 +--- /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.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.39.2 + diff --git a/SPECS/sos.spec b/SPECS/sos.spec index 73ebdc2..2f419f3 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.5.1 -Release: 3%{?dist} +Release: 3%{?dist}.inferit Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source1: sos-audit-%{auditversion}.tgz @@ -27,6 +27,8 @@ Patch1: sos-bz2175650-microshift-plugin-oc-command.patch Patch2: sos-bz2176086-iprconfig-sg-kmod.patch Patch3: sos-bz2176218-sos-clean-tmp.patch +# MSVSphere patches +Patch1001: 0001-Add-MSVSphere-policy-implementation.patch %description Sos is a set of tools that gathers information about system @@ -40,7 +42,7 @@ support technicians and developers. %patch1 -p1 %patch2 -p1 %patch3 -p1 - +%patch1001 -p1 %build %py3_build @@ -110,6 +112,10 @@ of the system. Currently storage and filesystem commands are audited. %ghost /etc/audit/rules.d/40-sos-storage.rules %changelog +* Tue Aug 15 2023 Sergey Cherevko - 4.5.1-3.inferit +- Added MSVSphere policy implementation +- Rebuilt for MSVSphere 8.8 + * Wed Jul 26 2023 MSVSphere Packaging Team - 4.5.1-3 - Rebuilt for MSVSphere 8.8