mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
release: Always use NO_ROOT for distribute* and package*
We used to have two different code paths for generating release media dist sets, one which expected to run as root, and one which did not. It was possible that the two different paths could generate different results. We can use the path that does not *require* root also when running as root, so use it always. We'll want to do eventually do the same for all release targets, but these ones are an easy place to start. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48041
This commit is contained in:
parent
91c6231246
commit
41adc5f29b
1 changed files with 5 additions and 7 deletions
|
|
@ -132,26 +132,24 @@ clean: beforeclean
|
|||
|
||||
base.txz:
|
||||
mkdir -p ${DISTDIR}
|
||||
( cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR} )
|
||||
( cd ${WORLDDIR} && ${IMAKE} -DNO_ROOT distributeworld DISTDIR=${.OBJDIR}/${DISTDIR} )
|
||||
# Bootstrap etcupdate(8) database.
|
||||
sh ${WORLDDIR}/usr.sbin/etcupdate/etcupdate.sh extract -B \
|
||||
-m "${MAKE}" -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \
|
||||
-s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" \
|
||||
-L /dev/null ${NO_ROOT:D-N}
|
||||
.if defined(NO_ROOT)
|
||||
-L /dev/null -N
|
||||
echo "./var/db/etcupdate type=dir uname=root gname=wheel mode=0755" >> ${.OBJDIR}/${DISTDIR}/base.meta
|
||||
sed -n 's,^\.,./var/db/etcupdate/current,p' ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate/current/METALOG \
|
||||
>> ${.OBJDIR}/${DISTDIR}/base.meta
|
||||
rm ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate/current/METALOG
|
||||
.endif
|
||||
# Package all components
|
||||
( cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} )
|
||||
( cd ${WORLDDIR} && ${IMAKE} -DNO_ROOT packageworld DISTDIR=${.OBJDIR}/${DISTDIR} )
|
||||
mv ${DISTDIR}/*.txz .
|
||||
|
||||
kernel.txz:
|
||||
mkdir -p ${DISTDIR}
|
||||
( cd ${WORLDDIR} && ${IMAKE} distributekernel DISTDIR=${.OBJDIR}/${DISTDIR} )
|
||||
( cd ${WORLDDIR} && ${IMAKE} packagekernel DISTDIR=${.OBJDIR}/${DISTDIR} )
|
||||
( cd ${WORLDDIR} && ${IMAKE} -DNO_ROOT distributekernel DISTDIR=${.OBJDIR}/${DISTDIR} )
|
||||
( cd ${WORLDDIR} && ${IMAKE} -DNO_ROOT packagekernel DISTDIR=${.OBJDIR}/${DISTDIR} )
|
||||
mv ${DISTDIR}/kernel*.txz .
|
||||
|
||||
src.txz:
|
||||
|
|
|
|||
Loading…
Reference in a new issue