Accepting request 1200293 from Virtualization:containers

OBS-URL: https://build.opensuse.org/request/show/1200293
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/passt?expand=0&rev=16
This commit is contained in:
Ana Guerrero 2024-09-13 12:27:36 +00:00 committed by Git OBS Bridge
commit 07fc0b1188
2 changed files with 21 additions and 6 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 12 11:08:38 UTC 2024 - Cathy Hu <cathy.hu@suse.com>
- 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

View File

@ -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