Add an unprivileged user, tester, at the

beginning of Chapter 6 for running some tests.  This
user is then removed at the end of the chapter.

Update to zstd-1.4.5. Fixes
Update to util-linux-2.35.2. Fixes
Update to bison-3.6.2. Fixes
Update to linux-5.6.15. Fixes



git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11864 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Bruce Dubbs 2020-05-29 08:06:18 +00:00
parent 51c960dfdf
commit 7406bece6f
10 changed files with 67 additions and 42 deletions

View File

@ -45,6 +45,23 @@
<listitem> <listitem>
<para>2020-05-28</para> <para>2020-05-28</para>
<itemizedlist> <itemizedlist>
<listitem>
<para>[bdubbs] - Add an unprivileged user, tester, at the
beginning of Chapter 6 for running some tests. This
user is then removed at the end of the chapter.</para>
</listitem>
<listitem>
<para>[bdubbs] - Update to zstd-1.4.5. Fixes
<ulink url="&lfs-ticket-root;4660">#4660</ulink>.</para>
</listitem>
<listitem>
<para>[bdubbs] - Update to util-linux-2.35.2. Fixes
<ulink url="&lfs-ticket-root;4659">#4659</ulink>.</para>
</listitem>
<listitem>
<para>[bdubbs] - Update to bison-3.6.2. Fixes
<ulink url="&lfs-ticket-root;4657">#4657</ulink>.</para>
</listitem>
<listitem> <listitem>
<para>[pierre] - Update to linux-5.6.15. Fixes <para>[pierre] - Update to linux-5.6.15. Fixes
<ulink url="&lfs-ticket-root;4658">#4658</ulink>.</para> <ulink url="&lfs-ticket-root;4658">#4658</ulink>.</para>
@ -66,8 +83,8 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>[pierre] - Bash: do not use "su -c command" to change user <para>[pierre] - Bash: do not use "su -c command" to change user
to nobody: it removes the controlling terminal and makes some to nobody: it removes the controlling terminal and makes some
tests fail. Use "su &lt;&lt; EOF" instead.</para> tests fail. Use "su &lt;&lt; EOF" instead.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>[pierre] - Mount /dev/pts with "--bind", so that "tty" <para>[pierre] - Mount /dev/pts with "--bind", so that "tty"

View File

@ -242,9 +242,9 @@
<listitem> <listitem>
<para>Tzdata-&tzdata-version;</para> <para>Tzdata-&tzdata-version;</para>
</listitem> </listitem>
<!--<listitem> <listitem>
<para>Util-Linux-&util-linux-version;</para> <para>Util-Linux-&util-linux-version;</para>
</listitem>--> </listitem>
<listitem> <listitem>
<para>Vim-&vim-version;</para> <para>Vim-&vim-version;</para>
</listitem> </listitem>
@ -257,9 +257,9 @@
<!--<listitem> <!--<listitem>
<para>Zlib-&zlib-version;</para> <para>Zlib-&zlib-version;</para>
</listitem>--> </listitem>-->
<!--<listitem> <listitem>
<para>Zstd-&zstd-version;</para> <para>Zstd-&zstd-version;</para>
</listitem>--> </listitem>
</itemizedlist> </itemizedlist>
<!--<itemizedlist> <!--<itemizedlist>

View File

@ -73,23 +73,21 @@
<para>Skip down to <quote>Install the <para>Skip down to <quote>Install the
package</quote> if not running the test suite.</para> package</quote> if not running the test suite.</para>
<para>To prepare the tests, ensure that the <systemitem class="username">nobody</systemitem> user can write to the sources tree:</para> <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para>
<screen><userinput remap="test">chown -Rv nobody .</userinput></screen> <screen><userinput remap="test">chown -Rv tester .</userinput></screen>
<para>Now, run the tests as the <systemitem <para>Now, run the tests as the <systemitem
class="username">nobody</systemitem> user:</para> class="username">tester</systemitem> user:</para>
<screen><userinput remap="test">su nobody -s /bin/bash &lt;&lt; EOF
PATH=$PATH HOME=/home make tests
EOF</userinput></screen>
<screen><userinput remap="test">su tester -c "PATH=$PATH make tests"</userinput></screen>
<!--
<para>The <command>su</command> command above is slightly different from <para>The <command>su</command> command above is slightly different from
other places in the book. The other places in the book. The
reason is that the <option>-c</option> option runs the command without reason is that the <option>-c</option> option runs the command without
a controlling terminal, while the bash test suite needs one.</para> a controlling terminal, while the bash test suite needs one.</para>
-->
<para>Nevertheless, the <systemitem class="username">nobody</systemitem> <para>The <systemitem class="username">tester</systemitem>
user does not have enough permissions for all the tests to pass. This shows user does not have enough permissions for all the tests to pass. This shows
up in some <quote>diff</quote> output in four test results.</para> up in some <quote>diff</quote> output in four test results.</para>

