From nobody@FreeBSD.org  Mon Jun 10 22:06:39 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 063F83D9
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Jun 2013 22:06:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id D2D191486
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Jun 2013 22:06:38 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r5AM6cYW041534
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Jun 2013 22:06:38 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r5AM6cGe041531;
	Mon, 10 Jun 2013 22:06:38 GMT
	(envelope-from nobody)
Message-Id: <201306102206.r5AM6cGe041531@oldred.freebsd.org>
Date: Mon, 10 Jun 2013 22:06:38 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] Quote LOCAL_MTREE so submakes don't interpret expanded value of LOCAL_MTREE as targets
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         179466
>Category:       conf
>Synopsis:       [PATCH] Quote LOCAL_MTREE so submakes don't interpret expanded value of LOCAL_MTREE as targets
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 10 22:10:01 UTC 2013
>Closed-Date:    Thu Aug 29 20:32:54 CDT 2013
>Last-Modified:  Fri Sep 13 12:00:00 UTC 2013
>Originator:     Garrett Cooper
>Release:        10-CURRENT
>Organization:
EMC Isilon
>Environment:
FreeBSD gran-tourismo.west.isilon.com 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r+ba9afe9: Fri Apr 19 20:29:10 PDT 2013     gcooper@gran-tourismo.west.isilon.com:/usr/obj/usr/src/sys/GRAN-TOURISMO  amd64
>Description:
We're using src.conf at work for specifying LOCAL_MTREE and unfortunately it's broken with multiple values to LOCAL_MTREE it seems. This is the error message we run into:

cd /build/mnt/src/etc; make LOCAL_MTREE=etc/mtree/ISILON.include.dist  etc/mtree/ISILON.root.dist  etc/mtree/ISILON.usr.dist  etc/mtree/ISILON.var.dist distrib-dirs

The solution is to quote the value of LOCAL_MTREE so it gets passed through submake invocations properly.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

From 1a3874ce7e95784649a276a6b6c842149fc74be6 Mon Sep 17 00:00:00 2001
From: Garrett Cooper <yanegomi@gmail.com>
Date: Mon, 10 Jun 2013 12:59:21 -0700
Subject: [PATCH 2/2] Quote LOCAL_MTREE so it gets passed between make
 invocations properly

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
---
 Makefile.inc1 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index f88dd9f..87b7a45 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -268,7 +268,7 @@ WMAKEENV=	${CROSSENV} \
 		PATH=${TMPPATH}
 
 # make hierarchy
-HMAKE=		${MAKE} LOCAL_MTREE=${LOCAL_MTREE}
+HMAKE=		${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q}
 .if defined(NO_ROOT)
 HMAKE+=		METALOG=${METALOG} -DNO_ROOT
 .endif
@@ -811,7 +811,7 @@ distributeworld installworld: installcheck installcheck_UGID
 	cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
 	    METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \
 	    DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \
-	    LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
+	    LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs
 .endif
 	${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
 	    ${IMAKEENV} rm -rf ${INSTALLTMP}
@@ -857,7 +857,7 @@ reinstall:
 	@echo ">>> Making hierarchy"
 	@echo "--------------------------------------------------------------"
 	${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 \
-	    LOCAL_MTREE=${LOCAL_MTREE} hierarchy
+	    LOCAL_MTREE=${LOCAL_MTREE:Q} hierarchy
 	@echo
 	@echo "--------------------------------------------------------------"
 	@echo ">>> Installing everything"
-- 
1.8.2.3



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: bdrewery 
State-Changed-When: Thu Aug 29 20:32:54 CDT 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=179466 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/179466: commit references a PR
Date: Fri, 30 Aug 2013 01:32:56 +0000 (UTC)

 Author: bdrewery (ports committer)
 Date: Fri Aug 30 01:32:47 2013
 New Revision: 255048
 URL: http://svnweb.freebsd.org/changeset/base/255048
 
 Log:
   - Fix LOCAL_MTREE so it properly handles multiple files and quotes
     its value into submakes
   
   PR:		conf/179466
   Submitted by:	Garrett Cooper <yaneurabeya@gmail.com>
   Approved by:	bapt
   MFC after:	2 weeks
   Sponsored by:	EMC / Isilon Storage Division
 
 Modified:
   head/Makefile.inc1
 
 Modified: head/Makefile.inc1
 ==============================================================================
 --- head/Makefile.inc1	Thu Aug 29 23:46:38 2013	(r255047)
 +++ head/Makefile.inc1	Fri Aug 30 01:32:47 2013	(r255048)
 @@ -265,7 +265,7 @@ WMAKEENV=	${CROSSENV} \
  		PATH=${TMPPATH}
  
  # make hierarchy
 -HMAKE=		PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE}
 +HMAKE=		PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q}
  .if defined(NO_ROOT)
  HMAKE+=		PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT
  .endif
 @@ -814,7 +814,7 @@ distributeworld installworld: installche
  	cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
  	    METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \
  	    DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \
 -	    LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
 +	    LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs
  .endif
  	${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
  	    ${IMAKEENV} rm -rf ${INSTALLTMP}
 @@ -888,7 +888,7 @@ reinstall:
  	@echo ">>> Making hierarchy"
  	@echo "--------------------------------------------------------------"
  	${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 \
 -	    LOCAL_MTREE=${LOCAL_MTREE} hierarchy
 +	    LOCAL_MTREE=${LOCAL_MTREE:Q} hierarchy
  	@echo
  	@echo "--------------------------------------------------------------"
  	@echo ">>> Installing everything"
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/179466: commit references a PR
Date: Fri, 13 Sep 2013 11:57:59 +0000 (UTC)

 Author: bdrewery (ports committer)
 Date: Fri Sep 13 11:57:52 2013
 New Revision: 255514
 URL: http://svnweb.freebsd.org/changeset/base/255514
 
 Log:
   MFC r255048:
   
     - Fix LOCAL_MTREE so it properly handles multiple files and quotes
       its value into submakes
   
   PR:		conf/179466
   Submitted by:	Garrett Cooper <yaneurabeya@gmail.com>
   Sponsored by:	EMC / Isilon Storage Division
 
 Modified:
   stable/9/Makefile.inc1   (contents, props changed)
 Directory Properties:
   stable/9/   (props changed)
 
 Modified: stable/9/Makefile.inc1
 ==============================================================================
 --- stable/9/Makefile.inc1	Fri Sep 13 11:25:42 2013	(r255513)
 +++ stable/9/Makefile.inc1	Fri Sep 13 11:57:52 2013	(r255514)
 @@ -270,7 +270,7 @@ WMAKEENV=	${CROSSENV} \
  		PATH=${TMPPATH}
  
  # make hierarchy
 -HMAKE=		PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE}
 +HMAKE=		PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q}
  .if defined(NO_ROOT)
  HMAKE+=		PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT
  .endif
 @@ -768,7 +768,7 @@ distributeworld installworld: installche
  	cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
  	    METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \
  	    DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \
 -	    LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
 +	    LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs
  .endif
  	${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
  	    ${IMAKEENV} rm -rf ${INSTALLTMP}
 @@ -814,7 +814,7 @@ reinstall:
  	@echo ">>> Making hierarchy"
  	@echo "--------------------------------------------------------------"
  	${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 \
 -	    LOCAL_MTREE=${LOCAL_MTREE} hierarchy
 +	    LOCAL_MTREE=${LOCAL_MTREE:Q} hierarchy
  	@echo
  	@echo "--------------------------------------------------------------"
  	@echo ">>> Installing everything"
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
