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:

  https://us-east.manta.joyent.com/pkgsrc/public/reports/Darwin/10.15/trunk/x86_64/20200615.0911/meta/report.html

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):

  https://us-east.manta.joyent.com/pkgsrc/public/reports/Darwin/10.15/trunk/x86_64/20200608.0925/meta/report.html

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

  --- bootstrap	30 May 2020 21:36:15 -0000	1.281
  +++ bootstrap	18 Jun 2020 10:14:19 -0000
  @@ -607,2 +607,9 @@
   	esac
  +	# 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.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index