Mailing List Archive

[xen master] tools/configure: drop BASH configure variable
commit a85f67b2658ed8032586b3a3e7cd78814d20aa4b
Author: Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jun 26 17:46:38 2020 +0100
Commit: Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Jul 31 15:18:41 2020 +0100

tools/configure: drop BASH configure variable

This is a weird variable to have in the first place. The only user of it is
XSM's CONFIG_SHELL, which opencodes a fallback to sh. The scripts are shebang
sh, which is already necessary to support non-Linux build environments.

Make the mkflask.sh and mkaccess_vector.sh scripts executable, drop the
CONFIG_SHELL, and drop the $BASH variable to prevent further use.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
config/Tools.mk.in | 1 -
tools/configure | 5 +----
tools/configure.ac | 1 -
xen/xsm/flask/Makefile | 8 ++------
xen/xsm/flask/policy/mkaccess_vector.sh | 0
xen/xsm/flask/policy/mkflask.sh | 0
6 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 23df47af8d..48bd9ab731 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -12,7 +12,6 @@ PYTHON := @PYTHON@
PYTHON_PATH := @PYTHONPATH@
PY_NOOPT_CFLAGS := @PY_NOOPT_CFLAGS@
PERL := @PERL@
-BASH := @BASH@
XGETTTEXT := @XGETTEXT@
AS86 := @AS86@
LD86 := @LD86@
diff --git a/tools/configure b/tools/configure
index dd9fb8fb6a..edcdcf4f73 100755
--- a/tools/configure
+++ b/tools/configure
@@ -662,6 +662,7 @@ GREP
CPP
pyconfig
PYTHONPATH
+BASH
CHECKPOLICY
XENSTORED
GO
@@ -686,7 +687,6 @@ SET_MAKE
AWK
IASL
XGETTEXT
-BASH
FLEX
BISON
PERL
@@ -843,7 +843,6 @@ PYTHON
PERL
BISON
FLEX
-BASH
XGETTEXT
AS86
LD86
@@ -1589,7 +1588,6 @@ Some influential environment variables:
PERL Path to Perl parser
BISON Path to Bison parser generator
FLEX Path to Flex lexical analyser generator
- BASH Path to bash shell
XGETTEXT Path to xgetttext tool
AS86 Path to as86 tool
LD86 Path to ld86 tool
@@ -4718,7 +4716,6 @@ LDFLAGS="$PREPEND_LDFLAGS $LDFLAGS $APPEND_LDFLAGS"



-
# Checks for programs.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
diff --git a/tools/configure.ac b/tools/configure.ac
index 9d126b7a14..6614a4f130 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -297,7 +297,6 @@ AC_ARG_VAR([PYTHON], [Path to the Python parser])
AC_ARG_VAR([PERL], [Path to Perl parser])
AC_ARG_VAR([BISON], [Path to Bison parser generator])
AC_ARG_VAR([FLEX], [Path to Flex lexical analyser generator])
-AC_ARG_VAR([BASH], [Path to bash shell])
AC_ARG_VAR([XGETTEXT], [Path to xgetttext tool])
AC_ARG_VAR([AS86], [Path to as86 tool])
AC_ARG_VAR([LD86], [Path to ld86 tool])
diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
index 07f36d075d..50bec20a1e 100644
--- a/xen/xsm/flask/Makefile
+++ b/xen/xsm/flask/Makefile
@@ -8,10 +8,6 @@ CFLAGS-y += -I./include

AWK = awk

-CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
- else if [ -x /bin/bash ]; then echo /bin/bash; \
- else echo sh; fi ; fi)
-
FLASK_H_DEPEND = policy/security_classes policy/initial_sids
AV_H_DEPEND = policy/access_vectors

@@ -24,14 +20,14 @@ extra-y += $(ALL_H_FILES)

mkflask := policy/mkflask.sh
quiet_cmd_mkflask = MKFLASK $@
-cmd_mkflask = $(CONFIG_SHELL) $(mkflask) $(AWK) include $(FLASK_H_DEPEND)
+cmd_mkflask = $(SHELL) $(mkflask) $(AWK) include $(FLASK_H_DEPEND)

$(subst include/,%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE
$(call if_changed,mkflask)

mkaccess := policy/mkaccess_vector.sh
quiet_cmd_mkaccess = MKACCESS VECTOR $@
-cmd_mkaccess = $(CONFIG_SHELL) $(mkaccess) $(AWK) $(AV_H_DEPEND)
+cmd_mkaccess = $(SHELL) $(mkaccess) $(AWK) $(AV_H_DEPEND)

$(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE
$(call if_changed,mkaccess)
diff --git a/xen/xsm/flask/policy/mkaccess_vector.sh b/xen/xsm/flask/policy/mkaccess_vector.sh
old mode 100644
new mode 100755
diff --git a/xen/xsm/flask/policy/mkflask.sh b/xen/xsm/flask/policy/mkflask.sh
old mode 100644
new mode 100755
--
generated by git-patchbot for /home/xen/git/xen.git#master