tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Sanitising make environment in pkgsrc



Sounds Great.

 - Tim

On Wed, Sep 7, 2011 at 2:05 PM, David Brownlee <abs%netbsd.org@localhost> wrote:
> On 19 August 2011 15:44, Tim Zingelman <tez%netbsd.org@localhost> wrote:
>> On Fri, Aug 19, 2011 at 3:47 AM, Steven Drake <sbd%netbsd.org@localhost> 
>> wrote:
>>> On Thu, 18 Aug 2011, Tim Zingelman wrote:
>>>> >> > On Tue, Aug 16, 2011 at 04:36:08PM -0500, Tim Zingelman wrote:
>>>> >> >> In that thread I pointed out that a common solaris boostrap passes
>>>> >> >> variables in the environment...
>>>> >> >>
>>>> >> >>     env CC=/opt/studio12/SUNWspro/bin/cc \
>>>> >> >>           SUNWSPROBASE=/opt/studio12/SUNWspro \
>>>> >> >>           ./bootstrap --abi=64
>>>> >> >>
>>>> >> >> does this patch still allow that (I had hoped to answer that question
>>>> >> >> myself by testing, but ENOTIME today.)
>>>>
>>>> I'd answer this myself by trying it or reading the code if I was not
>>>> so busy right now, but does bootstrap use mk.conf?  at the least it
>>>> makes bootstrapping less clean to require creating the /usr/pkg/etc
>>>> (or whatever) directory and adding a mk.conf there before starting the
>>>> bootstrap.
>>>
>>> No, but you can use the '--mk-fragment' flag to add a fragment to the
>>> mk.conf installed in /usr/pkg/etc.
>>>
>>> I noted the the bootstrap script add SUNWSPROBASE to the created mk.conf
>>> already so the change wouldn't affect you at all. :)
>>
>> I understand that  '--mk-fragment' adds to the created mk.conf... but
>> does that get created before the boostrap starts compiling stuff, and
>> is it used in those compiles?
>>
>> Many of the other pkgsrc/bootstrap/README.* files suggest setting
>> environment variables to make things work correctly as well.
>
> Does anyone have any objections to this variant:
>
> Add a PKGSRC_SETENV which defaults to ${SETENV},
> but can be easily set to ${SETENV} by those of us who
> want the sanitised environment, and also makes it much
> easier for others to test whether it breaks any bootstrap
> or other edge cases.
>


Home | Main Index | Thread Index | Old Index