[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell quoting fixes
From: |
Ralf Wildenhues |
Subject: |
Re: shell quoting fixes |
Date: |
Sat, 20 May 2006 13:49:43 +0200 |
User-agent: |
Mutt/1.5.9i |
Hi Paul,
* Paul Eggert wrote on Fri, May 19, 2006 at 04:59:07AM CEST:
> I installed this, which should be self-explanatory:
Yes, and thanks, but I think parts of it are not safe. Comments inline.
Cheers,
Ralf
> 2006-05-18 Paul Eggert <address@hidden>
>
> * lib/autoconf/functions.m4 (AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU):
> Quote some uses of shell variables if they might suffer unexpected
> globbing. This doesn't fix all instances of quoting problems that
> I found, just the easy ones that look safe.
> * lib/autoconf/general.m4 (_AC_INIT_SRCDIR, _AC_INIT_HELP):
> (AC_CONFIG_AUX_DIR, AC_CONFIG_AUX_DIR_DEFAULT, AC_CONFIG_AUX_DIRS):
> (AC_CANONICAL_BUILD, AC_CANONICAL_HOST, AC_CANONICAL_TARGET):
> (AC_CACHE_LOAD, AC_CACHE_SAVE): Likewise.
> * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF, _AC_PATH_X_DIRECT): Likewise.
> * lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Likewise.
> * lib/autoconf/status.m4 (_AC_OUTPUT_LINK, _AC_OUTPUT_SUBDIRS):
> Likewise.
> * lib/autotest/general.m4 (_AC_INIT_PARSE_ARGS): Likewise.
> * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Likewise.
> --- lib/autoconf/general.m4 6 May 2006 05:52:28 -0000 1.916
> +++ lib/autoconf/general.m4 18 May 2006 22:38:14 -0000
> @@ -1601,9 +1601,6 @@ done
> if test -z "$ac_aux_dir"; then
> AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
> fi
> -ac_config_guess="$SHELL $ac_aux_dir/config.guess"
> -ac_config_sub="$SHELL $ac_aux_dir/config.sub"
> -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus
> configure.
You are removing some variables here. These have not been documented,
but I can find usage out in the wild, e.g. here:
http://mail-archives.apache.org/mod_mbox/httpd-cvs/200002.mbox/address@hidden
Please don't remove them.
> AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
> ])# AC_CONFIG_AUX_DIRS
>
> @@ -1692,17 +1689,17 @@ m4_divert_once([HELP_CANON],
> System types:
> --build=BUILD configure for building on BUILD [guessed]]])dnl
> # Make sure we can run config.sub.
> -$ac_config_sub sun4 >/dev/null 2>&1 ||
> - AC_MSG_ERROR([cannot run $ac_config_sub])
> +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
> + AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub])
>
> AC_CACHE_CHECK([build system type], [ac_cv_build],
> [ac_build_alias=$build_alias
> test "x$ac_build_alias" = x &&
> - ac_build_alias=`$ac_config_guess`
> + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
> test "x$ac_build_alias" = x &&
> AC_MSG_ERROR([cannot guess build type; you must specify one])
> -ac_cv_build=`$ac_config_sub $ac_build_alias` ||
> - AC_MSG_ERROR([$ac_config_sub $ac_build_alias failed])
> +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
> + AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed])
> ])
> _AC_CANONICAL_SPLIT(build)
> ])# AC_CANONICAL_BUILD
> @@ -1718,8 +1715,8 @@ AC_CACHE_CHECK([host system type], [ac_c
> [if test "x$host_alias" = x; then
> ac_cv_host=$ac_cv_build
> else
> - ac_cv_host=`$ac_config_sub $host_alias` ||
> - AC_MSG_ERROR([$ac_config_sub $host_alias failed])
> + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
> + AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed])
> fi
> ])
> _AC_CANONICAL_SPLIT([host])
> @@ -1737,8 +1734,8 @@ AC_CACHE_CHECK([target system type], [ac
> [if test "x$target_alias" = x; then
> ac_cv_target=$ac_cv_host
> else
> - ac_cv_target=`$ac_config_sub $target_alias` ||
> - AC_MSG_ERROR([$ac_config_sub $target_alias failed])
> + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
> + AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed])
> fi
> ])
> _AC_CANONICAL_SPLIT([target])