diff mbox series

[meta-security] meta-tpm: fix sanity check

Message ID 20240208162732.15507-1-valeria.petrov@spinetix.com
State New
Headers show
Series [meta-security] meta-tpm: fix sanity check | expand

Commit Message

Valeria Petrov Feb. 8, 2024, 4:27 p.m. UTC
Add tpm2 condition to the sanity check. This issue is already fixed on
the master and langdale branches, see commit 7628a3e9.
This commit addresses the specific issue related to the tpm2 sanity
check, isolated from other modifications introduced in the commit
7628a3e9.

Signed-off-by: Valeria Petrov <valeria.petrov@spinetix.com>
---
 meta-tpm/classes/sanity-meta-tpm.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-tpm/classes/sanity-meta-tpm.bbclass b/meta-tpm/classes/sanity-meta-tpm.bbclass
index 2f8b52d..1ab03c8 100644
--- a/meta-tpm/classes/sanity-meta-tpm.bbclass
+++ b/meta-tpm/classes/sanity-meta-tpm.bbclass
@@ -2,7 +2,9 @@  addhandler tpm_machinecheck
 tpm_machinecheck[eventmask] = "bb.event.SanityCheck"
 python tpm_machinecheck() {
     skip_check = e.data.getVar('SKIP_META_TPM_SANITY_CHECK') == "1"
-    if 'tpm' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check:
+    if 'tpm' not in e.data.getVar('DISTRO_FEATURES').split() and \
+       'tpm2' not in e.data.getVar('DISTRO_FEATURES').split() and \
+       not skip_check:
         bb.warn("You have included the meta-tpm layer, but \
 'tpm or tpm2' has not been enabled in your DISTRO_FEATURES. Some bbappend files \
 and preferred version setting may not take effect. See the meta-tpm README \