From 906c6c78fd8a99f01a243fa272edb4ef12cb1fab Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Sat, 9 Apr 2022 16:53:27 +0300 Subject: MTCAP3: Fix tpm2-tss-engine for new versions of openssl Modern versions of openssl look for engine files that do not have the "lib" prefix. The current tpm2-tss-engine recipe provides a symlink from "tpm2tss.so" to "libtpm2tss.so" in the "-dev" package. Adding "-dev" packages to the image is not an option (increases the image size by more than 20 MiB) and the "-engines" package does not provide the required symlink. Provide the symlink in "tpm2-tss-engine-engines" so it can be used in the image instead of "tpm2-tss-engine-dev". --- recipes-tpm2/tpm2-tss/tpm2-tss-engine_1.0.1.bbappend | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 recipes-tpm2/tpm2-tss/tpm2-tss-engine_1.0.1.bbappend diff --git a/recipes-tpm2/tpm2-tss/tpm2-tss-engine_1.0.1.bbappend b/recipes-tpm2/tpm2-tss/tpm2-tss-engine_1.0.1.bbappend new file mode 100644 index 0000000..5bdbb4a --- /dev/null +++ b/recipes-tpm2/tpm2-tss/tpm2-tss-engine_1.0.1.bbappend @@ -0,0 +1,18 @@ +# Openssl since 1.1.0 looks for the engine files **without** the "lib" prefix, +# so add a symlink from "tpm2tss.so" to "libtpm2tss.so". +# More info: +# - https://github.com/tpm2-software/tpm2-tss-engine/issues/6#issuecomment-422489744 +# - https://github.com/openssl/openssl/commit/9ee0ed3de66678a15db126d10b3e4226e835b8f5 +# - https://bugzilla.yoctoproject.org/show_bug.cgi?id=14776 +# - https://lists.yoctoproject.org/g/yocto/message/47921 + +# Remove tpm2tss.so from the "-dev" package, include it to "-engines" instead. +# The "-dev" package depends on "-engines" anyway. +FILES_${PN}-dev = "${includedir}/*" +FILES_${PN}-engines_append = " ${libdir}/engines-1.1/tpm2tss.so" + +# Allow the symlink from tpm2tss.so to libtpm2tss.so in "-engines". +INSANE_SKIP_${PN}-engines += "dev-so" + +# Customized in mLinux. +PR = "m0" -- cgit v1.2.3