Compare commits
172 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
630d9a6666 | ||
|
|
c0cc824e8f | ||
|
|
ace7694196 | ||
|
|
e6c218363b | ||
|
|
1bd344a3ee | ||
|
|
17706eb780 | ||
|
|
e93cfa7b72 | ||
|
|
11ee438aa0 | ||
|
|
93d27ba219 | ||
|
|
f5e19e21ec | ||
|
|
658794f3e3 | ||
|
|
cb92b5067a | ||
|
|
183b6ffe53 | ||
|
|
94756e17ba | ||
|
|
d301e66a01 | ||
|
|
5f7bd5af0a | ||
|
|
5bd6294fca | ||
|
|
3a271f5265 | ||
|
|
cc080e498e | ||
|
|
65fa161f6f | ||
|
|
3eb6ca82a8 | ||
|
|
dd68fa8535 | ||
|
|
46e11071de | ||
|
|
6ae3e7d3fc | ||
|
|
ce72675700 | ||
|
|
d757b877a0 | ||
|
|
c8f176620d | ||
|
|
fa44d11ed8 | ||
|
|
67bdb1e7a5 | ||
|
|
e19a208cf3 | ||
|
|
3c2ac38daf | ||
|
|
392fa03072 | ||
|
|
17d137e658 | ||
|
|
d8501aad3c | ||
|
|
69eb1aef5e | ||
|
|
8b928d80e8 | ||
|
|
9a9e7b5d7e | ||
|
|
493b35df7b | ||
|
|
c77a77e39c | ||
|
|
cd558df935 | ||
|
|
5785621283 | ||
|
|
396291943b | ||
|
|
d6eb24d48f | ||
|
|
d39a6454a2 | ||
|
|
f7e6d7dcb5 | ||
|
|
041e7a130b | ||
|
|
d085b2403d | ||
|
|
b028c6a81b | ||
|
|
3c028107aa | ||
|
|
8840b49782 | ||
|
|
1396e21e63 | ||
|
|
8ea3353198 | ||
|
|
e1c3bd6193 | ||
|
|
4d63e5997c | ||
|
|
c62a76dec8 | ||
|
|
8e66d37730 | ||
|
|
7a283c335f | ||
|
|
bb087c8236 | ||
|
|
7f0685b7c9 | ||
|
|
b8e16f5ac1 | ||
|
|
b5ddd6cd6d | ||
|
|
2598e73c59 | ||
|
|
5f644f84d1 | ||
|
|
1d41610e25 | ||
|
|
082b752534 | ||
|
|
5443cd02b9 | ||
|
|
aae45ee479 | ||
|
|
0818b3952b | ||
|
|
ec182abe69 | ||
|
|
618f976e7b | ||
|
|
fd63d73041 | ||
|
|
b2615bd52c | ||
|
|
56ba584672 | ||
|
|
950d0d171f | ||
|
|
3bb977d8b3 | ||
|
|
a5d7dbf23d | ||
|
|
9ad7d4e48a | ||
|
|
f73658f908 | ||
|
|
afb5e45daa | ||
|
|
efa4712a7b | ||
|
|
2dcce95b10 | ||
|
|
02d7a5d1d7 | ||
|
|
3a754fee08 | ||
|
|
1924f09170 | ||
|
|
7672531487 | ||
|
|
051ad0ff37 | ||
|
|
be3765e54a | ||
|
|
5739cf73a2 | ||
|
|
13a8a83732 | ||
|
|
4006d5c5b4 | ||
|
|
869ecbd188 | ||
|
|
ccf0ebfefc | ||
|
|
7bfe6fa0af | ||
|
|
e236753025 | ||
|
|
526a5264e3 | ||
|
|
d570700ddd | ||
|
|
fdd5e434b3 | ||
|
|
442c972d4b | ||
|
|
12efca860a | ||
|
|
689c214584 | ||
|
|
d5a84f04a0 | ||
|
|
2123a2995d | ||
|
|
1299b6abea | ||
|
|
362ac1c345 | ||
|
|
04f559dd9d | ||
|
|
a34c9ef118 | ||
|
|
26a78c68ba | ||
|
|
a4af57962c | ||
|
|
e46f55812d | ||
|
|
300f5dde54 | ||
|
|
07282d3796 | ||
|
|
4424caacde | ||
|
|
5e80f4b5b1 | ||
|
|
a8a75e40d8 | ||
|
|
364e31e4d9 | ||
|
|
80eec9ca44 | ||
|
|
ed27604c5e | ||
|
|
f346ebaaf7 | ||
|
|
056d64edc9 | ||
|
|
e461113079 | ||
|
|
90685bf953 | ||
|
|
665320d083 | ||
|
|
abcfd7caf6 | ||
|
|
75dffcc440 | ||
|
|
7d9f204bf2 | ||
|
|
af4b0ecbe6 | ||
|
|
3caf5ed4b7 | ||
|
|
4dcc6b1421 | ||
|
|
87ef079e2e | ||
|
|
a71f281069 | ||
|
|
87688b7eb6 | ||
|
|
33f5961ddc | ||
|
|
9bac5f8821 | ||
|
|
100f5e541c | ||
|
|
aa84f5eb45 | ||
|
|
f713292352 | ||
|
|
5ee61040d8 | ||
|
|
cb2ae8409a | ||
|
|
5edcaf9a0f | ||
|
|
0f518147af | ||
|
|
4f89cbfc62 | ||
|
|
a9ec97ee18 | ||
|
|
cfe6f2a173 | ||
|
|
b606c9e8b9 | ||
|
|
ac50bae989 | ||
|
|
97b1266f1f | ||
|
|
3d2416abb2 | ||
|
|
8254901347 | ||
|
|
1150809eda | ||
|
|
89fdab0b96 | ||
|
|
69cc68edef | ||
|
|
66ba7d047b | ||
|
|
db984892b1 | ||
|
|
0fd1802836 | ||
|
|
26a7d40fae | ||
|
|
b0a687f698 | ||
|
|
b7aa74df7e | ||
|
|
52c9820670 | ||
|
|
f1f2c585e9 | ||
|
|
2456e82a5b | ||
|
|
26765faa8a | ||
|
|
c4d0d7f207 | ||
|
|
df18a215bf | ||
|
|
f4279f323b | ||
|
|
a93aa5612a | ||
|
|
51f161453c | ||
|
|
764e7165c1 | ||
|
|
d926e676b2 | ||
|
|
277093cf8e | ||
|
|
019b809b55 | ||
|
|
1a39aa9a37 | ||
|
|
d01ce99af6 |
29 changed files with 974 additions and 3264 deletions
|
|
@ -1 +0,0 @@
|
|||
setools-3.3.6.tar.bz2
|
||||
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
setools-3.3.7.tar.bz2
|
||||
setools-3.3.8.tar.bz2
|
||||
setools-3.3.8-f1e5b20.tar.bz2
|
||||
/4.1.0.tar.gz
|
||||
/4.1.1.tar.gz
|
||||
/4.2.0-beta.tar.gz
|
||||
/4.2.0-rc.tar.gz
|
||||
/4.2.0.tar.gz
|
||||
/4.2.1.tar.gz
|
||||
/4.2.2.tar.gz
|
||||
/4.3.0.tar.gz
|
||||
/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
|
||||
43
156.patch
Normal file
43
156.patch
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
From 39f7c88251925463c38f5000f6178fe70b484f44 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
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 <miro@hroncok.cz>
|
||||
---
|
||||
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
|
||||
42
157.patch
Normal file
42
157.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
From a33a2e394435316f3822e89ac9c2a9aabab17252 Mon Sep 17 00:00:00 2001
|
||||
From: Pranav Lawate <pran.lawate@gmail.com>
|
||||
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 <pran.lawate@gmail.com>
|
||||
---
|
||||
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')
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: setools
|
||||
# $Id: Makefile,v 1.2 2007/10/15 19:22:32 notting Exp $
|
||||
NAME := setools
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attempt a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
|
|
@ -2,11 +2,10 @@
|
|||
Name=SELinux Policy Analysis
|
||||
GenericName=SELinux Policy Analysis Tool
|
||||
Comment=This tool can examine, search, and relate policy components and policy rules
|
||||
Icon=apol.png
|
||||
Icon=apol
|
||||
Exec=/usr/bin/apol
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
||||
Categories=System;
|
||||
X-Desktop-File-Install-Version=0.2
|
||||
StartupNotify=true
|
||||
|
|
|
|||
16
gating.yaml
Normal file
16
gating.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_testing
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
|
||||
7
plans/selinux.fmf
Normal file
7
plans/selinux.fmf
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
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
|
||||
5
plans/tests.fmf
Normal file
5
plans/tests.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
summary: setools test plan
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
3
rpminspect.yaml
Normal file
3
rpminspect.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
emptyrpm:
|
||||
expected_empty:
|
||||
- setools
|
||||
|
|
@ -6,7 +6,6 @@ Icon=seaudit.png
|
|||
Exec=/usr/bin/seaudit
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
||||
Categories=System;
|
||||
X-Desktop-File-Install-Version=0.2
|
||||
StartupNotify=true
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ Comment=This tool allows you to compare two policy files
|
|||
Exec=/usr/bin/sediffx
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
||||
Categories=System;
|
||||
X-Desktop-File-Install-Version=0.2
|
||||
StartupNotify=true
|
||||
|
|
|
|||
2596
setools-python.patch
2596
setools-python.patch
File diff suppressed because it is too large
Load diff
|
|
@ -1,24 +0,0 @@
|
|||
diff -up setools-3.3.6/libqpol/include/qpol/Makefile.am~ setools-3.3.6/libqpol/include/qpol/Makefile.am
|
||||
--- setools-3.3.6/libqpol/include/qpol/Makefile.am~ 2009-07-14 14:03:27.000000000 -0400
|
||||
+++ setools-3.3.6/libqpol/include/qpol/Makefile.am 2009-07-28 09:01:32.000000000 -0400
|
||||
@@ -17,7 +17,7 @@ qpol_HEADERS = \
|
||||
netifcon_query.h \
|
||||
nodecon_query.h \
|
||||
permissive_query.h \
|
||||
- polcap_query.h
|
||||
+ polcap_query.h \
|
||||
policy.h \
|
||||
policy_extend.h \
|
||||
portcon_query.h \
|
||||
diff -up setools-3.3.6/libseaudit/swig/python/Makefile.am~ setools-3.3.6/libseaudit/swig/python/Makefile.am
|
||||
--- setools-3.3.6/libseaudit/swig/python/Makefile.am~ 2007-08-02 17:16:33.000000000 -0400
|
||||
+++ setools-3.3.6/libseaudit/swig/python/Makefile.am 2009-08-11 12:40:39.000000000 -0400
|
||||
@@ -10,7 +10,7 @@ BUILT_SOURCES = seaudit_wrap.c
|
||||
|
||||
AM_CFLAGS = @DEBUGCFLAGS@ @WARNCFLAGS@ @PROFILECFLAGS@ @SELINUX_CFLAGS@ \
|
||||
@QPOL_CFLAGS@ @APOL_CFLAGS@ -I$(top_builddir) -fpic \
|
||||
- -I$(top_srcdir)/libseaudit/include -D__attribute__\(x\)=''
|
||||
+ -I$(top_srcdir)/libseaudit/include
|
||||
AM_LDFLAGS = @DEBUGLDFLAGS@ @WARNLDFLAGS@ @PROFILELDFLAGS@ \
|
||||
@APOL_LIB_FLAG@ @QPOL_LIB_FLAG@ @SEAUDIT_LIB_FLAG@ @XML_LIBS@
|
||||
DEPENDENCIES = $(top_builddir)/libqpol/src/libqpol.so \
|
||||
975
setools.spec
975
setools.spec
File diff suppressed because it is too large
Load diff
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
93db5be0bfc32519f8e7fbf769542db5 setools-3.3.6.tar.bz2
|
||||
SHA512 (4.6.0.tar.gz) = 5b654f480f285717d15fa55f754fbd00cb030a0d8af8342d901e0514c4fdbacb7873e19420dab98540eaa481c687ff1e03423df893c0d1744eb4c53eb81afbf5
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/setools/Regression/The-setools-package-doesn-t-install-any-tools
|
||||
# Description: Make sure setools requires setools-console and setools-gui
|
||||
# Author: Vit Mojzis <vmojzis@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2020 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=/CoreOS/setools/Regression/The-setools-package-doesn-t-install-any-tools
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile
|
||||
|
||||
.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: Vit Mojzis <vmojzis@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Make sure setools requires setools-console and setools-gui" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 5m" >> $(METADATA)
|
||||
@echo "RunFor: setools" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1820078" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6 -RHEL7" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
summary: Make sure setools requires setools-console and setools-gui
|
||||
contact: Vit Mojzis <vmojzis@redhat.com>
|
||||
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
|
||||
53
tests/Regression/The-setools-package-doesn-t-install-any-tools/runtest.sh
Executable file
53
tests/Regression/The-setools-package-doesn-t-install-any-tools/runtest.sh
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/setools/Regression/bz1820078-The-setools-package-doesn-t-install-any-tools
|
||||
# Description: Make sure setools requires setools-console and setools-gui
|
||||
# Author: Vit Mojzis <vmojzis@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2020 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"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "dnf -y remove ${PACKAGE} ${PACKAGE}-gui ${PACKAGE}-console"
|
||||
OUTPUT_FILE=`mktemp`
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "bz#1820078"
|
||||
rlRun "dnf -y install ${PACKAGE}" 0
|
||||
rlAssertRpm "${PACKAGE}-gui"
|
||||
rlAssertRpm "${PACKAGE}-console"
|
||||
# make sure that setools-* packages do not require setools
|
||||
rlRun "rpm -q --whatrequires ${PACKAGE} >& ${OUTPUT_FILE}" 0,1
|
||||
rlRun "grep -i \"${PACKAGE}-\" ${OUTPUT_FILE}" 1
|
||||
if [ $? -ne 1 ]; then rlRun "cat \"${OUTPUT_FILE}\""; fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rm -f ${OUTPUT_FILE}
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
63
tests/Sanity/sedta/Makefile
Normal file
63
tests/Sanity/sedta/Makefile
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/setools/Sanity/sedta
|
||||
# Description: Does sedta work as expected? Does it support all features?
|
||||
# Author: Milos Malik <mmalik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 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=/CoreOS/setools/Sanity/sedta
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE testpolicy.cil
|
||||
|
||||
.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: Milos Malik <mmalik@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Does sedta work as expected? Does it support all features?" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 1h" >> $(METADATA)
|
||||
@echo "RunFor: setools" >> $(METADATA)
|
||||
@echo "Requires: policycoreutils setools-console-analyses" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL6 -RHEL7 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
||||
|
||||
3
tests/Sanity/sedta/PURPOSE
Normal file
3
tests/Sanity/sedta/PURPOSE
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
PURPOSE of /CoreOS/setools/Sanity/sedta
|
||||
Description: Does sedta work as expected? Does it support all features?
|
||||
Author: Milos Malik <mmalik@redhat.com>
|
||||
30
tests/Sanity/sedta/main.fmf
Normal file
30
tests/Sanity/sedta/main.fmf
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
summary: Does sedta work as expected? Does it support all features?
|
||||
description: ''
|
||||
contact: Milos Malik <mmalik@redhat.com>
|
||||
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
|
||||
87
tests/Sanity/sedta/runtest.sh
Executable file
87
tests/Sanity/sedta/runtest.sh
Executable file
|
|
@ -0,0 +1,87 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/setools/Sanity/sedta
|
||||
# Description: Does sedta work as expected? Does it support all features?
|
||||
# Author: Milos Malik <mmalik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 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"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm ${PACKAGE}-console-analyses
|
||||
OUTPUT_FILE=`mktemp`
|
||||
rlRun "semodule -i testpolicy.cil"
|
||||
rlRun "semodule -l | grep testpolicy"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "invalid values"
|
||||
rlRun "sedta -s unknown_t >& ${OUTPUT_FILE}" 1
|
||||
rlRun "grep -i 'not a valid type' ${OUTPUT_FILE}"
|
||||
rlRun "sedta -s apmd_t -t unknown_t -S >& ${OUTPUT_FILE}" 1
|
||||
rlRun "grep -i 'not a valid type' ${OUTPUT_FILE}"
|
||||
rlRun "sedta -s unknown_t -p /etc/selinux/unknown/policy/policy.31 >& ${OUTPUT_FILE}" 1
|
||||
rlRun "grep -i 'no such file or directory' ${OUTPUT_FILE}"
|
||||
rlRun "sedta -s apmd_t -t var_lib_t -A -1 >& ${OUTPUT_FILE}" 1
|
||||
rlRun "grep -i 'must be positive' ${OUTPUT_FILE}"
|
||||
rlRun "sedta -s xyz_t >& ${OUTPUT_FILE}"
|
||||
rlRun "grep -i '^0.*transition.*found' ${OUTPUT_FILE}"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "valid values"
|
||||
# transitivity
|
||||
rlRun "sedta -s first_t -t second_t -S >& ${OUTPUT_FILE}"
|
||||
rlRun "grep -i '^1 domain transition path.*found' ${OUTPUT_FILE}"
|
||||
rlRun "sedta -s second_t -t third_t -S >& ${OUTPUT_FILE}"
|
||||
rlRun "grep -i '^1 domain transition path.*found' ${OUTPUT_FILE}"
|
||||
rlRun "sedta -s first_t -t third_t -S >& ${OUTPUT_FILE}"
|
||||
rlRun "grep -i '^1 domain transition path.*found' ${OUTPUT_FILE}"
|
||||
# reflexivity
|
||||
rlRun "sedta -s first_t -t first_t -S >& ${OUTPUT_FILE}"
|
||||
rlRun "grep -i '^1 domain transition path.*found' ${OUTPUT_FILE}"
|
||||
rlRun "sedta -s second_t -t second_t -S >& ${OUTPUT_FILE}"
|
||||
rlRun "grep -i '^1 domain transition path.*found' ${OUTPUT_FILE}"
|
||||
rlRun "sedta -s third_t -t third_t -S >& ${OUTPUT_FILE}"
|
||||
rlRun "grep -i '^1 domain transition path.*found' ${OUTPUT_FILE}"
|
||||
# path is longer than limit
|
||||
rlRun "sedta -s first_t -t third_t -A 1 >& ${OUTPUT_FILE}"
|
||||
rlRun "grep -i '^0 domain transition path.*found' ${OUTPUT_FILE}"
|
||||
# non-existent relation
|
||||
rlRun "sedta -s first_t -t third_t -S -r >& ${OUTPUT_FILE}"
|
||||
rlRun "grep -i '^0 domain transition path.*found' ${OUTPUT_FILE}"
|
||||
# non-existent relation
|
||||
rlRun "sedta -s third_t -t first_t -S >& ${OUTPUT_FILE}"
|
||||
rlRun "grep -i '^0 domain transition path.*found' ${OUTPUT_FILE}"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "semodule -r testpolicy"
|
||||
rlRun "semodule -l | grep testpolicy" 1
|
||||
rm -f ${OUTPUT_FILE}
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
21
tests/Sanity/sedta/testpolicy.cil
Normal file
21
tests/Sanity/sedta/testpolicy.cil
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
( type xyz_t )
|
||||
|
||||
( type first_t )
|
||||
( type first_exec_t )
|
||||
( type second_t )
|
||||
( type second_exec_t )
|
||||
( type third_t )
|
||||
( type third_exec_t )
|
||||
|
||||
( typetransition first_t second_exec_t process second_t )
|
||||
( typetransition second_t third_exec_t process third_t )
|
||||
|
||||
( allow first_t second_exec_t ( file ( getattr open read execute )))
|
||||
( allow first_t second_t ( process ( transition )))
|
||||
( allow second_t third_exec_t ( file ( getattr open read execute )))
|
||||
( allow second_t third_t ( process ( transition )))
|
||||
|
||||
( allow first_t first_exec_t ( file ( entrypoint )))
|
||||
( allow second_t second_exec_t ( file ( entrypoint )))
|
||||
( allow third_t third_exec_t ( file ( entrypoint )))
|
||||
|
||||
64
tests/Sanity/seinfo-consistent-output/Makefile
Normal file
64
tests/Sanity/seinfo-consistent-output/Makefile
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of Sanity/seinfo-consistent-output
|
||||
# Description: Check whether different 2 or more runs of same seinfo commands produce same output
|
||||
# Author: Petr Lautrbach <plautrba@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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 <plautrba@redhat.com>" > $(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)
|
||||
3
tests/Sanity/seinfo-consistent-output/PURPOSE
Normal file
3
tests/Sanity/seinfo-consistent-output/PURPOSE
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
PURPOSE of Sanity/seinfo-consistent-output
|
||||
Description: Check whether different 2 or more runs of same seinfo commands produce same output
|
||||
Author: Petr Lautrbach <plautrba@redhat.com>
|
||||
15
tests/Sanity/seinfo-consistent-output/main.fmf
Normal file
15
tests/Sanity/seinfo-consistent-output/main.fmf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
summary: Check whether different 2 or more runs of same seinfo commands produce same
|
||||
output
|
||||
description: ''
|
||||
contact: Petr Lautrbach <plautrba@redhat.com>
|
||||
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
|
||||
63
tests/Sanity/seinfo-consistent-output/runtest.sh
Executable file
63
tests/Sanity/seinfo-consistent-output/runtest.sh
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
#!/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 <plautrba@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue