From e083e0224c00d984e9e9e7ae2724581b08c144ae Mon Sep 17 00:00:00 2001 From: Red Tail Date: Thu, 3 Jun 2021 14:53:25 -0400 Subject: [PATCH] Initial commit to enable RHEL-9 gating for rteval Resolves: rhbz#1966702 Signed-off-by: Mark Simmons msimmons@redhat.com --- gating.yaml | 6 ++ ...Remove-python-schedutils-requirement.patch | 74 +++++++++++++++++++ rteval.spec | 69 ++++++++++------- tests/scripts/run_tests.sh | 20 +++++ tests/tests.yml | 16 ++++ 5 files changed, 157 insertions(+), 28 deletions(-) create mode 100644 gating.yaml create mode 100644 rteval-Remove-python-schedutils-requirement.patch create mode 100644 tests/scripts/run_tests.sh create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/rteval-Remove-python-schedutils-requirement.patch b/rteval-Remove-python-schedutils-requirement.patch new file mode 100644 index 0000000..3842e99 --- /dev/null +++ b/rteval-Remove-python-schedutils-requirement.patch @@ -0,0 +1,74 @@ +From d12487a752ad6ff2453c70c4e26e0d8e60fa0292 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 13 Jan 2021 11:12:06 -0500 +Subject: [PATCH] rteval: Remove requirement to install python-schedutils + +This is actually a no-op in the code as no code was actually importing +python-schedutils or using it! + +This patches removes mention of it from a few documentation files. + +Note: we should remove rteval.spec entirely, the reason we cannot yet +is that there is some code that parses the version number from it. + +Signed-off-by: John Kacur +--- + README | 3 --- + doc/installing.txt | 6 +----- + rteval.spec | 2 +- + 3 files changed, 2 insertions(+), 9 deletions(-) + +diff --git a/README b/README +index 5ac45dcb2826..a5cf98344a46 100644 +--- a/README ++++ b/README +@@ -19,9 +19,6 @@ Rteval requires the following packages to run: + Python >= 3.0 + http://www.python.org/download/ + +-python-schedutils +- git://git.kernel.org/pub/scm/libs/python/python-schedutils/python-schedutils.git +- + python-ethtool + git://git.kernel.org/pub/scm/linux/kernel/git/acme/python-ethtool.git + +diff --git a/doc/installing.txt b/doc/installing.txt +index 14a755c4ef18..ff2d43cb9481 100644 +--- a/doc/installing.txt ++++ b/doc/installing.txt +@@ -1,10 +1,6 @@ + The rteval utility requires some external software libraries to run + properly. These are: + +-python-schedutils +- A python library to manipulate priority and affinty of threads +- git://git.kernel.org/pub/scm/libs/python/python-schedutils/python-schedutils.git +- + python-ethtool + A python library to query network interfaces + git://git.kernel.org/pub/scm/linux/kernel/git/acme/python-ethtool.git +@@ -26,7 +22,7 @@ rt-tests + git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git + + +-$ sudo yum install python-{dmidecode,ethtool,schedutils} ++$ 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.spec b/rteval.spec +index 834ac3c5d783..e84f46ab440b 100644 +--- a/rteval.spec ++++ b/rteval.spec +@@ -14,7 +14,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + + BuildRequires: python3-devel + Requires: platform-python +-Requires: python3-schedutils python3-ethtool python3-lxml ++Requires: python3-ethtool python3-lxml + Requires: python3-dmidecode >= 3.10 + Requires: rt-tests >= 0.97 + Requires: rteval-loads >= 1.4 +-- +2.26.2 + diff --git a/rteval.spec b/rteval.spec index 44f6fce..af11e30 100644 --- a/rteval.spec +++ b/rteval.spec @@ -1,37 +1,38 @@ Name: rteval Version: 3.1 -Release: 5%{?dist} +Release: 4%{?dist} Summary: Utility to evaluate system suitability for RT Linux Group: Development/Tools License: GPLv2 URL: https://git.kernel.org/pub/scm/utils/rteval/rteval.git -Source0: https://www.kernel.org/pub/linux/utils/%{name}/%{name}-%{version}.tar.xz +Source0: https://www.kernel.org/pub/linux/utils/rteval/rteval-3.1.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python3-devel +Requires: platform-python Requires: python3-ethtool Requires: python3-lxml Requires: python3-dmidecode >= 3.10 -Requires: realtime-tests -Requires: stress-ng -Requires: rteval-loads >= 1.4-11 +Requires: rt-tests >= 1.5-11 +Requires: rteval-loads >= 1.4-7 Requires: sysstat Requires: xz bzip2 Requires: kernel-headers Requires: sos Requires: tar +BuildArch: noarch +Obsoletes: rteval <= 2.14 Requires: numactl Requires: gcc flex bison bc make Requires: elfutils elfutils-libelf-devel Requires: openssl Requires: openssl-devel -Requires: binutils -BuildArch: noarch +Obsoletes: rteval-common <= 3.1 -# Patches +#Patches Patch1: rteval-Fix-incorrect-import-in-sysinfo-dir.patch -Patch2: rteval-Remove-requirement-to-install-python-schedutils.patch +Patch2: rteval-Remove-python-schedutils-requirement.patch %description The rteval script is a utility for measuring various aspects of @@ -53,36 +54,48 @@ to the screen. %install %{__python3} setup.py install --root=$RPM_BUILD_ROOT +%clean +rm -rf $RPM_BUILD_ROOT + %files %defattr(-,root,root,-) %{python3_sitelib}/*.egg-info -%doc README doc/rteval.txt -%license COPYING + +%doc COPYING README doc/rteval.txt %dir %{_datadir}/%{name} -%{python3_sitelib}/rteval +%{python3_sitelib}/rteval/rtevalclient.py* +%{python3_sitelib}/rteval/rtevalConfig.py* +%{python3_sitelib}/rteval/rtevalXMLRPC.py* +%{python3_sitelib}/rteval/version.py* +%{python3_sitelib}/rteval/Log.py* +%{python3_sitelib}/rteval/misc.py* +%{python3_sitelib}/rteval/systopology.py* %{_mandir}/man8/rteval.8.gz %config(noreplace) %{_sysconfdir}/rteval.conf %{_datadir}/%{name}/rteval_*.xsl -%{_bindir}/rteval +%{python3_sitelib}/rteval/__init__.py* +%{python3_sitelib}/rteval/rtevalMailer.py* +%{python3_sitelib}/rteval/rtevalReport.py* +%{python3_sitelib}/rteval/xmlout.py* +%{python3_sitelib}/rteval/modules +%{python3_sitelib}/rteval/sysinfo +/usr/bin/rteval + +%{python3_sitelib}/rteval/__pycache__/* %changelog -* Fri Apr 16 2021 Mohan Boddu - 3.1-5 -- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - -* Thu Jan 28 2021 John Kacur - 3.1-4 -- Made some changes to simplify the %%files section considerably -- Added some Requires for building the kernel that were in rteval-loads - -* Wed Jan 27 2021 John Kacur - 3.1-3 -- Remove the requirement to install python-schedutils -- add %%pycached to python files to properly handle __pycache__ -- remove unncessary %%clean section -- Change requires rt-tests to realtime-tests -- Add a requires for stress-ng -- Use the %%license macro on the COPYING file +* Wed Jan 13 2021 John Kacur - 3.1-4 +- Remove python-schedutils requirement +- Fix spec file to make Obsoletes rteval-common cover all necessary releases +Resolves: rhbz#1869340 +* Wed Jan 13 2021 John Kacur - 3.1-3 +- Remove a stray line in the changelog +Resolves: rhbz#1890555 + * Wed Jan 13 2021 John Kacur - 3.1-2 -- Fix an incorrect import in rteval/sysinfo/__init__.py +- Fix incorrect import in rteval/sysinfo/__init__.py +Resolves: rhbz#1890555 * Mon Jan 11 2021 John Kacur - 3.1-1 - Upgrade to rteval-3.1 diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh new file mode 100644 index 0000000..9a2c9df --- /dev/null +++ b/tests/scripts/run_tests.sh @@ -0,0 +1,20 @@ +#!/usr/bin/bash + +# make sure we have rteval installed +if rpm -q --quiet rteval; then + : +else + sudo dnf install -y rteval + if [[ $? != 0 ]]; then + echo "install of rteval failed!" + exit 1 + fi +fi + +rteval --help + +if [[ $? != 0 ]]; then + exit 2 +fi + +exit 0 diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..f2e1e05 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,16 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - simple: + dir: scripts + run: ./run_tests.sh + - short_test: + dir: . + run: rteval --duration=2m + timeout: 10m + required_packages: + - make + - rteval