tech-pkg archive

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

Re: Unsetting ENV in pkgsrc



On 22 May 2011 21:08, Tim Zingelman <tez%netbsd.org@localhost> wrote:
> On Sun, May 22, 2011 at 2:44 PM, Tim Zingelman <tez%netbsd.org@localhost> 
> wrote:
>> On Sun, May 22, 2011 at 1:46 PM, Tim Zingelman <tez%netbsd.org@localhost> 
>> wrote:
>>> On Sun, May 22, 2011 at 1:35 PM, David Brownlee <abs%netbsd.org@localhost> 
>>> wrote:
>>>> On 22 May 2011 19:26, Tim Zingelman <tez%netbsd.org@localhost> wrote:
>>>>> On Sun, May 22, 2011 at 1:08 PM, David Brownlee 
>>>>> <abs%netbsd.org@localhost> wrote:
>>>>>> On 16 May 2011 15:21, Martin S. Weber <Ephaeton%gmx.net@localhost> wrote:
>>>>>>> On Sun, May 15, 2011 at 09:56:25AM +0200, Bernd Ernesti wrote:
>>>>>>>> So is ENV enough which has to be cleared and in which step should that
>>>>>>>> be done?
>>>>>>>
>>>>>>> I'm wondering why SHELL can't be "env -i sh" basically anyways...
>>>>>>
>>>>>> I've just tested adjusting the value of TOOLS_PLATFORM.env to include
>>>>>> " -i" and everything seems to build so far (about 800 packages into my
>>>>>> standard set on a fresh pkgsrc build), and it fixes my ENV issue.
>>>>>>
>>>>>> Would anyone object to appending -i to the TOOLS_PLATFORM.env
>>>>>> definitions in mk/tools/tools.*.mk ?
>>>>>
>>>>> Does bootstrap use these definitions?  If so I think that would break
>>>>> the current instructions for bootstrapping on several supported OS's.
>>>>> For instance in bootstrap/README.Solaris suggests:
>>>>>
>>>>>        env CC=/opt/studio12/SUNWspro/bin/cc \
>>>>>          SUNWSPROBASE=/opt/studio12/SUNWspro \
>>>>>          ./bootstrap --abi=64
>>>>
>>>> Is there someone using pkgsrc on Solaris who could test?
>>>> Just append change TOOLS_PLATFORM.env in mk/tools/tools.SunOS.mk to
>>>> "TOOLS_PLATFORM.env?=            /usr/bin/env -i" and run the bootstrap.
>>>>
>>>
>>> Trying to revive / update my test system now...
>>
>> Bootstrap of HEAD fails on Solaris 10 with:
>>
>> ===> Building binary package for bootstrap-mk-files-20090807nb2
>> => Creating binary package
>> /usr/pkgsrc/packages/All/bootstrap-mk-files-20090807nb2.tgz
>> pkg_create: Package building is not supported in bootstrap mode
>> *** Error code 1
>>
>> unless you do 'env USE_DESTDIR=no ./bootstrap', and adding the -i to
>> TOOLS_PLATFORM.env causes this workaround to fail.
>>
>> Let me see if I can hack around that trouble and try testing again.
>
> editing mk/tools/tools.SunOS.mk to have:
>
>  TOOLS_PLATFORM.env?=     /usr/bin/env -i
>
> breaks the bootstrap on Solaris 10, and I don't think it has anything
> to do with the env passed in on the command line...
> (note that I did a working bootstrap without the -i then rm -rf
> /usr/pkg /var/db/pkg; ./cleanup)
>
> --- /usr/pkgsrc/bootstrap/work/wrk/devel/bmake/work/bmake/unit-tests/test.exp
>  Sun May 22 14:57:47 2011
> +++ test.out    Sun May 22 14:58:58 2011
> @@ -27,22 +27,6 @@
>  make: "error" line 3: just FYI
>  make: "error" line 4: warning: this could be serious
>  make: "error" line 5: this is fatal
> -UT_DOLLAR=This is $UT_FU
> -UT_FOO=foobar is fubar
> -UT_FU=fubar
> -UT_TEST=export
> -UT_ZOO=hoopie
> -UT_ALL=even this gets exported
> -UT_BADDIR=unit-tests
> -UT_DOLLAR=This is $UT_FU
> -UT_F=fine
> -UT_FOO=foobar is fubar
> -UT_FU=fubar
> -UT_NO=all
> -UT_OK=good
> -UT_OKDIR=unit-tests
> -UT_TEST=export-all
> -UT_ZOO=hoopie
>  At first, I am
>  happy
>  and now: sad
> @@ -315,9 +299,6 @@
>  The answer is known
>  The answer is 42
>  The answer is 42
> -UT_DOLLAR=This is $UT_FU
> -UT_FU=fubar
> -UT_TEST=unexport
>  UT_TEST=unexport-env
>  default FU=<v>fu</v> FOO=<v>foo</v> VAR=<v></v>
>  two FU=<v>bar</v> FOO=<v>goo</v> VAR=<v></v>
> *** Error code 1
>
> Stop.
> bmake: stopped in
> /usr/pkgsrc/bootstrap/work/wrk/devel/bmake/work/SunOS/unit-tests
> *** Error code 1
>
> Stop.
> bmake: stopped in /usr/pkgsrc/bootstrap/work/wrk/devel/bmake/work/SunOS
> *** Error code 1
>
> Stop.
> bmake: stopped in /usr/pkgsrc/devel/bmake
> *** Error code 1
>
> Stop.
> bmake: stopped in /usr/pkgsrc/devel/bmake
> ===> exited with status 1
> aborted.
>
>  - Tim
>

Thanks - OK I can see the fail on Red Hat EL also. I still think for
general usage pkgsrc should be using env -i, but the bootstrap is
special.... More work required :/

does anyone else have any thoughts on this?


Home | Main Index | Thread Index | Old Index