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 <adrian.freihofer@siemens.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Adrian Freihofer
2025-03-20 21:20:32 +01:00
committed by Armin Kuster
parent 7badda60cd
commit 36840b49c8

View File

@@ -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"