cvs commit: LFS/BOOK/chapter06 bash.xml chapter06.xml coreutils.xml make.xml

alex at linuxfromscratch.org alex at linuxfromscratch.org
Tue Mar 9 11:08:33 PST 2004


alex        04/03/09 12:08:33

  Modified:    BOOK/chapter01 changelog.xml
               BOOK/chapter06 bash.xml chapter06.xml coreutils.xml make.xml
  Log:
  Removing HOME and --login from the chroot commands.
  
  Revision  Changes    Path
  1.737     +6 -0      LFS/BOOK/chapter01/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter01/changelog.xml,v
  retrieving revision 1.736
  retrieving revision 1.737
  diff -u -r1.736 -r1.737
  --- changelog.xml	3 Mar 2004 22:10:40 -0000	1.736
  +++ changelog.xml	9 Mar 2004 19:08:32 -0000	1.737
  @@ -36,6 +36,12 @@
   </itemizedlist>
   </listitem>
   
  +<listitem><para>March 9th, 2004 [alex]: Chapter 6 - Removed HOME and --login
  +from the chroot commands.</para></listitem>
  +
  +<listitem><para>March 6th, 2004 [alex]: Rotated the contents of chapters 2, 3
  +and 4.</para></listitem>
  +
   <listitem><para>February 27th, 2004 [jeremy]: Upgraded to
   Procps-3.2.0.</para></listitem>
   
  
  
  
  1.19      +1 -1      LFS/BOOK/chapter06/bash.xml
  
  Index: bash.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/bash.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- bash.xml	7 Feb 2004 10:48:55 -0000	1.18
  +++ bash.xml	9 Mar 2004 19:08:33 -0000	1.19
  @@ -38,7 +38,7 @@
   
   <para>And reload the newly compiled <command>bash</command> program:</para>
   
  -<screen><userinput>exec /bin/bash --login +h</userinput></screen>
  +<screen><userinput>exec /bin/bash +h</userinput></screen>
   
   </sect2>
   
  
  
  
  1.77      +11 -11    LFS/BOOK/chapter06/chapter06.xml
  
  Index: chapter06.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/chapter06.xml,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- chapter06.xml	7 Mar 2004 12:09:31 -0000	1.76
  +++ chapter06.xml	9 Mar 2004 19:08:33 -0000	1.77
  @@ -129,18 +129,18 @@
   populated with only the temporary tools:</para>
   
   <screen><userinput>chroot $LFS /tools/bin/env -i \
  -    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
  +    TERM=$TERM  PS1='\u:\w\$ ' \
       PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
  -    /tools/bin/bash --login +h</userinput></screen>
  +    /tools/bin/bash +h</userinput></screen>
   
   <para>The <emphasis>-i</emphasis> option given to the
   <command>env</command> command will clear all variables of the chroot
  -environment. After that, only the HOME, TERM, PS1 and PATH variables are
  +environment. After that, only the TERM, PS1 and PATH variables are
   set again. The TERM=$TERM construct will set the TERM variable inside chroot
   to the same value as outside chroot; this variable is needed for programs
  -like <command>vim</command> and <command>less</command> to operate
  -properly. If you need other variables present, such as CFLAGS or CXXFLAGS,
  -this is a good place to set them again.</para>
  +like <command>less</command> and <command>vim</command> to operate
  +properly. If you need other variables present, such as CFLAGS, CXXFLAGS or
  +HOME, this is a good place to set them.</para>
   
   <para>From this point on there's no need to use the LFS variable anymore,
   because everything you do will be restricted to the LFS file system -- since
  @@ -328,7 +328,7 @@
   <filename>/etc/group</filename> files, user name and group name resolution
   will now work.</para>
   
  -<screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>
  +<screen><userinput>exec /tools/bin/bash +h</userinput></screen>
   
   <para>Note the use of the <emphasis>+h</emphasis> directive. This tells
   <command>bash</command> not to use its internal path hashing. Without this
  @@ -580,9 +580,9 @@
   <para>Then reenter it with:</para>
   
   <screen><userinput>chroot $LFS /tools/bin/env -i \
  -    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
  +    TERM=$TERM  PS1='\u:\w\$ ' \
       PATH=/bin:/usr/bin:/sbin:/usr/sbin \
  -    /tools/bin/bash --login</userinput></screen>
  +    /tools/bin/bash</userinput></screen>
   
   <para>Now you can safely strip the binaries and libraries:</para>
   
  @@ -610,9 +610,9 @@
   it, you should use the following modified chroot command:</para>
   
   <screen><userinput>chroot $LFS /usr/bin/env -i \
  -    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
  +    TERM=$TERM  PS1='\u:\w\$ ' \
       PATH=/bin:/usr/bin:/sbin:/usr/sbin \
  -    /bin/bash --login</userinput></screen>
  +    /bin/bash</userinput></screen>
   
   <para>The reason for this is that, since the programs in <filename
   class="directory">/tools</filename> are no longer needed, you may want to
  
  
  
  1.18      +6 -9      LFS/BOOK/chapter06/coreutils.xml
  
  Index: coreutils.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/coreutils.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- coreutils.xml	22 Feb 2004 19:05:53 -0000	1.17
  +++ coreutils.xml	9 Mar 2004 19:08:33 -0000	1.18
  @@ -45,14 +45,7 @@
   therefore have to set up a few things before being able to run the tests. If
   you choose not to run these tests, skip down to "Install the package".</para>
   
  -<para>To be able to run the full test suite, the <command>su</command> program
  -needs to be installed. We didn't bother to install this little program in
  -<xref linkend="chapter-temporary-tools"/> because it requires root privileges,
  -so do it now:</para>
  -
  -<screen><userinput>make install-root</userinput></screen>
  -
  -<para>Create a 'table of mounted filesystems' file with:</para>
  +<para>First create a 'table of mounted filesystems' file with:</para>
   
   <screen><userinput>touch /etc/mtab</userinput></screen>
   
  @@ -70,7 +63,11 @@
   <para>Then run the remainder of the tests as the <emphasis>dummy</emphasis>
   user:</para>
   
  -<screen><userinput>su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
  +<screen><userinput>src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
  +
  +<para>The above command uses the newly compiled <command>src/su</command>
  +program, since in <xref linkend="chapter-temporary-tools"/> we didn't bother to
  +install it, because installing it requires root privileges.</para>
   
   <para>When you're done testing, remove the dummy user and groups:</para>
   
  
  
  
  1.18      +2 -1      LFS/BOOK/chapter06/make.xml
  
  Index: make.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/make.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- make.xml	7 Feb 2004 10:48:55 -0000	1.17
  +++ make.xml	9 Mar 2004 19:08:33 -0000	1.18
  @@ -24,7 +24,8 @@
   <screen><userinput>make</userinput></screen>
   
   <para>To have the results tested, issue:
  -<userinput>make check</userinput>.</para>
  +<userinput>make HOME=/root check</userinput>. The HOME environment variable
  +needs to be set to prevent one of the tests from failing.</para>
   
   <para>And install the package:</para>
   
  
  
  



More information about the lfs-book mailing list