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
This commit is contained in:
наб 2025-03-09 03:32:15 +01:00
parent 2764c6e0d3
commit 588cce3882
No known key found for this signature in database
GPG Key ID: BCFD0B018D2658F1

View File

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