Ignore:
Timestamp:
06/29/2020 07:55:01 AM (4 years ago)
Author:
Thomas Trepl <thomas@…>
Branches:
multilib-10.1
Children:
c4804e8
Parents:
d4fdde6
Message:

Update to new lfs structure

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11986 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter04/settingenviron.xml

    rd4fdde6 r37e35d2  
    4444LC_ALL=POSIX
    4545LFS_TGT=$(uname -m)-lfs-linux-gnu
    46 PATH=/tools/bin:/bin:/usr/bin
     46PATH=/usr/bin
     47if [ ! -L /bin ]; then PATH=/bin:$PATH; fi
     48PATH=$LFS/tools/bin:$PATH
    4749export LFS LC_ALL LFS_TGT PATH</literal>
    4850EOF</userinput></screen>
     
    5557LFS_TGT32=i686-lfs-linux-gnu
    5658LFS_TGTX32=x86_64-lfs-linux-gnux32
    57 PATH=/tools/bin:/bin:/usr/bin
     59PATH=/usr/bin
     60if [ ! -L /bin ]; then PATH=/bin:$PATH; fi
     61PATH=$LFS/tools/bin:$PATH
    5862export LFS LC_ALL LFS_TGT LFS_TGT32 LFS_TGTX32 PATH</literal>
    5963EOF</userinput></screen>
    6064
    6165  <variablelist>
    62     <title>The meaning of the command line options in <filename>.bashrc</filename></title>
     66    <title>The meaning of the settings in <filename>.bashrc</filename></title>
    6367
    6468    <varlistentry>
     
    120124
    121125    <varlistentry>
    122       <term><parameter>PATH=/tools/bin:/bin:/usr/bin</parameter></term>
    123       <listitem>
    124   <para>By putting <filename class="directory">/tools/bin</filename> ahead of the
    125   standard <envar>PATH</envar>, all the programs installed in <xref
    126   linkend="chapter-temporary-tools"/> are picked up by the shell immediately after
    127   their installation. This, combined with turning off hashing, limits the risk
    128   that old programs are used from the host when the same programs are available in
    129   the Chapter 5 environment.</para>
     126      <term><parameter>PATH=/usr/bin</parameter></term>
     127      <listitem>
     128  <para>Many modern linux distributions have merged <filename
     129  class="directory">/bin</filename> and <filename
     130  class="directory">/usr/bin</filename>. When this is the case, the standard
     131  <envar>PATH</envar> variable needs just to be set to <filename
     132  class="directory">/usr/bin/</filename> for the <xref
     133  linkend="chapter-temporary-tools"/> environment. When this is not the
     134  case, the following line adds <filename class="directory">/bin</filename>
     135  to the path.</para>
     136      </listitem>
     137    </varlistentry>
     138
     139    <varlistentry>
     140      <term><parameter>if [ ! -L /bin ]; then PATH=/bin:$PATH; fi</parameter></term>
     141      <listitem>
     142  <para>If <filename class="directory">/bin</filename> is not a symbolic
     143  link, then it has to be added to the <envar>PATH</envar> variable.</para>
     144      </listitem>
     145    </varlistentry>
     146
     147    <varlistentry>
     148      <term><parameter>PATH=$LFS/tools/bin:$PATH</parameter></term>
     149      <listitem>
     150  <para>By putting <filename class="directory">$LFS/tools/bin</filename> ahead of the
     151  standard <envar>PATH</envar>, the cross-compiler installed at the beginning
     152  of <xref linkend="chapter-cross-tools"/> is picked up by the shell
     153  immediately after its installation. This, combined with turning off hashing,
     154  limits the risk that the compiler from the host be used instead of the
     155  cross-compiler.</para>
    130156      </listitem>
    131157    </varlistentry>
     
    135161      <listitem>
    136162        <para>While the above commands have set some variables, in order
    137         to make them visible within any sub-shells, we export them</para>
     163        to make them visible within any sub-shells, we export them.</para>
    138164      </listitem>
    139165    </varlistentry>
    140166
    141167  </variablelist>
     168
     169  <important>
     170
     171     <para>Several commercial distributions add a non-documented instantiation
     172     of <filename>/etc/bash.bashrc</filename> to the initialization of
     173     <command>bash</command>. This file has the potential to modify the
     174     <systemitem class="username">lfs</systemitem>
     175     user's environment in ways that can affect the building of critical LFS
     176     packages. To make sure the <systemitem class="username">lfs</systemitem>
     177     user's envronment is clean, check for the
     178     presence of <filename>/etc/bash.bashrc</filename> and, if present, move it
     179     out of the way.  As the <systemitem class="username">root</systemitem>
     180     user, run:</para>
     181
     182     <screen role="nodump"><userinput>[ ! -e /etc/bash.bashrc ] || mv -v /etc/bash.bashrc /etc/bash.bashrc.NOUSE</userinput></screen>
     183
     184     <para>After use of the <systemitem class="username">lfs</systemitem>
     185     user is finished at the beginning of <xref
     186     linkend="chapter-chroot-temporary-tools"/>, you can restore
     187         <filename>/etc/bash.bashrc</filename> (if desired).</para>
     188
     189     <para>Note that the LFS Bash package we will build in
     190     <xref linkend="ch-system-bash"/> is not configured to load or execute
     191     <filename>/etc/bash.bashrc</filename>, so this file is useless on a
     192     completed LFS system.</para>
     193  </important>
    142194
    143195  <para>Finally, to have the environment fully prepared for building the
Note: See TracChangeset for help on using the changeset viewer.