Accepting request 1166199 from home:danishprakash:branches:Virtualization:containers

spec: Override symlinks with hard links

OBS-URL: https://build.opensuse.org/request/show/1166199
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/passt?expand=0&rev=7
This commit is contained in:
Dan Čermák 2024-04-08 12:43:39 +00:00 committed by Git OBS Bridge
parent ccf6fc5a20
commit 5e6df527a8
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Apr 8 11:41:54 UTC 2024 - Danish Prakash <danish.prakash@suse.com>
- spec: Override symlinks with hard links for apparmor
profiles to take effect. (bsc#1221840)
(https://github.com/containers/buildah/issues/5440)
-------------------------------------------------------------------
Mon Apr 08 08:39:24 UTC 2024 - dcermak@suse.com

View File

@ -108,6 +108,13 @@ mkdir -p %{buildroot}%{_sysconfdir}/apparmor.d/abstractions
install -m 0644 usr.bin.passt %{buildroot}%{_sysconfdir}/apparmor.d/
install -m 0644 abstractions/{passt,pasta} %{buildroot}%{_sysconfdir}/apparmor.d/abstractions
popd
# apparmor doesn't apply different profiles
# to symlinks, override here with hard links
# https://github.com/containers/buildah/issues/5440
ln -f passt %{buildroot}%{_bindir}/pasta
%ifarch x86_64
ln -f passt.avx2 %{buildroot}%{_bindir}/pasta.avx2
%endif
%endif
%if %{with selinux}