From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 22:53:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35C321065780; Fri, 2 Jan 2009 22:53:55 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id E46668FC13; Fri, 2 Jan 2009 22:53:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n02MrpqH029120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Jan 2009 14:53:54 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <495E9AFF.4010109@freebsd.org> Date: Fri, 02 Jan 2009 14:53:51 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901011141.n01BfDqj054333@svn.freebsd.org> <495D5FC3.6000109@freebsd.org> <495D62C0.7090306@FreeBSD.org> <495D63B6.3020106@freebsd.org> <495DC24E.90606@FreeBSD.org> <495E511B.7000006@freebsd.org> <495E8ED1.2010108@FreeBSD.org> In-Reply-To: <495E8ED1.2010108@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 02 Jan 2009 22:53:56 -0000 Doug Barton wrote: > Sam Leffler wrote: > >> Doug Barton wrote: >> >>> Sam Leffler wrote: >>> >>> >>>> Doug Barton wrote: >>>> >>>> >>>>> Sam Leffler wrote: >>>>> >>>>> >>>>> >>>>>> Doug Barton wrote: >>>>>> >>>>>> >>>>>>> 1. Switch to using the top level (e.g., /usr/src) Makefile, and >>>>>>> specify >>>>>>> that we should use the *.mk files from the source directory >>>>>>> instead of >>>>>>> the installed versions. [1][2] This allows easier cross builds and >>>>>>> simplifies (or in some cases permits) upgrading. >>>>>>> >>>>>>> >>>>>> I believe you changed the meaning of the -m flag so it now requires a >>>>>> pathname to the src tree and not src/etc. This breaks existing >>>>>> usage. In the PR I filed there was a follow-on patch from Bjoern that >>>>>> amended >>>>>> my suggestion to instead add a -M option to set the source tree. I >>>>>> thought that was an improvement over my hack. In lieu of that you >>>>>> might >>>>>> want to examine the pathname supplied to -m to try to provide >>>>>> backwards >>>>>> compatibility by stripping any /etc suffix on the path. >>>>>> >>>>>> >>>>> The version in bin/96528 from ru had a better fix for this issue, but >>>>> thanks for thinking of it. :) >>>>> >>>>> >>>>> >>>> That's nice to know. Unfortunately what's in HEAD doesn't seem to work >>>> for my cross-install setup. Did you test using the recipe in my PR? I >>>> am debugging; could be a local problem. >>>> >>>> >>> I finally got this to work, but the problem wasn't with mergemaster. >>> Turns out that bsd.obj.mk is not taking ${TARGET} into account in the >>> same way that src/Makefile.inc1 does. I'm sending the following patch >>> to -hackers for discussion: >>> >>> Index: bsd.obj.mk >>> =================================================================== >>> --- bsd.obj.mk (revision 186676) >>> +++ bsd.obj.mk (working copy) >>> @@ -43,7 +43,7 @@ >>> .include >>> >>> .if defined(MAKEOBJDIRPREFIX) >>> -CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} >>> +CANONICALOBJDIR:=${OBJTREE}${.CURDIR} >>> .else >>> CANONICALOBJDIR:=/usr/obj${.CURDIR} >>> .endif >>> >>> Meanwhile you can work around the problem with sendmail (which is the >>> only thing mergemaster installs that cares) by setting >>> WITHOUT_SENDMAIL in /etc/src.conf. >>> >>> >>> >> Presumably this is because I was testing w/o your changes to run builds >> from /usr/src (instead of /usr/src/etc)? >> > > At the point where it's actually building and installing things to the > temproot there is a SUBDIR_OVERRIDE which restricts it to src/etc so > that shouldn't make any difference. > > >> Unfortunately the above change does not help me; I still fail in >> sendmail as before. I don't see where OBJTREE is defined in any .mk >> file or by make (searching the man page). >> > > It's defined in src/Makefile.inc1. Try running the most recent version > of mergemaster that's in the tree, plus the patch above to > src/share/mk/bsd.obj.mk and it should work. It worked for me using a > clean DESTDIR, -i and -Aarm. I didn't specify a different src > directory as you did in the PR since I was using my regular stock src > tree (plus the bsd.obj.mk patch above). > My tests were w/ an up to date tree. Sam