configure: disable bash check for FreeBSD
PATCH 1/1 configure: disable bash check for FreeBSD
Bash it's not used on FreeBSD.
---
Please re-run autoconf after applying
--- tools/configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tools/configure.ac +5 -1
@@ -320,7 +320,11 @@ AS_IF([test "x$xsmpolicy" = "xy"], [ xsmpolicy="n" ]) ]) -AX_PATH_PROG_OR_FAIL([BASH], [bash]) +dnl FreeBSD doesn't require bash (hotplug scripts are in plain sh) +case "$host_os" in + freebsd*) ;; + *) AX_PATH_PROG_OR_FAIL([BASH], [bash]);; +esac AS_IF([echo "$PYTHON" | grep -q "^/"], [ PYTHONPATH=$PYTHON PYTHON=`basename $PYTHONPATH`
Signature · 7 lines
2.10.1 (Apple Git-78) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Sorry, I've forgot to re-generate the patch after adding the maintainers...
Quoted 29 lines · Roger Pau Monne
Bash it's not used on FreeBSD.
Signed-off-by Roger Pau Monné <[email protected]>---
Please re-run autoconf after applying--- tools/configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)tools/configure.ac +5
-1@@ -320,7 +320,11 @@ AS_IF([test "x$xsmpolicy" = "xy"], [ xsmpolicy="n" ]) ]) -AX_PATH_PROG_OR_FAIL([BASH], [bash]) +dnl FreeBSD doesn't require bash (hotplug scripts are in plain sh) +case "$host_os" in + freebsd*) ;; + *) AX_PATH_PROG_OR_FAIL([BASH], [bash]);; +esac AS_IF([echo "$PYTHON" | grep -q "^/"], [ PYTHONPATH=$PYTHON PYTHON=`basename $PYTHONPATH`Signature · 1 line
2.10.1 (Apple Git-78)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 12 lines · Roger Pau Monne
Sorry, I've forgot to re-generate the patch after adding the maintainers...
Quoted 9 lines · Roger Pau Monne
Bash it's not used on FreeBSD.
Signed-off-by Roger Pau Monné <[email protected]>---
Please re-run autoconf after applying--- tools/configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Quoted 10 lines
tools/configure.ac AS_IF([test "x$xsmpolicy" = "xy"], [ · line 323
Quoted 10 lines
tools/configure.ac +1
-1@@ -320,7 +320,11 @@ AS_IF([test "x$xsmpolicy" = "xy"], [ xsmpolicy="n" ]) ]) -AX_PATH_PROG_OR_FAIL([BASH], [bash]) +dnl FreeBSD doesn't require bash (hotplug scripts are in plain sh)
I am not sure I follow this comment. It implies hotplug scripts are the only shell scripts that we ship or care and this check here is specifically for that purpose.
If this comment is correct, isn't it better to just remove this check? AFAICT sh is standard. If this comment is not correct, should we check for the desired shell in FreeBSD?
Wei.
Quoted 10 lines
Quoted 10 lines
tools/configure.ac +4
-0+case "$host_os" in + freebsd*) ;; + *) AX_PATH_PROG_OR_FAIL([BASH], [bash]);; +esac AS_IF([echo "$PYTHON" | grep -q "^/"], [ PYTHONPATH=$PYTHON PYTHON=`basename $PYTHONPATH`Signature · 1 line
2.10.1 (Apple Git-78)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 27 lines · Wei Liu
Quoted 12 lines · Roger Pau Monne
Sorry, I've forgot to re-generate the patch after adding the maintainers...
Quoted 9 lines · Roger Pau Monne
Bash it's not used on FreeBSD.
Signed-off-by Roger Pau Monné <[email protected]>---
Please re-run autoconf after applying--- tools/configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Quoted 10 lines
tools/configure.ac AS_IF([test "x$xsmpolicy" = "xy"], [ · line 323
Quoted 10 lines
tools/configure.ac +1
-1@@ -320,7 +320,11 @@ AS_IF([test "x$xsmpolicy" = "xy"], [ xsmpolicy="n" ]) ]) -AX_PATH_PROG_OR_FAIL([BASH], [bash]) +dnl FreeBSD doesn't require bash (hotplug scripts are in plain sh)I am not sure I follow this comment. It implies hotplug scripts are the only shell scripts that we ship or care and this check here is specifically for that purpose.
Quoted 3 lines
If this comment is correct, isn't it better to just remove this check? AFAICT sh is standard. If this comment is not correct, should we check for the desired shell in FreeBSD?
As an upstream, everything we publish should be sh-compatible. Even on some Linux distros, it is common for the default shell to be dash rather than bash.
If our scripts aren't sh-compatible, we should make them so.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 32 lines · Andrew Cooper
Quoted 27 lines · Wei Liu
Quoted 12 lines · Roger Pau Monne
Sorry, I've forgot to re-generate the patch after adding the maintainers...
Quoted 9 lines · Roger Pau Monne
Bash it's not used on FreeBSD.
Signed-off-by Roger Pau Monné <[email protected]>---
Please re-run autoconf after applying--- tools/configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Quoted 10 lines
tools/configure.ac AS_IF([test "x$xsmpolicy" = "xy"], [ · line 323
Quoted 10 lines
tools/configure.ac +1
-1@@ -320,7 +320,11 @@ AS_IF([test "x$xsmpolicy" = "xy"], [ xsmpolicy="n" ]) ]) -AX_PATH_PROG_OR_FAIL([BASH], [bash]) +dnl FreeBSD doesn't require bash (hotplug scripts are in plain sh)I am not sure I follow this comment. It implies hotplug scripts are the only shell scripts that we ship or care and this check here is specifically for that purpose.
Quoted 3 lines
If this comment is correct, isn't it better to just remove this check? AFAICT sh is standard. If this comment is not correct, should we check for the desired shell in FreeBSD?
Quoted 5 lines
As an upstream, everything we publish should be sh-compatible. Even on some Linux distros, it is common for the default shell to be dash rather than bash.
If our scripts aren't sh-compatible, we should make them so.
IIRC the hotplug scripts on Linux are full of bashisms.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 28 lines · Wei Liu
Quoted 12 lines · Roger Pau Monne
Sorry, I've forgot to re-generate the patch after adding the maintainers...
Quoted 9 lines · Roger Pau Monne
Bash it's not used on FreeBSD.
Signed-off-by Roger Pau Monné <[email protected]>---
Please re-run autoconf after applying--- tools/configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Quoted 10 lines
tools/configure.ac AS_IF([test "x$xsmpolicy" = "xy"], [ · line 323
Quoted 10 lines
tools/configure.ac +1
-1@@ -320,7 +320,11 @@ AS_IF([test "x$xsmpolicy" = "xy"], [ xsmpolicy="n" ]) ]) -AX_PATH_PROG_OR_FAIL([BASH], [bash]) +dnl FreeBSD doesn't require bash (hotplug scripts are in plain sh)I am not sure I follow this comment. It implies hotplug scripts are the only shell scripts that we ship or care and this check here is specifically for that purpose.
Quoted 3 lines
If this comment is correct, isn't it better to just remove this check? AFAICT sh is standard. If this comment is not correct, should we check for the desired shell in FreeBSD?
Hotplug scripts are specific to each OS, and the FreeBSD ones use /bin/sh as the parser, which is present in base (ie: there's no reason to explicitly check for it, also because it's the same that's used in configure). Linux OTOH uses bash as the hotplug script parser, hence this check is needed there.
Hope this makes sense, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Wei Liu
Acked-byQuoted 33 lines · Roger Pau Monne
Quoted 28 lines · Wei Liu
Quoted 12 lines · Roger Pau Monne
Sorry, I've forgot to re-generate the patch after adding the maintainers...
Quoted 9 lines · Roger Pau Monne
Bash it's not used on FreeBSD.
Signed-off-by Roger Pau Monné <[email protected]>---
Please re-run autoconf after applying--- tools/configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Quoted 10 lines
tools/configure.ac AS_IF([test "x$xsmpolicy" = "xy"], [ · line 323
Quoted 10 lines
tools/configure.ac +1
-1@@ -320,7 +320,11 @@ AS_IF([test "x$xsmpolicy" = "xy"], [ xsmpolicy="n" ]) ]) -AX_PATH_PROG_OR_FAIL([BASH], [bash]) +dnl FreeBSD doesn't require bash (hotplug scripts are in plain sh)I am not sure I follow this comment. It implies hotplug scripts are the only shell scripts that we ship or care and this check here is specifically for that purpose.
Quoted 3 lines
If this comment is correct, isn't it better to just remove this check? AFAICT sh is standard. If this comment is not correct, should we check for the desired shell in FreeBSD?
Quoted 6 lines
Hotplug scripts are specific to each OS, and the FreeBSD ones use
/bin/shas the parser, which is present in base (ie: there's no reason to explicitly check for it, also because it's the same that's used in configure). Linux OTOH uses bash as the hotplug script parser, hence this check is needed there.Hope this makes sense, Roger.
Yes, it does.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel