From 3f12743405f4123463b57e0446bafdd398f2e598 Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Thu, 2 May 2002 20:15:02 +0000 Subject: fix bugs #335 and #342 plus various touch ups, layout fixed (line wrapping mostly) git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1864 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter05/bash-exp.xml | 10 +++++----- chapter05/bash-inst.xml | 10 ++++------ chapter05/bzip2-inst.xml | 3 +-- chapter05/creatingdirs.xml | 22 +++++++++++----------- chapter05/fileutils-exp.xml | 4 ++-- chapter05/fileutils-inst.xml | 9 ++++----- chapter05/gawk-inst.xml | 4 ++-- chapter05/gcc-inst.xml | 9 +++------ chapter05/grep-inst.xml | 2 +- chapter05/shellutils-inst.xml | 10 +++++----- chapter05/tar-inst.xml | 5 +++-- chapter05/texinfo-inst.xml | 3 ++- chapter05/textutils-inst.xml | 5 +++-- 13 files changed, 46 insertions(+), 50 deletions(-) (limited to 'chapter05') 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. -ln -sf bash sh: 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. +ln -sf bash $LFS/bin/sh: 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. The &&'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 libcurses.a as a symlink by running the following commands as user root: -cd /usr/lib && -ln -s libncurses.a libcurses.a +ln -s libncurses.a /usr/lib/libcurses.a Now we can continue. Install Bash by running the following commands: -./configure --enable-static-link --prefix=$LFS/usr \ -   --bindir=$LFS/bin --with-curses && +./configure --enable-static-link \ +    --prefix=$LFS/usr --bindir=$LFS/bin --with-curses && make && make install && -cd $LFS/bin && -ln -sf bash sh +ln -sf bash $LFS/bin/sh If the make install phase ends with something along the lines of 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 @@ make CC="gcc -static" && make PREFIX=$LFS/usr install && -cd $LFS/usr/bin && -mv bzcat bunzip2 bzip2 bzip2recover bzless bzmore $LFS/bin +mv $LFS/usr/bin/{bzcat,bunzip2,bzip2,bzip2recover,bzless,bzmore} $LFS/bin 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: cd $LFS && mkdir -p bin boot dev/pts etc/opt home lib mnt proc root sbin tmp var opt && for dirname in $LFS/usr $LFS/usr/local -   do -   mkdir $dirname -   cd $dirname -   mkdir bin etc include lib sbin share src -   ln -s share/man -   ln -s share/doc -   ln -s share/info -   cd $dirname/share -   mkdir dict doc info locale man nls misc terminfo zoneinfo -   cd $dirname/share/man -   mkdir man{1,2,3,4,5,6,7,8} +    do +    mkdir $dirname +    cd $dirname +    mkdir bin etc include lib sbin share src +    ln -s share/man +    ln -s share/doc +    ln -s share/info +    cd $dirname/share +    mkdir dict doc info locale man nls misc terminfo zoneinfo +    cd $dirname/share/man +    mkdir man{1,2,3,4,5,6,7,8} done && cd $LFS/var && mkdir -p lock log mail run spool tmp opt cache lib/misc local && 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. cp lib/Makefile.in lib/Makefile.in.backup && sed -e 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \ -   -e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \ -   lib/Makefile.in.backup > lib/Makefile.in: +    -e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \ +    lib/Makefile.in.backup > lib/Makefile.in: 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. cp lib/Makefile.in lib/Makefile.in.backup && sed -e 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \ -   -e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \ -   lib/Makefile.in.backup > lib/Makefile.in +    -e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \ +    lib/Makefile.in.backup > lib/Makefile.in Install Fileutils by running the following commands: ./configure --disable-nls \ -   --prefix=$LFS/usr --bindir=$LFS/bin && +    --prefix=$LFS/usr --bindir=$LFS/bin && make LDFLAGS=-static && make install && -cd $LFS/usr/bin && -ln -sf ../../bin/install +ln -sf ../../bin/install $LFS/usr/bin 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 it'll run rm -rf cp awklib/Makefile.in awklib/Makefile.in.backup && sed -e '/^datadir/s/awk/gawk/' \ -e '/^libexecdir/s%/awk%%' awklib/Makefile.in.backup \ -   > awklib/Makefile.in && +    > awklib/Makefile.in && CPPFLAGS=-Dre_max_failures=re_max_failures2 \ ./configure --prefix=$LFS/usr --disable-nls \ -   --libexecdir=$LFS/usr/bin && +    --libexecdir=$LFS/usr/bin && make LDFLAGS=-static && make install 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 &&    --disable-nls --disable-shared --enable-threads=posix && make BOOT_LDFLAGS=-static bootstrap && make prefix=$LFS/usr install && -cd $LFS/lib && -ln -sf ../usr/bin/cpp && -cd $LFS/usr/lib && -ln -sf ../bin/cpp && -cd $LFS/usr/bin && -ln -sf gcc cc && +ln -sf ../usr/bin/cpp $LFS/lib && +ln -sf ../bin/cpp $LFS/usr/lib && +ln -sf gcc $LFS/usr/bin/cc && rmdir $LFS/usr/*-gnu/include && rmdir $LFS/usr/*-gnu 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 @@ CPPFLAGS=-Dre_max_failures=re_max_failures2 \ ./configure --prefix=$LFS/usr --bindir=$LFS/bin \ -   --disable-nls --disable-perl-regexp && +    --disable-nls --disable-perl-regexp && make LDFLAGS=-static && make install 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 @@ Install Sh-utils by running the following commands: -./configure --prefix=$LFS/usr --disable-nls && +./configure --prefix=$LFS/usr \ +    --disable-nls && make LDFLAGS=-static && make install && -cd $LFS/usr/bin && -mv basename date echo false hostname $LFS/bin && -mv pwd sleep stty test true uname $LFS/bin && -mv chroot ../sbin +mv $LFS/usr/bin/{basename,date,echo,false,hostname} $LFS/bin && +mv $LFS/usr/bin/{pwd,sleep,stty,test,true,uname} $LFS/bin && +mv $LFS/usr/bin/chroot $LFS/usr/sbin During the make install stage you will see the following warning: 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). Install Tar by running the following commands: -./configure --prefix=$LFS/usr --disable-nls \ -   --libexecdir=$LFS/usr/bin --bindir=$LFS/bin && +./configure --prefix=$LFS/usr \ +    --disable-nls --libexecdir=$LFS/usr/bin \ +    --bindir=$LFS/bin && make LDFLAGS=-static && make install 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 @@ Install Texinfo by running the following commands: -./configure --prefix=$LFS/usr --disable-nls && +./configure --prefix=$LFS/usr \ +    --disable-nls && make LDFLAGS=-static && make install 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 @@ Install Textutils by running the following commands: -./configure --prefix=$LFS/usr --disable-nls && +./configure --prefix=$LFS/usr \ +    --disable-nls && make LDFLAGS=-static && make install && -mv $LFS/usr/bin/cat $LFS/usr/bin/head $LFS/bin +mv $LFS/usr/bin/{cat,head} $LFS/bin -- cgit v1.2.3-54-g00ecf