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 --- chapter01/changelog.xml | 11 +++++++++++ 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 +++-- chapter06/bash-inst.xml | 5 ++--- chapter06/bzip2-inst.xml | 15 ++++++--------- chapter06/changingowner.xml | 7 +++---- chapter06/chroot.xml | 7 ------- chapter06/chrootcmd.xml | 5 ++--- chapter06/config-glibc.xml | 7 +++---- chapter06/config-keyboard.xml | 7 +++---- chapter06/e2fsprogs-inst.xml | 2 +- chapter06/ed-inst.xml | 6 +++--- chapter06/fileutils-inst.xml | 3 +-- chapter06/gawk-inst.xml | 2 +- chapter06/gcc-inst.xml | 11 ++++------- chapter06/glibc-inst.xml | 5 +++-- chapter06/groff-inst.xml | 7 +++---- chapter06/gzip-inst.xml | 12 +++++------- chapter06/ncurses-exp.xml | 2 +- chapter06/ncurses-inst.xml | 20 +++++++++----------- chapter06/netkitbase-inst.xml | 3 +-- chapter06/procps-inst.xml | 2 +- chapter06/psmisc-inst.xml | 6 +++--- chapter06/shadowpwd-inst.xml | 15 ++++++--------- chapter06/shellutils-inst.xml | 10 ++++------ chapter06/sysvinit-inst.xml | 2 +- chapter06/tar-inst.xml | 4 ++-- chapter06/textutils-inst.xml | 2 +- chapter06/utillinux-inst.xml | 2 +- chapter06/vim-inst.xml | 6 ++---- 41 files changed, 129 insertions(+), 153 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 28156400e..64ba025e6 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -27,6 +27,17 @@ +May 2nd, 2002 [gerard]: Chapter 06 - Procps: Changed the +two single quotes to two double quotes (the two single quotes can be +mistaken for one double quote which will cause an error). + +May 2nd, 2002 [gerard]: Changed the +cd dir && ln -sf commands to one single command +(such as ln -sf bash $LFS/bin/sh Same goes for +cd dir && mv/cp constructions which are now replaced +with constructions like +mv $LFS/usr/bin/{bzcat,bzip2} $LFS/bin + May 2nd, 2002 [markh]: Removed the "Removing old NSS library files" section. 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 diff --git a/chapter06/bash-inst.xml b/chapter06/bash-inst.xml index 08c522099..c6d5b0608 100644 --- a/chapter06/bash-inst.xml +++ b/chapter06/bash-inst.xml @@ -4,11 +4,10 @@ Install Bash by running the following commands: ./configure --prefix=/usr --with-curses \ -   --bindir=/bin && +    --bindir=/bin && make && make install && -cd /bin && -ln -sf bash sh && +ln -sf bash /bin/sh && exec /bin/bash --login diff --git a/chapter06/bzip2-inst.xml b/chapter06/bzip2-inst.xml index cf2abcd81..39ba93e21 100644 --- a/chapter06/bzip2-inst.xml +++ b/chapter06/bzip2-inst.xml @@ -10,15 +10,12 @@ make PREFIX=/usr install && cp bzip2-shared /bin/bzip2 && ln -s libbz2.so.1.0 libbz2.so && cp -a libbz2.so* /lib && -cd /usr/lib && -ln -sf ../../lib/libbz2.so && -cd /usr/bin && -rm bunzip2 bzcat bzip2 && -rm /bin/bzless /bin/bzmore && -mv bzip2recover bzless bzmore /bin && -cd /bin && -ln -sf bzip2 bunzip2 && -ln -sf bzip2 bzcat +ln -sf ../../lib/libbz2.so $LFS/usr/lib&& +rm /usr/bin/{bunzip2,bzcat,bzip2} && +rm /bin/{bzless,bzmore} && +mv /usr/bin/{bzip2recover,bzless,bzmore} /bin && +ln -sf bzip2 /bin/bunzip2 && +ln -sf bzip2 /bin/bzcat Although it's not strictly a part of a basic LFS system it's worth diff --git a/chapter06/changingowner.xml b/chapter06/changingowner.xml index fca9bff74..365e0857e 100644 --- a/chapter06/changingowner.xml +++ b/chapter06/changingowner.xml @@ -6,14 +6,13 @@ all files and directories that were installed in chapter 5 back to root. Run the following commands to do so: -cd / && -chown 0.0 . proc && -chown -R 0.0 bin boot dev etc home lib mnt opt root sbin tmp usr var +chown 0.0 / /proc && +chown -R 0.0 /{bin,boot,dev,etc,home,lib,mnt,opt,root,sbin,tmp,usr,var} Depending on the filesystem you created on the LFS partition, you may have a /lost+found directory. If so, run: -chown 0.0 lost+found +chown 0.0 /lost+found These commands will change the ownership of the root partition and the /proc directory to root, plus everything under diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml index 120eef684..daf324588 100644 --- a/chapter06/chroot.xml +++ b/chapter06/chroot.xml @@ -19,13 +19,6 @@ chroot to the same value as outside chroot which is needed for programs like vim and less to operate properly. If you need other variables present, such as CFLAGS or CXXFLAGS, you need to set them again. -The reason we do cd $LFS before running the -chroot command is that older sh-utils packages -have a chroot program which doesn't do the cd by itself, therefore -meaning that we have to perform it manually. While this isn't an issue -with most modern distributions, it does no harm anyways and ensures that -the command works for everyone. - Now that we are inside a chroot'ed environment, we can continue to install all the basic system software. You have to make sure all the following commands in this and following chapters are run from within the diff --git a/chapter06/chrootcmd.xml b/chapter06/chrootcmd.xml index e7ea6bdde..358ef1b40 100644 --- a/chapter06/chrootcmd.xml +++ b/chapter06/chrootcmd.xml @@ -1,3 +1,2 @@ -cd $LFS && -chroot $LFS /usr/bin/env -i HOME=/root \ -   TERM=$TERM /bin/bash --login +chroot $LFS /usr/bin/env -i HOME=/root \ +    TERM=$TERM /bin/bash --login diff --git a/chapter06/config-glibc.xml b/chapter06/config-glibc.xml index 804025337..f04711c2f 100644 --- a/chapter06/config-glibc.xml +++ b/chapter06/config-glibc.xml @@ -38,19 +38,18 @@ location of the needed timezone file. Create the /etc/localtime symlink by running: -cd /etc && -ln -sf ../usr/share/zoneinfo/<tzselect's output> localtime +ln -sf ../usr/share/zoneinfo/<tzselect's output> /etc/localtime tzselect's output can be something like EST5EDT or Canada/Eastern. The symlink you'd create with that information would be: -ln -sf ../usr/share/zoneinfo/EST5EDT localtime +ln -sf ../usr/share/zoneinfo/EST5EDT /etc/localtime Or: -ln -sf ../usr/share/zoneinfo/Canada/Eastern localtime +ln -sf ../usr/share/zoneinfo/Canada/Eastern /etc/localtime diff --git a/chapter06/config-keyboard.xml b/chapter06/config-keyboard.xml index 9f61aefb6..32b9a285f 100644 --- a/chapter06/config-keyboard.xml +++ b/chapter06/config-keyboard.xml @@ -8,13 +8,12 @@ section. The US keymap file is the default if you don't change it. /usr/share/kbd/keymaps/defkeymap.map.gz symlink by running the following commands: -cd /usr/share/kbd/keymaps && -ln -s <path/to/keymap> defkeymap.map.gz +ln -s <path/to/keymap> /usr/share/kbd/keymaps/defkeymap.map.gz Replace <path/to/keymap> with the your keyboard's map file. For example, if you have a Dutch keyboard, you would run: -ln -s i386/qwerty/nl.map.gz defkeymap.map.gz +ln -s i386/qwerty/nl.map.gz /usr/share/kbd/keymaps/defkeymap.map.gz An second option to configure your keyboard's layout is to compile the keymap directly into the kernel. This will make sure that your @@ -30,7 +29,7 @@ you, so skip the next command. Run the following commands to accomplish that: loadkeys -m /usr/share/kbd/keymaps/defkeymap.map.gz > \ -   /usr/src/linux/drivers/char/defkeymap.c +    /usr/src/linux/drivers/char/defkeymap.c diff --git a/chapter06/e2fsprogs-inst.xml b/chapter06/e2fsprogs-inst.xml index b1171650e..0abaafa20 100644 --- a/chapter06/e2fsprogs-inst.xml +++ b/chapter06/e2fsprogs-inst.xml @@ -6,7 +6,7 @@ mkdir ../e2fsprogs-build && cd ../e2fsprogs-build && ../e2fsprogs-&e2fsprogs-version;/configure --prefix=/usr --with-root-prefix="" \ -   --enable-elf-shlibs && +    --enable-elf-shlibs && make && make install && make install-libs && diff --git a/chapter06/ed-inst.xml b/chapter06/ed-inst.xml index 40f9a20af..7287748c8 100644 --- a/chapter06/ed-inst.xml +++ b/chapter06/ed-inst.xml @@ -10,9 +10,9 @@ days. cp buf.c buf.c.backup && sed 's/int u/int u, sfd/' buf.c.backup | \ -   sed '/.*\*mktemp.*/d' | \ -   sed 's/.*if (mktemp.*/ sfd = mkstemp(sfn);\ -   if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL)/' > buf.c && +    sed '/.*\*mktemp.*/d' | \ +    sed 's/.*if (mktemp.*/ sfd = mkstemp(sfn);\ +    if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL)/' > buf.c && ./configure --prefix=/usr && make && make install && diff --git a/chapter06/fileutils-inst.xml b/chapter06/fileutils-inst.xml index 2653ef754..b3f70ee81 100644 --- a/chapter06/fileutils-inst.xml +++ b/chapter06/fileutils-inst.xml @@ -6,8 +6,7 @@ ./configure --prefix=/usr --bindir=/bin && make && make install && -cd /usr/bin && -ln -sf ../../bin/install +ln -sf ../../bin/install /usr/bin diff --git a/chapter06/gawk-inst.xml b/chapter06/gawk-inst.xml index 40d0dbdd7..49555c5cf 100644 --- a/chapter06/gawk-inst.xml +++ b/chapter06/gawk-inst.xml @@ -16,7 +16,7 @@ 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 && ./configure --prefix=/usr --libexecdir=/usr/bin && make && make install diff --git a/chapter06/gcc-inst.xml b/chapter06/gcc-inst.xml index ff0db53be..33eaee7f7 100644 --- a/chapter06/gcc-inst.xml +++ b/chapter06/gcc-inst.xml @@ -26,15 +26,12 @@ who actively work on LFS. mkdir ../gcc-build && cd ../gcc-build && ../gcc-&gcc-version;/configure --prefix=/usr --enable-shared \ -   --enable-languages=c,c++ --enable-threads=posix && +    --enable-languages=c,c++ --enable-threads=posix && make bootstrap && make install && -cd /lib && -ln -sf ../usr/bin/cpp && -cd /usr/lib && -ln -sf ../bin/cpp && -cd /usr/bin && -ln -sf gcc cc && +ln -sf ../usr/bin/cpp /lib && +ln -sf ../bin/cpp /usr/lib && +ln -sf gcc /usr/bin/cc && rmdir /usr/*-gnu/include && rmdir /usr/*-gnu diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index 22ae1a0ff..e210d5b4d 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -25,13 +25,14 @@ is putting your system at very high risk. mknod -m 0666 /dev/null c 1 3 && touch /etc/ld.so.conf && cp malloc/Makefile malloc/Makefile.backup && -sed 's%\$(PERL)%/usr/bin/perl%' malloc/Makefile.backup > malloc/Makefile && +sed 's%\$(PERL)%/usr/bin/perl%' \ +    malloc/Makefile.backup > malloc/Makefile && cp login/Makefile login/Makefile.backup && sed 's/root/0/' login/Makefile.backup > login/Makefile && mkdir ../glibc-build && cd ../glibc-build && ../glibc-&glibc-version;/configure --prefix=/usr \ -   --enable-add-ons --libexecdir=/usr/bin && +    --enable-add-ons --libexecdir=/usr/bin && echo "cross-compiling = no" > configparms && make && make install && diff --git a/chapter06/groff-inst.xml b/chapter06/groff-inst.xml index 4d320d42f..bb995fa75 100644 --- a/chapter06/groff-inst.xml +++ b/chapter06/groff-inst.xml @@ -6,10 +6,9 @@ ./configure --prefix=/usr && make && make install && -cd /usr/bin && -ln -s soelim zsoelim && -ln -s eqn geqn && -ln -s tbl gtbl +ln -s soelim /usr/bin/zsoelim && +ln -s eqn /usr/bin/geqn && +ln -s tbl /usr/bin/gtbl diff --git a/chapter06/gzip-inst.xml b/chapter06/gzip-inst.xml index 57fd9a457..7782d1f05 100644 --- a/chapter06/gzip-inst.xml +++ b/chapter06/gzip-inst.xml @@ -8,13 +8,11 @@ cp gzexe.in gzexe.in.backup && sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in && make && make install && -cd /usr/bin && -mv gzip /bin && -rm gunzip zcat && -cd /bin && -ln -sf gzip gunzip && -ln -sf gzip zcat && -ln -sf gunzip uncompress +mv /usr/bin/gzip /bin && +rm /usr/bin/{gunzip,zcat} && +ln -sf gzip /bin/gunzip && +ln -sf gzip /bin/zcat && +ln -sf gunzip /bin/uncompress diff --git a/chapter06/ncurses-exp.xml b/chapter06/ncurses-exp.xml index 95d079dff..f7fb2ef06 100644 --- a/chapter06/ncurses-exp.xml +++ b/chapter06/ncurses-exp.xml @@ -7,7 +7,7 @@ shared ncurses library files. --disable-termcap: Disabled the compilation of termcap fall back support. -cd /lib && mv *.a /usr/lib : This +mv /lib/*.a /usr/lib : This moves all of the static ncurses library files from /lib to /usr/lib. /lib should only contain the shared files which are essential to the system when /usr may not be mounted. diff --git a/chapter06/ncurses-inst.xml b/chapter06/ncurses-inst.xml index 9329fc1dd..26b9cb05c 100644 --- a/chapter06/ncurses-inst.xml +++ b/chapter06/ncurses-inst.xml @@ -4,18 +4,16 @@ Install Ncurses by running the following commands: ./configure --prefix=/usr --libdir=/lib \ -   --with-shared --disable-termcap && +    --with-shared --disable-termcap && make && make install && -cd /lib && -mv *.a /usr/lib && -chmod 755 *.5.2 && -cd /usr/lib && -ln -sf libncurses.a libcurses.a && -ln -sf ../../lib/libncurses.so && -ln -sf ../../lib/libcurses.so && -ln -sf ../../lib/libform.so && -ln -sf ../../lib/libpanel.so && -ln -sf ../../lib/libmenu.so +mv /lib/*.a /usr/lib && +chmod 755 /lib/*.5.2 && +ln -sf libncurses.a /usr/lib/libcurses.a && +ln -sf ../../lib/libncurses.so /usr/lib && +ln -sf ../../lib/libcurses.so /usr/lib && +ln -sf ../../lib/libform.so /usr/lib && +ln -sf ../../lib/libpanel.so /usr/lib && +ln -sf ../../lib/libmenu.so /usr/lib diff --git a/chapter06/netkitbase-inst.xml b/chapter06/netkitbase-inst.xml index e6c5ef440..7729d82d3 100644 --- a/chapter06/netkitbase-inst.xml +++ b/chapter06/netkitbase-inst.xml @@ -6,8 +6,7 @@ ./configure && make && make install && -cd etc.sample && -cp services protocols /etc +cp etc.sample/{services,protocols} /etc There are other files in the etc.sample directory which might be of diff --git a/chapter06/procps-inst.xml b/chapter06/procps-inst.xml index d5bb0ce68..46d589303 100644 --- a/chapter06/procps-inst.xml +++ b/chapter06/procps-inst.xml @@ -4,7 +4,7 @@ Install Procps by running the following commands: make && -make XSCPT='' install && +make XSCPT="" install && mv /usr/bin/kill /bin diff --git a/chapter06/psmisc-inst.xml b/chapter06/psmisc-inst.xml index e1b07780c..43dc13e58 100644 --- a/chapter06/psmisc-inst.xml +++ b/chapter06/psmisc-inst.xml @@ -3,7 +3,8 @@ Install Psmisc by running the following commands: -./configure --prefix=/usr --exec-prefix=/ && +./configure --prefix=/usr \ +    --exec-prefix=/ && make && make install @@ -23,8 +24,7 @@ should remove Psmisc's pidof man page by running: package's installation by creating the /bin/pidof symlink by running: -cd /bin -ln -s killall pidof +ln -s killall /bin/pidof diff --git a/chapter06/shadowpwd-inst.xml b/chapter06/shadowpwd-inst.xml index e8a492b30..7f0a448c5 100644 --- a/chapter06/shadowpwd-inst.xml +++ b/chapter06/shadowpwd-inst.xml @@ -12,17 +12,14 @@ following commands: ./configure --prefix=/usr --enable-shared && make && make install && -cd etc && -cp limits login.access /etc && -sed 's%/var/spool/mail%/var/mail%' login.defs.linux > /etc/login.defs && -cd /usr/sbin && -ln -sf vipw vigr && +cp etc/{limits,login.access} /etc && +sed 's%/var/spool/mail%/var/mail%' \ +    etc/login.defs.linux > /etc/login.defs && +ln -sf vipw /usr/bin/vigr && rm /bin/vipw && mv /bin/sg /usr/bin && -cd /lib && -mv libmisc.*a libshadow.*a /usr/lib && -cd /usr/lib && -ln -s ../../lib/libshadow.so +mv /lib/{libmisc.*a,libshadow.*a} /usr/lib && +ln -s ../../lib/libshadow.so /usr/lib diff --git a/chapter06/shellutils-inst.xml b/chapter06/shellutils-inst.xml index 40fa49415..3e12be173 100644 --- a/chapter06/shellutils-inst.xml +++ b/chapter06/shellutils-inst.xml @@ -6,10 +6,9 @@ ./configure --prefix=/usr && make && make install && -cd /usr/bin && -mv basename date echo false hostname /bin && -mv pwd sleep stty su test true uname /bin && -mv chroot ../sbin +mv /usr/bin/{basename,date,echo,false,hostname} /bin && +mv /usr/bin/{pwd,sleep,stty,su,test,true,uname} /bin && +mv /usr/bin/chroot /usr/sbin @@ -23,8 +22,7 @@ are built into the bash interpreter, but the FHS dictates that there should be a [ binary. We create that in this way, while still in the /bin directory: -cd /bin && -ln -sf test [ +ln -sf test /bin/[ diff --git a/chapter06/sysvinit-inst.xml b/chapter06/sysvinit-inst.xml index 11e52b066..c2f274a0f 100644 --- a/chapter06/sysvinit-inst.xml +++ b/chapter06/sysvinit-inst.xml @@ -13,7 +13,7 @@ following commands. If you don't want to change it, skip it. cp src/init.c src/init.c.backup && sed 's/\(.*\)\(Sending processes\)\(.*\)/\1\2 started by init\3/' \ -   src/init.c.backup > src/init.c +    src/init.c.backup > src/init.c Install Sysvinit by running the following commands: diff --git a/chapter06/tar-inst.xml b/chapter06/tar-inst.xml index 39746b74d..8b1282488 100644 --- a/chapter06/tar-inst.xml +++ b/chapter06/tar-inst.xml @@ -14,8 +14,8 @@ for gzip files). Install Tar by running the following commands from the toplevel directory: -./configure --prefix=/usr --libexecdir=/usr/bin \ -   --bindir=/bin && +./configure --prefix=/usr \ +    --libexecdir=/usr/bin --bindir=/bin && make && make install diff --git a/chapter06/textutils-inst.xml b/chapter06/textutils-inst.xml index 2b62f220a..d9e78da0f 100644 --- a/chapter06/textutils-inst.xml +++ b/chapter06/textutils-inst.xml @@ -6,7 +6,7 @@ ./configure --prefix=/usr && make && make install && -mv /usr/bin/cat /usr/bin/head /bin +mv /usr/bin/{cat,head} /bin diff --git a/chapter06/utillinux-inst.xml b/chapter06/utillinux-inst.xml index eb561b913..cbf7d9e8f 100644 --- a/chapter06/utillinux-inst.xml +++ b/chapter06/utillinux-inst.xml @@ -7,7 +7,7 @@ util-linux package, FHS-compliant, run the following. cp hwclock/hwclock.c hwclock/hwclock.c.backup && sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \ -   hwclock/hwclock.c.backup > hwclock/hwclock.c && +    hwclock/hwclock.c.backup > hwclock/hwclock.c && mkdir -p /var/lib/hwclock diff --git a/chapter06/vim-inst.xml b/chapter06/vim-inst.xml index 8bf39c1c3..3b3909050 100644 --- a/chapter06/vim-inst.xml +++ b/chapter06/vim-inst.xml @@ -12,8 +12,7 @@ which are currently available are for Emacs, Joe and nano. ./configure --prefix=/usr && make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\" && make install && -cd /usr/bin && -ln -sf vim vi +ln -sf vim /usr/bin/vi If you plan on installing the X Window system on your LFS system, you might want to re-compile Vim after you have installed X. Vim @@ -34,8 +33,7 @@ instead of the one presented above: ./configure --prefix=/usr --localstatedir=/var/lib/vim && make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\" && make install && -cd /usr/bin && -ln -sf vim vi +ln -sf vim /usr/bin/vi -- cgit v1.2.3-54-g00ecf