Changeset 8d4f212 for chapter06


Ignore:
Timestamp:
03/31/2021 10:41:39 AM (3 years ago)
Author:
Xℹ Ruoyao <xry111@…>
Branches:
ml-11.0, multilib
Children:
6451cd1
Parents:
362282a
git-author:
Thomas Trepl <thomas@…> (05/30/2020 07:00:00 AM)
git-committer:
Xℹ Ruoyao <xry111@…> (03/31/2021 10:41:39 AM)
Message:

MultiLib: Merge changes up to 11861

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

Location:
chapter06
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • chapter06/bash.xml

    r362282a r8d4f212  
    7474    package</quote> if not running the test suite.</para>
    7575
    76     <para>To prepare the tests, ensure that the <systemitem class="username">nobody</systemitem> user can write to the sources tree:</para>
     76    <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para>
    7777
    78 <screen><userinput remap="test">chown -Rv nobody .</userinput></screen>
     78<screen><userinput remap="test">chown -Rv tester .</userinput></screen>
    7979
    8080    <para>Now, run the tests as the <systemitem
    81     class="username">nobody</systemitem> user:</para>
     81    class="username">tester</systemitem> user:</para>
    8282
    83 <screen><userinput remap="test">su nobody -s /bin/bash &lt;&lt; EOF
    84 PATH=$PATH HOME=/home make tests
    85 EOF</userinput></screen>
     83<screen><userinput remap="test">su tester -c "PATH=$PATH make tests"</userinput></screen>
    8684
    87     <para>The <command>su</command> command above is slightly different from
    88     other places in the book. The
    89     reason is that the <option>-c</option> option runs the command without
    90     a controlling terminal, while the bash test suite needs one.</para>
     85    <para>The <systemitem class="username">tester</systemitem>
     86    user does not have enough permissions for all the tests to pass. This shows
     87    up in some <quote>diff</quote> output in four test results. Portions of the
     88    run-execscript, run-lastpipe, run-read, and run-test programs
     89    are known to fail in the LFS chroot environment, but pass if the tests
     90    are run in a full system.</para>
    9191
    9292    <para>Install the package and move the main executable to
  • chapter06/coreutils.xml

    r362282a r8d4f212  
    109109    meant to be run as user <systemitem class="username">root</systemitem>:</para>
    110110
    111 <screen><userinput remap="test">make NON_ROOT_USERNAME=nobody check-root</userinput></screen>
     111<screen><userinput remap="test">make NON_ROOT_USERNAME=tester check-root</userinput></screen>
    112112
    113113    <para>We're going to run the remainder of the tests as the
    114     <systemitem class="username">nobody</systemitem> user. Certain tests,
     114    <systemitem class="username">tester</systemitem> user. Certain tests,
    115115    however, require that the user be a member of more than one group. So that
    116116    these tests are not skipped we'll add a temporary group and make the
    117     user <systemitem class="username">nobody</systemitem> a part of it:</para>
    118 
    119 <screen><userinput remap="test">echo "dummy:x:1000:nobody" &gt;&gt; /etc/group</userinput></screen>
     117    user <systemitem class="username">tester</systemitem> a part of it:</para>
     118
     119<screen><userinput remap="test">echo "tester:x:1000:nogroup" &gt;&gt; /etc/group</userinput></screen>
    120120
    121121    <para>Fix some of the permissions so that the non-root user can compile and
    122122    run the tests:</para>
    123123
    124 <screen><userinput remap="test">chown -Rv nobody . </userinput></screen>
     124<screen><userinput remap="test">chown -Rv tester . </userinput></screen>
    125125
    126126    <para>Now run the tests. Make sure the PATH in the <userinput>su</userinput>
    127127    environment includes /tools/bin.</para>
    128128
    129 <screen><userinput remap="test">su nobody -s /bin/bash -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
     129<screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
    130130<!--
    131131    <para>The test program test-getlogin is known to fail in a
     
    133133    passes if run at the end of this chapter.  The test program tty.sh is
    134134    also known to fail.</para>
     135
     136    <para>Remove the temporary group:</para>
     137
     138<screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>
    135139-->
    136     <para>Remove the temporary group:</para>
    137 
    138 <screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>
    139 
    140140    <para>Install the package:</para>
    141141
  • chapter06/createfiles.xml

    r362282a r8d4f212  
    365365  rather use the group's name.</para>
    366366
     367  <para>Some tests later in the chapter need a regular user. We add this
     368  user here and delete this account at the end of the chapter.</para>
     369
     370<screen><userinput>echo "tester:x:101:101::/home/tester:/bin/bash" &gt;&gt; /etc/passwd
     371echo "tester:x:101:dummy" &gt;&gt; /etc/group
     372install -o tester -d /home/tester</userinput></screen>
     373
    367374  <para>To remove the <quote>I have no name!</quote> prompt, start a new
    368375  shell. Since a full Glibc was installed in <xref
  • chapter06/findutils.xml

    r362282a r8d4f212  
    6868    <para>To test the results, issue:</para>
    6969
    70 <screen><userinput remap="test">make check</userinput></screen>
    71 
    72     <para>Two tests are known to fail in the chroot environment:
    73     sv-bug-54171.old-O3 and sv-bug-54171.new-O3.</para>
     70<screen><userinput remap="test">chown -Rv tester .
     71su tester -c "PATH=$PATH make check"</userinput></screen>
    7472
    7573    <para>Install the package:</para>
  • chapter06/gcc.xml

    r362282a r8d4f212  
    127127    <para>Test the results as a non-privileged user, but do not stop at errors:</para>
    128128
    129 <screen><userinput remap="test">chown -Rv nobody .
    130 su nobody -s /bin/bash -c "PATH=$PATH make -k check"</userinput></screen>
     129<screen><userinput remap="test">chown -Rv tester .
     130su tester -c "PATH=$PATH make -k check"</userinput></screen>
    131131
    132132    <para>To receive a summary of the test suite results, run:</para>
     
    168168
    169169    <para>The GCC build directory is owned by <systemitem class="username">
    170     nobody</systemitem> now and the ownership of the installed header
     170    tester</systemitem> now and the ownership of the installed header
    171171    directory (and its content) will be incorrect.  Change the ownership to
    172172    <systemitem class="username">root</systemitem> user and group:</para>
  • chapter06/revisedchroot.xml

    r362282a r8d4f212  
    7474   Archive (.la) files"</ulink>.</para>
    7575
     76   <para>Finally, remove the temporary 'tester' usr account created at the
     77   beginning of this chapter.</para>
     78
     79<screen><userinput>sed -i '/tester/d' /etc/passwd /etc/group
     80rm -rf /home/tester</userinput></screen>
    7681</sect1>
  • chapter06/sed.xml

    r362282a r8d4f212  
    4141    <title>Installation of Sed</title>
    4242
    43     <para>First fix an issue in the LFS environment and remove a failing test:</para>
     43    <para>First fix an issue in the LFS environment:</para>
    4444
    45 <screen><userinput remap="pre">sed -i 's/usr/tools/'                 build-aux/help2man
    46 sed -i 's/testsuite.panic-tests.sh//' Makefile.in</userinput></screen>
     45<screen><userinput remap="pre">sed -i 's/usr/tools/' build-aux/help2man</userinput></screen>
    4746
    4847    <para>Prepare Sed for compilation:</para>
    4948
    5049<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen>
    51 <!--
    52     <variablelist>
    53       <title>The meaning of the new configure option:</title>
    5450
    55       <varlistentry>
    56         <term><parameter>-i -htmldir</parameter></term>
    57         <listitem>
    58           <para>This sets the installation directory for the HTML documentation.</para>
    59         </listitem>
    60       </varlistentry>
    61     </variablelist>
    62 -->
    6351    <para>Compile the package and generate the HTML documentation:</para>
    6452
     
    6856    <para>To test the results, issue:</para>
    6957
    70 <screen><userinput remap="test">make check</userinput></screen>
     58<screen><userinput remap="test">chown -Rv tester .
     59su -c "PATH=$PATH make check"</userinput></screen>
    7160
    7261    <para>Install the package and its documentation:</para>
  • chapter06/util-linux.xml

    r362282a r8d4f212  
    4141
    4242  <sect2 role="installation">
    43     <title>FHS compliance notes</title>
     43    <title>Installation of Util-linux</title>
    4444
    4545    <para>The FHS recommends using the <filename
    4646    class="directory">/var/lib/hwclock</filename> directory instead of the
    4747    usual <filename class="directory">/etc</filename> directory as the
    48     location for the <filename>adjtime</filename> file.  First create a directory
    49     to enable storage for the <command>hwclock</command> program:</para>
     48    location for the <filename>adjtime</filename> file. Create this directory
     49    with:</para>
    5050
    5151<screen><userinput remap="pre">mkdir -pv /var/lib/hwclock</userinput></screen>
    52 
    53   </sect2>
    54 
    55   <sect2 role="installation">
    56     <title>Installation of Util-linux</title>
    57 <!--
    58     <para>First, fix one of the regression tests:</para>
    59 
    60 <screen><userinput remap="pre">sed -e 's/2^64/(2^64/' -e 's/E &lt;/E) &lt;=/' -e 's/ne /eq /' \
    61     -i tests/ts/ipcs/limits2</userinput></screen>
    62 -->
    6352
    6453    <para>Remove the earlier created symlinks and files:</para>
     
    116105    </warning>
    117106
    118 <screen><userinput remap="test">chown -Rv nobody .
    119 su nobody -s /bin/bash -c "PATH=$PATH make -k check"</userinput></screen>
     107<screen><userinput remap="test">chown -Rv tester .
     108su tester -c "make -k check"</userinput></screen>
    120109
    121110    <para>Install the package:</para>
  • chapter06/vim.xml

    r362282a r8d4f212  
    6868
    6969    <para>To prepare the tests, ensure that the
    70     <systemitem class="username">nobody</systemitem> user can write
     70    <systemitem class="username">tester</systemitem> user can write
    7171    to the sources tree:</para>
    7272
    73 <screen><userinput remap="test">chown -Rv nobody .</userinput></screen>
     73<screen><userinput remap="test">chown -Rv tester .</userinput></screen>
    7474
    7575    <para>Now run the tests as the <systemitem
    76     class="username">nobody</systemitem> user:</para>
    77 
    78 <screen><userinput remap="test">su nobody -s /bin/bash -c "LANG=en_US.UTF-8 make -j1 test" &amp;> vim-test.log</userinput></screen>
     76    class="username">tester</systemitem> user:</para>
     77
     78<screen><userinput remap="test">su tester -c "LANG=en_US.UTF-8 make -j1 test" &amp;> vim-test.log</userinput></screen>
    7979
    8080<!--<screen><userinput remap="test">LANG=en_US.UTF-8 make -j1 test &amp;&gt; vim-test.log</userinput></screen>-->
Note: See TracChangeset for help on using the changeset viewer.