public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if setools can be built with userspace packages
@ 2026-09-11 13:21 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:21 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : ef0547613f3527b4c44042e7dfd0d37d0238e99b
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2023-12-05T13:21:49+01:00
            Stats  : +64/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/ef0547613f3527b4c44042e7dfd0d37d0238e99b?branch=pr775-checkpolicy-revdeps

            Log:
            test if setools can be built with userspace packages

A recent rebuild testing in COPR revealed that the setools package
cannot be built with the latest SELinux userspace (version 3.6).
The TC reproduces the situation.

In order to have a well-functioning set of tools for SELinux policy
analysis which works together with the new version of SELinux
userspace, I believe that the problem needs to be fixed.

The TC covers BZ#2251915 and RHEL-18067.

---
diff --git a/setools/rebuild-from-srpm/main.fmf b/setools/rebuild-from-srpm/main.fmf
new file mode 100644
index 0000000..01286da
--- /dev/null
+++ b/setools/rebuild-from-srpm/main.fmf
@@ -0,0 +1,32 @@
+summary: Can setools be built from its source RPM?
+contact: Milos Malik <mmalik@redhat.com>
+component:
+  - setools
+test: ./runtest.sh
+framework: beakerlib
+recommend:
+  - dnf-utils
+  - rpm-build
+  - libsepol
+  - libsemanage
+  - libselinux
+  - policycoreutils
+duration: 10m
+enabled: true
+tier: 1
+tag:
+  - CI-Tier-1
+  - NoRHEL4
+  - NoRHEL5
+  - NoRHEL6
+  - NoRHEL7
+  - targeted
+link:
+  - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2251915
+  - verifies: https://issues.redhat.com/browse/RHEL-18067
+adjust:
+  - enabled: false
+    when: distro == rhel-4, rhel-5, rhel-6, rhel-7
+    continue: false
+extra-nitrate: TC#0616295
+id: 37430912-7a9e-40e7-a569-cbef9529b9e3

diff --git a/setools/rebuild-from-srpm/runtest.sh b/setools/rebuild-from-srpm/runtest.sh
new file mode 100755
index 0000000..b52fc95
--- /dev/null
+++ b/setools/rebuild-from-srpm/runtest.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+rlJournalStart
+    rlPhaseStartSetup
+        rlAssertRpm libsepol
+        rlAssertRpm libsemanage
+        rlAssertRpm libselinux
+        rlAssertRpm policycoreutils
+        rlRun "rm -f setools*.src.rpm"
+        rlRun "yumdownloader --source setools"
+        rlRun "ls -l setools*src.rpm"
+    rlPhaseEnd
+
+    rlPhaseStartTest "bz#2251915 + RHEL-18067"
+        if rlIsRHEL ; then
+            rlRun "yum-builddep -y setools --enablerepo rhel-CRB"
+        elif rlIsCentOS ; then
+            rlRun "yum-builddep -y setools --enablerepo crb"
+        else # Fedora
+            rlRun "yum-builddep -y setools"
+        fi
+        rlRun "rpmbuild --rebuild setools*.src.rpm"
+        rlRun "ls -lR ~/rpmbuild/RPMS | grep setools"
+    rlPhaseEnd
+
+    rlPhaseStartCleanup
+        rlRun "rm -f setools*.src.rpm"
+    rlPhaseEnd
+rlJournalEnd
+

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:21 [tests/selinux] pr775-checkpolicy-revdeps: test if setools can be built with userspace packages Milos Malik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox