Rename smack OVERRIDE to with-lsm-smack
authorJosé Bollo <jose.bollo@iot.bzh>
Wed, 24 Jan 2018 10:18:02 +0000 (11:18 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 13 Feb 2018 10:02:00 +0000 (11:02 +0100)
Using the OVERRIDE "smack" came with the use of
the layer meta-intel-iot-security.

When switching to meta-security, it conflicts with the
package name 'smack' that provide the smack user library.

Yocto was reporting the following error:
  ERROR: .../meta-security/recipes-security/smack/smack_1.3.0.bb:
         QA Issue: Recipe .../meta-security/recipes-security/smack/smack_1.3.0.bb
         has PN of "smack" which is in OVERRIDES, this can result
         in unexpected behaviour. [pn-overrides]

Change-Id: Id71b283bf1ce5682bd94bf96595eb32506acb1d5
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend
meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc
meta-agl-bsp/recipes-kernel/linux/linux-agl.inc
meta-app-framework/conf/include/agl-appfw-smack.inc
meta-app-framework/recipes-core/af-main/af-main_1.0.bb
meta-app-framework/recipes-core/base-files/base-files_%.bbappend
meta-app-framework/recipes-core/security-manager/security-manager_%.bbappend
meta-app-framework/recipes-kernel/linux/linux-%.bbappend
meta-app-framework/recipes-kernel/linux/linux-yocto_4.12.bbappend
templates/feature/agl-appfw-smack/50_bblayers.conf.inc

index 5d5549f..3da7180 100644 (file)
@@ -13,6 +13,6 @@ KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cgroup.cfg"
 #-------------------------------------------------------------------------
 # smack patches for handling bluetooth
 
-SRC_URI_append_smack = "\
+SRC_URI_append_with-lsm-smack = "\
        file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \
 "
index 3235ff4..c4ebf4d 100644 (file)
@@ -3,6 +3,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/linux-4.9:"
 #-------------------------------------------------------------------------
 # smack patches for handling bluetooth
 
-SRC_URI_append_smack = "\
+SRC_URI_append_with-lsm-smack = "\
        file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \
        "
index db37ab2..b6f9604 100644 (file)
@@ -67,7 +67,7 @@ SRC_URI_append_virtualmachine = " file://vbox-vmware-sata.cfg"
 KERNEL_CONFIG_FRAGMENTS_append_virtualmachine = " ${WORKDIR}/vbox-vmware-sata.cfg"
 
 # Enable support for smack
-KERNEL_CONFIG_FRAGMENTS_append_smack = "\
+KERNEL_CONFIG_FRAGMENTS_append_with-lsm-smack = "\
        ${WORKDIR}/audit.cfg \
        ${WORKDIR}/smack.cfg \
        ${WORKDIR}/smack-default-lsm.cfg \
index b77a5d1..95092a9 100644 (file)
@@ -1,5 +1,5 @@
 # enable security features (smack, cynara) - required by Application Framework
-OVERRIDES .= ":smack"
+OVERRIDES .= ":with-lsm-smack"
 DISTRO_FEATURES_append = " smack dbus-cynara xattr"
 
 # use tar-native to support SMACK extended attributes independently of host config
index 8ac6615..69df39e 100644 (file)
@@ -14,7 +14,7 @@ DEPENDS = "openssl libxml2 xmlsec1 systemd libzip json-c systemd security-manage
 DEPENDS_class-native = "openssl libxml2 xmlsec1 libzip json-c"
 RDEPENDS_${PN}_class-target += "af-binder-tools"
 
-PACKAGE_WRITE_DEPS_append_smack = " smack-userspace-native libcap-native"
+PACKAGE_WRITE_DEPS_append_with-lsm-smack = " smack-userspace-native libcap-native"
 
 EXTRA_OECMAKE_class-native  = "\
        -DUSE_LIBZIP=1 \
@@ -46,8 +46,8 @@ GROUPADD_PARAM_${PN} = "-r ${afm_name}"
 FILES_${PN} += "\
        ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/afm-user-daemon.service', '', d)} \
 "
-RDEPENDS_${PN}_append_smack = " smack-userspace bash"
-DEPENDS_append_smack = " smack-userspace-native"
+RDEPENDS_${PN}_append_with-lsm-smack = " smack-userspace bash"
+DEPENDS_append_with-lsm-smack = " smack-userspace-native"
 
 # short hacks here
 SRC_URI += "\
@@ -90,7 +90,7 @@ pkg_postinst_${PN}() {
     chown ${afm_name}:${afm_name} $D${afm_datadir}/icons
 }
 
