From d2ae4aca05cdc9951d406d7afaf2203d299ae635 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Thu, 21 Dec 2023 14:00:23 -0500 Subject: [PATCH] Disable the use of python-dmidecode --- .rteval.metadata | 1 + rteval-Disable-use-of-python-dmidecode.patch | 87 ++++++++++++++++++++ rteval-Makefile-More-rpm-cleanups.patch | 64 ++++++++++++++ rteval.spec | 11 ++- 4 files changed, 161 insertions(+), 2 deletions(-) create mode 100644 .rteval.metadata create mode 100644 rteval-Disable-use-of-python-dmidecode.patch create mode 100644 rteval-Makefile-More-rpm-cleanups.patch diff --git a/.rteval.metadata b/.rteval.metadata new file mode 100644 index 0000000..223fe1e --- /dev/null +++ b/.rteval.metadata @@ -0,0 +1 @@ +fe85dce7852985e9ca916877b278feed31508f8f rteval-3.7.tar.xz diff --git a/rteval-Disable-use-of-python-dmidecode.patch b/rteval-Disable-use-of-python-dmidecode.patch new file mode 100644 index 0000000..ceed1b5 --- /dev/null +++ b/rteval-Disable-use-of-python-dmidecode.patch @@ -0,0 +1,87 @@ +From d142f0d23d8df1cede3573c3d6cfbf16535b3475 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 20 Dec 2023 17:55:21 -0500 +Subject: [PATCH 2/2] rteval: Disable use of python-dmidecode + +python-dmidecode is not being maintained upstream. +For now just disable it's use in rteval since it is useful but not +essential information for running rteval + +In the future look at generating this info directly using dmidecode. + +Signed-off-by: John Kacur +--- + README | 6 ------ + doc/installing.txt | 9 --------- + rteval/sysinfo/dmi.py | 4 ++-- + 3 files changed, 2 insertions(+), 17 deletions(-) + +diff --git a/README b/README +index a5cf98344a46..b352d7f66ad2 100644 +--- a/README ++++ b/README +@@ -19,15 +19,9 @@ Rteval requires the following packages to run: + Python >= 3.0 + http://www.python.org/download/ + +-python-ethtool +- git://git.kernel.org/pub/scm/linux/kernel/git/acme/python-ethtool.git +- + python-lxml + http://lxml.de/ + +-python-dmidecode +- http://www.ohloh.net/p/python-dmidecode +- + libxml2-python + http://xmlsoft.org/ + +diff --git a/doc/installing.txt b/doc/installing.txt +index ff2d43cb9481..227249bbc9ed 100644 +--- a/doc/installing.txt ++++ b/doc/installing.txt +@@ -1,18 +1,10 @@ + The rteval utility requires some external software libraries to run + properly. These are: + +-python-ethtool +- A python library to query network interfaces +- git://git.kernel.org/pub/scm/linux/kernel/git/acme/python-ethtool.git +- + python-lxml + A python library to parse XML files and XSLT stylesheets + http://lxml.de/ + +-python-dmidecode +- A python library used to access DMI table information +- http://www.autonomy.net.au/display/pydmi/Home +- + libxml2-python + A python library to parse XML files + http://xmlsoft.org/ +@@ -22,7 +14,6 @@ rt-tests + git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git + + +-$ sudo yum install python-{dmidecode,ethtool) + $ git clone \ + git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git + $ cd rt-tests && sudo make prefix=/usr install +diff --git a/rteval/sysinfo/dmi.py b/rteval/sysinfo/dmi.py +index e8285d263fe6..c01a0eef1435 100644 +--- a/rteval/sysinfo/dmi.py ++++ b/rteval/sysinfo/dmi.py +@@ -15,8 +15,8 @@ from rteval import xmlout + from rteval import rtevalConfig + + try: +- import dmidecode +- dmidecode_avail = True ++ # import dmidecode ++ dmidecode_avail = False + except ModuleNotFoundError: + dmidecode_avail = False + +-- +2.42.0 + diff --git a/rteval-Makefile-More-rpm-cleanups.patch b/rteval-Makefile-More-rpm-cleanups.patch new file mode 100644 index 0000000..abca54c --- /dev/null +++ b/rteval-Makefile-More-rpm-cleanups.patch @@ -0,0 +1,64 @@ +From 2d2e85c459d240926c99b1961bbef090aa80a1fc Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 20 Dec 2023 17:22:22 -0500 +Subject: [PATCH 1/2] rteval: Makefile: More rpm cleanups + +Afer having removed the upstream specfile, there were still a few +references to rpms in the Makefile. These are not necessary because any +work with rpms can be done with modern rpm tools and are typically done +by distributions + +Also test whether directory 'run' exists since it may have been removed +by make realclean, and create it if it does not + +Signed-off-by: John Kacur +--- + Makefile | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +diff --git a/Makefile b/Makefile +index ee4cca555b95..b8bed643f760 100644 +--- a/Makefile ++++ b/Makefile +@@ -31,6 +31,7 @@ load: + $(PYTHON) rteval-cmd --onlyload -D -L -v --workdir=./run --loaddir=$(HERE)/loadsource -f $(HERE)/rteval/rteval.conf -i $(HERE)/rteval + + sysreport: ++ [ -d $(HERE)/run ] || mkdir run + $(PYTHON) rteval-cmd -D -v --workdir=$(HERE)/run --loaddir=$(HERE)/loadsource --duration=$(D) -i $(HERE)/rteval --sysreport + + clean: +@@ -39,7 +40,7 @@ clean: + + realclean: clean + [ -f $(XMLRPCDIR)/Makefile ] && make -C $(XMLRPCDIR) maintainer-clean || echo -n +- rm -rf run rpm ++ rm -rf run + + install: install_loads install_rteval + +@@ -73,13 +74,6 @@ rteval-xmlrpc-$(XMLRPCVER).tar.gz : + make distcheck + cp $(XMLRPCDIR)/rteval-xmlrpc-$(XMLRPCVER).tar.gz $(HERE)/ + +-rpm_prep: +- rm -rf rpm +- mkdir -p rpm/{BUILD,RPMS,SRPMS,SOURCES,SPECS} +- +-rpms rpm: rpm_prep rtevalrpm loadrpm +- +- + help: + @echo "" + @echo "rteval Makefile targets:" +@@ -88,6 +82,7 @@ help: + @echo " tarfile: create the source tarball" + @echo " install: install rteval locally" + @echo " clean: cleanup generated files" ++ @echo " realclean: Same as clean plus directory run" + @echo " sysreport: do a short testrun and generate sysreport data" + @echo " tags: generate a ctags file" + @echo " cleantags: remove the ctags file" +-- +2.42.0 + diff --git a/rteval.spec b/rteval.spec index f2a0d82..17288b5 100644 --- a/rteval.spec +++ b/rteval.spec @@ -1,6 +1,6 @@ Name: rteval Version: 3.7 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Utility to evaluate system suitability for RT Linux Group: Development/Tools @@ -12,7 +12,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python3-devel Requires: python3-lxml Requires: python3-libxml2 -Requires: python3-dmidecode >= 3.10 Requires: python3-requests Requires: realtime-tests >= 2.5-1 Requires: rteval-loads >= 1.6-2 @@ -33,6 +32,8 @@ BuildArch: noarch #Patches Patch1: rteval-Change-the-default-kernel-for-kcompile.patch Patch2: rteval-Remove-upstream-spec-file.patch +Patch3: rteval-Makefile-More-rpm-cleanups.patch +Patch4: rteval-Disable-use-of-python-dmidecode.patch %description The rteval script is a utility for measuring various aspects of @@ -47,6 +48,8 @@ to the screen. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %{__python3} setup.py build @@ -68,6 +71,10 @@ to the screen. %{_bindir}/rteval %changelog +* Thu Dec 21 2023 John Kacur - 3.7-6 +- Disable the use of python-dmidecode +Resolves: RHEL-8857 + * Wed Nov 15 2023 John Kacur - 3.7-5 - Add a capabilities rule to the rpminspect.yaml file Resolves: RHEL-16400