- Timestamp:
- 03/31/2021 10:41:39 AM (3 years ago)
- 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)
- Location:
- chapter06
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/bash.xml
r362282a r8d4f212 74 74 package</quote> if not running the test suite.</para> 75 75 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> 77 77 78 <screen><userinput remap="test">chown -Rv nobody.</userinput></screen>78 <screen><userinput remap="test">chown -Rv tester .</userinput></screen> 79 79 80 80 <para>Now, run the tests as the <systemitem 81 class="username"> nobody</systemitem> user:</para>81 class="username">tester</systemitem> user:</para> 82 82 83 <screen><userinput remap="test">su nobody -s /bin/bash << 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> 86 84 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> 91 91 92 92 <para>Install the package and move the main executable to -
chapter06/coreutils.xml
r362282a r8d4f212 109 109 meant to be run as user <systemitem class="username">root</systemitem>:</para> 110 110 111 <screen><userinput remap="test">make NON_ROOT_USERNAME= nobodycheck-root</userinput></screen>111 <screen><userinput remap="test">make NON_ROOT_USERNAME=tester check-root</userinput></screen> 112 112 113 113 <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, 115 115 however, require that the user be a member of more than one group. So that 116 116 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" >> /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" >> /etc/group</userinput></screen> 120 120 121 121 <para>Fix some of the permissions so that the non-root user can compile and 122 122 run the tests:</para> 123 123 124 <screen><userinput remap="test">chown -Rv nobody. </userinput></screen>124 <screen><userinput remap="test">chown -Rv tester . </userinput></screen> 125 125 126 126 <para>Now run the tests. Make sure the PATH in the <userinput>su</userinput> 127 127 environment includes /tools/bin.</para> 128 128 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> 130 130 <!-- 131 131 <para>The test program test-getlogin is known to fail in a … … 133 133 passes if run at the end of this chapter. The test program tty.sh is 134 134 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> 135 139 --> 136 <para>Remove the temporary group:</para>137 138 <screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>139 140 140 <para>Install the package:</para> 141 141 -
chapter06/createfiles.xml
r362282a r8d4f212 365 365 rather use the group's name.</para> 366 366 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" >> /etc/passwd 371 echo "tester:x:101:dummy" >> /etc/group 372 install -o tester -d /home/tester</userinput></screen> 373 367 374 <para>To remove the <quote>I have no name!</quote> prompt, start a new 368 375 shell. Since a full Glibc was installed in <xref -
chapter06/findutils.xml
r362282a r8d4f212 68 68 <para>To test the results, issue:</para> 69 69 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 . 71 su tester -c "PATH=$PATH make check"</userinput></screen> 74 72 75 73 <para>Install the package:</para> -
chapter06/gcc.xml
r362282a r8d4f212 127 127 <para>Test the results as a non-privileged user, but do not stop at errors:</para> 128 128 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 . 130 su tester -c "PATH=$PATH make -k check"</userinput></screen> 131 131 132 132 <para>To receive a summary of the test suite results, run:</para> … … 168 168 169 169 <para>The GCC build directory is owned by <systemitem class="username"> 170 nobody</systemitem> now and the ownership of the installed header170 tester</systemitem> now and the ownership of the installed header 171 171 directory (and its content) will be incorrect. Change the ownership to 172 172 <systemitem class="username">root</systemitem> user and group:</para> -
chapter06/revisedchroot.xml
r362282a r8d4f212 74 74 Archive (.la) files"</ulink>.</para> 75 75 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 80 rm -rf /home/tester</userinput></screen> 76 81 </sect1> -
chapter06/sed.xml
r362282a r8d4f212 41 41 <title>Installation of Sed</title> 42 42 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> 44 44 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> 47 46 48 47 <para>Prepare Sed for compilation:</para> 49 48 50 49 <screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> 51 <!--52 <variablelist>53 <title>The meaning of the new configure option:</title>54 50 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 -->63 51 <para>Compile the package and generate the HTML documentation:</para> 64 52 … … 68 56 <para>To test the results, issue:</para> 69 57 70 <screen><userinput remap="test">make check</userinput></screen> 58 <screen><userinput remap="test">chown -Rv tester . 59 su -c "PATH=$PATH make check"</userinput></screen> 71 60 72 61 <para>Install the package and its documentation:</para> -
chapter06/util-linux.xml
r362282a r8d4f212 41 41 42 42 <sect2 role="installation"> 43 <title> FHS compliance notes</title>43 <title>Installation of Util-linux</title> 44 44 45 45 <para>The FHS recommends using the <filename 46 46 class="directory">/var/lib/hwclock</filename> directory instead of the 47 47 usual <filename class="directory">/etc</filename> directory as the 48 location for the <filename>adjtime</filename> file. First create adirectory49 to enable storage for the <command>hwclock</command> program:</para>48 location for the <filename>adjtime</filename> file. Create this directory 49 with:</para> 50 50 51 51 <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 </E) <=/' -e 's/ne /eq /' \61 -i tests/ts/ipcs/limits2</userinput></screen>62 -->63 52 64 53 <para>Remove the earlier created symlinks and files:</para> … … 116 105 </warning> 117 106 118 <screen><userinput remap="test">chown -Rv nobody.119 su nobody -s /bin/bash -c "PATH=$PATHmake -k check"</userinput></screen>107 <screen><userinput remap="test">chown -Rv tester . 108 su tester -c "make -k check"</userinput></screen> 120 109 121 110 <para>Install the package:</para> -
chapter06/vim.xml
r362282a r8d4f212 68 68 69 69 <para>To prepare the tests, ensure that the 70 <systemitem class="username"> nobody</systemitem> user can write70 <systemitem class="username">tester</systemitem> user can write 71 71 to the sources tree:</para> 72 72 73 <screen><userinput remap="test">chown -Rv nobody.</userinput></screen>73 <screen><userinput remap="test">chown -Rv tester .</userinput></screen> 74 74 75 75 <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" &> 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" &> vim-test.log</userinput></screen> 79 79 80 80 <!--<screen><userinput remap="test">LANG=en_US.UTF-8 make -j1 test &> vim-test.log</userinput></screen>-->
Note:
See TracChangeset
for help on using the changeset viewer.