From 51a4c6b5179d087f647cf0c458edb8ab107826ef Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sat, 1 Jun 2019 13:51:10 -0700 Subject: linux-bbappends: simplify Signed-off-by: Armin Kuster --- recipes-kernel/linux/linux-%.bbapend | 9 +++++++++ recipes-kernel/linux/linux-yocto-5.0/apparmor.cfg | 9 --------- recipes-kernel/linux/linux-yocto-5.0/apparmor_on_boot.cfg | 1 - recipes-kernel/linux/linux-yocto-5.0/smack-default-lsm.cfg | 2 -- recipes-kernel/linux/linux-yocto-5.0/smack.cfg | 7 ------- recipes-kernel/linux/linux-yocto/yama.cfg | 1 + recipes-kernel/linux/linux-yocto_5.0.%.bbappend | 11 ----------- recipes-kernel/linux/linux/apparmor.cfg | 9 +++++++++ recipes-kernel/linux/linux/apparmor_on_boot.cfg | 1 + recipes-kernel/linux/linux/smack-default-lsm.cfg | 2 ++ recipes-kernel/linux/linux/smack.cfg | 7 +++++++ 11 files changed, 29 insertions(+), 30 deletions(-) create mode 100644 recipes-kernel/linux/linux-%.bbapend delete mode 100644 recipes-kernel/linux/linux-yocto-5.0/apparmor.cfg delete mode 100644 recipes-kernel/linux/linux-yocto-5.0/apparmor_on_boot.cfg delete mode 100644 recipes-kernel/linux/linux-yocto-5.0/smack-default-lsm.cfg delete mode 100644 recipes-kernel/linux/linux-yocto-5.0/smack.cfg create mode 100644 recipes-kernel/linux/linux-yocto/yama.cfg delete mode 100644 recipes-kernel/linux/linux-yocto_5.0.%.bbappend create mode 100644 recipes-kernel/linux/linux/apparmor.cfg create mode 100644 recipes-kernel/linux/linux/apparmor_on_boot.cfg create mode 100644 recipes-kernel/linux/linux/smack-default-lsm.cfg create mode 100644 recipes-kernel/linux/linux/smack.cfg diff --git a/recipes-kernel/linux/linux-%.bbapend b/recipes-kernel/linux/linux-%.bbapend new file mode 100644 index 0000000..ec7adeb --- /dev/null +++ b/recipes-kernel/linux/linux-%.bbapend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/linux:" + +SRC_URI += "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', ' file://apparmor.cfg', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', ' file://apparmor_on_boot.cfg', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'smack', ' file://smack.cfg', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'smack', ' file://smack-default-lsm.cfg', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'yama', ' file://yama.cfg', '', d)} \ +" diff --git a/recipes-kernel/linux/linux-yocto-5.0/apparmor.cfg b/recipes-kernel/linux/linux-yocto-5.0/apparmor.cfg deleted file mode 100644 index ae6cdcd..0000000 --- a/recipes-kernel/linux/linux-yocto-5.0/apparmor.cfg +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG_AUDIT=y -CONFIG_SECURITY_PATH=y -CONFIG_SECURITY_APPARMOR=y -CONFIG_SECURITY_APPARMOR_HASH=y -CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y -CONFIG_INTEGRITY_AUDIT=y -CONFIG_DEFAULT_SECURITY_APPARMOR=y -CONFIG_DEFAULT_SECURITY="apparmor" -CONFIG_AUDIT_GENERIC=y diff --git a/recipes-kernel/linux/linux-yocto-5.0/apparmor_on_boot.cfg b/recipes-kernel/linux/linux-yocto-5.0/apparmor_on_boot.cfg deleted file mode 100644 index fc35740..0000000 --- a/recipes-kernel/linux/linux-yocto-5.0/apparmor_on_boot.cfg +++ /dev/null @@ -1 +0,0 @@ -CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1 diff --git a/recipes-kernel/linux/linux-yocto-5.0/smack-default-lsm.cfg b/recipes-kernel/linux/linux-yocto-5.0/smack-default-lsm.cfg deleted file mode 100644 index b5c4845..0000000 --- a/recipes-kernel/linux/linux-yocto-5.0/smack-default-lsm.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_DEFAULT_SECURITY="smack" -CONFIG_DEFAULT_SECURITY_SMACK=y diff --git a/recipes-kernel/linux/linux-yocto-5.0/smack.cfg b/recipes-kernel/linux/linux-yocto-5.0/smack.cfg deleted file mode 100644 index 0d5fc64..0000000 --- a/recipes-kernel/linux/linux-yocto-5.0/smack.cfg +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG_NETLABEL=y -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -CONFIG_SECURITY_SMACK=y -CONFIG_SECURITY_SMACK_BRINGUP=y -CONFIG_SECURITY_SMACK_APPEND_SIGNALS=y -CONFIG_TMPFS_XATTR=y diff --git a/recipes-kernel/linux/linux-yocto/yama.cfg b/recipes-kernel/linux/linux-yocto/yama.cfg new file mode 100644 index 0000000..3b55731 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/yama.cfg @@ -0,0 +1 @@ +CONFIG_SECURITY_YAMA=y diff --git a/recipes-kernel/linux/linux-yocto_5.0.%.bbappend b/recipes-kernel/linux/linux-yocto_5.0.%.bbappend deleted file mode 100644 index f810e21..0000000 --- a/recipes-kernel/linux/linux-yocto_5.0.%.bbappend +++ /dev/null @@ -1,11 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.0:" - -SRC_URI += "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', ' file://apparmor.cfg', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', ' file://apparmor_on_boot.cfg', '', d)} \ -" - -SRC_URI += "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'smack', ' file://smack.cfg', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'smack', ' file://smack-default-lsm.cfg', '', d)} \ -" diff --git a/recipes-kernel/linux/linux/apparmor.cfg b/recipes-kernel/linux/linux/apparmor.cfg new file mode 100644 index 0000000..ae6cdcd --- /dev/null +++ b/recipes-kernel/linux/linux/apparmor.cfg @@ -0,0 +1,9 @@ +CONFIG_AUDIT=y +CONFIG_SECURITY_PATH=y +CONFIG_SECURITY_APPARMOR=y +CONFIG_SECURITY_APPARMOR_HASH=y +CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y +CONFIG_INTEGRITY_AUDIT=y +CONFIG_DEFAULT_SECURITY_APPARMOR=y +CONFIG_DEFAULT_SECURITY="apparmor" +CONFIG_AUDIT_GENERIC=y diff --git a/recipes-kernel/linux/linux/apparmor_on_boot.cfg b/recipes-kernel/linux/linux/apparmor_on_boot.cfg new file mode 100644 index 0000000..fc35740 --- /dev/null +++ b/recipes-kernel/linux/linux/apparmor_on_boot.cfg @@ -0,0 +1 @@ +CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1 diff --git a/recipes-kernel/linux/linux/smack-default-lsm.cfg b/recipes-kernel/linux/linux/smack-default-lsm.cfg new file mode 100644 index 0000000..b5c4845 --- /dev/null +++ b/recipes-kernel/linux/linux/smack-default-lsm.cfg @@ -0,0 +1,2 @@ +CONFIG_DEFAULT_SECURITY="smack" +CONFIG_DEFAULT_SECURITY_SMACK=y diff --git a/recipes-kernel/linux/linux/smack.cfg b/recipes-kernel/linux/linux/smack.cfg new file mode 100644 index 0000000..0d5fc64 --- /dev/null +++ b/recipes-kernel/linux/linux/smack.cfg @@ -0,0 +1,7 @@ +CONFIG_NETLABEL=y +CONFIG_SECURITY_NETWORK=y +# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_SMACK=y +CONFIG_SECURITY_SMACK_BRINGUP=y +CONFIG_SECURITY_SMACK_APPEND_SIGNALS=y +CONFIG_TMPFS_XATTR=y -- cgit v1.2.3-54-g00ecf