Set PATH statically, and use 'env -i' to kick chroot(8). As a result,
the second buildworld environment is fully isolated from parent's environment variables. Tested virtually on: snapshots.jp.FreeBSD.org Approved by: arch@ (silently) MFC after: 2 weeks
This commit is contained in:
parent
f832bb8c37
commit
dafdb1b4c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98438
@ -392,7 +392,7 @@ rerelease release:
|
||||
.endif
|
||||
# Don't remove this, or the build will fall over!
|
||||
echo "export RELEASEDIR=${_R}" >> ${CHROOTDIR}/mk
|
||||
echo "export PATH=$${PATH}:${LOCALDIR}" >> ${CHROOTDIR}/mk
|
||||
echo "export PATH=/bin:/usr/bin:/sbin:/usr/sbin:${LOCALDIR}" >> ${CHROOTDIR}/mk
|
||||
echo "export TMPDIR=/tmp" >> ${CHROOTDIR}/mk
|
||||
echo "export MAKEOBJDIRPREFIX=/usr/obj" >> ${CHROOTDIR}/mk
|
||||
echo "export MANBUILDCAT=YES" >> ${CHROOTDIR}/mk
|
||||
@ -406,7 +406,7 @@ rerelease release:
|
||||
echo "make \$${_RELTARGET}" >> ${CHROOTDIR}/mk
|
||||
echo "echo \">>> make ${.TARGET} for ${TARGET} finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${CHROOTDIR}/mk
|
||||
chmod 755 ${CHROOTDIR}/mk
|
||||
chroot ${CHROOTDIR} /mk
|
||||
env -i /usr/sbin/chroot ${CHROOTDIR} /mk
|
||||
|
||||
clean:
|
||||
rm -rf boot_crunch release.[0-9]
|
||||
|
Loading…
Reference in New Issue
Block a user