git: 01ff67f4bdf5 - main - mtree: TESTSBASE directory always starts with a /

From: Jose Luis Duran <jlduran_at_FreeBSD.org>
Date: Fri, 24 Jan 2025 23:10:37 UTC
The branch main has been updated by jlduran:

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

commit 01ff67f4bdf5959a719a6511a855f6a60c0e3a93
Author:     Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2025-01-24 23:10:05 +0000
Commit:     Jose Luis Duran <jlduran@FreeBSD.org>
CommitDate: 2025-01-24 23:10:05 +0000

    mtree: TESTSBASE directory always starts with a /
    
    Remove the extra forward slash ("/"), otherwise the mtree specification
    file will have the double slash and will not be parsed by makefs when
    attempting to build NanoBSD with NO_ROOT privileges.
    
    Fixes:  07670b30fa43 ("Create /usr/tests *.debug file directory hierarchy")
    Reviewed by:    emaste
    Approved by:    emaste (mentor)
    Differential Revision:  https://reviews.freebsd.org/D47722
---
 Makefile.inc1 | 2 +-
 etc/Makefile  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index efa1299b76a7..4383b4bfe30a 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1506,7 +1506,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
 	    -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} >/dev/null
 .if ${MK_DEBUG_FILES} != "no"
 	${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
-	    -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/${TESTSBASE} >/dev/null
+	    -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug${TESTSBASE} >/dev/null
 .endif
 .endif
 	${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \
diff --git a/etc/Makefile b/etc/Makefile
index fdcad75911c8..d3cb6b679dc5 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -112,7 +112,7 @@ MTREES+=	mtree/BSD.lib${libcompat}.dist	/usr/lib/debug/usr
 .endfor
 .if ${MK_TESTS} != "no"
 MTREES+=	mtree/BSD.tests.dist		${TESTSBASE}
-MTREES+=	mtree/BSD.tests.dist		/usr/lib/debug/${TESTSBASE}
+MTREES+=	mtree/BSD.tests.dist		/usr/lib/debug${TESTSBASE}
 .endif
 .if ${MK_SENDMAIL} != "no"
 MTREES+=	mtree/BSD.sendmail.dist		/