public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] main: Fix for  /libselinux/matchpathcon-in-chroot-env
@ 2026-07-22 12:07 Veronika Syncakova
  0 siblings, 0 replies; only message in thread
From: Veronika Syncakova @ 2026-07-22 12:07 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : main
            Commit : e62cab0e38df14d02c3c7b0134752509a5aeab7d
            Author : Veronika Syncakova <veva.syncakova@gmail.com>
            Date   : 2026-07-22T11:10:59+02:00
            Stats  : +4/-7 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/e62cab0e38df14d02c3c7b0134752509a5aeab7d?branch=main

            Log:
            Fix for  /libselinux/matchpathcon-in-chroot-env

If epel repo was installed, the release version was not recognized.

---
diff --git a/libselinux/matchpathcon-in-chroot-env/runtest.sh b/libselinux/matchpathcon-in-chroot-env/runtest.sh
index 5e74132..5a98804 100755
--- a/libselinux/matchpathcon-in-chroot-env/runtest.sh
+++ b/libselinux/matchpathcon-in-chroot-env/runtest.sh
@@ -40,13 +40,10 @@ fi
 if yum install --help | grep -q skip-unavailable ; then
     INSTALL_OPTION="${INSTALL_OPTION} --skip-unavailable"
 fi
-# yum sometimes fails to detect the release version on CentOS 9
-if rlIsCentOS 9 ; then
-    INSTALL_OPTION="${INSTALL_OPTION} --releasever 9"
-elif rlIsFedora ; then
-    RELEASEVER=`grep VERSION_ID /etc/os-release | cut -d = -f 2`
-    INSTALL_OPTION="${INSTALL_OPTION} --releasever ${RELEASEVER}"
-fi
+# detect release version
+test -e /etc/os-release && os_release='/etc/os-release' || os_release='/usr/lib/os-release'
+. "${os_release}"
+INSTALL_OPTION="${INSTALL_OPTION} --releasever ${VERSION_ID}"
 
 rlJournalStart
     rlPhaseStartSetup

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

only message in thread, other threads:[~2026-07-22 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-22 12:07 [tests/selinux] main: Fix for /libselinux/matchpathcon-in-chroot-env Veronika Syncakova

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