diff options
author | Jessica Clarke <jrtc27@FreeBSD.org> | 2022-07-15 22:03:49 +0000 |
---|---|---|
committer | Jessica Clarke <jrtc27@FreeBSD.org> | 2022-07-15 22:03:49 +0000 |
commit | 445421abc914536d6c36327a5dd1d1cd71e55a15 (patch) | |
tree | b4f5ce0c4a3f8698d87cfc4fba0b8aedc31375f8 | |
parent | e60f6384f9dbe3abe83e59acf0997c591752ff81 (diff) |
Makefile.inc1: Honour DB_FROM_SRC for NO_ROOT distributeworld
Currently the host's database files are used, but on non-FreeBSD these
are not necessarily sufficient; in particular, Linux does not have a
wheel group. Instead, use -N to use the in-tree database files when
creating the METALOG entries, as is done for the recursive makes via
IMAKE_MTREE.
Reviewed by: brooks
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D35810
-rw-r--r-- | Makefile.inc1 | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 73bbba7fef54..43cd3c3344c8 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -964,12 +964,16 @@ WORLDTMP_MTREEFLAGS= -deUW # that are created by mtree to be owned by root/wheel. DESTDIR_MTREEFLAGS+= -W .endif -DISTR_MTREE= ${MTREE_CMD} +.if defined(DB_FROM_SRC) +DISTR_MTREEFLAGS= -N ${.CURDIR}/etc +.endif +DISTR_MTREECMD= ${MTREE_CMD} .if ${BUILD_WITH_STRICT_TMPPATH} != 0 -DISTR_MTREE= ${WORLDTMP}/legacy/usr/sbin/mtree +DISTR_MTREECMD= ${WORLDTMP}/legacy/usr/sbin/mtree .endif -WORLDTMP_MTREE= ${DISTR_MTREE} ${WORLDTMP_MTREEFLAGS} -DESTDIR_MTREE= ${DISTR_MTREE} ${DESTDIR_MTREEFLAGS} +DISTR_MTREE= ${DISTR_MTREECMD} ${DISTR_MTREEFLAGS} +WORLDTMP_MTREE= ${DISTR_MTREECMD} ${WORLDTMP_MTREEFLAGS} +DESTDIR_MTREE= ${DISTR_MTREECMD} ${DESTDIR_MTREEFLAGS} # kernel stage KMAKEENV= ${WMAKEENV:NSYSROOT=*} |