aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06
diff options
context:
space:
mode:
authorJeremy Huntwork <jhuntwork@linuxfromscratch.org>2007-04-03 12:21:48 +0000
committerJeremy Huntwork <jhuntwork@linuxfromscratch.org>2007-04-03 12:21:48 +0000
commitf4c628cc8009690144917de718338bb95cbff428 (patch)
treedc5da569c6dad157c691e3627ab3e49f0d52b345 /chapter06
parent85d8df50447b4bdcae11a0fb45253ed6fa8549bb (diff)
Install su from coreutils in chapter 5 as su-tools. Use su-tools to run test suites from coreutils and bash as user nobody. Fixes #1877
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8006 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r--chapter06/bash.xml6
-rw-r--r--chapter06/coreutils.xml21
2 files changed, 8 insertions, 19 deletions
diff --git a/chapter06/bash.xml b/chapter06/bash.xml
index 88a76c612..147af875b 100644
--- a/chapter06/bash.xml
+++ b/chapter06/bash.xml
@@ -70,8 +70,10 @@ sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/bash-&bash-version;|" \
<screen><userinput>make</userinput></screen>
- <para>To test the results, issue:
- <userinput>make tests</userinput>.</para>
+ <para>To test the results, issue:</para>
+
+<screen><userinput>chown -Rv nobody ./
+su-tools nobody -s /bin/bash -c "make tests"</userinput></screen>
<para>Install the package:</para>
diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml
index 9b55fc312..84da49220 100644
--- a/chapter06/coreutils.xml
+++ b/chapter06/coreutils.xml
@@ -72,31 +72,18 @@
<screen><userinput>make</userinput></screen>
- <para>The test suite of Coreutils makes several assumptions about the
- presence of system users and groups that are not valid within the minimal
- environment that exists at the moment. Therefore, additional items need
- to be set up before running the tests. Skip down to <quote>Install the
+ <para>Skip down to <quote>Install the
package</quote> if not running the test suite.</para>
- <para>Create two dummy groups and a dummy user:</para>
-
-<screen><userinput>echo "dummy1:x:1000:" &gt;&gt; /etc/group
-echo "dummy2:x:1001:dummy" &gt;&gt; /etc/group
-echo "dummy:x:1000:1000::/root:/bin/bash" &gt;&gt; /etc/passwd</userinput></screen>
-
<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>
-<screen><userinput>make NON_ROOT_USERNAME=dummy check-root</userinput></screen>
+<screen><userinput>make NON_ROOT_USERNAME=nobody check-root</userinput></screen>
<para>Then run the remainder of the tests as the
- <systemitem class="username">dummy</systemitem> user:</para>
-
-<screen><userinput>src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
-
- <para>When testing is complete, remove the dummy user and groups:</para>
+ <systemitem class="username">nobody</systemitem> user:</para>
-<screen><userinput>sed -i '/dummy/d' /etc/passwd /etc/group</userinput></screen>
+<screen><userinput>su-tools nobody -s /bin/bash -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
<para>Install the package:</para>