package/apparmor: add option to install generic profiles
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 28 Mar 2020 08:28:08 +0000 (09:28 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Mon, 20 Apr 2020 07:55:48 +0000 (09:55 +0200)
The apparmor packages comes with a set of profiles for a class of usual,
mostly server-class programs and daemons.

Even though an embedded device will mostly require custom profiles, the
generic ones may come handy, as they also provide "abstractions", that
can serve as templates for custom profiles.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
[yann.morin.1998@free.fr: split off into its own patch]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
package/apparmor/Config.in
package/apparmor/apparmor.mk

index d02838f800356a36f98f3dcefe6f294b2a84a8d9..3cb5349cac5411e37b8db797d5296a47b0a54a0d 100644 (file)
@@ -60,6 +60,12 @@ config BR2_PACKAGE_APPARMOR_UTILS_EXTRA
 
 endif # BR2_PACKAGE_APPARMOR_UTILS
 
+config BR2_PACKAGE_APPARMOR_PROFILES
+       bool "profiles"
+       help
+         Installs server-class profiles for a wide range of
+         usual programs and daemons.
+
 endif # BR2_PACKAGE_APPARMOR
 
 comment "apparmor needs a toolchain w/ headers >= 3.16, threads, C++"
index ab0b7778d6239b8cf59aee77d3121e38e2a68ed6..b1a47c080cb372a70be2a65451c6768a51909f76 100644 (file)
@@ -35,6 +35,10 @@ endif # BR2_PACKAGE_APPARMOR_UTILS_EXTRA
 
 endif # BR2_PACKAGE_APPARMOR_UTILS
 
+ifeq ($(BR2_PACKAGE_APPARMOR_PROFILES),y)
+APPARMOR_TOOLS += profiles
+endif
+
 define APPARMOR_BUILD_CMDS
        $(foreach tool,$(APPARMOR_TOOLS),\
                $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \