conf/176897: [PATCH] make distrib-dirs doesn't detect missing mtree files

Garrett Cooper yaneurabeya at
Tue Mar 12 23:10:00 UTC 2013

>Number:         176897
>Category:       conf
>Synopsis:       [PATCH] make distrib-dirs doesn't detect missing mtree files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 12 23:10:00 UTC 2013
>Originator:     Garrett Cooper
>Release:        10-CURRENT
EMC Isilon
FreeBSD fuji-current.local 10.0-CURRENT FreeBSD 10.0-CURRENT #5 r+6fb31dd: Tue Mar 12 15:32:36 PDT 2013     root at fuji-current.local:/usr/obj/usr/src/sys/FUJI  i386
Ran make hierarchy and didn't realize there was a typo on my git branch with the MTREES var (BSD.test.dist -> BSD.tests.dist).

At the very least distrib-dirs should depend on the mtree file. This hack (a proper solution would be to make it a dependency of the target, but that would involve a large degree of gymnastics) would address that:

diff --git a/etc/Makefile b/etc/Makefile
index 3a10b02..7ac3bec 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -335,6 +335,7 @@ distrib-dirs:
        @set ${MTREES}; \
        while test $$# -ge 2; do \
                m=${.CURDIR}/$$1; \
+               test -e $$m; \
                shift; \
                d=${DESTDIR}$$1; \
                shift; \
1. Apply this patch:

diff --git a/etc/Makefile b/etc/Makefile
index 3a10b02..6f15fd0 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -308,7 +308,7 @@ distribution:
 MTREE_CMD?=    mtree
-MTREES=                mtree/BSD.root.dist             /               \
+MTREES=                mtree/BSD.roots.dist            /               \
                mtree/BSD.var.dist              /var            \
                mtree/BSD.usr.dist              /usr            \
                mtree/BSD.include.dist          /usr/include
2. Run make hierarchy from the top-level directory.


More information about the freebsd-bugs mailing list