Date: Thu, 7 Apr 2016 01:10:35 +0000 From: Glen Barber <gjb@FreeBSD.org> To: Sean Fagan <sef@ixsystems.com> Cc: freebsd-pkgbase@freebsd.org, Marko Turk <markoml@markoturk.info> Subject: Re: Missing METALOG Message-ID: <20160407011035.GF1498@FreeBSD.org> In-Reply-To: <20160406203625.GC1498@FreeBSD.org> References: <20160322164814.GJ58208@FreeBSD.org> <56F1979C.7010306@pcbsd.org> <20160322202242.GL58208@FreeBSD.org> <08F56E57-F9F4-4C3E-8154-108E5E50E3D0@ixsystems.com> <20160322210541.GM58208@FreeBSD.org> <26D01772-FF20-4875-B2D0-4588A6AD22C6@ixsystems.com> <20160405232942.GH1596@FreeBSD.org> <66D097F5-E409-4F44-A541-94D87EC63308@ixsystems.com> <20160406202403.GA1498@FreeBSD.org> <20160406203625.GC1498@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--hTiIB9CRvBOLTyqY Content-Type: multipart/mixed; boundary="hK8Uo4Yp55NZU70L" Content-Disposition: inline --hK8Uo4Yp55NZU70L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 <gjb@FreeBSD.org> wrote: > > > >>>>>>>>=20 > > > > The problem should be resolved as of r297598. The issue was setting > > > > DESTDIR as 'DESTDIR=3D${DESTDIR:U${WSTAGEDIR}}', which will never a= llow > > > > locating WSTAGEDIR since it is only being set to the correct locati= on > > > > when DESTDIR is not set. By setting DESTDIR=3D${WSTAGEDIR} directl= y, the > > > > MAKEOBJDIRPREFIX and DESTDIR are expanded correctly, so although not > > > > obvious at first what was going wrong, I was able to get a full pac= kage > > > > set with non-default .{OBJDIR}. > > >=20 > > > Nope. > > >=20 > > > % env MAKEOBJDIRPREFIX=3D${HOME}/obj make DESTDIR=3D${HOME}/packages = -j1 -DNO_CLEAN -DNO_ROOT packages > >=20 > > Why are you specifying DESTDIR for the 'packages' target? It seem you > > want the actual 'packages/' directory to be outside of the OBJDIR. > >=20 > > Instead of specifying DESTDIR, try using 'REPODIR=3D$HOME/packages', wh= ich > > I believe should work. > >=20 >=20 > This does not work, in fact, but I see why. Working on a fix now. >=20 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=3D/usr/objtmp make -s -j8 \ buildworld buildkernel root@pkgbase:/usr/src # env MAKEOBJDIRPREFIX=3D/usr/objtmp make \ REPODIR=3D/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 --hK8Uo4Yp55NZU70L Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fix-non-default-env.diff.txt" Content-Transfer-Encoding: quoted-printable Index: Makefile.inc1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile.inc1 (revision 297621) +++ Makefile.inc1 (working copy) @@ -1241,7 +1241,7 @@ real-packages: stage-packages create-packages sign-packages =20 stage-packages: - @mkdir -p ${WSTAGEDIR} ${KSTAGEDIR} + @mkdir -p ${REPODIR} ${WSTAGEDIR} ${KSTAGEDIR} ${_+_}@cd ${.CURDIR}; \ ${MAKE} DESTDIR=3D${WSTAGEDIR} -DNO_ROOT -B stageworld ; \ ${MAKE} DESTDIR=3D${KSTAGEDIR} -DNO_ROOT -B stagekernel @@ -1256,37 +1256,37 @@ create-kernel-packages =20 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=3D$${plist##*/} ; \ pkgname=3D$${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=3D$${plist##*/} ; \ pkgname=3D$${plist%.plist} ; \ awk -F\" ' \ /^name/ { printf("=3D=3D=3D> Creating %s-", $$2); next } \ /^version/ { print $$2; next } \ - ' ${DESTDIR}/$${pkgname}.ucl ; \ - pkg -o ABI_FILE=3D${DESTDIR}/bin/sh -o ALLOW_BASE_SHLIBS=3Dyes \ - create -M ${DESTDIR}/$${pkgname}.ucl \ - -p ${DESTDIR}/$${pkgname}.plist \ - -r ${DESTDIR} \ - -o ${REPODIR}/$$(pkg -o ABI_FILE=3D${DESTDIR}/bin/sh config ABI)/${PKG_= VERSION} ; \ + ' ${WSTAGEDIR}/$${pkgname}.ucl ; \ + pkg -o ABI_FILE=3D${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=3Dyes \ + create -M ${WSTAGEDIR}/$${pkgname}.ucl \ + -p ${WSTAGEDIR}/$${pkgname}.plist \ + -r ${WSTAGEDIR} \ + -o ${REPODIR}/$$(pkg -o ABI_FILE=3D${WSTAGEDIR}/bin/sh config ABI)/${PK= G_VERSION} ; \ done =20 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=3Dyes -v _kernconf=3D${INSTALLKERNEL} \ - ${DESTDIR}/kernel.meta ; \ + ${KSTAGEDIR}/kernel.meta ; \ cap_arg=3D`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \ pwd_arg=3D`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("=3D=3D=3D> Creating %s-", $$2); next } \ /version/ {print $$2; next } ' \ - ${DESTDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \ + ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \ pkg -o ABI_FILE=3D${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=3Dyes \ - 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=3D${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=3Dyes -v _kernconf=3D${_kernel} \ - ${DESTDIR}/kernel.${_kernel}.meta ; \ + ${KSTAGEDIR}/kernel.${_kernel}.meta ; \ cap_arg=3D`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \ pwd_arg=3D`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("=3D=3D=3D> 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=3D${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=3Dyes \ - 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=3D${WSTAGEDIR}/bin/sh config ABI)/${PKG= _VERSION} .endfor .endif --hK8Uo4Yp55NZU70L-- --hTiIB9CRvBOLTyqY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXBbOGAAoJEAMUWKVHj+KTZcIP/3Ah3zyICeCfZRj/uOhn4Kxk xIkdGgBp9FtS/sO7i26XmFULLMbY1dvrbNT698MvIn6+3IRSrscMHVwAHAO3CALx NCc1w3hO6HZDC0kOY6b3Tbv/ddnvOWnFYuDsY3mDf9GDBxfuIZWP7D/jIcZr2AG7 FETuOAJeT1eEeacYke5amigDe2/lbVCSIRyhEqLFtsdfOsy5AhAdmRFbBBLq5lQy IsludGulPpeNsRGQmZhAnhwOXbEZiF5EOK14sXy2hJtBcqL2jxzP8WCXNeDutMWT WbW+RfKJAOej5+VfaMl/tvrL/5hDTmyozsx8VI5Oxe2dsjTvnGFTm1BsygAuURQe K2xGmsxC857xVueizMH6uPhw+GyOsVw24PSJLUhYVLFu5FGBSw9FxKYb+0Idoo2d z+f3ZZrAvcYXDwerCKcviSzwa8Nh+Fb5B6tdjdxLn2//aqnwp6RMPWsI6weUi084 wKRjCJw16jpQ3DkLIc8t+x4whaC18k9ldE5lrinCM3QEvczTVWVYBa9VLYjzcF6O yp5Cj7s/kwtis9HiUpuM7312hqeWH8w/AGXQVj08RKOMcJ7+G/sK+arTOQey5NsM lEDLq3qn69NmjBNh7hIR6xpmYlEcLaIW3W+38syBsJXVz3S4x5fgOnD97p1cpzuN vrC/KkqnqvizokSh4bhJ =SADo -----END PGP SIGNATURE----- --hTiIB9CRvBOLTyqY--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160407011035.GF1498>