From 29fc1490b48a04b4d3fde8769c7c64d594335915 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Thu, 3 Dec 2026 02:50:27 +0100 Subject: selinux: Don't use legacy /var/run path for PID file context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Radosław reports that each install of the passt-selinux package triggers two policy rebuilds, because, quoting: /usr/libexec/selinux/varrun-convert.sh finds this entry in file_contexts, generates the extra_varrun module and runs a second "semodule -i". %selinux_modules_install removes extra_varrun first, so each install or update of any package with a SELinux module does two full policy rebuilds instead of one (13-14 s each on one of my machines). Fix this by switching to the modern /run path for the PID file context. Reported-by: Radosław Stachowiak <50bda1cd2babf798@rdslw.online> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2587559 Suggested-by: Radosław Stachowiak <50bda1cd2babf798@rdslw.online> Signed-off-by: Stefano Brivio --- contrib/selinux/pasta.fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/selinux/pasta.fc b/contrib/selinux/pasta.fc index 82dbcbe..3495d9a 100644 --- a/contrib/selinux/pasta.fc +++ b/contrib/selinux/pasta.fc @@ -11,7 +11,7 @@ /usr/bin/pasta system_u:object_r:pasta_exec_t:s0 /usr/bin/pasta.avx2 system_u:object_r:pasta_exec_t:s0 /tmp/pasta\.pcap system_u:object_r:pasta_log_t:s0 -/var/run/pasta\.pid system_u:object_r:pasta_pid_t:s0 +/run/pasta\.pid system_u:object_r:pasta_pid_t:s0 /run/user/[0-9]+/netns system_u:object_r:ifconfig_var_run_t:s0 /run/user/[0-9]+/containers/networks/rootless-netns system_u:object_r:ifconfig_var_run_t:s0 # In case XDG_RUNTIME_DIR is not set (i.e. no systemd user session) Podman falls -- cgit v1.2.3