Skip to content

Commit

Permalink
libfetch: unquote @LIBFETCH_SONAME@ subst
Browse files Browse the repository at this point in the history
@LIBFETCH_SONAME@ is no longer quoted. The C define still is.

Ref: 153f7c9
Ref: openzfs#12835 (comment)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#12922
  • Loading branch information
nabijaczleweli authored and nicman23 committed Aug 22, 2022
1 parent 0bcb4a1 commit 39eeb5c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions config/user-libfetch.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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)])
], [])
Expand All @@ -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
Expand All @@ -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])
])
4 changes: 2 additions & 2 deletions contrib/dracut/90zfs/module-setup.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions contrib/initramfs/hooks/zfs.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,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
Expand Down

0 comments on commit 39eeb5c

Please sign in to comment.