View File

@ -108,35 +108,35 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \
<para>Now the test suite is ready to be run. First, run the tests that are <para>Now the test suite is ready to be run. First, run the tests that are
meant to be run as user <systemitem class="username">root</systemitem>:</para> meant to be run as user <systemitem class="username">root</systemitem>:</para>
<screen><userinput remap="test">make NON_ROOT_USERNAME=nobody check-root</userinput></screen> <screen><userinput remap="test">make NON_ROOT_USERNAME=tester check-root</userinput></screen>
<para>We're going to run the remainder of the tests as the <para>We're going to run the remainder of the tests as the
<systemitem class="username">nobody</systemitem> user. Certain tests, <systemitem class="username">tester</systemitem> user. Certain tests,
however, require that the user be a member of more than one group. So that however, require that the user be a member of more than one group. So that
these tests are not skipped we'll add a temporary group and make the these tests are not skipped we'll add a temporary group and make the
user <systemitem class="username">nobody</systemitem> a part of it:</para> user <systemitem class="username">tester</systemitem> a part of it:</para>
<screen><userinput remap="test">echo "dummy:x:1000:nobody" &gt;&gt; /etc/group</userinput></screen> <screen><userinput remap="test">echo "tester:x:1000:nogroup" &gt;&gt; /etc/group</userinput></screen>
<para>Fix some of the permissions so that the non-root user can compile and <para>Fix some of the permissions so that the non-root user can compile and
run the tests:</para> run the tests:</para>
<screen><userinput remap="test">chown -Rv nobody . </userinput></screen> <screen><userinput remap="test">chown -Rv tester . </userinput></screen>
<para>Now run the tests. Make sure the PATH in the <userinput>su</userinput> <para>Now run the tests. Make sure the PATH in the <userinput>su</userinput>
environment includes /tools/bin.</para> environment includes /tools/bin.</para>
<screen><userinput remap="test">su nobody -s /bin/bash -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen> <screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
<!-- <!--
<para>The test program test-getlogin is known to fail in a <para>The test program test-getlogin is known to fail in a
partially built system environment like the chroot environment here, but partially built system environment like the chroot environment here, but
passes if run at the end of this chapter. The test program tty.sh is passes if run at the end of this chapter. The test program tty.sh is
also known to fail.</para> also known to fail.</para>
-->
<para>Remove the temporary group:</para> <para>Remove the temporary group:</para>
<screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen> <screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>
-->
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput remap="install">make install</userinput></screen> <screen><userinput remap="install">make install</userinput></screen>

View File

@ -342,6 +342,12 @@ EOF</userinput></screen>
administrator since well-written programs do not depend on GID numbers, but administrator since well-written programs do not depend on GID numbers, but
rather use the group's name.</para> rather use the group's name.</para>
<para>Some tests later in the chapter need a regular user. We add this
user here and delete this account at the end of the chapter.</para>
<screen><userinput>echo "tester:x:101:101::/tmp:/bin/bash" &gt;&gt; /etc/passwd
echo "tester:x:101:dummy" &gt;&gt; /etc/group</userinput></screen>
<para>To remove the <quote>I have no name!</quote> prompt, start a new <para>To remove the <quote>I have no name!</quote> prompt, start a new
shell. Since a full Glibc was installed in <xref shell. Since a full Glibc was installed in <xref
linkend="chapter-temporary-tools"/> and the linkend="chapter-temporary-tools"/> and the

View File

