From nobody@FreeBSD.org  Sun May 12 20:26:21 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id A019B9DB
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 May 2013 20:26:21 +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 90E06D4D
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 May 2013 20:26:21 +0000 (UTC)
Received: from oldred.FreeBSD.org ([127.0.1.6])
	by oldred.FreeBSD.org (8.14.5/8.14.5) with ESMTP id r4CKQL5K038380
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 May 2013 20:26:21 GMT
	(envelope-from nobody@oldred.FreeBSD.org)
Received: (from nobody@localhost)
	by oldred.FreeBSD.org (8.14.5/8.14.5/Submit) id r4CKQKAF038379;
	Sun, 12 May 2013 20:26:20 GMT
	(envelope-from nobody)
Message-Id: <201305122026.r4CKQKAF038379@oldred.FreeBSD.org>
Date: Sun, 12 May 2013 20:26:20 GMT
From: Arseny Nasokin <eirnym@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: new install (see UPDATING 20130121) break crossbuild process.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         178547
>Category:       conf
>Synopsis:       new install (see UPDATING 20130121) break crossbuild process.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brooks
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 12 20:30:01 UTC 2013
>Closed-Date:    Wed Jul 10 19:11:50 UTC 2013
>Last-Modified:  Wed Jul 10 19:11:50 UTC 2013
>Originator:     Arseny Nasokin
>Release:        FreeBSD-CURRENT, 10
>Organization:
private person
>Environment:
FreeBSD eroese.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r226748: Wed Oct 26 02:10:17 MSD 2011     root@eroese.org:/usr/obj/usr/src/sys/GENERIC_PF  amd64
>Description:
New install(1) will be built as legacy tools with world building process(CROSSENV, BPATH), but not taken from when you'll install world. For example, I can build only kernel for cross-arch, but I have to build toolchain before.


>How-To-Repeat:
$ cat /dev/null > /etc/make.conf
$ cat /dev/null > /etc/src.conf
$ rm -rf /usr/src
$ cd /usr && svn co http://${FREEBSD_SVN_SERVER}/head src
$
$ DESTDIR=/path/to/destdir
$ make TARGET=amd64 toolchain buildworld >/dev/null
$ make TARGET=amd64 DESTDIR=${DESTDIR} hierarchy distrib-dirs distribution installworld >/dev/null

install: illegal option -- l
 usage: install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
                [-o owner] file1 file2
        install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
                [-o owner] file1 ... fileN directory
        install -d [-v] [-g group] [-m mode] [-o owner] directory ...
 *** [_installlinks] Error code 64

 Stop in /usr/src/usr.bin/makewhatis.
 *** [bootstrap-tools] Error code 1

 Stop in /usr/src.
 *** [_bootstrap-tools] Error code 1

 Stop in /usr/src.
 *** [buildworld] Error code 1

 Stop in /usr/src.
>Fix:
Workaround is defining INSTALL make variable as "/usr/obj/${TARGET}.${TARGET_ARCH}${SRC_PATH}/tmp/legacy/usr/bin/install"

>Release-Note:
>Audit-Trail:

From: Arseny Nasokin <eirnym@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: conf/178547: new install (see UPDATING 20130121) break crossbuild
 process.
Date: Sun, 12 May 2013 20:26:20 GMT

 >Number:         178547
 >Category:       conf
 >Synopsis:       new install (see UPDATING 20130121) break crossbuild process.
 >Confidential:   no
 >Severity:       non-critical
 >Priority:       low
 >Responsible:    freebsd-bugs
 >State:          open
 >Quarter:        
 >Keywords:       
 >Date-Required:
 >Class:          sw-bug
 >Submitter-Id:   current-users
 >Arrival-Date:   Sun May 12 20:30:01 UTC 2013
 >Closed-Date:
 >Last-Modified:
 >Originator:     Arseny Nasokin
 >Release:        FreeBSD-CURRENT, 10
 >Organization:
 private person
 >Environment:
 FreeBSD eroese.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r226748: Wed Oct 26 02:10:17 MSD 2011     root@eroese.org:/usr/obj/usr/src/sys/GENERIC_PF  amd64
 >Description:
 New install(1) will be built as legacy tools with world building process(CROSSENV, BPATH), but not taken from when you'll install world. For example, I can build only kernel for cross-arch, but I have to build toolchain before.
 
 
 >How-To-Repeat:
 $ cat /dev/null > /etc/make.conf
 $ cat /dev/null > /etc/src.conf
 $ rm -rf /usr/src
 $ cd /usr && svn co http://${FREEBSD_SVN_SERVER}/head src
 $
 $ DESTDIR=/path/to/destdir
 $ make TARGET=amd64 toolchain buildworld >/dev/null
 $ make TARGET=amd64 DESTDIR=${DESTDIR} hierarchy distrib-dirs distribution installworld >/dev/null
 
 install: illegal option -- l
  usage: install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
                 [-o owner] file1 file2
         install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
                 [-o owner] file1 ... fileN directory
         install -d [-v] [-g group] [-m mode] [-o owner] directory ...
  *** [_installlinks] Error code 64
 
  Stop in /usr/src/usr.bin/makewhatis.
  *** [bootstrap-tools] Error code 1
 
  Stop in /usr/src.
  *** [_bootstrap-tools] Error code 1
 
  Stop in /usr/src.
  *** [buildworld] Error code 1
 
  Stop in /usr/src.
 >Fix:
 Workaround is defining INSTALL make variable as "/usr/obj/${TARGET}.${TARGET_ARCH}${SRC_PATH}/tmp/legacy/usr/bin/install"
 
 >Release-Note:
 >Audit-Trail:
 >Unformatted:
 _______________________________________________
 freebsd-bugs@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
