mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
release: Include an etcupdate tree in -DNO_ROOT release image builds
This makes use of the new -N etcupdate flag and merges the resulting METALOG into base.meta re-rooted to /var/db/etcupdate/current. Reviewed by: gjb Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D35858
This commit is contained in:
parent
febca0e643
commit
f36b5d8a8c
@ -117,15 +117,22 @@ clean: beforeclean
|
||||
base.txz:
|
||||
mkdir -p ${DISTDIR}
|
||||
cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR}
|
||||
# TODO: Add NO_ROOT mode to mm-tree.sh and etcupdate
|
||||
# TODO: Add NO_ROOT mode to mm-tree.sh
|
||||
.if !defined(NO_ROOT)
|
||||
# Set up mergemaster root database
|
||||
sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \
|
||||
"TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} ${.MAKE.JOBS:D-j${.MAKE.JOBS}}" \
|
||||
-D "${.OBJDIR}/${DISTDIR}/base"
|
||||
.endif
|
||||
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"
|
||||
-s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" \
|
||||
${NO_ROOT:D-N}
|
||||
.if defined(NO_ROOT)
|
||||
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}
|
||||
|
Loading…
Reference in New Issue
Block a user