From owner-svn-src-head@freebsd.org Sun Nov 5 01:36:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59713E5D2B2; Sun, 5 Nov 2017 01:36:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33594672BD; Sun, 5 Nov 2017 01:36:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 3290C1750C; Sun, 5 Nov 2017 01:36:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 5F4B7932D; Sun, 5 Nov 2017 01:36:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id eYOfRkcYPgE8; Sun, 5 Nov 2017 01:36:11 +0000 (UTC) Content-Type: text/plain; charset=utf-8 DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 361989329 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r325416 - head/share/mk From: Bryan Drewery X-Mailer: iPhone Mail (15B93) In-Reply-To: <2AE40414-7976-4B43-90B2-41C32026A2B7@FreeBSD.org> Date: Sat, 4 Nov 2017 18:36:09 -0700 Cc: peter@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <2264A0FB-9B5B-4E38-88D7-D0F7B3C0C3CC@FreeBSD.org> References: <201711050012.vA50C6m8042948@repo.freebsd.org> <2AE40414-7976-4B43-90B2-41C32026A2B7@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Nov 2017 01:36:16 -0000 > On Nov 4, 2017, at 18:27, Bryan Drewery wrote: >=20 > Pretty sure this fixes /etc host files being used in =E2=80=98make distrib= ution=E2=80=99 (without AUTO_OBJ) as the source files to install to DESTDIR s= ince many of the etc dirs use NO_OBJ. > I am away from computer for a while so cannot confirm but some basic tests= before I left showed it was possible and Peter has run into such a case. > I=E2=80=99ll look more when I get home and mail current@ if it did fix it.= It would have regressed since the src.sys.obj.mk commit the other day. >=20 If it wasn=E2=80=99t clear, any such case is definitely fixed by this commit= and=20 r325405 would assert it doesn=E2=80=99t happen again. I=E2=80=99m just not sure if the above is a possible failure case yet. >=20 > Regards, > Bryan Drewery >=20 >> On Nov 4, 2017, at 17:12, Bryan Drewery wrote: >>=20 >> Author: bdrewery >> Date: Sun Nov 5 00:12:05 2017 >> New Revision: 325416 >> URL: https://svnweb.freebsd.org/changeset/base/325416 >>=20 >> Log: >> Always try to set .OBJDIR, even if AUTO_OBJ is enabled, and fallback to .= CURDIR. >>=20 >> When AUTO_OBJ is enabled this change becomes redundant with the auto.obj.= mk >> check added in r325404. However, it is possible that new code is added >> at some point between src.sys.obj.mk and auto.obj.mk that disables AUTO_O= BJ. >> That could leave make with a bogus and unsafe .OBJDIR in some cases. >>=20 >> Sponsored by: Dell EMC Isilon >>=20 >> Modified: >> head/share/mk/src.sys.obj.mk >>=20 >> Modified: head/share/mk/src.sys.obj.mk >> =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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >> --- head/share/mk/src.sys.obj.mk Sun Nov 5 00:12:02 2017 (r325415)= >> +++ head/share/mk/src.sys.obj.mk Sun Nov 5 00:12:05 2017 (r325416)= >> @@ -154,9 +154,8 @@ MK_AUTO_OBJ:=3D ${OBJDIR_WRITABLE} >> .export MK_AUTO_OBJ >> .endif # ${MK_AUTO_OBJ} =3D=3D "no" && ... >>=20 >> -# Assign this directory as .OBJDIR if possible after determining if AUTO= _OBJ >> -# can be enabled by default. >> -.if ${MK_AUTO_OBJ} =3D=3D "no" >> +# Assign this directory as .OBJDIR if possible. >> +# >> # The expected OBJDIR already exists, set it as .OBJDIR. >> .if !empty(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX}${.CURDIR}) >> .OBJDIR: ${MAKEOBJDIRPREFIX}${.CURDIR} >> @@ -169,5 +168,10 @@ MK_AUTO_OBJ:=3D ${OBJDIR_WRITABLE} >> .elif ${MAKE_VERSION} <=3D 20170720 && \ >> ${.CURDIR} =3D=3D ${SRCTOP} && ${.OBJDIR} =3D=3D ${SRCTOP}/ >> .OBJDIR: ${.CURDIR} >> +.else >> +# The OBJDIR we wanted does not yet exist, ensure we default to safe .CU= RDIR >> +# in case make started with a bogus MAKEOBJDIR, that expanded before OBJ= TOP >> +# was set, that happened to match some unexpected directory. Either >> +# auto.obj.mk or bsd.obj.mk will create the directory and fix .OBJDIR la= ter. >> +.OBJDIR: ${.CURDIR} >> .endif >> -.endif # ${MK_AUTO_OBJ} =3D=3D "no" >>=20 >=20 >=20