From 36840b49c8a9082ded705f46224cd3c74656a353 Mon Sep 17 00:00:00 2001 From: Adrian Freihofer Date: Thu, 20 Mar 2025 21:20:32 +0100 Subject: [PATCH] tpm2-tss-engine: add .so symmlink to engines package Without the symlink, the engine is not found by openssl: openssl engine -t -c tpm2tss 20F0C5BDFFFF0000:error:12800067:DSO support routines:dlfcn_load:could not load the shared library:/usr/src/debug/openssl/3.2.4/crypto/dso/dso_dlfcn.c:118: filename(/usr/lib/engines-3/tpm2tss.so): /usr/lib/engines-3/tpm2tss.so: cannot open shared object file: No such file or directory ... With sym-link it works (also without extra configuration for openssl) cd /usr/lib/engines-3/ ln -s libtpm2tss.so tpm2tss.so openssl engine -t -c tpm2tss (tpm2tss) TPM2-TSS engine for OpenSSL [RSA, RAND] [ available ] For exmample also the Fedora package has the symlink. Signed-off-by: Adrian Freihofer Signed-off-by: Armin Kuster --- .../recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.2.0.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.2.0.bb b/meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.2.0.bb index 30865d2..af9dec8 100644 --- a/meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.2.0.bb +++ b/meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.2.0.bb @@ -29,7 +29,11 @@ do_configure:prepend() { PACKAGES += "${PN}-engines ${PN}-engines-staticdev ${PN}-bash-completion" -FILES:${PN}-dev = "${libdir}/engines-3/tpm2tss.so ${includedir}/*" -FILES:${PN}-engines = "${libdir}/engines-3/lib*.so*" +FILES:${PN}-dev = "${includedir}/*" +FILES:${PN}-engines = "${libdir}/engines-3/*.so*" FILES:${PN}-engines-staticdev = "${libdir}/engines-3/libtpm2tss.a" FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions" + +# The tpm2tss.so symlink is in the main package because OpenSSL +# searches for the shared object via the symlink. +INSANE_SKIP:${PN}-engines += "dev-so"