On Wed, Apr 06, 2016 at 08:36:25PM +0000, Glen Barber wrote: > On Wed, Apr 06, 2016 at 08:24:03PM +0000, Glen Barber wrote: > > On Wed, Apr 06, 2016 at 11:31:49AM -0700, Sean Fagan wrote: > > > On Apr 5, 2016, at 4:29 PM, Glen Barber <[email protected]> wrote: > > > >>>>>>>> > > > > The problem should be resolved as of r297598. The issue was setting > > > > DESTDIR as 'DESTDIR=${DESTDIR:U${WSTAGEDIR}}', which will never allow > > > > locating WSTAGEDIR since it is only being set to the correct location > > > > when DESTDIR is not set. By setting DESTDIR=${WSTAGEDIR} directly, the > > > > MAKEOBJDIRPREFIX and DESTDIR are expanded correctly, so although not > > > > obvious at first what was going wrong, I was able to get a full package > > > > set with non-default .{OBJDIR}. > > > > > > Nope. > > > > > > % env MAKEOBJDIRPREFIX=${HOME}/obj make DESTDIR=${HOME}/packages -j1 > > > -DNO_CLEAN -DNO_ROOT packages > > > > Why are you specifying DESTDIR for the 'packages' target? It seem you > > want the actual 'packages/' directory to be outside of the OBJDIR. > > > > Instead of specifying DESTDIR, try using 'REPODIR=$HOME/packages', which > > I believe should work. > > > > This does not work, in fact, but I see why. Working on a fix now. >
I have an uncommitted patch that, I think, does not affect the behavior overall, but this just worked for me: root@pkgbase:/usr/src # env MAKEOBJDIRPREFIX=/usr/objtmp make -s -j8 \ buildworld buildkernel root@pkgbase:/usr/src # env MAKEOBJDIRPREFIX=/usr/objtmp make \ REPODIR=/usr/repodir packages I have the patch attached, but I need to know a few more things: 1) Why are you using DESTDIR with the 'packages' target? I.e., what are you expecting? 2) I need full output of the failures. Redacting it with 'globs of output' is not helpful. I need to see the full build log and the commands run to reproduce it. (Use script(1), please.) The patch I have just tested with is attached, but not yet committed. I plan to commit it tomorrow regardless, since this introduces zero regressions against current behavior with default '/usr/src' and '/usr/obj' paths. Glen
Index: Makefile.inc1
===================================================================
--- Makefile.inc1 (revision 297621)
+++ Makefile.inc1 (working copy)
@@ -1241,7 +1241,7 @@
real-packages: stage-packages create-packages sign-packages
stage-packages:
- @mkdir -p ${WSTAGEDIR} ${KSTAGEDIR}
+ @mkdir -p ${REPODIR} ${WSTAGEDIR} ${KSTAGEDIR}
${_+_}@cd ${.CURDIR}; \
${MAKE} DESTDIR=${WSTAGEDIR} -DNO_ROOT -B stageworld ; \
${MAKE} DESTDIR=${KSTAGEDIR} -DNO_ROOT -B stagekernel
@@ -1256,37 +1256,37 @@
create-kernel-packages
create-world-packages: _pkgbootstrap
- @rm -f ${DESTDIR}/*.plist 2>/dev/null || :
- @cd ${DESTDIR} ; \
+ @rm -f ${WSTAGEDIR}/*.plist 2>/dev/null || :
+ @cd ${WSTAGEDIR} ; \
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
- ${DESTDIR}/METALOG
- @for plist in ${DESTDIR}/*.plist; do \
+ ${WSTAGEDIR}/METALOG
+ @for plist in ${WSTAGEDIR}/*.plist; do \
plist=$${plist##*/} ; \
pkgname=$${plist%.plist} ; \
sh ${SRCDIR}/release/packages/generate-ucl.sh -o $${pkgname} \
- -s ${SRCDIR} -u ${DESTDIR}/$${pkgname}.ucl ; \
+ -s ${SRCDIR} -u ${WSTAGEDIR}/$${pkgname}.ucl ; \
done
- @for plist in ${DESTDIR}/*.plist; do \
+ @for plist in ${WSTAGEDIR}/*.plist; do \
plist=$${plist##*/} ; \
pkgname=$${plist%.plist} ; \
awk -F\" ' \
/^name/ { printf("===> Creating %s-", $$2); next } \
/^version/ { print $$2; next } \
- ' ${DESTDIR}/$${pkgname}.ucl ; \
- pkg -o ABI_FILE=${DESTDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \
- create -M ${DESTDIR}/$${pkgname}.ucl \
- -p ${DESTDIR}/$${pkgname}.plist \
- -r ${DESTDIR} \
- -o ${REPODIR}/$$(pkg -o ABI_FILE=${DESTDIR}/bin/sh
config ABI)/${PKG_VERSION} ; \
+ ' ${WSTAGEDIR}/$${pkgname}.ucl ; \
+ pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \
+ create -M ${WSTAGEDIR}/$${pkgname}.ucl \
+ -p ${WSTAGEDIR}/$${pkgname}.plist \
+ -r ${WSTAGEDIR} \
+ -o ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh
config ABI)/${PKG_VERSION} ; \
done
create-kernel-packages: _pkgbootstrap
-.if exists(${DESTDIR}/kernel.meta)
+.if exists(${KSTAGEDIR}/kernel.meta)
.for flavor in "" -debug
- @cd ${DESTDIR}/${DISTDIR} ; \
+ @cd ${KSTAGEDIR}/${DISTDIR} ; \
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
-v kernel=yes -v _kernconf=${INSTALLKERNEL} \
- ${DESTDIR}/kernel.meta ; \
+ ${KSTAGEDIR}/kernel.meta ; \
cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \
sed -e "s/%VERSION%/${PKG_VERSION}/" \
@@ -1296,26 +1296,26 @@
-e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
-e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g" \
${SRCDIR}/release/packages/kernel.ucl \
- > ${DESTDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \
+ > ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl
; \
awk -F\" ' \
/name/ { printf("===> Creating %s-", $$2); next } \
/version/ {print $$2; next } ' \
- ${DESTDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \
+ ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \
pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \
- create -M
${DESTDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl \
- -p ${DESTDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.plist
\
- -r ${DESTDIR}/${DISTDIR} \
+ create -M
${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl \
+ -p
${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.plist \
+ -r ${KSTAGEDIR}/${DISTDIR} \
-o ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config
ABI)/${PKG_VERSION}
.endfor
.endif
.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
.for _kernel in ${BUILDKERNELS:[2..-1]}
-.if exists(${DESTDIR}/kernel.${_kernel}.meta)
+.if exists(${KSTAGEDIR}/kernel.${_kernel}.meta)
.for flavor in "" -debug
- @cd ${DESTDIR}/kernel.${_kernel} ; \
+ @cd ${KSTAGEDIR}/kernel.${_kernel} ; \
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
-v kernel=yes -v _kernconf=${_kernel} \
- ${DESTDIR}/kernel.${_kernel}.meta ; \
+ ${KSTAGEDIR}/kernel.${_kernel}.meta ; \
cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \
sed -e "s/%VERSION%/${PKG_VERSION}/" \
@@ -1325,15 +1325,15 @@
-e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
-e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g" \
${SRCDIR}/release/packages/kernel.ucl \
- > ${DESTDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ;
\
+ > ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl
; \
awk -F\" ' \
/name/ { printf("===> Creating %s-", $$2); next } \
/version/ {print $$2; next } ' \
- ${DESTDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \
+ ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ;
\
pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \
- create -M
${DESTDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl \
- -p
${DESTDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.plist \
- -r ${DESTDIR}/kernel.${_kernel} \
+ create -M
${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl \
+ -p
${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.plist \
+ -r ${KSTAGEDIR}/kernel.${_kernel} \
-o ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config
ABI)/${PKG_VERSION}
.endfor
.endif
signature.asc
Description: PGP signature
