Element: <stageinfo>

Syntax

        <!ELEMENT stageinfo      (root?, user?, environment?, base?)>

This element occurs in : Element: <stage>

See also : Element: <root> | Element : <base> | Element: <environment> | Element: <user>

Description

The stageinfo element allows you to specify several contexts of information used to process the commands of the stage to which the stageinfo element belongs.

The user child-element specifies a user ID that will be used as the effective user ID of the current process for all the commands of the stage. See Element: <user>.

The root child-element specifies a directory name in which the commands of the stage will be performed (using a chroot command). See Element: <root>.

The environment child-element allows you to specify an environment variable that will be added to the current environment when processing the commands of the stage. See Element: <environment>.

The base attribute allows you to specify the directory in which the operation will be performed. For a better description, see Element : <base>.

Examples

<stage name="Install gzip">

        <stageinfo>
                <root>/mnt/lfs</root>
                <user>lfs</user>
                <base>/usr/src/gzip.1.2.4a</base>
        </stageinfo>

        <configure>
        </configure>

        <make>
        </make>

        <make>
                <param>install</param>
        </make>

</stage>

The equivalent bash script is :

echo Executing configure
su - lfs
cd /usr/src/gzip.1.2.4a
./configure

echo Executing make
su - lfs
cd /usr/src/gzip.1.2.4a
make

echo Executing make
su - lfs
cd /usr/src/gzip.1.2.4a
make install

echo Exiting stage