tech-pkg archive

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

Switch macOS default bootstrap shell

Newer macOS releases with SIP enabled can cause problems when trying
to use certain environment variables such as LD_LIBRARY_PATH under
system shells, i.e. /bin/*sh.  Currently we have various workarounds
for this across the tree.

I propose changing bootstrap to default to pdksh for these releases,
as using a shell outside of system paths still works.

I've tested this in a bulk build using --full, the results of which
are here:

and can be compared to the previous regular build using /bin/bash here
(though note that my bulk build hosts disable SIP so do not see the
problems that others do):

I don't see any causes for concern, so would like to commit the

  --- bootstrap	30 May 2020 21:36:15 -0000	1.281
  +++ bootstrap	18 Jun 2020 10:14:19 -0000
  @@ -607,2 +607,9 @@
  +	# Avoid system shells on releases with SIP (for LD_LIBRARY_PATH etc.)
  +	case "$macosx_version" in
  +	10.1[1-9]|10.[2-9]*)
  +		need_ksh=yes
  +		;;
  +	esac
   	unset osrev macosx_version

We're quite close to freezing, but I think this should be safe, and
will resolve some issues that people are seeing.

Jonathan Perkin  -  Joyent, Inc.  -

Home | Main Index | Thread Index | Old Index