Author: jhuntwork
Date: 2007-04-03 06:21:48 -0600 (Tue, 03 Apr 2007)
New Revision: 8006
Modified:
trunk/BOOK/chapter01/changelog.xml
trunk/BOOK/chapter05/coreutils.xml
trunk/BOOK/chapter06/bash.xml
trunk/BOOK/chapter06/coreutils.xml
trunk/BOOK/general.ent
Log:
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
Modified: trunk/BOOK/chapter01/changelog.xml
===================================================================
--- trunk/BOOK/chapter01/changelog.xml 2007-04-02 21:35:30 UTC (rev 8005)
+++ trunk/BOOK/chapter01/changelog.xml 2007-04-03 12:21:48 UTC (rev 8006)
@@ -35,7 +35,19 @@
</itemizedlist>
</listitem>
-->
+
<listitem>
+ <para>2007-04-03</para>
+ <itemizedlist>
+ <listitem>
+ <para>[jhuntwork] - 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.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
<para>2007-04-01</para>
<itemizedlist>
<listitem>
Modified: trunk/BOOK/chapter05/coreutils.xml
===================================================================
--- trunk/BOOK/chapter05/coreutils.xml 2007-04-02 21:35:30 UTC (rev 8005)
+++ trunk/BOOK/chapter05/coreutils.xml 2007-04-03 12:21:48 UTC (rev 8006)
@@ -56,6 +56,15 @@
<screen><userinput>make install</userinput></screen>
+ <para>The above command refuses to install <filename>su</filename>
+ because it cannot install it setuid root as a non-privileged user. By
+ manually installing it with a different name, we can use it for running
+ tests in the final system as a non-privileged user and we keep a possibly
+ useful <command>su</command> from our host first place in our PATH. Install
+ it with:</para>
+
+<screen><userinput>cp -v src/su /tools/bin/su-tools</userinput></screen>
+
</sect2>
<sect2 role="content">
Modified: trunk/BOOK/chapter06/bash.xml
===================================================================
--- trunk/BOOK/chapter06/bash.xml 2007-04-02 21:35:30 UTC (rev 8005)
+++ trunk/BOOK/chapter06/bash.xml 2007-04-03 12:21:48 UTC (rev 8006)
@@ -70,9 +70,11 @@
<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>
<screen><userinput>make install</userinput></screen>
Modified: trunk/BOOK/chapter06/coreutils.xml
===================================================================
--- trunk/BOOK/chapter06/coreutils.xml 2007-04-02 21:35:30 UTC (rev 8005)
+++ trunk/BOOK/chapter06/coreutils.xml 2007-04-03 12:21:48 UTC (rev 8006)
@@ -72,32 +72,19 @@
<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:" >> /etc/group
-echo "dummy2:x:1001:dummy" >> /etc/group
-echo "dummy:x:1000:1000::/root:/bin/bash" >>
/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>
+ <systemitem class="username">nobody</systemitem> user:</para>
-<screen><userinput>src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes
check"</userinput></screen>
+<screen><userinput>su-tools nobody -s /bin/bash -c "make
RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
- <para>When testing is complete, remove the dummy user and groups:</para>
-
-<screen><userinput>sed -i '/dummy/d' /etc/passwd
/etc/group</userinput></screen>
-
<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent 2007-04-02 21:35:30 UTC (rev 8005)
+++ trunk/BOOK/general.ent 2007-04-03 12:21:48 UTC (rev 8006)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!ENTITY version "SVN-20070401">
-<!ENTITY releasedate "April 1, 2007">
+<!ENTITY version "SVN-20070403">
+<!ENTITY releasedate "April 3, 2007">
<!ENTITY milestone "6.3">
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or
"x.y[-pre{x}]" -->
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page