Bug 2587559

Summary: passt-selinux: pasta.fc uses legacy /var/run/pasta\.pid, causes a second policy rebuild on each SELinux module install
Product: [Fedora] Fedora Reporter: RadosÅ‚aw Stachowiak <50bda1cd2babf798>
Component: passtAssignee: Stefano Brivio <sbrivio>
Status: POST --- QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 45CC: sbrivio
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Radosław Stachowiak 2026-11-30 19:22:25 UTC
Version: passt-selinux-0^20261002.gcba3570-1.fc45, selinux-policy-45.26-1.fc45

Problem:
pasta.pp contains the file context
  /var/run/pasta\.pid  system_u:object_r:pasta_pid_t:s0
and no /run/pasta\.pid equivalent.

Effect:
/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).

Reproducible: Always

Steps to Reproduce:
1. strings /usr/share/selinux/packages/targeted/pasta.pp | grep '^/var/run'
2. dnf reinstall flatpak-selinux (or any other *-selinux package)
3. journalctl -k | grep MAC_POLICY_LOAD  -> two policy loads for one %post
4. cat /run/selinux-policy/extra_varrun.cil  -> contains /run/pasta.pid


Expected Results:
Expected:
pasta.fc uses /run/pasta\.pid. No extra_varrun entry, one policy rebuild.