From c6decf06c57805f05d27d1c5b8ed25a9dc9d45bc Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Mon, 15 Jun 2020 10:25:53 +0200 Subject: [PATCH] bootstrap: Use pkgsrc ksh shell for Darwin Fixes: #66 Due to System Integrity Protection (SIP) on macOS systems, the binaries from the /bin (eg. /bin/bash) are not allowed to handle this environment variables. More information: https://support.apple.com/en-us/HT204899 It is causing that seting environment variable are not working for pkg_alternatives. This change fix this by using bash shell from pkgsrc. --- bootstrap/bootstrap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 1e2f12e60c4b..346d5e8cb4bf 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -582,6 +582,9 @@ Darwin) need_bsd_install=no need_awk=yes need_sed=yes + # Fix for System Integrity Protection which was included in 10.11 and later + # https://support.apple.com/en-us/HT204899 + need_ksh=yes set_opsys=no machine_arch=`get_machine_arch_darwin` CC=${CC:-"cc -isystem /usr/include"}; export CC @@ -603,6 +606,7 @@ Darwin) 10.[0-7]) need_awk=no need_sed=no + need_ksh=no ;; esac unset osrev macosx_version @@ -768,7 +772,7 @@ Minix) set_opsys=no machine_arch=`uname -p` check_compiler=yes - ;; + ;; MirBSD) root_group=wheel need_pax=yes