pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/bootstrap Don't reject dash as /bin/sh.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/96269491380c
branches:  trunk
changeset: 451565:96269491380c
user:      maya <maya%pkgsrc.org@localhost>
date:      Wed Apr 28 11:14:51 2021 +0000

description:
Don't reject dash as /bin/sh.

>From a discussion with jperkin, who tested this on bulk builds, the
remaining issues with non-BSD echo are in legacy wrappers.

Keep the workaround to use bash on Debian GNU kFreeBSD because it still
uses legacy wrappers and add a comment that that's why it's there.

Now naive usage of bootstrap on many popular Linux distros doesn't require
setting an environment variable.

diffstat:

 bootstrap/bootstrap |  16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diffs (39 lines):

diff -r c0d4640c2845 -r 96269491380c bootstrap/bootstrap
--- a/bootstrap/bootstrap       Wed Apr 28 10:27:28 2021 +0000
+++ b/bootstrap/bootstrap       Wed Apr 28 11:14:51 2021 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.298 2021/03/15 16:22:06 ryoon Exp $
+# $NetBSD: bootstrap,v 1.299 2021/04/28 11:14:51 maya Exp $
 #
 # Copyright (c) 2001-2011 Alistair Crooks <agc%NetBSD.org@localhost>
 # All rights reserved.
@@ -399,19 +399,6 @@
        ;;
 esac
 
-# On some newer Ubuntu installations, /bin/sh is a symlink to /bin/dash,
-# whose echo(1) is not BSD-compatible.
-# On all Debian GNU/kFreeBSD 7.0, /bin/sh is a symlink to /bin/dash, and
-# use /bin/bash. bootstrap forces /bin/bash is used.
-dash_echo_test=`$bootstrap_sh -c 'echo "\\100"'`
-if [ "$opsys" != "GNUkFreeBSD" ] && [ "$dash_echo_test" = "@" ]; then
-       { echo "ERROR: Your shell's echo command is not BSD-compatible."
-         echo "ERROR: Please select another shell by setting the environment"
-         echo "ERROR: variable SH."
-       } 1>&2
-       exit 1;
-fi
-
 if [ -n "$PKG_PATH" ]; then
        die "ERROR: Please unset PKG_PATH before running bootstrap."
 fi
@@ -1149,6 +1136,7 @@
 
 # On all Debian GNU/kFreeBSD 7, /bin/sh is a symlink to /bin/dash, and
 # use /bin/bash.
+# Only needed by legacy wrappers.
 if [ "$opsys" = "GNUkFreeBSD" -a "$bootstrap_sh_set" != "set" ]; then
        echo "TOOLS_PLATFORM.sh?=               /bin/bash       # instead of /bin/sh" >> ${TARGET_MKCONF}
        echo "TOOLS_PLATFORM.sh?=               /bin/bash       # instead of /bin/sh" >> ${BOOTSTRAP_MKCONF}



Home | Main Index | Thread Index | Old Index