Current-Users archive

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


On 23-Sep-08, at 5:20 AM, Hubert Feyrer wrote:

Can be made to erase the environment, to not pick up random stuff?
(think 'env -i')?

I've been using something very much like that to build NetBSD since the 1.6 days. There may have been a few other tweaks necessary, but at least for building on a NetBSD host itself it works very well. My wrapper script starts out with:

$ head /usr/src-1.6/
#! /bin/ksh

# make sure we start out with a very clean environment!
if [ -z "$MYBUILD_CLEAN" ]; then
exec env -i USER=${USER} SHELL=/bin/ksh MYBUILD_CLEAN=true "$0" ${1+"$@"}

# XXX ksh is needed because of ${var:+$var} quoting bugs

(I can send the whole wrapper script, plus all my local patches to the source tree itself, or at least to makefiles and such, if you'd like to help sort out what's necessary to make the build work in a clean, reproducible, environment.)

                                        Greg A. Woods; Planix, Inc.

Attachment: PGP.sig
Description: This is a digitally signed message part

Home | Main Index | Thread Index | Old Index