Author: pierre
Date: Sun May 31 10:33:35 2020
New Revision: 11881
Log:
Fixes for bash tests
Modified:
trunk/BOOK/chapter01/changelog.xml
trunk/BOOK/chapter06/bash.xml
trunk/BOOK/chapter06/coreutils.xml
trunk/BOOK/chapter06/createfiles.xml
trunk/BOOK/general.ent
Modified: trunk/BOOK/chapter01/changelog.xml
==============================================================================
--- trunk/BOOK/chapter01/changelog.xml Sat May 30 21:10:51 2020 (r11880)
+++ trunk/BOOK/chapter01/changelog.xml Sun May 31 10:33:35 2020 (r11881)
@@ -43,6 +43,18 @@
appropriate for the entry or if needed the entire day's listitem.
-->
<listitem>
+ <para>2020-05-31</para>
+ <itemizedlist>
+ <listitem>
+ <para>[pierre] - Fix bash tests: add a couple of symlinks
+ from /bin to /tools, create the tester user with the uid of
+ the tty owner, run the bash tests with su << EOF, and
+ explicitely defining stdin (with help from thomas and bdubbs).</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
<para>2020-05-29</para>
<itemizedlist>
<listitem>
Modified: trunk/BOOK/chapter06/bash.xml
==============================================================================
--- trunk/BOOK/chapter06/bash.xml Sat May 30 21:10:51 2020 (r11880)
+++ trunk/BOOK/chapter06/bash.xml Sun May 31 10:33:35 2020 (r11881)
@@ -80,7 +80,9 @@
<para>Now, run the tests as the <systemitem
class="username">tester</systemitem> user:</para>
-<screen><userinput remap="test">su tester -c "PATH=$PATH make
tests"</userinput></screen>
+<screen><userinput remap="test">su tester << EOF
+PATH=$PATH make tests < $(tty)
+EOF</userinput></screen>
<para>The <systemitem class="username">tester</systemitem>
user does not have enough permissions for all the tests to pass. This shows
Modified: trunk/BOOK/chapter06/coreutils.xml
==============================================================================
--- trunk/BOOK/chapter06/coreutils.xml Sat May 30 21:10:51 2020 (r11880)
+++ trunk/BOOK/chapter06/coreutils.xml Sun May 31 10:33:35 2020 (r11881)
@@ -116,7 +116,7 @@
these tests are not skipped we'll add a temporary group and make the
user <systemitem class="username">tester</systemitem> a part of it:</para>
-<screen><userinput remap="test">echo "dummy:x:1000:tester" >>
/etc/group</userinput></screen>
+<screen><userinput remap="test">echo "dummy:x:102:tester" >>
/etc/group</userinput></screen>
<para>Fix some of the permissions so that the non-root user can compile and
run the tests:</para>
Modified: trunk/BOOK/chapter06/createfiles.xml
==============================================================================
--- trunk/BOOK/chapter06/createfiles.xml Sat May 30 21:10:51 2020
(r11880)
+++ trunk/BOOK/chapter06/createfiles.xml Sun May 31 10:33:35 2020
(r11881)
@@ -39,7 +39,7 @@
will be replaced by real files throughout the course of this chapter after
the
software has been installed:</para>
-<screen><userinput>ln -sv
/tools/bin/{bash,cat,chmod,dd,echo,ln,mkdir,pwd,rm,stty,touch} /bin
+<screen><userinput>ln -sv
/tools/bin/{bash,cat,chmod,dd,echo,false,ln,ls,mkdir,pwd,rm,stty,touch} /bin
ln -sv /tools/bin/{env,install,perl,printf} /usr/bin
ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
ln -sv /tools/lib/libstdc++.{a,so{,.6}} /usr/lib
@@ -334,7 +334,7 @@
<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::/home/tester:/bin/bash" >>
/etc/passwd
+<screen><userinput>echo "tester:x:$(ls -n $(tty) | cut -d" "
-f3):101::/home/tester:/bin/bash" >> /etc/passwd
echo "tester:x:101:" >> /etc/group
install -o tester -d /home/tester</userinput></screen>
Modified: trunk/BOOK/general.ent
==============================================================================
--- trunk/BOOK/general.ent Sat May 30 21:10:51 2020 (r11880)
+++ trunk/BOOK/general.ent Sun May 31 10:33:35 2020 (r11881)
@@ -1,13 +1,13 @@
-<!ENTITY version "SVN-20200529">
+<!ENTITY version "SVN-20200531">
<!ENTITY short-version "svn"> <!-- Used below in &blfs-book;
Change to x.y for release but not -rc
releases -->
<!ENTITY generic-version "development"> <!-- Use "development" or
"x.y[-pre{x}]" -->
-<!ENTITY versiond "20200529-systemd">
+<!ENTITY versiond "20200531-systemd">
<!ENTITY short-versiond "systemd">
<!ENTITY generic-versiond "systemd">
-<!ENTITY releasedate "May 29th, 2020">
+<!ENTITY releasedate "May 31st, 2020">
<!ENTITY copyrightdate "1999-2020"><!-- jhalfs needs a literal dash, not
– -->
--
http://lists.linuxfromscratch.org/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page