[meta-security][PATCH 2/2] parsec-service: Only enable TPM is layer and DISTRO_FEATURE is defined.


Armin Kuster
 

Signed-off-by: Armin Kuster <akuster808@...>
---
.../recipes-parsec/parsec-service/parsec-service_0.8.1.bb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta-parsec/recipes-parsec/parsec-service/parsec-service_0.8.1.bb b/meta-parsec/recipes-parsec/parsec-service/parsec-service_0.8.1.bb
index 1cbf2bd..3f12139 100644
--- a/meta-parsec/recipes-parsec/parsec-service/parsec-service_0.8.1.bb
+++ b/meta-parsec/recipes-parsec/parsec-service/parsec-service_0.8.1.bb
@@ -12,7 +12,12 @@ SRC_URI += "crate://crates.io/parsec-service/${PV} \

DEPENDS = "clang-native"

-PACKAGECONFIG ??= "TPM PKCS11 MBED-CRYPTO CRYPTOAUTHLIB"
+PACKAGECONFIG ??= "PKCS11 MBED-CRYPTO CRYPTOAUTHLIB"
+
+have_TPM = "${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', 'TPM', '', d)}"
+PACKAGECONFIG:append = " ${@bb.utils.contains('BBFILE_COLLECTIONS', 'tpm-layer', '${have_TPM}', '', d)}"
+
+
PACKAGECONFIG[ALL] = "all-providers cryptoki/generate-bindings tss-esapi/generate-bindings,,tpm2-tss libts,libts"
PACKAGECONFIG[TPM] = "tpm-provider tss-esapi/generate-bindings,,tpm2-tss"
PACKAGECONFIG[PKCS11] = "pkcs11-provider cryptoki/generate-bindings,"
--
2.25.1

Join yocto@lists.yoctoproject.org to automatically receive all group messages.