From 765be3600603656aedb20ad6b0ad2f2ed5261cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Thu, 6 Jan 2022 20:26:40 +0100 Subject: [PATCH] libfetch: unquote @LIBFETCH_SONAME@ subst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @LIBFETCH_SONAME@ is no longer quoted. The C define still is. Ref: 153f7c9f72082d7ef5ee27fcbec1bcb94ba88151 Ref: https://github.com/openzfs/zfs/pull/12835#discussion_r776833743 Reviewed-by: Brian Behlendorf Reviewed-by: Damian Szuberski Signed-off-by: Ahelenia ZiemiaƄska Closes #12922 --- config/user-libfetch.m4 | 6 +++--- contrib/dracut/90zfs/module-setup.sh.in | 4 ++-- contrib/initramfs/hooks/zfs.in | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/user-libfetch.m4 b/config/user-libfetch.m4 index f5149fc1a5..d961c6ca77 100644 --- a/config/user-libfetch.m4 +++ b/config/user-libfetch.m4 @@ -32,7 +32,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBFETCH], [ have_libfetch=1 LIBFETCH_IS_FETCH=1 LIBFETCH_DYNAMIC=1 - LIBFETCH_SONAME='"libfetch.so.6"' + LIBFETCH_SONAME="libfetch.so.6" LIBFETCH_LIBS="-ldl" AC_MSG_RESULT([fetch(3)]) ], []) @@ -45,7 +45,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBFETCH], [ LIBFETCH_IS_LIBCURL=1 if test "$(curl-config --built-shared)" = "yes"; then LIBFETCH_DYNAMIC=1 - LIBFETCH_SONAME='"libcurl.so.4"' + LIBFETCH_SONAME="libcurl.so.4" LIBFETCH_LIBS="-ldl" AC_MSG_RESULT([libcurl]) else @@ -67,5 +67,5 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBFETCH], [ AC_DEFINE_UNQUOTED([LIBFETCH_IS_FETCH], [$LIBFETCH_IS_FETCH], [libfetch is fetch(3)]) AC_DEFINE_UNQUOTED([LIBFETCH_IS_LIBCURL], [$LIBFETCH_IS_LIBCURL], [libfetch is libcurl]) AC_DEFINE_UNQUOTED([LIBFETCH_DYNAMIC], [$LIBFETCH_DYNAMIC], [whether the chosen libfetch is to be loaded at run-time]) - AC_DEFINE_UNQUOTED([LIBFETCH_SONAME], [$LIBFETCH_SONAME], [soname of chosen libfetch]) + AC_DEFINE_UNQUOTED([LIBFETCH_SONAME], ["$LIBFETCH_SONAME"], [soname of chosen libfetch]) ]) diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index c27f905bfa..fbf32b6588 100755 --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in @@ -61,9 +61,9 @@ install() { dracut_install /usr/lib*/gcc/**/libgcc_s.so* fi # shellcheck disable=SC2050 - if [ @LIBFETCH_DYNAMIC@ != 0 ]; then + if [ @LIBFETCH_DYNAMIC@ -gt 0 ]; then for d in $libdirs; do - [ -e "$d/"@LIBFETCH_SONAME@ ] && dracut_install "$d/"@LIBFETCH_SONAME@ + [ -e "$d/@LIBFETCH_SONAME@" ] && dracut_install "$d/@LIBFETCH_SONAME@" done fi dracut_install @mounthelperdir@/mount.zfs diff --git a/contrib/initramfs/hooks/zfs.in b/contrib/initramfs/hooks/zfs.in index bdf169fd96..546841e6c3 100755 --- a/contrib/initramfs/hooks/zfs.in +++ b/contrib/initramfs/hooks/zfs.in @@ -31,8 +31,8 @@ find /lib/ -type f -name "libgcc_s.so.[1-9]" | while read -r libgcc; do done # shellcheck disable=SC2050 -if [ @LIBFETCH_DYNAMIC@ != 0 ]; then - find /lib/ -name @LIBFETCH_SONAME@ | while read -r libfetch; do +if [ @LIBFETCH_DYNAMIC@ -gt 0 ]; then + find /lib/ -name "@LIBFETCH_SONAME@" | while read -r libfetch; do copy_exec "$libfetch" done fi