#1 build system: configure: use CONFIG_SHELL
Closed a year ago by midipix. Opened a year ago by orbea.
zippy/ orbea/sofort config_shell  into  main

file modified
+1 -1
@@ -53,7 +53,7 @@ 

  TOOLCHAIN		= @toolchain@

  SYSROOT 		= @sysroot@

  CROSS_COMPILE 		= @cross_compile@

- SHELL 			= @shell@

+ SHELL 			= @config_shell@

  

  PREFIX 			= @prefix@

  EXEC_PREFIX 		= @exec_prefix@

file modified
+4 -4
@@ -275,7 +275,7 @@ 

  	mb_toolchain=$TOOLCHAIN

  	mb_sysroot=$SYSROOT

  	mb_cross_compile=$CROSS_COMPILE

- 	mb_shell=$SHELL

+ 	mb_config_shell=$CONFIG_SHELL

  

  	# pkgconf

  	mb_pkgconf=$PKGCONF
@@ -685,8 +685,8 @@ 

  	fi

  

  	# shell

- 	if [ -z "$mb_shell" ]; then

- 		mb_shell='/bin/sh'

+ 	if [ -z "$mb_config_shell" ]; then

+ 		mb_config_shell='/bin/sh'

  	fi

  

  	# inherited cflags & ldflags
@@ -1207,7 +1207,7 @@ 

  			mb_sysroot=${arg#*=}

  			;;

  		--shell=*)

- 			mb_shell=${arg#*=}

+ 			mb_config_shell=${arg#*=}

  			;;

  		--debug)

  			mb_debug=yes

file modified
+1 -1
@@ -54,7 +54,7 @@ 

  sysroot

  freestanding

  cross_compile

- shell

+ config_shell

  

  pkgconf

  pkgconfig

When build sofort projects in a chroot where the SHELL environment variable is /sbin/nologin the build will fail.

mkdir -p build
This account is currently not available.
make: *** [Makefile:286: dirs.tag] Error 1

This can be avoided by relying on CONFIG_SHELL instead of SHELL which matches the behavior of autoconf.

The shell with which to run configure for the --recheck option. It must be Bourne-compatible. The default is a shell that supports LINENO if available, and /bin/sh otherwise. Invoking configure by hand bypasses this setting, so you may need to use a command like ‘CONFIG_SHELL=/bin/bash /bin/bash ./configure’ to insure that the same shell is used everywhere. The absolute name of the shell should be passed.

https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/config_002estatus-Invocation.html

Thanks for pointing this out! Commit 8466b1 now avoids the /sbin/nologin pitfall (and similar) while maintaining support support of --shell as well as adding support for CONFIG_SHELL.

Pull-Request has been closed by midipix

a year ago