Author: dj
Date: 2012-07-29 21:02:54 -0600 (Sun, 29 Jul 2012)
New Revision: 10481
Modified:
trunk/BOOK/general.ent
trunk/BOOK/introduction/welcome/changelog.xml
trunk/BOOK/x/installing/x7app.xml
trunk/BOOK/x/installing/x7font.xml
trunk/BOOK/x/installing/x7lib.xml
trunk/BOOK/x/installing/x7proto.xml
Log:
Added AS_ROOT variable to Xorg installation loops.
Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent 2012-07-30 00:47:38 UTC (rev 10480)
+++ trunk/BOOK/general.ent 2012-07-30 03:02:54 UTC (rev 10481)
@@ -3,7 +3,7 @@
$Date$
-->
-<!ENTITY day "29"> <!-- Always 2 digits -->
+<!ENTITY day "30"> <!-- Always 2 digits -->
<!ENTITY month "07"> <!-- Always 2 digits -->
<!ENTITY year "2012">
<!ENTITY copyrightdate "2001-&year;">
@@ -109,6 +109,35 @@
<!ENTITY lfssvn_built2 " platform but has not been tested.">
<!-- End special entities about LFS compatibility -->
+<!ENTITY as_root "<note><para>When installing multiple packages in
+ a script, the installation needs to be done as
+ the root user. There are three general options
+ that can be used to do this:</para>
+
+ <orderedlist>
+ <listitem><para>Run the entire script as the root
+ user (not recommended).</para></listitem>
+
+ <listitem><para>Use the '<command>sudo</command>'
+ command from the <xref linkend='sudo'/>
+ package.</para></listitem>
+
+ <listitem><para>Use '<command>su -c</command>'
+ which will ask for the root password for every
+ iteration of the loop.</para></listitem>
+ </orderedlist>
+
+ <para>Select a preferred method and export a
+ variable <parameter>AS_ROOT</parameter> with the
+ following command replacing
+ <parameter><as_root></parameter> with the
+ selected command (unset or use an empty variable
+ if you intend to run the entire loop as the
+ root user):</para>
+
+ <screen><userinput>export
AS_ROOT='<replaceable><as_root></replaceable>'</userinput></screen>
+ </note>">
+
<!ENTITY not-katamari "<para>This package is not a part of the Xorg
katamari and is provided only as a dependency to
other packages or for testing the completed Xorg
Modified: trunk/BOOK/introduction/welcome/changelog.xml
===================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml 2012-07-30 00:47:38 UTC
(rev 10480)
+++ trunk/BOOK/introduction/welcome/changelog.xml 2012-07-30 03:02:54 UTC
(rev 10481)
@@ -44,6 +44,16 @@
-->
<listitem>
+ <para>July 30th, 2012</para>
+ <itemizedlist>
+ <listitem>
+ <para>[dj] - Added "AS_ROOT" variable to Xorg installation
+ loops.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
<para>July 29th, 2012</para>
<itemizedlist>
<listitem>
Modified: trunk/BOOK/x/installing/x7app.xml
===================================================================
--- trunk/BOOK/x/installing/x7app.xml 2012-07-30 00:47:38 UTC (rev 10480)
+++ trunk/BOOK/x/installing/x7app.xml 2012-07-30 03:02:54 UTC (rev 10481)
@@ -242,8 +242,10 @@
<sect2 role="installation">
<title>Installation of Xorg Applications</title>
- <para>First, start a sub-shell that will exit on error:</para>
+&as_root;
+ <para>First, start a subshell that will exit on error:</para>
+
<screen><userinput>bash -e</userinput></screen>
<para>Install all of the applications by running the following
@@ -253,11 +255,11 @@
do
packagedir=${package%.tar.bz2}
tar -xf $package
- cd $packagedir
+ pushd $packagedir
./configure $XORG_CONFIG
make
- sudo make install
- cd ..
+ $AS_ROOT make install
+ popd
rm -r $packagedir
done</userinput></screen>
Modified: trunk/BOOK/x/installing/x7font.xml
===================================================================
--- trunk/BOOK/x/installing/x7font.xml 2012-07-30 00:47:38 UTC (rev 10480)
+++ trunk/BOOK/x/installing/x7font.xml 2012-07-30 03:02:54 UTC (rev 10481)
@@ -233,6 +233,8 @@
<sect2 role="installation">
<title>Installation of Xorg Fonts</title>
+&as_root;
+
<para>First, start a subshell that will exit on error:</para>
<screen><userinput>bash -e</userinput></screen>
@@ -244,11 +246,11 @@
do
packagedir=${package%.tar.bz2}
tar -xf $package
- cd $packagedir
+ pushd $packagedir
./configure $XORG_CONFIG
make
- sudo make install
- cd ..
+ $AS_ROOT make install
+ popd
rm -r $packagedir
done</userinput></screen>
Modified: trunk/BOOK/x/installing/x7lib.xml
===================================================================
--- trunk/BOOK/x/installing/x7lib.xml 2012-07-30 00:47:38 UTC (rev 10480)
+++ trunk/BOOK/x/installing/x7lib.xml 2012-07-30 03:02:54 UTC (rev 10481)
@@ -229,6 +229,8 @@
<sect2 role="installation">
<title>Installation of Xorg Libraries</title>
+&as_root;
+
<para>First, start a subshell that will exit on error:</para>
<screen><userinput>bash -e</userinput></screen>
@@ -240,7 +242,7 @@
do
packagedir=${package%.tar.bz2}
tar -xf $package
- cd $packagedir
+ pushd $packagedir
case $packagedir in
libXfont-[0-9]* )
./configure $XORG_CONFIG --disable-devel-docs
@@ -254,8 +256,8 @@
;;
esac
make
- sudo make install
- cd ..
+ $AS_ROOT make install
+ popd
rm -r $packagedir
sudo /sbin/ldconfig
done</userinput></screen>
Modified: trunk/BOOK/x/installing/x7proto.xml
===================================================================
--- trunk/BOOK/x/installing/x7proto.xml 2012-07-30 00:47:38 UTC (rev 10480)
+++ trunk/BOOK/x/installing/x7proto.xml 2012-07-30 03:02:54 UTC (rev 10481)
@@ -209,6 +209,8 @@
<sect2 role="installation">
<title>Installation of Xorg Protocol Headers</title>
+ &as_root;
+
<para>First, start a subshell that will exit on error:</para>
<screen><userinput>bash -e</userinput></screen>
@@ -220,10 +222,10 @@
do
packagedir=${package%.tar.bz2}
tar -xf $package
- cd $packagedir
+ pushd $packagedir
./configure $XORG_CONFIG
- sudo make install
- cd ..
+ $AS_ROOT make install
+ popd
rm -r $packagedir
done</userinput></screen>
@@ -236,7 +238,7 @@
<sect2 role="commands">
<title>Command Explanations</title>
- <para><command>bash -e</command>: This command starts a sub-shell that will
+ <para><command>bash -e</command>: This command starts a subshell that will
exit if any command returns a value other than 0, causing the for loop to
exit immediately if an error occurs. This also eliminates the need for the
<command>&&</command> construct used elsewhere in the book.</para>
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page