From 588cce3882eefef9aa6f972da72012d17aab2677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sun, 9 Mar 2025 03:32:15 +0100 Subject: [PATCH] dracut: install TPM2 TCTIs with inst_libdir_file instead of removed-from-dracut-ng inst_library We can't pull in 91tpm2-tss if installing TPM2 backend instead of installing the TCTIs manually because it's require_binaries tpm2 Initrds produced are identical. References: https://todo.sr.ht/~nabijaczleweli/tzpfms/3 --- initrd/dracut/module-setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/initrd/dracut/module-setup.sh b/initrd/dracut/module-setup.sh index a465c55..8a7bde4 100755 --- a/initrd/dracut/module-setup.sh +++ b/initrd/dracut/module-setup.sh @@ -25,8 +25,7 @@ _get_backend() { _install_tpm2() { inst_binary zfs-tpm2-load-key - # shellcheck disable=SC2046 - inst_library $(find /usr/lib -name 'libtss2-tcti*.so*') # TODO: there's got to be a better way™! + inst_libdir_file 'libtss2-tcti*.so*' command -v tpm2_dictionarylockout > /dev/null && inst_binary tpm2_dictionarylockout }