Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2013 18:37:14 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r250707 - head
Message-ID:  <201305161837.r4GIbESa060620@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Thu May 16 18:37:14 2013
New Revision: 250707
URL: http://svnweb.freebsd.org/changeset/base/250707

Log:
  Implement NO_ROOT support for distributekernel and packagekernel.

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Thu May 16 18:13:10 2013	(r250706)
+++ head/Makefile.inc1	Thu May 16 18:37:14 2013	(r250707)
@@ -1023,25 +1023,50 @@ distributekernel distributekernel.debug:
 	@echo "ERROR: No kernel \"${KERNCONF}\" to install."; \
 	false
 .endif
+	mkdir -p ${DESTDIR}/${DISTDIR}
+.if defined(NO_ROOT)
+	echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.premeta
+.endif
 	cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
-	    ${CROSSENV} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \
-	    DESTDIR=${DESTDIR}/${DISTDIR}/kernel \
+	    ${IMAKEENV} ${IMAKE_INSTALL:S/METALOG/kernel.premeta/} \
+	    ${IMAKE_MTREE} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \
+	    DESTDIR=${INSTALL_DDIR:S://:/:g:C:/$::}/kernel \
 	    ${.TARGET:S/distributekernel/install/}
+	sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta > \
+	    ${DESTDIR}/${DISTDIR}/kernel.meta
 .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
+.if defined(NO_ROOT)
+	echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta
+.endif
 	cd ${KRNLOBJDIR}/${_kernel}; \
-	    ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
+	    ${IMAKEENV} ${IMAKE_INSTALL:S/METALOG/kernel.${_kernel}.premeta/} \
+	    ${IMAKE_MTREE} PATH=${TMPPATH} ${MAKE} \
 	    KERNEL=${INSTKERNNAME}.${_kernel} \
-	    DESTDIR=${DESTDIR}/${DISTDIR}/kernel.${_kernel} \
+	    DESTDIR=${INSTALL_DDIR:S://:/:g:C:/$::}/kernel.${_kernel} \
 	    ${.TARGET:S/distributekernel/install/}
+	sed -e 's|^./kernel|.|' \
+	    ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta > \
+	    ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta
 .endfor
 
 packagekernel:
+.if defined(NO_ROOT)
+	cd ${DESTDIR}/${DISTDIR}/kernel; \
+	    tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz \
+	    @${DESTDIR}/${DISTDIR}/kernel.meta
+.for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
+	cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
+	    tar cvJf ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz \
+	    @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta
+.endfor
+.else
 	cd ${DESTDIR}/${DISTDIR}/kernel; \
 	    tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz .
 .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
 	cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
 	    tar cvJf ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz .
 .endfor
+.endif
 
 #
 # doxygen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305161837.r4GIbESa060620>