environment help

James Robertson jameswrobertson at earthlink.net
Mon Jul 21 07:52:03 PDT 2003

James Robertson wrote:

I know it is bad form to post to yourself, but I wanted to provide an 

> Hi All,
> I am using nALFS 1.1.7 and building a custom profile for LFS CVS 
> (currently 20030603).  I am having some issues with the <environment> 
> set of tags.  As most of you know, we have to make sure that /stage1 is 
> at the front of the path and we need to turn of hashing in bash with 
> 'set +h'.  In my profile I have the following:
> <stage name="Phase 2: Creating the toolbox packages">
>     <stageinfo>
>         <base>&lfs;&build-dir;</base>
>         <user>&lfs-user;</user>
>         <environment>
>             <variable 
> name="PATH">&toolbox-dir;:/bin:/usr/bin:/usr/local/bin
                            ^ should have been &toolbox-dir/bin (for 
/statge1/bin), duh!

>             </variable>
>             <variable name="LC_ALL">POSIX</variable>
>             <variable name="TERM">linux</variable>
>         </environment>
>     </stageinfo>
>     <execute command="set +h"></execute>
>     <execute command="umask 0022"></execute>
> blah, blah, blah
> [Mozilla mail has wrapped this, sorry]
> I would assume that all commands issued in the same stage with a set of 
> <stageinfo> tags would be run under the user set with the <user> tags, 
> but this does not seem to be the case.
> To test my theory, I added an <execute> tag for 'env' after all this 
> (and before the binutils pass1 file), and nALFS shows me root's 
> environment not lfs's.  How do I know that nALFS has set the environment 
> correctly?
> The issue I am having is that when I get to the glibc in ch5, configure 
> does not find the newly compiled gcc in /stage1, instead it finds it in 
> /usr from my host.  If I do the commands by hand, everything works great.

The above fix, helps with my glibc problem. I however am still confused 
on how nALFS handles the environment tags.  If I echo variables (e.g. 
echo $PATH), I get expected results.  It is just when I want to see the 
whole environment that the lfs user is running in that I have issues.

> Any ideas?
> Thanks.

James Robertson | jameswrobertson at earthlink dot net
Reg. Linux User: #160424  http://counter.li.org
Reg. LFS User:   #6981    http://www.linuxfromscratch.org

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message

More information about the alfs-discuss mailing list