@ -115,8 +115,8 @@ cd build</userinput></screen>
<para>Test the results as a non-privileged user, but do not stop at errors:</para> <para>Test the results as a non-privileged user, but do not stop at errors:</para>
<screen><userinput remap="test">chown -Rv nobody . <screen><userinput remap="test">chown -Rv tester .
su nobody -s /bin/bash -c "PATH=$PATH make -k check"</userinput></screen> su tester -c "PATH=$PATH make -k check"</userinput></screen>
<para>To receive a summary of the test suite results, run:</para> <para>To receive a summary of the test suite results, run:</para>
@ -156,7 +156,7 @@ su nobody -s /bin/bash -c "PATH=$PATH make -k check"</userinput></screen>
rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/</userinput></screen> rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/</userinput></screen>
<para>The GCC build directory is owned by <systemitem class="username"> <para>The GCC build directory is owned by <systemitem class="username">
nobody</systemitem> now and the ownership of the installed header tester</systemitem> now and the ownership of the installed header
directory (and its content) will be incorrect. Change the ownership to directory (and its content) will be incorrect. Change the ownership to
<systemitem class="username">root</systemitem> user and group:</para> <systemitem class="username">root</systemitem> user and group:</para>

View File

@ -70,4 +70,8 @@ rm -f /usr/lib/libz.a</userinput></screen>
url="&blfs-book;/introduction/la-files.html">BLFS section "About Libtool url="&blfs-book;/introduction/la-files.html">BLFS section "About Libtool
Archive (.la) files"</ulink>.</para> Archive (.la) files"</ulink>.</para>
<para>Finally, remove the temporary 'tester' usr account created at the
beginning of this chapter.</para>
<screen><userinput>sed -i '/tester/d' /etc/passwd /etc/group</userinput></screen>
</sect1> </sect1>

View File

@ -115,8 +115,8 @@ rm -vf /usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc</userinput></screen>
<screen role="nodump"><userinput>bash tests/run.sh --srcdir=$PWD --builddir=$PWD</userinput></screen> <screen role="nodump"><userinput>bash tests/run.sh --srcdir=$PWD --builddir=$PWD</userinput></screen>
</warning> </warning>
<screen><userinput remap="test">chown -Rv nobody . <screen><userinput remap="test">chown -Rv tester .
su nobody -s /bin/bash -c "PATH=$PATH make -k check"</userinput></screen> su tester -c "make -k check"</userinput></screen>
<para>Install the package:</para> <para>Install the package:</para>

View File

@ -67,15 +67,15 @@
<screen><userinput remap="make">make</userinput></screen> <screen><userinput remap="make">make</userinput></screen>
<para>To prepare the tests, ensure that the <para>To prepare the tests, ensure that the
<systemitem class="username">nobody</systemitem> user can write <systemitem class="username">tester</systemitem> user can write
to the sources tree:</para> to the sources tree:</para>
<screen><userinput remap="test">chown -Rv nobody .</userinput></screen> <screen><userinput remap="test">chown -Rv tester .</userinput></screen>
<para>Now run the tests as the <systemitem <para>Now run the tests as the <systemitem
class="username">nobody</systemitem> user:</para> class="username">tester</systemitem> user:</para>
<screen><userinput remap="test">su nobody -s /bin/bash -c "LANG=en_US.UTF-8 make -j1 test" &amp;> vim-test.log</userinput></screen> <screen><userinput remap="test">su tester -c "LANG=en_US.UTF-8 make -j1 test" &amp;> vim-test.log</userinput></screen>
<!--<screen><userinput remap="test">LANG=en_US.UTF-8 make -j1 test &amp;&gt; vim-test.log</userinput></screen>--> <!--<screen><userinput remap="test">LANG=en_US.UTF-8 make -j1 test &amp;&gt; vim-test.log</userinput></screen>-->

View File