-pkg_postinst_${PN}_append_smack() {
+pkg_postinst_${PN}_append_with-lsm-smack() {
     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
         chsmack -a 'System::Shared' -t $D${systemd_units_root}/system
         chsmack -a 'System::Shared' -t $D${systemd_units_root}/system/afm-user-session@.target.wants
index 636bcc4..249f321 100644 (file)
@@ -1,5 +1,5 @@
-RDEPENDS_${PN}_append_smack = " smack-userspace"
-PACKAGE_WRITE_DEPS_append_smack = " smack-userspace-native"
+RDEPENDS_${PN}_append_with-lsm-smack = " smack-userspace"
+PACKAGE_WRITE_DEPS_append_with-lsm-smack = " smack-userspace-native"
 
 do_install_append() {
     install -d ${D}/${sysconfdir}/skel/app-data
@@ -13,7 +13,7 @@ do_install_append() {
     ln -s ../../var/local ${D}/usr/local
 }
 
-do_install_append_smack () {
+do_install_append_with-lsm-smack () {
     install -d ${D}/${sysconfdir}/smack/accesses.d
     cat > ${D}/${sysconfdir}/smack/accesses.d/default-access-domains-no-user <<EOF
 System User::App-Shared rwxat
@@ -22,7 +22,7 @@ EOF
     chmod 0644 ${D}/${sysconfdir}/smack/accesses.d/default-access-domains-no-user
 }
 
-pkg_postinst_${PN}_append_smack() {
+pkg_postinst_${PN}_append_with-lsm-smack() {
     chsmack -r -a 'User::Home' -t -D $D/${sysconfdir}/skel
     chsmack -a 'User::App-Shared' -D $D/${sysconfdir}/skel/app-data
     cp -rTf --preserve=all $D/${sysconfdir}/skel $D/${ROOT_HOME}
index 92b7957..cd02afa 100644 (file)
@@ -1,6 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/security-manager:"
 
-PACKAGE_WRITE_DEPS_append_smack = " smack-userspace-native"
+PACKAGE_WRITE_DEPS_append_with-lsm-smack = " smack-userspace-native"
 
 SRC_URI += " file://0001-Adapt-rules-to-AGL.patch \
             file://init-security-manager-db.service \
index 02595ef..fba5bf1 100644 (file)
@@ -1,3 +1,3 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/linux:"
-SRC_URI_append_smack = " file://audit.cfg"
+SRC_URI_append_with-lsm-smack = " file://audit.cfg"
 
index b1eadaf..5ae62d5 100644 (file)
@@ -3,7 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/linux/linux-yocto-4.12:"
 #-------------------------------------------------------------------------
 # smack patches for handling bluetooth
 
-SRC_URI_append_smack = "\
+SRC_URI_append_with-lsm-smack = "\
        file://0002-smack-fix-cache-of-access-labels.patch \
        file://0003-Smack-ignore-null-signal-in-smack_task_kill.patch \
        file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \
index 344c250..7f5f24e 100644 (file)
@@ -1,6 +1,7 @@
 BBLAYERS =+ " \
-       ${METADIR}/meta-intel-iot-security/meta-security-smack \
-       ${METADIR}/meta-intel-iot-security/meta-security-framework \
+        ${METADIR}/meta-security \
+       ${METADIR}/meta-openembedded/meta-perl \
+        ${METADIR}/meta-agl/meta-security \
        ${METADIR}/meta-agl/meta-app-framework \
     "