>Number:         173308
>Category:       bin
>Synopsis:       [patch] Support "make universe" with read-only src tree
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 02 22:50:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Peter Jeremy
>Release:        FreeBSD 8.3-STABLE amd64
>Organization:
FreeBSD
>Environment:
System: FreeBSD server.rulingia.com 8.3-STABLE FreeBSD 8.3-STABLE #18 r237444M: 
Sun Jul 8 10:47:08 EST 2012 
[email protected]:/var/obj/usr/src/sys/server amd64

>Description:
        "make universe" creates separate logs for each target and
        architecture but these are all hard-wired to be in the tree
        being built.  This prevents the use of "make universe" with
        a read-only root (in my case, I wanted to use a ro NFS mount),

>How-To-Repeat:
        Mount a source tree read-only and run "make universe".  It will
        report lots of failures like:
cannot create _.amd64.buildworld: Read-only file system

>Fix:
        The following patch creates a new "LOGDIR" variable and creates
        all the "make universe" logfiles in that directory.  If not
        specified, it defaults to "${.CURDIR}" for consistency with the
        existing behaviour.

Index: head/Makefile
===================================================================
--- head/Makefile       (revision 242498)
+++ head/Makefile       (working copy)
@@ -346,6 +346,9 @@
 .endif
 KERNSRCDIR?=           ${.CURDIR}/sys
 
+# Directory for writing logs etc
+LOGDIR?=${.CURDIR}
+
 targets:
        @echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets"
 .for target in ${TARGETS}
@@ -355,7 +358,7 @@
 .endfor
 
 .if defined(DOING_TINDERBOX)
-FAILFILE=${.CURDIR}/_.tinderbox.failed
+FAILFILE=${LOGDIR}/_.tinderbox.failed
 MAKEFAIL=tee -a ${FAILFILE}
 .else
 MAKEFAIL=cat
@@ -384,9 +387,9 @@
            ${MAKE} ${JFLAG} ${UNIVERSE_TARGET} \
            TARGET=${target} \
            TARGET_ARCH=${target_arch} \
-           > _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \
+           > ${LOGDIR}/_.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \
            (echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \
-           "check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | 
\
+           "check ${LOGDIR}/_.${target}.${target_arch}.${UNIVERSE_TARGET} for 
details" | \
            ${MAKEFAIL}))
        @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on 
`LC_ALL=C date`"
 .endfor
@@ -394,9 +397,9 @@
 .if !defined(MAKE_JUST_WORLDS)
 .if exists(${KERNSRCDIR}/${target}/conf/NOTES)
        @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \
-           ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
+           ${MAKE} LINT > ${LOGDIR}/_.${target}.makeLINT 2>&1 || \
            (echo "${target} 'make LINT' failed," \
-           "check _.${target}.makeLINT for details"| ${MAKEFAIL}))
+           "check ${LOGDIR}/_.${target}.makeLINT for details"| ${MAKEFAIL}))
 .endif
        @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \
            universe_kernels
@@ -425,9 +428,9 @@
            TARGET=${TARGET} \
            TARGET_ARCH=${TARGET_ARCH_${kernel}} \
            KERNCONF=${kernel} \
-           > _.${TARGET}.${kernel} 2>&1 || \
+           > ${LOGDIR}/_.${TARGET}.${kernel} 2>&1 || \
            (echo "${TARGET} ${kernel} kernel failed," \
-           "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
+           "check ${LOGDIR}/_.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
 .endfor
 universe: universe_epilogue
 universe_epilogue:


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to