]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
Also support SUSE apparmor
authorAlessandro Astone <ales.astone@gmail.com>
Mon, 14 Nov 2022 21:35:42 +0000 (22:35 +0100)
committerAlessandro Astone <ales.astone@gmail.com>
Fri, 18 Nov 2022 14:19:17 +0000 (15:19 +0100)
Makefile

index b128ef5a8580e9450e8a949fe489a1ef0e4130ab..a3ec1c8d953f851d4b94d1a92b27dd258d4b3e2f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,7 @@ install_apparmor:
        sed --sandbox -i "/lxc.aa_profile/ s/unconfined/lxc-waydroid/g" $(DESTDIR)$(WAYDROID_DIR)/data/configs/config_1
        sed --sandbox -i "/lxc.apparmor.profile/ s/unconfined/lxc-waydroid/g" $(DESTDIR)$(WAYDROID_DIR)/data/configs/config_2
        # Load the profiles if not just packaging
        sed --sandbox -i "/lxc.aa_profile/ s/unconfined/lxc-waydroid/g" $(DESTDIR)$(WAYDROID_DIR)/data/configs/config_1
        sed --sandbox -i "/lxc.apparmor.profile/ s/unconfined/lxc-waydroid/g" $(DESTDIR)$(WAYDROID_DIR)/data/configs/config_2
        # Load the profiles if not just packaging
-       if [ -z $(DESTDIR) ] && aa-enabled --quiet 2>/dev/null; then \
+       if [ -z $(DESTDIR) ] && { aa-enabled --quiet || systemctl is-active -q apparmor; } 2>/dev/null; then \
                apparmor_parser -r -T -W "$(INSTALL_APPARMOR_DIR)/adbd"; \
                apparmor_parser -r -T -W "$(INSTALL_APPARMOR_DIR)/android_app"; \
                apparmor_parser -r -T -W "$(INSTALL_APPARMOR_DIR)/lxc/lxc-waydroid"; \
                apparmor_parser -r -T -W "$(INSTALL_APPARMOR_DIR)/adbd"; \
                apparmor_parser -r -T -W "$(INSTALL_APPARMOR_DIR)/android_app"; \
                apparmor_parser -r -T -W "$(INSTALL_APPARMOR_DIR)/lxc/lxc-waydroid"; \