diff --git a/passt.changes b/passt.changes index e18167f..0d5a792 100644 --- a/passt.changes +++ b/passt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Sep 12 11:08:38 UTC 2024 - Cathy Hu + +- Fix passt-selinux to use selinux macros instead of calling semodule + by hand, which leads to unwanted policy reload on Micro (bsc#1229132) + ------------------------------------------------------------------- Mon Sep 09 06:57:41 UTC 2024 - dcermak@suse.com diff --git a/passt.spec b/passt.spec index 1b5653b..0b8423a 100644 --- a/passt.spec +++ b/passt.spec @@ -43,6 +43,7 @@ %endif %endif +%global selinuxtype targeted Name: passt Version: 20240906.6b38f07 Release: 0 @@ -135,13 +136,21 @@ popd %endif %if %{with selinux} -%post selinux -semodule -i %{_datadir}/selinux/packages/%{name}/passt.pp 2>/dev/null || : -semodule -i %{_datadir}/selinux/packages/%{name}/pasta.pp 2>/dev/null || : +%pre selinux +%selinux_relabel_pre -s %{selinuxtype} -%preun selinux -semodule -r passt 2>/dev/null || : -semodule -r pasta 2>/dev/null || : +%post selinux +%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{name}/passt.pp +%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{name}/pasta.pp + +%postun selinux +if [ $1 -eq 0 ]; then + %selinux_modules_uninstall -s %{selinuxtype} passt + %selinux_modules_uninstall -s %{selinuxtype} pasta +fi + +%posttrans selinux +%selinux_relabel_post -s %{selinuxtype} %endif %files