From owner-freebsd-current@freebsd.org Tue Jul 19 16:57:47 2016 Return-Path: Delivered-To: freebsd-current@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 5624FB9ECA1 for ; Tue, 19 Jul 2016 16:57:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 3486C142A for ; Tue, 19 Jul 2016 16:57:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id 305F1B9ECA0; Tue, 19 Jul 2016 16:57:47 +0000 (UTC) Delivered-To: current@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 30012B9EC9F for ; Tue, 19 Jul 2016 16:57:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1E7141E; Tue, 19 Jul 2016 16:57:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 1274B123F; Tue, 19 Jul 2016 16:57:47 +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 B85255228; Tue, 19 Jul 2016 16:57:46 +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 V-Sjt0afnE4R; Tue, 19 Jul 2016 16:57:43 +0000 (UTC) Subject: Re: Issue of `make distribueworld` with normal user and customized DESTDIR DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7F1065221 To: Li-Wen Hsu , gjb@FreeBSD.org, current@FreeBSD.org References: <20160719070713.GA89625@FreeBSD.cs.nctu.edu.tw> <26f2bfa6-a078-315d-8881-0629ba7d8ece@FreeBSD.org> <20160719165518.GA63285@FreeBSD.cs.nctu.edu.tw> From: Bryan Drewery Organization: FreeBSD Message-ID: <9d6a0492-7c9d-3061-1a66-d6aa66849dca@FreeBSD.org> Date: Tue, 19 Jul 2016 09:57:43 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160719165518.GA63285@FreeBSD.cs.nctu.edu.tw> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2016 16:57:47 -0000 On 7/19/16 9:55 AM, Li-Wen Hsu wrote: > On Tue, Jul 19, 2016 at 09:35:48 -0700, Bryan Drewery wrote: >> On 7/19/16 9:14 AM, Bryan Drewery wrote: >>> On 7/19/16 12:07 AM, Li-Wen Hsu wrote: >>>> Hi Bryan, >>>> >>>> I am trying to create snapshot *.txz in our CI system, using >>>> script like this: >>>> >>>> https://gist.github.com/lwhsu/93ece918767694942e9f12186731c622 >>>> >>>> Basically it does are build/distribue/package world and kernel with normal >>>> user, and customize directories. >>>> >>>> But then I hit some problems like trying to install or find files under /base, >>>> after some research, I have the attached patch to make it work. >>>> >>>> How do you think of this? Do you have any suggestion about how to test this? >>>> >>> >>> It seems odd that it would have gone unnoticed for over 14 years. Still >>> looking at it. >>> >>>> BTW, what's the suitabl mailing list to discuss stuff like this? >>> >>> current@ is as good as it gets right now. >>> >>>> >>>> Thanks, >>>> Li-Wen >>>> >>> >>> >> >> build(7) has it documented that DISTDIR should be used for >> packageworld/packagekernel/distributeworld. I think you should be >> specifying that instead of DESTDIR. It seems that originally DISTDIR >> was intended to be its own thing that had a higher priority than >> DESTDIR; that DISTDIR was not supposed to be in DESTDIR. Several places >> in the build assume this, such as in release/Makefile. I think that >> over time people have been adding ${DESTDIR}/${DISTDIR} in Makefile.inc1 >> as a mistake. > > I see, thanks very much for your explanation, I read build(7) but got > confused by ${DESTDIR}/${DISTDIR} everywhere. > > Maybe we should clean it up after 11.0-R? Or it's OK to start now? > I think that it would be too risky to apply your change as scripts and people may be expecting DISTDIR to override DESTDIR. But it may also be the opposite for some new targets that have been added. I'm not sure what to do. Needs more discussion in public. By the way, your "/base" issue is likely a bug either way as things should probably just work if you don't specify DISTDIR. -- Regards, Bryan Drewery