git: e9ba25aabf69 - main - release: Use in-tree etcupdate for build

From: Jessica Clarke <jrtc27_at_FreeBSD.org>
Date: Tue, 09 Aug 2022 21:59:03 UTC
The branch main has been updated by jrtc27:

URL: https://cgit.FreeBSD.org/src/commit/?id=e9ba25aabf6932646ddf0eb2144f40003349d921

commit e9ba25aabf6932646ddf0eb2144f40003349d921
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2022-08-09 21:52:47 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2022-08-09 21:52:47 +0000

    release: Use in-tree etcupdate for build
    
    This is in preparation for non-FreeBSD and -DNO_ROOT builds. On
    non-FreeBSD there is no host etcupdate to use, and -DNO_ROOT will
    require additional flags that may not be supported by the host's
    etcupdate when building on FreeBSD. Moreover, there's no guarantee
    anyway that the host's etcupdate is quite right for the current tree;
    upgrading from source only requires that the host's is good enough for
    -p which just manually copies master.passwd and group, the rest of the
    upgrade is done post-installworld. For example, should a new set of
    autogenerated files be added that etcupdate is taught about, the host
    won't know about them and so the bootstrapped current tree will
    incorrectly contain them, leading to spurious diffs on the installed
    system.
    
    Reviewed by:    gjb, delphij
    Obtained from:  CheriBSD
    Differential Revision:  https://reviews.freebsd.org/D35853
---
 release/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/release/Makefile b/release/Makefile
index 6f250e0fc9ca..c8639b43a3be 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -123,7 +123,8 @@ base.txz:
 	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"
-	etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \
+	sh ${WORLDDIR}/usr.sbin/etcupdate/etcupdate.sh extract -B \
+	    -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \
 	    -s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate"
 .endif
 # Package all components