diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:26:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:30:18 +0000 |
commit | a1d39386db04d06315363b0e275437f725081ebd (patch) | |
tree | fdf446fb830ffd57b69fe488543ce0f888bf73bc /debian/initramfs/hooks | |
parent | Merging debian version 2:2.7.2-1. (diff) | |
download | cryptsetup-a1d39386db04d06315363b0e275437f725081ebd.tar.xz cryptsetup-a1d39386db04d06315363b0e275437f725081ebd.zip |
Reverting switch from libargon to libopenssl for backports.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/initramfs/hooks')
-rw-r--r-- | debian/initramfs/hooks/cryptroot | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/initramfs/hooks/cryptroot b/debian/initramfs/hooks/cryptroot index dd5c798..83d29fd 100644 --- a/debian/initramfs/hooks/cryptroot +++ b/debian/initramfs/hooks/cryptroot @@ -313,6 +313,27 @@ copy_libssl_legacy_library() { fi } +# See #1032221: newer libargon2 are built with glibc ≥2.34 hence no +# longer links libpthread. This in turns means that initramfs-tool's +# copy_exec() is no longer able to detect pthread_*() need and thus +# doesn't copy libgcc_s.so anymore. So we need to do it manually +# instead. +copy_libgcc_argon2() { + local libdir rv=0 + libdir="$(env --unset=LD_PRELOAD ldd /sbin/cryptsetup | sed -nr '/.*=>\s*(\S+)\/libargon2\.so\..*/ {s//\1/p;q}')" + copy_libgcc "$libdir" || rv=$? + if [ $rv -ne 0 ]; then + # merged-/usr mismatch, see #1032518 + if [ "${libdir#/usr/}" != "$libdir" ]; then + libdir="${libdir#/usr}" + else + libdir="/usr/${libdir#/}" + fi + copy_libgcc "$libdir" && rv=0 || rv=$? + fi + return $rv +} + ####################################################################### # Begin real processing @@ -349,6 +370,7 @@ manual_add_modules dm_crypt copy_exec /sbin/cryptsetup copy_exec /sbin/dmsetup +copy_libgcc_argon2 [ "$ASKPASS" = n ] || copy_exec /lib/cryptsetup/askpass |