From 677f0f50c88d473433685ba240d6632767781d9a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 5 Apr 2022 07:21:18 -0400 Subject: [PATCH] import rteval-3.3-4.el9_0 --- ...-for-python3.6-where-text-True-is-no.patch | 53 +++++++++++++++++++ ...dconfig-build-on-machines-that-don-t.patch | 31 +++++++++++ SPECS/rteval.spec | 11 +++- 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 SOURCES/rteval-Fix-Popen-for-python3.6-where-text-True-is-no.patch create mode 100644 SOURCES/rteval-Fix-allmodconfig-build-on-machines-that-don-t.patch diff --git a/SOURCES/rteval-Fix-Popen-for-python3.6-where-text-True-is-no.patch b/SOURCES/rteval-Fix-Popen-for-python3.6-where-text-True-is-no.patch new file mode 100644 index 0000000..f89b8ee --- /dev/null +++ b/SOURCES/rteval-Fix-Popen-for-python3.6-where-text-True-is-no.patch @@ -0,0 +1,53 @@ +From cb8b42e3328f9a06b5a18dda64969f16196b9190 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Tue, 18 Jan 2022 15:03:36 -0500 +Subject: [PATCH 1/2] rteval: Fix Popen for python3.6 where text=True is not + available + +Fix using text=True in Popen for python-3.6 by using +encoding='utf-8' instead + +Signed-off-by: John Kacur +--- + rteval/sysinfo/services.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/rteval/sysinfo/services.py b/rteval/sysinfo/services.py +index e5de22efc342..c85980e19165 100644 +--- a/rteval/sysinfo/services.py ++++ b/rteval/sysinfo/services.py +@@ -62,11 +62,11 @@ class SystemServices: + if not [1 for p in reject if fnmatch.fnmatch(servicename, p)] \ + and os.access(service, os.X_OK): + cmd = '%s -qs "\(^\|\W\)status)" %s' % (getcmdpath('grep'), service) +- c = subprocess.Popen(cmd, shell=True, text=True) ++ c = subprocess.Popen(cmd, shell=True, encoding='utf-8') + c.wait() + if c.returncode == 0: + cmd = ['env', '-i', 'LANG="%s"' % os.environ['LANG'], 'PATH="%s"' % os.environ['PATH'], 'TERM="%s"' % os.environ['TERM'], service, 'status'] +- c = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) ++ c = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8') + c.wait() + if c.returncode == 0 and (c.stdout.read() or c.stderr.read()): + ret_services[servicename] = 'running' +@@ -81,7 +81,7 @@ class SystemServices: + ret_services = {} + cmd = '%s list-unit-files -t service --no-legend' % getcmdpath('systemctl') + self.__log(Log.DEBUG, "cmd: %s" % cmd) +- c = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) ++ c = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8') + for p in c.stdout: + # p are lines like b'servicename.service status' + v = p.strip().split() +@@ -91,7 +91,7 @@ class SystemServices: + + def services_get(self): + cmd = [getcmdpath('ps'), '-ocomm=', '1'] +- c = subprocess.Popen(cmd, stdout=subprocess.PIPE, text=True) ++ c = subprocess.Popen(cmd, stdout=subprocess.PIPE, encoding='utf-8') + self.__init = c.stdout.read().strip() + if self.__init == 'systemd': + self.__log(Log.DEBUG, "Using systemd to get services status") +-- +2.35.1 + diff --git a/SOURCES/rteval-Fix-allmodconfig-build-on-machines-that-don-t.patch b/SOURCES/rteval-Fix-allmodconfig-build-on-machines-that-don-t.patch new file mode 100644 index 0000000..ca48cde --- /dev/null +++ b/SOURCES/rteval-Fix-allmodconfig-build-on-machines-that-don-t.patch @@ -0,0 +1,31 @@ +From 5931ace285305edbf8c86508f89869c5f3be0bf0 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 9 Mar 2022 14:03:10 -0500 +Subject: [PATCH 2/2] rteval: Fix allmodconfig build on machines that don't + allow sha1 signing + +rteval compiles the kernel using allmodconfig as a load. +This can be a problem if sha1 signing of modules is disabled. +Fix this by signing with sha512 + +Suggested-by: Juri Lelli +Signed-off-by: John Kacur +--- + rteval/modules/loads/kcompile.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py +index 8f97d38eca56..367f8dc1ca86 100644 +--- a/rteval/modules/loads/kcompile.py ++++ b/rteval/modules/loads/kcompile.py +@@ -66,6 +66,7 @@ class KBuildJob: + + self.runcmd = f"make O={self.objdir} -C {self.kdir} -j{self.jobs}" + self.cleancmd = f"make O={self.objdir} -C {self.kdir} clean allmodconfig" ++ self.cleancmd += f"&& pushd {self.objdir} && {self.kdir}/scripts/config -d CONFIG_MODULE_SIG_SHA1 -e CONFIG_MODULE_SIG_SHA512 && popd && make O={self.objdir} -C {self.kdir} olddefconfig" + if self.binder: + self.runcmd = self.binder + " " + self.runcmd + self.cleancmd = self.binder + " " + self.cleancmd +-- +2.35.1 + diff --git a/SPECS/rteval.spec b/SPECS/rteval.spec index 9187d6a..6da0b2d 100644 --- a/SPECS/rteval.spec +++ b/SPECS/rteval.spec @@ -1,6 +1,6 @@ Name: rteval Version: 3.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Utility to evaluate system suitability for RT Linux Group: Development/Tools @@ -33,6 +33,8 @@ Patch1: rteval-Fix-test-misses-threshold-assignment.patch Patch2: rteval-Increase-default-buckets-from-2000-to-3500.patch Patch3: rteval-Don-t-restrict-measurement-threads-to-inherit.patch Patch4: rteval-If-the-user-doesn-t-specify-a-cpumask-use-the.patch +Patch5: rteval-Fix-Popen-for-python3.6-where-text-True-is-no.patch +Patch6: rteval-Fix-allmodconfig-build-on-machines-that-don-t.patch %description The rteval script is a utility for measuring various aspects of @@ -49,6 +51,8 @@ to the screen. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build %{__python3} setup.py build @@ -75,6 +79,11 @@ rm -rf $RPM_BUILD_ROOT %{python3_sitelib}/rteval/__pycache__/* %changelog +* Thu Mar 10 2022 John Kacur - 3.3-4 +- Fix Popen for python3.6 +- Fix allmodconfig when SHA1 signing of modules is not available +Resolves: rhbz#2062457 + * Tue Feb 15 2022 John Kacur - 3.3-3 - Use inherited cpumask if user doesn't specify a cpumask Resolves: rhbz#1983783