Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jul 2016 09:57:43 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Li-Wen Hsu <lwhsu@FreeBSD.org>, gjb@FreeBSD.org, current@FreeBSD.org
Subject:   Re: Issue of `make distribueworld` with normal user and customized DESTDIR
Message-ID:  <9d6a0492-7c9d-3061-1a66-d6aa66849dca@FreeBSD.org>
In-Reply-To: <20160719165518.GA63285@FreeBSD.cs.nctu.edu.tw>
References:  <20160719070713.GA89625@FreeBSD.cs.nctu.edu.tw> <b1cb93fe-dac6-5f41-7ae1-7c94a1f891a9@FreeBSD.org> <26f2bfa6-a078-315d-8881-0629ba7d8ece@FreeBSD.org> <20160719165518.GA63285@FreeBSD.cs.nctu.edu.tw>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9d6a0492-7c9d-3061-1a66-d6aa66849dca>