diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index b838721..229213b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,10 +12,3 @@ setools-3.3.8-f1e5b20.tar.bz2 /05e90ee.tar.gz /16c0696.tar.gz /4.4.0.tar.gz -/4.4.1.tar.gz -/4.4.2.tar.gz -/4.4.3.tar.gz -/4.4.4.tar.gz -/4.5.0.tar.gz -/4.5.1.tar.gz -/4.6.0.tar.gz diff --git a/1002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch b/1002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch new file mode 100644 index 0000000..d270d21 --- /dev/null +++ b/1002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch @@ -0,0 +1,142 @@ +From e47d19f4985098ca316eea4a383510d419ec6055 Mon Sep 17 00:00:00 2001 +From: Vit Mojzis +Date: Fri, 26 Apr 2019 15:27:25 +0200 +Subject: [PATCH 1/2] Do not export/use setools.InfoFlowAnalysis and + setools.DomainTransitionAnalysis + +dta and infoflow modules require networkx which brings lot of dependencies. +These dependencies are not necessary for setools module itself as it's +used in policycoreutils. + +Therefore it's better to use setools.infoflow.InfoFlowAnalysis and +setools.dta.DomainTransitionAnalysis and let the package containing +sedta and seinfoflow to require python3-networkx +--- + sedta | 5 +++-- + seinfoflow | 4 ++-- + setools/__init__.py | 4 ---- + setoolsgui/apol/dta.py | 2 +- + setoolsgui/apol/infoflow.py | 2 +- + tests/dta.py | 2 +- + tests/infoflow.py | 2 +- + 7 files changed, 9 insertions(+), 12 deletions(-) + +diff --git a/sedta b/sedta +index 57070098fe10..51890ea8ea73 100755 +--- a/sedta ++++ b/sedta +@@ -23,9 +23,10 @@ import logging + import signal + + import setools ++import setools.dta + + +-def print_transition(trans: setools.DomainTransition) -> None: ++def print_transition(trans: setools.dta.DomainTransition) -> None: + if trans.transition: + print("Domain transition rule(s):") + for t in trans.transition: +@@ -114,7 +115,7 @@ else: + + try: + p = setools.SELinuxPolicy(args.policy) +- g = setools.DomainTransitionAnalysis(p, reverse=args.reverse, exclude=args.exclude) ++ g = setools.dta.DomainTransitionAnalysis(p, reverse=args.reverse, exclude=args.exclude) + + if args.shortest_path or args.all_paths: + if args.shortest_path: +diff --git a/seinfoflow b/seinfoflow +index 0ddcfdc7c1fb..8321718b2640 100755 +--- a/seinfoflow ++++ b/seinfoflow +@@ -17,7 +17,7 @@ + # along with SETools. If not, see . + # + +-import setools ++import setools.infoflow + import argparse + import sys + import logging +@@ -102,7 +102,7 @@ elif args.booleans is not None: + try: + p = setools.SELinuxPolicy(args.policy) + m = setools.PermissionMap(args.map) +- g = setools.InfoFlowAnalysis(p, m, min_weight=args.min_weight, exclude=args.exclude, ++ g = setools.infoflow.InfoFlowAnalysis(p, m, min_weight=args.min_weight, exclude=args.exclude, + booleans=booleans) + + if args.shortest_path or args.all_paths: +diff --git a/setools/__init__.py b/setools/__init__.py +index d72d343e7e79..642485b9018d 100644 +--- a/setools/__init__.py ++++ b/setools/__init__.py +@@ -91,12 +91,8 @@ from .pcideviceconquery import PcideviceconQuery + from .devicetreeconquery import DevicetreeconQuery + + # Information Flow Analysis +-from .infoflow import InfoFlowAnalysis + from .permmap import PermissionMap, RuleWeight, Mapping + +-# Domain Transition Analysis +-from .dta import DomainTransitionAnalysis, DomainEntrypoint, DomainTransition +- + # Policy difference + from .diff import PolicyDifference + +diff --git a/setoolsgui/apol/dta.py b/setoolsgui/apol/dta.py +index 62dbf04d9a5e..0ea000e790f0 100644 +--- a/setoolsgui/apol/dta.py ++++ b/setoolsgui/apol/dta.py +@@ -24,7 +24,7 @@ from PyQt5.QtCore import pyqtSignal, Qt, QStringListModel, QThread + from PyQt5.QtGui import QPalette, QTextCursor + from PyQt5.QtWidgets import QCompleter, QHeaderView, QMessageBox, QProgressDialog, \ + QTreeWidgetItem +-from setools import DomainTransitionAnalysis ++from setools.dta import DomainTransitionAnalysis + + from ..logtosignal import LogHandlerToSignal + from .analysistab import AnalysisSection, AnalysisTab +diff --git a/setoolsgui/apol/infoflow.py b/setoolsgui/apol/infoflow.py +index 28009aa2329c..92d350bf727c 100644 +--- a/setoolsgui/apol/infoflow.py ++++ b/setoolsgui/apol/infoflow.py +@@ -26,7 +26,7 @@ from PyQt5.QtCore import pyqtSignal, Qt, QStringListModel, QThread + from PyQt5.QtGui import QPalette, QTextCursor + from PyQt5.QtWidgets import QCompleter, QHeaderView, QMessageBox, QProgressDialog, \ + QTreeWidgetItem +-from setools import InfoFlowAnalysis ++from setools.infoflow import InfoFlowAnalysis + from setools.exception import UnmappedClass, UnmappedPermission + + from ..logtosignal import LogHandlerToSignal +diff --git a/tests/dta.py b/tests/dta.py +index a0cc9381469c..177e6fb0b961 100644 +--- a/tests/dta.py ++++ b/tests/dta.py +@@ -18,7 +18,7 @@ + import os + import unittest + +-from setools import DomainTransitionAnalysis ++from setools.dta import DomainTransitionAnalysis + from setools import TERuletype as TERT + from setools.exception import InvalidType + from setools.policyrep import Type +diff --git a/tests/infoflow.py b/tests/infoflow.py +index aa0e44a7e4f8..fca2848aeca5 100644 +--- a/tests/infoflow.py ++++ b/tests/infoflow.py +@@ -18,7 +18,7 @@ + import os + import unittest + +-from setools import InfoFlowAnalysis ++from setools.infoflow import InfoFlowAnalysis + from setools import TERuletype as TERT + from setools.exception import InvalidType + from setools.permmap import PermissionMap +-- +2.30.0 + diff --git a/1003-Require-networkx-on-package-level.patch b/1003-Require-networkx-on-package-level.patch new file mode 100644 index 0000000..99eb500 --- /dev/null +++ b/1003-Require-networkx-on-package-level.patch @@ -0,0 +1,24 @@ +From 7b73bdeda54b9c944774452bfa3b3c1f2733b3f0 Mon Sep 17 00:00:00 2001 +From: Petr Lautrbach +Date: Thu, 2 Apr 2020 16:06:14 +0200 +Subject: [PATCH 2/2] Require networkx on package level + +It allows us to ship python3-setools without dependency on python3-networkx +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index c593b786cc61..0551811e3fd1 100644 +--- a/setup.py ++++ b/setup.py +@@ -163,5 +163,5 @@ setup(name='setools', + # setup also requires libsepol and libselinux + # C libraries and headers to compile. + setup_requires=['setuptools', 'Cython>=0.27'], +- install_requires=['setuptools', 'networkx>=2.0'] ++ install_requires=['setuptools'] + ) +-- +2.30.0 + diff --git a/156.patch b/156.patch deleted file mode 100644 index ea56fc1..0000000 --- a/156.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 39f7c88251925463c38f5000f6178fe70b484f44 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Tue, 8 Apr 2025 11:22:47 +0200 -Subject: [PATCH] Remove redundant runtime requirement on setuptools -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The dependency was dropped in 99a1cf3b50cd8bf502b5070293c4d1bf792d1566 - -Add a build time dependency for setup.py build_ext on Python 3.12+ -which no longer contains distutils. - -Signed-off-by: Miro Hrončok ---- - pyproject.toml | 2 +- - tox.ini | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/pyproject.toml b/pyproject.toml -index f7815a15..28ae121a 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -39,7 +39,7 @@ classifiers = ["Development Status :: 5 - Production/Stable", - - requires-python=">=3.10" - # also requires libsepol.so and libselinux.so. --dependencies = ["setuptools"] -+dependencies = [] - - optional-dependencies.analysis = ["networkx>=2.6", - "pygraphviz"] -diff --git a/tox.ini b/tox.ini -index 8fa6954f..b2a21d6b 100644 ---- a/tox.ini -+++ b/tox.ini -@@ -56,5 +56,6 @@ deps = networkx>=2.6 - pygraphviz - pytest-qt - pytest-xvfb -+ setuptools;python_version>="3.12" - commands_pre = {envpython} setup.py build_ext -i - commands = {envpython} -m pytest tests diff --git a/157.patch b/157.patch deleted file mode 100644 index 24b6820..0000000 --- a/157.patch +++ /dev/null @@ -1,42 +0,0 @@ -From a33a2e394435316f3822e89ac9c2a9aabab17252 Mon Sep 17 00:00:00 2001 -From: Pranav Lawate -Date: Tue, 30 Sep 2025 22:29:10 +0530 -Subject: [PATCH] Fix seinfo argument parsing when policy path follows query - options - -Signed-off-by: Pranav Lawate ---- - seinfo | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/seinfo b/seinfo -index 99180c36..d04ec320 100755 ---- a/seinfo -+++ b/seinfo -@@ -12,6 +12,7 @@ import logging - import signal - import ipaddress - import warnings -+from pathlib import Path - from typing import Callable, List, Tuple - - -@@ -102,6 +103,18 @@ xen.add_argument("--devicetreecon", help="Print all devicetreecon statements.", - - args = parser.parse_args() - -+# Fix argument misparsing: when policy is None and a query option is a string, -+# check if the string is actually a policy file that is incorrectly consumed by the query option -+if not args.policy: -+ # Check all query options defined in the queries argument group -+ for action in queries._group_actions: -+ value = getattr(args, action.dest, None) -+ if isinstance(value, str) and Path(value).exists(): -+ # This query argument consumed the policy path - fix it -+ args.policy = value -+ setattr(args, action.dest, True) -+ break -+ - if args.debug: - logging.basicConfig(level=logging.DEBUG, - format='%(asctime)s|%(levelname)s|%(name)s|%(message)s') diff --git a/plans/selinux.fmf b/plans/selinux.fmf deleted file mode 100644 index b20003c..0000000 --- a/plans/selinux.fmf +++ /dev/null @@ -1,7 +0,0 @@ -summary: selinux tests - Tier 1 | policycoreutils | checkpolicy -discover: - how: fmf - url: https://src.fedoraproject.org/tests/selinux - filter: "tier: 1 | component: policycoreutils | component: checkpolicy" -execute: - how: tmt diff --git a/plans/tests.fmf b/plans/tests.fmf deleted file mode 100644 index 1caffcc..0000000 --- a/plans/tests.fmf +++ /dev/null @@ -1,5 +0,0 @@ -summary: setools test plan -discover: - how: fmf -execute: - how: tmt diff --git a/rpminspect.yaml b/rpminspect.yaml deleted file mode 100644 index 6bcfaca..0000000 --- a/rpminspect.yaml +++ /dev/null @@ -1,3 +0,0 @@ -emptyrpm: - expected_empty: - - setools diff --git a/setools.spec b/setools.spec index e43d04a..ed3c2c6 100644 --- a/setools.spec +++ b/setools.spec @@ -1,29 +1,27 @@ -%global sepol_ver 3.9 -%global selinux_ver 3.9 +%global sepol_ver 3.2-1 +%global selinux_ver 3.2-1 Name: setools -Version: 4.6.0 -Release: 4%{?dist} +Version: 4.4.0 +Release: 1%{?dist} Summary: Policy analysis tools for SELinux -License: GPL-2.0-only AND LGPL-2.1-only +License: GPLv2 URL: https://github.com/SELinuxProject/setools/wiki Source0: https://github.com/SELinuxProject/setools/archive/%{version}.tar.gz Source1: setools.pam Source2: apol.desktop - -# Remove redundant runtime requirement on setuptools -Patch: https://github.com/SELinuxProject/setools/pull/156.patch -# Fix seinfo argument parsing when policy path follows query -Patch: https://github.com/SELinuxProject/setools/pull/157.patch - +Patch1002: 1002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch +Patch1003: 1003-Require-networkx-on-package-level.patch Obsoletes: setools < 4.0.0, setools-devel < 4.0.0 BuildRequires: flex, bison BuildRequires: glibc-devel, gcc, git-core BuildRequires: libsepol-devel >= %{sepol_ver}, libsepol-static >= %{sepol_ver} +BuildRequires: qt5-qtbase-devel BuildRequires: swig BuildRequires: python3-Cython BuildRequires: python3-devel +BuildRequires: python3-setuptools BuildRequires: libselinux-devel Requires: %{name}-console = %{version}-%{release} @@ -36,7 +34,7 @@ Python modules designed to facilitate SELinux policy analysis. %package console Summary: Policy analysis command-line tools for SELinux -License: GPL-2.0-only +License: GPLv2 Requires: python3-setools = %{version}-%{release} Requires: libselinux >= %{selinux_ver} @@ -53,7 +51,7 @@ This package includes the following console tools: %package console-analyses Summary: Policy analysis command-line tools for SELinux -License: GPL-2.0-only +License: GPLv2 Requires: python3-setools = %{version}-%{release} Requires: libselinux >= %{selinux_ver} Requires: python3-networkx @@ -69,9 +67,11 @@ This package includes the following console tools: %package -n python3-setools -Summary: Policy analysis tools for SELinux -License: LGPL-2.1-only +Summary: Policy analysis tools for SELinux Obsoletes: setools-libs < 4.0.0 +Recommends: libselinux-python3 +%{?python_provide:%python_provide python3-setools} +Requires: python3-setuptools %description -n python3-setools SETools is a collection of graphical tools, command-line tools, and @@ -80,9 +80,8 @@ Python 3 modules designed to facilitate SELinux policy analysis. %package gui Summary: Policy analysis graphical tools for SELinux -License: GPL-2.0-only Requires: python3-setools = %{version}-%{release} -Requires: python3-pyqt6 python3-pyqt6-sip +Requires: python3-qt5 Requires: python3-networkx %description gui @@ -94,28 +93,22 @@ Python modules designed to facilitate SELinux policy analysis. %autosetup -p 1 -S git -n setools-%{version} -%generate_buildrequires -%pyproject_buildrequires - - %build -%pyproject_wheel +%py3_build %install -%pyproject_install +%py3_install %check %if %{?_with_check:1}%{!?_with_check:0} -# dnf install python3-pytest python3-pytest-qt -%pytest +%{__python3} setup.py test %endif %files %files console -%license COPYING.GPL %{_bindir}/sechecker %{_bindir}/sediff %{_bindir}/seinfo @@ -129,7 +122,6 @@ Python modules designed to facilitate SELinux policy analysis. %{_mandir}/ru/man1/sesearch* %files console-analyses -%license COPYING.GPL %{_bindir}/sedta %{_bindir}/seinfoflow %{_mandir}/man1/sedta* @@ -138,127 +130,17 @@ Python modules designed to facilitate SELinux policy analysis. %{_mandir}/ru/man1/seinfoflow* %files -n python3-setools -%license COPYING COPYING.LGPL +%license COPYING COPYING.GPL COPYING.LGPL %{python3_sitearch}/setools %{python3_sitearch}/setools-* %files gui -%license COPYING.GPL %{_bindir}/apol %{python3_sitearch}/setoolsgui %{_mandir}/man1/apol* %{_mandir}/ru/man1/apol* %changelog -* Mon Dec 01 2025 Veronika Syncakova - 4.6.0-4 -- Fix seinfo argument parsing when policy path follows query options - -* Thu Oct 02 2025 Miro Hrončok - 4.6.0-3 -- Drop redundant runtime requirement on python3-setuptools (redux) - -* Fri Sep 19 2025 Python Maint - 4.6.0-2 -- Rebuilt for Python 3.14.0rc3 bytecode - -* Tue Sep 09 2025 Petr Lautrbach - 4.6.0-1 -- SETools 4.6.0 - -* Fri Aug 15 2025 Python Maint - 4.5.1-11 -- Rebuilt for Python 3.14.0rc2 bytecode - -* Mon Aug 04 2025 Miro Hrončok - 4.5.1-10 -- Drop redundant runtime requirement on python3-setuptools (correction) - -* Fri Jul 25 2025 Fedora Release Engineering - 4.5.1-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sat Jul 05 2025 Petr Lautrbach - 4.5.1-8 -- Rebuilt with SELinux userspace 3.9-rc2 release - -* Mon Jun 02 2025 Python Maint - 4.5.1-7 -- Rebuilt for Python 3.14 - -* Tue Apr 01 2025 Miro Hrončok - 4.5.1-6 -- Drop redundant runtime requirement on python3-setuptools, dropped in setools 4.5.1 - -* Sun Jan 19 2025 Fedora Release Engineering - 4.5.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sat Jul 20 2024 Fedora Release Engineering - 4.5.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jun 07 2024 Python Maint - 4.5.1-3 -- Rebuilt for Python 3.13 - -* Thu May 02 2024 Petr Lautrbach - 4.5.1-2 -- Fix License tag - -* Thu May 02 2024 Petr Lautrbach - 4.5.1-1 -- SETools 4.5.1 - -* Thu Apr 18 2024 Petr Lautrbach - 4.5.0-1 -- SETools 4.5.0 - -* Sat Jan 27 2024 Fedora Release Engineering - 4.4.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Mon Dec 11 2023 Petr Lautrbach - 4.4.4-1 -- SETools 4.4.4 release - -* Mon Aug 28 2023 Petr Lautrbach - 4.4.3-2 -- Use Qt 6 - -* Wed Aug 9 2023 Petr Lautrbach - 4.4.3-1 -- SETools 4.4.3 release - -* Wed Jul 26 2023 Petr Lautrbach - 4.4.2-4 -- Disable/remove neverallow options in sediff. -- Improve man pages -- seinfoflow: Add -r option to get flows into the source type. -- seinfoflow.1: Remove references to sepolgen permission map. -- AVRule/AVRuleXperm: Treat rules with no permissions as invalid policy. -- SELinuxPolicy: Add explicit cast for libspol message - -* Sat Jul 22 2023 Fedora Release Engineering - 4.4.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 13 2023 Python Maint - 4.4.2-2 -- Rebuilt for Python 3.12 - -* Thu Apr 20 2023 Petr Lautrbach - 4.4.2-1 -- SETools 4.4.2 release - -* Mon Feb 6 2023 Petr Lautrbach - 4.4.1-1 -- SETools 4.4.1 release - -* Sat Jan 21 2023 Fedora Release Engineering - 4.4.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 4.4.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Jun 16 2022 Python Maint - 4.4.0-8 -- Rebuilt for Python 3.11 - -* Mon Jun 13 2022 Petr Lautrbach - 4.4.0-7 -- Update required userspace versions to 3.4 -- Drop unnecessary Recommends - -* Mon Jun 13 2022 Python Maint - 4.4.0-6 -- Rebuilt for Python 3.11 - -* Sat Jan 22 2022 Fedora Release Engineering - 4.4.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Nov 19 2021 Petr Lautrbach - 4.4.0-4 -- Make seinfo output predictable - https://github.com/SELinuxProject/setools/issues/65 - -* Fri Jul 23 2021 Fedora Release Engineering - 4.4.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 4.4.0-2 -- Rebuilt for Python 3.10 - * Mon Mar 8 2021 Petr Lautrbach - 4.4.0-1 - SETools 4.4.0 release diff --git a/sources b/sources index 386b801..dbc6493 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (4.6.0.tar.gz) = 5b654f480f285717d15fa55f754fbd00cb030a0d8af8342d901e0514c4fdbacb7873e19420dab98540eaa481c687ff1e03423df893c0d1744eb4c53eb81afbf5 +SHA512 (4.4.0.tar.gz) = 4033ce54213e47e3afd1bdb03b99b0ee3d977f085310d746b34dcfcfe48ac3a562ae0aa2f730d629a298b56dbf295ad219669d13f82578521866b465f8c976e8 diff --git a/tests/Regression/The-setools-package-doesn-t-install-any-tools/main.fmf b/tests/Regression/The-setools-package-doesn-t-install-any-tools/main.fmf deleted file mode 100644 index 11ff640..0000000 --- a/tests/Regression/The-setools-package-doesn-t-install-any-tools/main.fmf +++ /dev/null @@ -1,11 +0,0 @@ -summary: Make sure setools requires setools-console and setools-gui -contact: Vit Mojzis -component: - - setools -test: ./runtest.sh -framework: beakerlib -duration: 5m -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1820078 -extra-summary: /CoreOS/setools/Regression/The-setools-package-doesn-t-install-any-tools -extra-task: /CoreOS/setools/Regression/The-setools-package-doesn-t-install-any-tools diff --git a/tests/Regression/The-setools-package-doesn-t-install-any-tools/runtest.sh b/tests/Regression/The-setools-package-doesn-t-install-any-tools/runtest.sh index ad83754..16267ce 100755 --- a/tests/Regression/The-setools-package-doesn-t-install-any-tools/runtest.sh +++ b/tests/Regression/The-setools-package-doesn-t-install-any-tools/runtest.sh @@ -26,6 +26,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setools" diff --git a/tests/Sanity/sedta/main.fmf b/tests/Sanity/sedta/main.fmf deleted file mode 100644 index e0c2de1..0000000 --- a/tests/Sanity/sedta/main.fmf +++ /dev/null @@ -1,30 +0,0 @@ -summary: Does sedta work as expected? Does it support all features? -description: '' -contact: Milos Malik -component: - - setools -test: ./runtest.sh -framework: beakerlib -recommend: - - git - - policycoreutils - - setools-console-analyses -duration: 1h -enabled: true -tag: - - CI-Tier-1 - - NoRHEL4 - - NoRHEL5 - - NoRHEL6 - - NoRHEL7 - - TIPfail_Security - - f32friendly - - f33friendly - - targeted -adjust: - - enabled: false - when: distro == rhel-4, rhel-5, rhel-6, rhel-7 - continue: false -extra-nitrate: TC#0604139 -extra-summary: /CoreOS/setools/Sanity/sedta -extra-task: /CoreOS/setools/Sanity/sedta diff --git a/tests/Sanity/sedta/runtest.sh b/tests/Sanity/sedta/runtest.sh index fa6372d..4fb0483 100755 --- a/tests/Sanity/sedta/runtest.sh +++ b/tests/Sanity/sedta/runtest.sh @@ -26,6 +26,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setools" diff --git a/tests/Sanity/seinfo-consistent-output/Makefile b/tests/Sanity/seinfo-consistent-output/Makefile deleted file mode 100644 index e8bd655..0000000 --- a/tests/Sanity/seinfo-consistent-output/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of Sanity/seinfo-consistent-output -# Description: Check whether different 2 or more runs of same seinfo commands produce same output -# Author: Petr Lautrbach -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=Sanity/seinfo-consistent-output -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Lautrbach " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Check whether different 2 or more runs of same seinfo commands produce same output" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: setools" >> $(METADATA) - @echo "Requires: setools-console" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 2019962" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Sanity/seinfo-consistent-output/PURPOSE b/tests/Sanity/seinfo-consistent-output/PURPOSE deleted file mode 100644 index 3202eb9..0000000 --- a/tests/Sanity/seinfo-consistent-output/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of Sanity/seinfo-consistent-output -Description: Check whether different 2 or more runs of same seinfo commands produce same output -Author: Petr Lautrbach diff --git a/tests/Sanity/seinfo-consistent-output/main.fmf b/tests/Sanity/seinfo-consistent-output/main.fmf deleted file mode 100644 index 1c908d7..0000000 --- a/tests/Sanity/seinfo-consistent-output/main.fmf +++ /dev/null @@ -1,15 +0,0 @@ -summary: Check whether different 2 or more runs of same seinfo commands produce same - output -description: '' -contact: Petr Lautrbach -component: - - setools -test: ./runtest.sh -framework: beakerlib -recommend: - - setools-console -duration: 5m -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2019962 -extra-summary: Sanity/seinfo-consistent-output -extra-task: Sanity/seinfo-consistent-output diff --git a/tests/Sanity/seinfo-consistent-output/runtest.sh b/tests/Sanity/seinfo-consistent-output/runtest.sh deleted file mode 100755 index 0ad39a7..0000000 --- a/tests/Sanity/seinfo-consistent-output/runtest.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of Sanity/seinfo-consistent-output -# Description: Check whether different 2 or more runs of same seinfo commands produce same output -# Author: Petr Lautrbach -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="setools-console" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlPhaseEnd - - commands=( - "seinfo --all -x" - "seinfo --constrain" - "seinfo --common" - "seinfo -c -x" - "seinfo -r -x" - "seinfo -u -x" - ) - - for c in "${commands[@]}"; do - - rlPhaseStartTest "$c" - rlRun "$c > 1.out" - rlRun "$c > 2.out" - rlRun "cmp 1.out 2.out" 0 - rlPhaseEnd - done - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..f1c994e --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,21 @@ +--- +# Test to run in classic context +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/selinux.git" + dest: "selinux" + fmf_filter: "tier: 1 | component: policycoreutils | component: checkpolicy" + +# Test to run in classic context +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + tests: + - Sanity/sedta + - Regression/The-setools-package-doesn-t-install-any-tools