aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05
diff options
context:
space:
mode:
Diffstat (limited to 'chapter05')
-rw-r--r--chapter05/bash-exp.xml10
-rw-r--r--chapter05/bash-inst.xml10
-rw-r--r--chapter05/bzip2-inst.xml3
-rw-r--r--chapter05/creatingdirs.xml22
-rw-r--r--chapter05/fileutils-exp.xml4
-rw-r--r--chapter05/fileutils-inst.xml9
-rw-r--r--chapter05/gawk-inst.xml4
-rw-r--r--chapter05/gcc-inst.xml9
-rw-r--r--chapter05/grep-inst.xml2
-rw-r--r--chapter05/shellutils-inst.xml10
-rw-r--r--chapter05/tar-inst.xml5
-rw-r--r--chapter05/texinfo-inst.xml3
-rw-r--r--chapter05/textutils-inst.xml5
13 files changed, 46 insertions, 50 deletions
diff --git a/chapter05/bash-exp.xml b/chapter05/bash-exp.xml
index 3dd99144a..5a17c6bba 100644
--- a/chapter05/bash-exp.xml
+++ b/chapter05/bash-exp.xml
@@ -28,11 +28,11 @@ trouble later on in this chapter when you install the Texinfo package.
That package requires ncurses and termcap can't reliably be used
there.</para>
-<para><userinput>ln -sf bash sh:</userinput> This command creates the sh
-symlink that points to bash. Most scripts run themselves via 'sh'
-(invoked by the #!/bin/sh as the first line in the scripts) which
-invokes a special bash mode. Bash will then behave (as closely as
-possible) as the original Bourne shell.</para>
+<para><userinput>ln -sf bash $LFS/bin/sh:</userinput> This command creates
+the <filename class="symlink">sh</filename> symlink that points to bash. Most
+scripts run themselves via 'sh' (invoked by the #!/bin/sh as the first line
+in the scripts) which invokes a special bash mode. Bash will then behave
+(as closely as possible) as the original Bourne shell.</para>
<para>The <userinput>&amp;&amp;</userinput>'s at the end of every line cause
the next command to be executed only if the previous command exists
diff --git a/chapter05/bash-inst.xml b/chapter05/bash-inst.xml
index 7ab7fe351..334286d40 100644
--- a/chapter05/bash-inst.xml
+++ b/chapter05/bash-inst.xml
@@ -15,18 +15,16 @@ or you just installed it, check for the two files again. Often the
create <filename>libcurses.a</filename> as a symlink by running the
following commands as user root:</para>
-<para><screen><userinput>cd /usr/lib &amp;&amp;
-ln -s libncurses.a libcurses.a</userinput></screen></para>
+<para><screen><userinput>ln -s libncurses.a /usr/lib/libcurses.a</userinput></screen></para>
<para>Now we can continue. Install Bash by running the following
commands:</para>
-<para><screen><userinput>./configure --enable-static-link --prefix=$LFS/usr \
-&nbsp;&nbsp;&nbsp;--bindir=$LFS/bin --with-curses &amp;&amp;
+<para><screen><userinput>./configure --enable-static-link \
+&nbsp;&nbsp;&nbsp;&nbsp;--prefix=$LFS/usr --bindir=$LFS/bin --with-curses &amp;&amp;
make &amp;&amp;
make install &amp;&amp;
-cd $LFS/bin &amp;&amp;
-ln -sf bash sh</userinput></screen></para>
+ln -sf bash $LFS/bin/sh</userinput></screen></para>
<para>If the make install phase ends with something along the lines of</para>
diff --git a/chapter05/bzip2-inst.xml b/chapter05/bzip2-inst.xml
index 68281be77..b1b7cec9c 100644
--- a/chapter05/bzip2-inst.xml
+++ b/chapter05/bzip2-inst.xml
@@ -5,8 +5,7 @@
<para><screen><userinput>make CC="gcc -static" &amp;&amp;
make PREFIX=$LFS/usr install &amp;&amp;
-cd $LFS/usr/bin &amp;&amp;
-mv bzcat bunzip2 bzip2 bzip2recover bzless bzmore $LFS/bin</userinput></screen></para>
+mv $LFS/usr/bin/{bzcat,bunzip2,bzip2,bzip2recover,bzless,bzmore} $LFS/bin</userinput></screen></para>
<para>Although it's not strictly a part of a basic LFS system it's worth
mentioning that a patch for Tar can be downloaded which enables the tar
diff --git a/chapter05/creatingdirs.xml b/chapter05/creatingdirs.xml
index fcbc16db0..9ebdd1884 100644
--- a/chapter05/creatingdirs.xml
+++ b/chapter05/creatingdirs.xml
@@ -10,17 +10,17 @@ Issuing the following commands will create a default directory layout:</para>
<para><screen><userinput>cd $LFS &amp;&amp;
mkdir -p bin boot dev/pts etc/opt home lib mnt proc root sbin tmp var opt &amp;&amp;
for dirname in $LFS/usr $LFS/usr/local
-&nbsp;&nbsp;&nbsp;do
-&nbsp;&nbsp;&nbsp;mkdir $dirname
-&nbsp;&nbsp;&nbsp;cd $dirname
-&nbsp;&nbsp;&nbsp;mkdir bin etc include lib sbin share src
-&nbsp;&nbsp;&nbsp;ln -s share/man
-&nbsp;&nbsp;&nbsp;ln -s share/doc
-&nbsp;&nbsp;&nbsp;ln -s share/info
-&nbsp;&nbsp;&nbsp;cd $dirname/share
-&nbsp;&nbsp;&nbsp;mkdir dict doc info locale man nls misc terminfo zoneinfo
-&nbsp;&nbsp;&nbsp;cd $dirname/share/man
-&nbsp;&nbsp;&nbsp;mkdir man{1,2,3,4,5,6,7,8}
+&nbsp;&nbsp;&nbsp;&nbsp;do
+&nbsp;&nbsp;&nbsp;&nbsp;mkdir $dirname
+&nbsp;&nbsp;&nbsp;&nbsp;cd $dirname
+&nbsp;&nbsp;&nbsp;&nbsp;mkdir bin etc include lib sbin share src
+&nbsp;&nbsp;&nbsp;&nbsp;ln -s share/man
+&nbsp;&nbsp;&nbsp;&nbsp;ln -s share/doc
+&nbsp;&nbsp;&nbsp;&nbsp;ln -s share/info
+&nbsp;&nbsp;&nbsp;&nbsp;cd $dirname/share
+&nbsp;&nbsp;&nbsp;&nbsp;mkdir dict doc info locale man nls misc terminfo zoneinfo
+&nbsp;&nbsp;&nbsp;&nbsp;cd $dirname/share/man
+&nbsp;&nbsp;&nbsp;&nbsp;mkdir man{1,2,3,4,5,6,7,8}
done &amp;&amp;
cd $LFS/var &amp;&amp;
mkdir -p lock log mail run spool tmp opt cache lib/misc local &amp;&amp;
diff --git a/chapter05/fileutils-exp.xml b/chapter05/fileutils-exp.xml
index 10b002427..99bc82a1e 100644
--- a/chapter05/fileutils-exp.xml
+++ b/chapter05/fileutils-exp.xml
@@ -7,8 +7,8 @@ change.</para>
<para><userinput>cp lib/Makefile.in lib/Makefile.in.backup &amp;&amp;
sed -e 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \
-&nbsp;&nbsp;&nbsp;-e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \
-&nbsp;&nbsp;&nbsp;lib/Makefile.in.backup &gt; lib/Makefile.in:</userinput>
+&nbsp;&nbsp;&nbsp;&nbsp;-e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \
+&nbsp;&nbsp;&nbsp;&nbsp;lib/Makefile.in.backup &gt; lib/Makefile.in:</userinput>
This is used to fix a problem with building fileutils statically on glibc 2.2.3
systems. If this isn't done, then there is the possibility of all of the
fileutils programs causing segmentation faults once chroot is entered
diff --git a/chapter05/fileutils-inst.xml b/chapter05/fileutils-inst.xml
index 6d630b2c7..29121fec8 100644
--- a/chapter05/fileutils-inst.xml
+++ b/chapter05/fileutils-inst.xml
@@ -23,17 +23,16 @@ than likely result in all kinds of compile time problems.</para>
<para><screen><userinput>cp lib/Makefile.in lib/Makefile.in.backup &amp;&amp;
sed -e 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \
-&nbsp;&nbsp;&nbsp;-e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \
-&nbsp;&nbsp;&nbsp;lib/Makefile.in.backup &gt; lib/Makefile.in</userinput></screen></para>
+&nbsp;&nbsp;&nbsp;&nbsp;-e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \
+&nbsp;&nbsp;&nbsp;&nbsp;lib/Makefile.in.backup &gt; lib/Makefile.in</userinput></screen></para>
<para>Install Fileutils by running the following commands:</para>
<para><screen><userinput>./configure --disable-nls \
-&nbsp;&nbsp;&nbsp;--prefix=$LFS/usr --bindir=$LFS/bin &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--prefix=$LFS/usr --bindir=$LFS/bin &amp;&amp;
make LDFLAGS=-static &amp;&amp;
make install &amp;&amp;
-cd $LFS/usr/bin &amp;&amp;
-ln -sf ../../bin/install</userinput></screen></para>
+ln -sf ../../bin/install $LFS/usr/bin</userinput></screen></para>
<para>Once you have installed Fileutils, you can test whether the
segmentation fault problem has been avoided by running
diff --git a/chapter05/gawk-inst.xml b/chapter05/gawk-inst.xml
index 81c923fb3..0d858adc8 100644
--- a/chapter05/gawk-inst.xml
+++ b/chapter05/gawk-inst.xml
@@ -16,10 +16,10 @@ class="directory">/usr/bin</filename> it'll run <userinput>rm -rf
<para><screen><userinput>cp awklib/Makefile.in awklib/Makefile.in.backup &amp;&amp;
sed -e '/^datadir/s/awk/gawk/' \
-e '/^libexecdir/s%/awk%%' awklib/Makefile.in.backup \
-&nbsp;&nbsp;&nbsp;&gt; awklib/Makefile.in &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;&gt; awklib/Makefile.in &amp;&amp;
CPPFLAGS=-Dre_max_failures=re_max_failures2 \
./configure --prefix=$LFS/usr --disable-nls \
-&nbsp;&nbsp;&nbsp;--libexecdir=$LFS/usr/bin &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=$LFS/usr/bin &amp;&amp;
make LDFLAGS=-static &amp;&amp;
make install</userinput></screen></para>
diff --git a/chapter05/gcc-inst.xml b/chapter05/gcc-inst.xml
index c79a98ee4..029fa52fe 100644
--- a/chapter05/gcc-inst.xml
+++ b/chapter05/gcc-inst.xml
@@ -21,12 +21,9 @@ cd ../gcc-build &amp;&amp;
&nbsp;&nbsp;&nbsp;--disable-nls --disable-shared --enable-threads=posix &amp;&amp;
make BOOT_LDFLAGS=-static bootstrap &amp;&amp;
make prefix=$LFS/usr install &amp;&amp;
-cd $LFS/lib &amp;&amp;
-ln -sf ../usr/bin/cpp &amp;&amp;
-cd $LFS/usr/lib &amp;&amp;
-ln -sf ../bin/cpp &amp;&amp;
-cd $LFS/usr/bin &amp;&amp;
-ln -sf gcc cc &amp;&amp;
+ln -sf ../usr/bin/cpp $LFS/lib &amp;&amp;
+ln -sf ../bin/cpp $LFS/usr/lib &amp;&amp;
+ln -sf gcc $LFS/usr/bin/cc &amp;&amp;
rmdir $LFS/usr/*-gnu/include &amp;&amp;
rmdir $LFS/usr/*-gnu</userinput></screen></para>
diff --git a/chapter05/grep-inst.xml b/chapter05/grep-inst.xml
index 305775029..8e9a711cd 100644
--- a/chapter05/grep-inst.xml
+++ b/chapter05/grep-inst.xml
@@ -5,7 +5,7 @@
<para><screen><userinput>CPPFLAGS=-Dre_max_failures=re_max_failures2 \
./configure --prefix=$LFS/usr --bindir=$LFS/bin \
-&nbsp;&nbsp;&nbsp;--disable-nls --disable-perl-regexp &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls --disable-perl-regexp &amp;&amp;
make LDFLAGS=-static &amp;&amp;
make install</userinput></screen></para>
diff --git a/chapter05/shellutils-inst.xml b/chapter05/shellutils-inst.xml
index 74602382a..ec819ca95 100644
--- a/chapter05/shellutils-inst.xml
+++ b/chapter05/shellutils-inst.xml
@@ -3,13 +3,13 @@
<para>Install Sh-utils by running the following commands:</para>
-<para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls &amp;&amp;
+<para><screen><userinput>./configure --prefix=$LFS/usr \
+&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls &amp;&amp;
make LDFLAGS=-static &amp;&amp;
make install &amp;&amp;
-cd $LFS/usr/bin &amp;&amp;
-mv basename date echo false hostname $LFS/bin &amp;&amp;
-mv pwd sleep stty test true uname $LFS/bin &amp;&amp;
-mv chroot ../sbin</userinput></screen></para>
+mv $LFS/usr/bin/{basename,date,echo,false,hostname} $LFS/bin &amp;&amp;
+mv $LFS/usr/bin/{pwd,sleep,stty,test,true,uname} $LFS/bin &amp;&amp;
+mv $LFS/usr/bin/chroot $LFS/usr/sbin</userinput></screen></para>
<para>During the make install stage you will see the following warning:</para>
diff --git a/chapter05/tar-inst.xml b/chapter05/tar-inst.xml
index 7b3bcc95d..1b2f62b8b 100644
--- a/chapter05/tar-inst.xml
+++ b/chapter05/tar-inst.xml
@@ -12,8 +12,9 @@ for gzip files).</para>
<para>Install Tar by running the following commands:</para>
-<para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls \
-&nbsp;&nbsp;&nbsp;--libexecdir=$LFS/usr/bin --bindir=$LFS/bin &amp;&amp;
+<para><screen><userinput>./configure --prefix=$LFS/usr \
+&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls --libexecdir=$LFS/usr/bin \
+&nbsp;&nbsp;&nbsp;&nbsp;--bindir=$LFS/bin &amp;&amp;
make LDFLAGS=-static &amp;&amp;
make install</userinput></screen></para>
diff --git a/chapter05/texinfo-inst.xml b/chapter05/texinfo-inst.xml
index 02cf81fd1..c7482ab00 100644
--- a/chapter05/texinfo-inst.xml
+++ b/chapter05/texinfo-inst.xml
@@ -3,7 +3,8 @@
<para>Install Texinfo by running the following commands:</para>
-<para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls &amp;&amp;
+<para><screen><userinput>./configure --prefix=$LFS/usr \
+&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls &amp;&amp;
make LDFLAGS=-static &amp;&amp;
make install</userinput></screen></para>
diff --git a/chapter05/textutils-inst.xml b/chapter05/textutils-inst.xml
index 08c544b75..ee81169b3 100644
--- a/chapter05/textutils-inst.xml
+++ b/chapter05/textutils-inst.xml
@@ -3,10 +3,11 @@
<para>Install Textutils by running the following commands:</para>
-<para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls &amp;&amp;
+<para><screen><userinput>./configure --prefix=$LFS/usr \
+&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls &amp;&amp;
make LDFLAGS=-static &amp;&amp;
make install &amp;&amp;
-mv $LFS/usr/bin/cat $LFS/usr/bin/head $LFS/bin</userinput></screen></para>
+mv $LFS/usr/bin/{cat,head} $LFS/bin</userinput></screen></para>
</sect2>