State-Changed-From-To: open->patched 
State-Changed-By: brooks 
State-Changed-When: Fri Jun 14 22:33:08 UTC 2013 
State-Changed-Why:  
Fixed in head. 

Note that the hierarchy and distrib-dir targets are not documented for 
direct use.  You should be able to get the same result by replacing: 

make TARGET=amd64 DESTDIR=${DESTDIR} hierarchy distrib-dirs distribution installworld 

with  

make TARGET=amd64 DESTDIR=${DESTDIR} installworld distribution  

http://www.freebsd.org/cgi/query-pr.cgi?pr=178547 
Responsible-Changed-From-To: freebsd-bugs->brooks 
Responsible-Changed-By: brooks 
Responsible-Changed-When: Fri Jun 14 22:37:33 UTC 2013 
Responsible-Changed-Why:  
Take ownership. 

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

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

 Author: brooks
 Date: Fri Jun 14 22:32:47 2013
 New Revision: 251765
 URL: http://svnweb.freebsd.org/changeset/base/251765
 
 Log:
   Simplify the hierarchy target's logic. [0]
   
   Run hierarchy with WORLDTMP in the path so it works when it is invoked
   directly.  Such use is nearly alwasy wrong but appears to be common.[1]
   
   PR:		conf/178209 [0], conf/178547 [1]
   Submitted by:	Garrett Cooper <yaneurabeya@gmail.com> [0]
   MFC after:	5 days
 
 Modified:
   head/Makefile.inc1
 
 Modified: head/Makefile.inc1
 ==============================================================================
 --- head/Makefile.inc1	Fri Jun 14 22:06:45 2013	(r251764)
 +++ head/Makefile.inc1	Fri Jun 14 22:32:47 2013	(r251765)
 @@ -263,6 +263,13 @@ WMAKEENV=	${CROSSENV} \
  		VERSION="${VERSION}" \
  		INSTALL="sh ${.CURDIR}/tools/install.sh" \
  		PATH=${TMPPATH}
 +
 +# make hierarchy
 +HMAKE=		PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE}
 +.if defined(NO_ROOT)
 +HMAKE+=		PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT
 +.endif
 +
  .if ${MK_CDDL} == "no"
  WMAKEENV+=	NO_CTF=1
  .endif
 @@ -1367,12 +1374,7 @@ cross-tools:
  # hierarchy - ensure that all the needed directories are present
  #
  hierarchy hier:
 -.if defined(NO_ROOT)
 -	cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} \
 -	    -DNO_ROOT METALOG=${METALOG} distrib-dirs
 -.else
 -	cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
 -.endif
 +	cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs
  
  #
  # libraries - build all libraries, and install them under ${DESTDIR}.
 _______________________________________________
 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/178547: commit references a PR
Date: Wed, 10 Jul 2013 18:27:33 +0000 (UTC)

 Author: brooks
 Date: Wed Jul 10 18:27:14 2013
 New Revision: 253164
 URL: http://svnweb.freebsd.org/changeset/base/253164
 
 Log:
   MFC r251765:
   
   Simplify the hierarchy target's logic.[0]
   
   Run hierarchy with WORLDTMP in the path so it works when it is invoked
   directly.  Such use is nearly alwasy wrong but appears to be common.[1]
   
   PR:		conf/178209 [0], conf/178547 [1]
   Submitted by:	Garrett Cooper <yaneurabeya@gmail.com> [0]
 
 Modified:
   stable/9/Makefile.inc1   (contents, props changed)
 
 Modified: stable/9/Makefile.inc1
 ==============================================================================
 --- stable/9/Makefile.inc1	Wed Jul 10 18:19:48 2013	(r253163)
 +++ stable/9/Makefile.inc1	Wed Jul 10 18:27:14 2013	(r253164)
 @@ -268,6 +268,13 @@ WMAKEENV=	${CROSSENV} \
  		VERSION="${VERSION}" \
  		INSTALL="sh ${.CURDIR}/tools/install.sh" \
  		PATH=${TMPPATH}
 +
 +# make hierarchy
 +HMAKE=		PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE}
 +.if defined(NO_ROOT)
 +HMAKE+=		PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT
 +.endif
 +
  .if ${MK_CDDL} == "no"
  WMAKEENV+=	NO_CTF=1
  .endif
 @@ -1288,12 +1295,7 @@ cross-tools:
  # hierarchy - ensure that all the needed directories are present
  #
  hierarchy hier:
 -.if defined(NO_ROOT)
 -	cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} \
 -	    -DNO_ROOT METALOG=${METALOG} distrib-dirs
 -.else
 -	cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
 -.endif
 +	cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs
  
  #
  # libraries - build all libraries, and install them under ${DESTDIR}.
 _______________________________________________
 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"
 
State-Changed-From-To: patched->closed 
State-Changed-By: brooks 
State-Changed-When: Wed Jul 10 19:11:36 UTC 2013 
State-Changed-Why:  
Merged to 9-STABLE 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178547 
>Unformatted:
