apparmor-rpm-macros/macros.apparmor
Christian Boltz 5adf8c6842 Accepting request 1147928 from home:fcrozat:branches:security:apparmor
- Update macro to detect when installing in chroot
  (transactional-update) and avoid calling apparmor_parser.

OBS-URL: https://build.opensuse.org/request/show/1147928
OBS-URL: https://build.opensuse.org/package/show/security:apparmor/apparmor-rpm-macros?expand=0&rev=15
2024-02-20 12:39:50 +00:00

12 lines
421 B
Plaintext

%apparmor_reload()\
if [ "$YAST_IS_RUNNING" != "instsys" -a -x /usr/bin/systemd-detect-virt -a -x /usr/bin/systemctl ]; then\
systemd-detect-virt --chroot --quiet \
NOT_IN_CHROOT=$? \
if [ $NOT_IN_CHROOT -gt 0 ]; then \
if /usr/bin/systemctl is-active --quiet apparmor.service; then\
/sbin/apparmor_parser -r -T -W %{?*} > /dev/null || :\
fi\
fi \
fi\
%{nil}