public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/radicale] epel10.2: selinux: add pre, adjust post
@ 2026-10-08  5:35 Peter Bieringer
  0 siblings, 0 replies; only message in thread
From: Peter Bieringer @ 2026-10-08  5:35 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/radicale
Branch : epel10.2
Commit : b192a70a17e6d72b71085d85a432137a52a2ace1
Author : Peter Bieringer <pb@bieringer.de>
Date   : 2026-04-15T21:08:45+02:00
Stats  : +9/-11 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/radicale/c/b192a70a17e6d72b71085d85a432137a52a2ace1?branch=epel10.2

Log:
selinux: add pre, adjust post

---
diff --git a/radicale.spec b/radicale.spec
index 2f3bf1d..6e42ab5 100644
--- a/radicale.spec
+++ b/radicale.spec
@@ -409,18 +409,19 @@ exit 0
 %systemd_post %{name}.service
 
 
+%pre -n %{radicale_package_name}-selinux
+for selinuxvariant in %{selinux_variants}
+do
+  %selinux_relabel_pre -s ${selinuxvariant}
+done
+
+
 %post -n %{radicale_package_name}-selinux
 for selinuxvariant in %{selinux_variants}
 do
-  if rpm -q selinux-policy-$selinuxvariant >/dev/null 2>&1; then
-    echo "SELinux semodule store for %{radicale_package_name} ($selinuxvariant)"
-    /usr/sbin/semodule -s ${selinuxvariant} -i \
-      %{_datadir}/selinux/${selinuxvariant}/%{name}.pp
-  else
-    echo "SELinux semodule store for %{radicale_package_name} ($selinuxvariant) SKIPPED - policy not installed"
-  fi
+  %selinux_modules_install -s ${selinuxvariant} -p 400 %{_datadir}/selinux/packages/${selinuxvariant}/%{name}.pp
+  %selinux_relabel_post -s ${selinuxvariant}
 done
-# http://danwalsh.livejournal.com/10607.html
 if semanage port -l | grep -q "^radicale_port_t\s*tcp\s*5232$"; then
   echo "SELinux adjustments for %{radicale_package_name} port tcp/5232 already done"
 else
@@ -428,9 +429,6 @@ else
   semanage port -a -t radicale_port_t -p tcp 5232
 fi
 
-echo "SELinux fixfiles for: %{radicale_package_name}"
-/usr/sbin/fixfiles -R %{radicale_package_name} restore >/dev/null
-
 if [ -d %{_localstatedir}/log/%{name} ]; then
   echo "SELinux restorecon for: %{_localstatedir}/log/%{name}"
   /usr/sbin/restorecon -R %{_localstatedir}/log/%{name}

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

only message in thread, other threads:[~2026-10-08  5:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08  5:35 [rpms/radicale] epel10.2: selinux: add pre, adjust post Peter Bieringer

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