diff --git a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-dev.bbappend b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-dev.bbappend index 49d5d48..0d9f088 100644 --- a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-dev.bbappend +++ b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-dev.bbappend @@ -1 +1 @@ -include linux-yocto-luks.inc +include ${@bb.utils.contains('DISTRO_FEATURES', 'luks', '${BPN}-luks.inc', '', d)} diff --git a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-rt_%.bbappend b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-rt_%.bbappend index 49d5d48..0d9f088 100644 --- a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-rt_%.bbappend +++ b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-rt_%.bbappend @@ -1 +1 @@ -include linux-yocto-luks.inc +include ${@bb.utils.contains('DISTRO_FEATURES', 'luks', '${BPN}-luks.inc', '', d)} diff --git a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto_%.bbappend index 49d5d48..0d9f088 100644 --- a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto_%.bbappend +++ b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto_%.bbappend @@ -1 +1 @@ -include linux-yocto-luks.inc +include ${@bb.utils.contains('DISTRO_FEATURES', 'luks', '${BPN}-luks.inc', '', d)} diff --git a/meta-encrypted-storage/recipes-support/cryptsetup/cryptsetup-luks.inc b/meta-encrypted-storage/recipes-support/cryptsetup/cryptsetup-luks.inc new file mode 100644 index 0000000..693a68b --- /dev/null +++ b/meta-encrypted-storage/recipes-support/cryptsetup/cryptsetup-luks.inc @@ -0,0 +1,2 @@ +RDEPENDS:${PN} += "lvm2" +RRECOMMENDS:${PN}:append:class-target = " lvm2-udevrules" diff --git a/meta-encrypted-storage/recipes-support/cryptsetup/cryptsetup_%.bbappend b/meta-encrypted-storage/recipes-support/cryptsetup/cryptsetup_%.bbappend index 693a68b..c57ec50 100644 --- a/meta-encrypted-storage/recipes-support/cryptsetup/cryptsetup_%.bbappend +++ b/meta-encrypted-storage/recipes-support/cryptsetup/cryptsetup_%.bbappend @@ -1,2 +1 @@ -RDEPENDS:${PN} += "lvm2" -RRECOMMENDS:${PN}:append:class-target = " lvm2-udevrules" +require ${@bb.utils.contains('DISTRO_FEATURES', 'luks', '${BPN}-luks.inc', '', d)} diff --git a/meta-encrypted-storage/recipes-support/lvm2/lvm2-luks.inc b/meta-encrypted-storage/recipes-support/lvm2/lvm2-luks.inc new file mode 100644 index 0000000..b7db196 --- /dev/null +++ b/meta-encrypted-storage/recipes-support/lvm2/lvm2-luks.inc @@ -0,0 +1,7 @@ +# +# Copyright (C) 2019 Wind River Systems, Inc. +# + +FILESEXTRAPATHS:prepend := "${THISDIR}/lvm2:" + +SRC_URI += "file://0001-10-dm.rules.in-Fix-dmcrypt-hanging-on-hand-over-from.patch" diff --git a/meta-encrypted-storage/recipes-support/lvm2/lvm2_%.bbappend b/meta-encrypted-storage/recipes-support/lvm2/lvm2_%.bbappend index b7db196..c57ec50 100644 --- a/meta-encrypted-storage/recipes-support/lvm2/lvm2_%.bbappend +++ b/meta-encrypted-storage/recipes-support/lvm2/lvm2_%.bbappend @@ -1,7 +1 @@ -# -# Copyright (C) 2019 Wind River Systems, Inc. -# - -FILESEXTRAPATHS:prepend := "${THISDIR}/lvm2:" - -SRC_URI += "file://0001-10-dm.rules.in-Fix-dmcrypt-hanging-on-hand-over-from.patch" +require ${@bb.utils.contains('DISTRO_FEATURES', 'luks', '${BPN}-luks.inc', '', d)}