Changeset 5b7293a


Ignore:
Timestamp:
03/09/2004 07:08:33 PM (20 years ago)
Author:
Alex Gronenwoud <alex@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
02974d8
Parents:
c6b5ddb
Message:

Removing HOME and --login from the chroot commands.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3285 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    rc6b5ddb r5b7293a  
    3636</itemizedlist>
    3737</listitem>
     38
     39<listitem><para>March 9th, 2004 [alex]: Chapter 6 - Removed HOME and --login
     40from the chroot commands.</para></listitem>
     41
     42<listitem><para>March 6th, 2004 [alex]: Rotated the contents of chapters 2, 3
     43and 4.</para></listitem>
    3844
    3945<listitem><para>February 27th, 2004 [jeremy]: Upgraded to
  • chapter06/bash.xml

    rc6b5ddb r5b7293a  
    3939<para>And reload the newly compiled <command>bash</command> program:</para>
    4040
    41 <screen><userinput>exec /bin/bash --login +h</userinput></screen>
     41<screen><userinput>exec /bin/bash +h</userinput></screen>
    4242
    4343</sect2>
  • chapter06/chapter06.xml

    rc6b5ddb r5b7293a  
    130130
    131131<screen><userinput>chroot $LFS /tools/bin/env -i \
    132 &nbsp;&nbsp;&nbsp;&nbsp;HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
     132&nbsp;&nbsp;&nbsp;&nbsp;TERM=$TERM PS1='\u:\w\$ ' \
    133133&nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    134 &nbsp;&nbsp;&nbsp;&nbsp;/tools/bin/bash --login +h</userinput></screen>
     134&nbsp;&nbsp;&nbsp;&nbsp;/tools/bin/bash +h</userinput></screen>
    135135
    136136<para>The <emphasis>-i</emphasis> option given to the
    137137<command>env</command> command will clear all variables of the chroot
    138 environment. After that, only the HOME, TERM, PS1 and PATH variables are
     138environment. After that, only the TERM, PS1 and PATH variables are
    139139set again. The TERM=$TERM construct will set the TERM variable inside chroot
    140140to the same value as outside chroot; this variable is needed for programs
    141 like <command>vim</command> and <command>less</command> to operate
    142 properly. If you need other variables present, such as CFLAGS or CXXFLAGS,
    143 this is a good place to set them again.</para>
     141like <command>less</command> and <command>vim</command> to operate
     142properly. If you need other variables present, such as CFLAGS, CXXFLAGS or
     143HOME, this is a good place to set them.</para>
    144144
    145145<para>From this point on there's no need to use the LFS variable anymore,
     
    329329will now work.</para>
    330330
    331 <screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>
     331<screen><userinput>exec /tools/bin/bash +h</userinput></screen>
    332332
    333333<para>Note the use of the <emphasis>+h</emphasis> directive. This tells
     
    581581
    582582<screen><userinput>chroot $LFS /tools/bin/env -i \
    583 &nbsp;&nbsp;&nbsp;&nbsp;HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
     583&nbsp;&nbsp;&nbsp;&nbsp;TERM=$TERM PS1='\u:\w\$ ' \
    584584&nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    585 &nbsp;&nbsp;&nbsp;&nbsp;/tools/bin/bash --login</userinput></screen>
     585&nbsp;&nbsp;&nbsp;&nbsp;/tools/bin/bash</userinput></screen>
    586586
    587587<para>Now you can safely strip the binaries and libraries:</para>
     
    611611
    612612<screen><userinput>chroot $LFS /usr/bin/env -i \
    613 &nbsp;&nbsp;&nbsp;&nbsp;HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
     613&nbsp;&nbsp;&nbsp;&nbsp;TERM=$TERM PS1='\u:\w\$ ' \
    614614&nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    615 &nbsp;&nbsp;&nbsp;&nbsp;/bin/bash --login</userinput></screen>
     615&nbsp;&nbsp;&nbsp;&nbsp;/bin/bash</userinput></screen>
    616616
    617617<para>The reason for this is that, since the programs in <filename
  • chapter06/coreutils.xml

    rc6b5ddb r5b7293a  
    4646you choose not to run these tests, skip down to "Install the package".</para>
    4747
    48 <para>To be able to run the full test suite, the <command>su</command> program
    49 needs to be installed. We didn't bother to install this little program in
    50 <xref linkend="chapter-temporary-tools"/> because it requires root privileges,
    51 so do it now:</para>
    52 
    53 <screen><userinput>make install-root</userinput></screen>
    54 
    55 <para>Create a 'table of mounted filesystems' file with:</para>
     48<para>First create a 'table of mounted filesystems' file with:</para>
    5649
    5750<screen><userinput>touch /etc/mtab</userinput></screen>
     
    7164user:</para>
    7265
    73 <screen><userinput>su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
     66<screen><userinput>src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
     67
     68<para>The above command uses the newly compiled <command>src/su</command>
     69program, since in <xref linkend="chapter-temporary-tools"/> we didn't bother to
     70install it, because installing it requires root privileges.</para>
    7471
    7572<para>When you're done testing, remove the dummy user and groups:</para>
  • chapter06/make.xml

    rc6b5ddb r5b7293a  
    2525
    2626<para>To have the results tested, issue:
    27 <userinput>make check</userinput>.</para>
     27<userinput>make HOME=/root check</userinput>. The HOME environment variable
     28needs to be set to prevent one of the tests from failing.</para>
    2829
    2930<para>And install the package:</para>
Note: See TracChangeset for help on using the changeset viewer.