@ -70,10 +70,10 @@
<!ENTITY binutils-ch6-du "5.1 GB"> <!ENTITY binutils-ch6-du "5.1 GB">
<!ENTITY binutils-ch6-sbu "6.7 SBU"> <!ENTITY binutils-ch6-sbu "6.7 SBU">
<!ENTITY bison-version "3.6.1"> <!ENTITY bison-version "3.6.2">
<!ENTITY bison-size "2,407 KB"> <!ENTITY bison-size "2,411 KB">
<!ENTITY bison-url "&gnu;bison/bison-&bison-version;.tar.xz"> <!ENTITY bison-url "&gnu;bison/bison-&bison-version;.tar.xz">
<!ENTITY bison-md5 "16fa3e60f2c33888c6ef7af64c89e182"> <!ENTITY bison-md5 "fa5f7c67c523f1d8b2155f55e67f7e1c">
<!ENTITY bison-home "&gnu-software;bison/"> <!ENTITY bison-home "&gnu-software;bison/">
<!ENTITY bison-ch5-du "43 MB"> <!ENTITY bison-ch5-du "43 MB">
<!ENTITY bison-ch5-sbu "0.3 SBU"> <!ENTITY bison-ch5-sbu "0.3 SBU">
@ -428,7 +428,7 @@
<!ENTITY linux-patch-version "15"> <!ENTITY linux-patch-version "15">
<!--<!ENTITY linux-version "&linux-major-version;.&linux-minor-version;">--> <!--<!ENTITY linux-version "&linux-major-version;.&linux-minor-version;">-->
<!ENTITY linux-version "&linux-major-version;.&linux-minor-version;.&linux-patch-version;"> <!ENTITY linux-version "&linux-major-version;.&linux-minor-version;.&linux-patch-version;">
<!ENTITY linux-size "109,192 KB"> <!ENTITY linux-size "109,193 KB">
<!ENTITY linux-url "&kernel;linux/kernel/v&linux-major-version;.x/linux-&linux-version;.tar.xz"> <!ENTITY linux-url "&kernel;linux/kernel/v&linux-major-version;.x/linux-&linux-version;.tar.xz">
<!ENTITY linux-md5 "41f02b34dbb66ffa6b71bb3e2361e94d"> <!ENTITY linux-md5 "41f02b34dbb66ffa6b71bb3e2361e94d">
<!ENTITY linux-home "https://www.kernel.org/"> <!ENTITY linux-home "https://www.kernel.org/">
@ -690,10 +690,10 @@
<!ENTITY udev-lfs-home " "> <!ENTITY udev-lfs-home " ">
<!ENTITY util-linux-minor "2.35"> <!ENTITY util-linux-minor "2.35">
<!ENTITY util-linux-version "2.35.1"> <!-- 2.33.x --> <!ENTITY util-linux-version "2.35.2"> <!-- 2.33.x -->
<!ENTITY util-linux-size "5,018 KB"> <!ENTITY util-linux-size "5,030 KB">
<!ENTITY util-linux-url "&kernel;linux/utils/util-linux/v&util-linux-minor;/util-linux-&util-linux-version;.tar.xz"> <!ENTITY util-linux-url "&kernel;linux/utils/util-linux/v&util-linux-minor;/util-linux-&util-linux-version;.tar.xz">
<!ENTITY util-linux-md5 "7f64882f631225f0295ca05080cee1bf"> <!ENTITY util-linux-md5 "248a4d0810c9193e0e9a4bb3f26b93d8">
<!ENTITY util-linux-home "http://freecode.com/projects/util-linux"> <!ENTITY util-linux-home "http://freecode.com/projects/util-linux">
<!ENTITY util-linux-ch5-du "154 MB"> <!ENTITY util-linux-ch5-du "154 MB">
<!ENTITY util-linux-ch5-sbu "0.9 SBU"> <!ENTITY util-linux-ch5-sbu "0.9 SBU">
@ -737,10 +737,10 @@
<!ENTITY zlib-ch6-du "5.1 MB"> <!ENTITY zlib-ch6-du "5.1 MB">
<!ENTITY zlib-ch6-sbu "less than 0.1 SBU"> <!ENTITY zlib-ch6-sbu "less than 0.1 SBU">
<!ENTITY zstd-version "1.4.4"> <!ENTITY zstd-version "1.4.5">
<!ENTITY zstd-size "1,903 KB"> <!ENTITY zstd-size "1,928 KB">
<!ENTITY zstd-url "https://github.com/facebook/zstd/releases/download/v&zstd-version;/zstd-&zstd-version;.tar.gz"> <!ENTITY zstd-url "https://github.com/facebook/zstd/releases/download/v&zstd-version;/zstd-&zstd-version;.tar.gz">
<!ENTITY zstd-md5 "487f7ee1562dee7c1c8adf85e2a63df9"> <!ENTITY zstd-md5 "dd0b53631303b8f972dafa6fd34beb0c">
<!ENTITY zstd-home "https://facebook.github.io/zstd/"> <!ENTITY zstd-home "https://facebook.github.io/zstd/">
<!ENTITY zstd-ch6-du "16 MB"> <!ENTITY zstd-ch6-du "16 MB">
<!ENTITY zstd-ch6-sbu "0.7 SBU"> <!ENTITY zstd-ch6-sbu "0.7 SBU">