tech-pkg archive

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

Re: Sanitising make environment in pkgsrc



On 18 August 2011 10:44, Steven Drake <sbd%netbsd.org@localhost> wrote:
> On Tue, Aug 16, 2011 at 01:24:43PM +0100, David Brownlee wrote:
>> The attached patch defines CLEANENV as "${SETENV} -i" then uses it
>> instead of SETENV when defining MAKE_ENV for pkgsrc sub makes.
>>
>> Its been tested in NetBSD and Linux (RHEL) including bootstrap.
>
> None, I think it's a great idea and will probable solve a few headaches,
> as I've seen stray environment variable break things.
>
> But wouldn't it be easier to change SETENV to include the '-i'?
> I note that this was suggested in the thread Martin pointed to.

I found that breaks the wrapped use of setenv in a few packages.

On reflection like to see this as an option - I'd prefer to default it
to on, but could accept it defaulting to off. I'm now proposing to
name it PKGSRC_SETENV rather than CLEANENV and defaulting to ${SETENV}
-i", but can be set to use just SETENV if someone has a specific use
case where they need to pass environment variables through.


Home | Main Index | Thread Index | Old Index