From 99302877e2420aec4721c0be2416c2749361896f Mon Sep 17 00:00:00 2001 From: Timothy Bauscher Date: Sun, 19 Jan 2003 15:36:47 +0000 Subject: Chapter 6 cleanup after conversions. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2392 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/autoconf-inst.xml | 3 +- chapter06/automake-inst.xml | 8 ++---- chapter06/bash-inst.xml | 3 +- chapter06/bin86-inst.xml | 3 +- chapter06/bzip2-inst.xml | 44 +++++++++++++---------------- chapter06/diffutils-inst.xml | 3 +- chapter06/e2fsprogs-inst.xml | 67 ++++++++++++++++++++++++-------------------- chapter06/ed-inst.xml | 39 ++++++++++---------------- chapter06/file-inst.xml | 4 +-- chapter06/grep-inst.xml | 4 +-- chapter06/gzip-inst.xml | 44 ++++++++++++----------------- chapter06/kbd-inst.xml | 16 ++--------- chapter06/libtool-inst.xml | 19 +------------ chapter06/lilo-inst.xml | 16 +++++------ chapter06/make-inst.xml | 4 +-- chapter06/man-inst.xml | 55 ++++++++++++++++++------------------ chapter06/texinfo-inst.xml | 17 ++++------- index.xml | 4 +-- 18 files changed, 145 insertions(+), 208 deletions(-) diff --git a/chapter06/autoconf-inst.xml b/chapter06/autoconf-inst.xml index e4078e5aa..9a6800680 100644 --- a/chapter06/autoconf-inst.xml +++ b/chapter06/autoconf-inst.xml @@ -4,8 +4,7 @@ Prepare Autoconf to be compiled: - -./configure --prefix=/usr +./configure --prefix=/usr Continue with compiling the package: diff --git a/chapter06/automake-inst.xml b/chapter06/automake-inst.xml index b1535bd02..eca0bf9f6 100644 --- a/chapter06/automake-inst.xml +++ b/chapter06/automake-inst.xml @@ -5,16 +5,14 @@ Prepare Automake to be compiled: - -./configure --prefix=/usr +./configure --prefix=/usr Continue with compiling and installing the package: make install -Create necessary symbolic link: +Create a necessary symbolic link: - -ln -s automake-1.7 /usr/share/automake +ln -s automake-1.7 /usr/share/automake diff --git a/chapter06/bash-inst.xml b/chapter06/bash-inst.xml index 78a8fe0f1..ea23cf607 100644 --- a/chapter06/bash-inst.xml +++ b/chapter06/bash-inst.xml @@ -5,8 +5,7 @@ Prepare Bash to be compiled: - -./configure --prefix=/usr --bindir=/bin +./configure --prefix=/usr --bindir=/bin Continue with compiling the package: diff --git a/chapter06/bin86-inst.xml b/chapter06/bin86-inst.xml index c87102563..5e743aacf 100644 --- a/chapter06/bin86-inst.xml +++ b/chapter06/bin86-inst.xml @@ -20,8 +20,7 @@ you decide to skip this. And finish off installing the package: - -make PREFIX=/usr install +make PREFIX=/usr install diff --git a/chapter06/bzip2-inst.xml b/chapter06/bzip2-inst.xml index 4ff56528b..5547ffaae 100644 --- a/chapter06/bzip2-inst.xml +++ b/chapter06/bzip2-inst.xml @@ -3,38 +3,34 @@ Installation of Bzip2 -Compile the package: - -make -f Makefile-libbz2_so && -make - +Begin compiling the package: -And finish off installing the package: +make -f Makefile-libbz2_so - -make install +The -f flag will cause bzip2 to be built +using a different Makefile file, in this case the +Makefile-libbz2_so file, which creates a dynamic +libbz2.so library and links the bzip2 utilities +against it. -Copy the Bzip2 binary into the /bin directory, make some - neccessary symbolic links and clean up. +Continue compiling the package: - -cp bzip2-shared /bin/bzip2 && +make + +Install the package: + +make install + +Copy the Bzip2 binary into the /bin directory, make some +neccessary symbolic links and clean up. + +cp bzip2-shared /bin/bzip2 && cp -a libbz2.so* /lib && ln -s ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so && rm /usr/bin/{bunzip2,bzcat,bzip2} && mv /usr/bin/{bzip2recover,bzless,bzmore} /bin && ln -s bzip2 /bin/bunzip2 && -ln -s bzip2 /bin/bzcat - - - - - -Command explanations - -make -f Makefile-libbz2_so: This will cause bzip2 -to be built using a different Makefile file, in this case the -Makefile-libbz2_so file, which creates a dynamic libbz2.so library and -links the bzip2 utilities against it. +ln -s bzip2 /bin/bzcat diff --git a/chapter06/diffutils-inst.xml b/chapter06/diffutils-inst.xml index c221e911c..c845b456a 100644 --- a/chapter06/diffutils-inst.xml +++ b/chapter06/diffutils-inst.xml @@ -5,8 +5,7 @@ Prepare Diffutils to be compiled: - -./configure --prefix=/usr +./configure --prefix=/usr Continue with compiling the package: diff --git a/chapter06/e2fsprogs-inst.xml b/chapter06/e2fsprogs-inst.xml index 2f42e27e7..88abd266e 100644 --- a/chapter06/e2fsprogs-inst.xml +++ b/chapter06/e2fsprogs-inst.xml @@ -3,49 +3,54 @@ Installation of E2fsprogs +It is recommended to build E2fsprogs outside of the +source tree. Create the build directory: + +mkdir ../e2fsprogs-build && +cd ../e2fsprogs-build + Prepare E2fsprogs to be compiled: - -mkdir ../e2fsprogs-build && -cd ../e2fsprogs-build && -../e2fsprogs-&e2fsprogs-version;/configure --prefix=/usr --with-root-prefix="" \ -    --enable-elf-shlibs - +../e2fsprogs-&e2fsprogs-version;/configure --prefix=/usr --with-root-prefix="" \ +    --enable-elf-shlibs -Continue with compiling the package: +The meaning of the configure options are: -make + -And finish off installing the package: +--with-root-prefix="": This option +is used because of the e2fsprogs Makefile. Some programs are essential for +system use when, for example, /usr +isn't mounted (like the e2fsck program). These programs and libraries, +therefore, belong in directories like /lib and /sbin. If this option isn't passed to +E2fsprogs's configure, the programs are placed in the /usr directory, which is not what we +want. - -make install && -make install-libs && -install-info /usr/share/info/libext2fs.info /usr/share/info/dir - +--enable-elf-shlibs: This creates +the shared libraries which some programs in this package make use +of. - + - -Command explanations +Continue with compiling the package: + +make + +Begin installing the package: + +make install ---with-root-prefix="": The -reason for supplying this option is because of the setup of the -e2fsprogs Makefile. Some programs are essential for system use when, -for example, /usr isn't mounted (like the e2fsck program). These -programs and libraries, therefore, belong in directories like /lib and -/sbin. If this option isn't passed to E2fsprogs's configure, it places -these programs in /usr, which is not what we want. +Install the shared libraries: ---enable-elf-shlibs: This creates shared -libraries that some programs in this package can make use of. +make install-libs -make install-libs: This installs the shared -libraries that are built. +Update the /usr/share/info/dir file to +include E2fsprogs' info pages in the index: -install-info...: This updates the -/usr/share/info/dir file to include this package's -info pages to the index. +install-info /usr/share/info/libext2fs.info /usr/share/info/dir diff --git a/chapter06/ed-inst.xml b/chapter06/ed-inst.xml index ad41da7d7..093273360 100644 --- a/chapter06/ed-inst.xml +++ b/chapter06/ed-inst.xml @@ -9,16 +9,20 @@ file. This happens rarely because diff-based patches are preferred these days. This package requires its patch to be applied before you can -install it. +install it. This patch fixes a symlink vulnerability in +ed. The ed executable +creates files in /tmp with +predictable names. By using various symlink attacks, it is possible +to have ed write to files it should not, change the permissions of +files, etc. - -patch -Np1 -i ../ed-&ed-patch-version;.patch - +Apply the patch: + +patch -Np1 -i ../ed-&ed-patch-version;.patch Prepare Ed to be compiled: - -./configure --prefix=/usr +./configure --prefix=/usr Continue with compiling the package: @@ -28,25 +32,12 @@ patch -Np1 -i ../ed-&ed-patch-version;.patch make install -Move the Ed binaries to the root partition. - -mv /usr/bin/{ed,red} /bin - - - - - -Command explanations - -patch -Np1 -i ../ed-&ed-version;.patch: This -patch fixes a symlink vulnerability in ed. The ed executable creates files -in /tmp with predictable names. By using various symlink attacks, it is -possible to have ed write to files it should not, change the permissions -of files, etc. +We need to move the Ed binaries to the /bin directory so they may be used in +the event that the /usr +partition is unavailable. -mv /usr/bin/{ed,red} /bin: -The Ed binaries are moved to the /bin directory so they may be used in -the event that the /usr partition is unavailable. +mv /usr/bin/{ed,red} /bin diff --git a/chapter06/file-inst.xml b/chapter06/file-inst.xml index a8e9fea6e..8ca1abd9f 100644 --- a/chapter06/file-inst.xml +++ b/chapter06/file-inst.xml @@ -5,9 +5,7 @@ Prepare File to be compiled: - -./configure --prefix=/usr --datadir=/usr/share/misc - +./configure --prefix=/usr --datadir=/usr/share/misc Continue with compiling the package: diff --git a/chapter06/grep-inst.xml b/chapter06/grep-inst.xml index 57cfdf976..ada7a6b18 100644 --- a/chapter06/grep-inst.xml +++ b/chapter06/grep-inst.xml @@ -5,9 +5,7 @@ Prepare Grep to be compiled: - -./configure --prefix=/usr --bindir=/bin - +./configure --prefix=/usr --bindir=/bin Continue with compiling the package: diff --git a/chapter06/gzip-inst.xml b/chapter06/gzip-inst.xml index 06b9441f9..28d387f77 100644 --- a/chapter06/gzip-inst.xml +++ b/chapter06/gzip-inst.xml @@ -3,46 +3,38 @@ Installation of Gzip +A buffer overflow may occur if gzip +encounters a filename over 1020 characters in length. Apply the +patch to fix this problem: + +patch -Np1 -i ../gzip-&gzip-patch-version;.patch + Prepare Gzip to be compiled: - -patch -Np1 -i ../gzip-&gzip-patch-version;.patch && -./configure --prefix=/usr && -cp gzexe.in{,.backup} && -sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in - +./configure --prefix=/usr + +Change the default installation directory for Gzip so it will +be installed in the /bin +directory: + +cp gzexe.in{,.backup} && +sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in Continue with compiling the package: make -And finish off installing the package: +Install the package: make install -Move the Gzip binaries to the root partition: +Move the Gzip binaries to the /bin directory: - -mv /usr/bin/gzip /bin && +mv /usr/bin/gzip /bin && rm /usr/bin/{gunzip,zcat} && ln -s gzip /bin/gunzip && ln -s gzip /bin/zcat && ln -s gunzip /bin/uncompress - - - -Command explanations - -patch -Np1 -i ../gzip-1.2.4b.patch: -This patch fixes a buffer overflow that occurs when a filename is -longer than 1020 characters. - - -cp gzexe.in{,.backup} && -sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in -Change the default installation directory for Gzip so it will be -installed on the root partition. - - diff --git a/chapter06/kbd-inst.xml b/chapter06/kbd-inst.xml index bdf52b636..29958f1e9 100644 --- a/chapter06/kbd-inst.xml +++ b/chapter06/kbd-inst.xml @@ -5,16 +5,13 @@ Kbd doesn't install some of its utilities (setlogcons, setvesablank and getunimap) by default. The kbd patch enables the compilation of these -utilities. - -Apply the patch by running the following command: +utilities. Apply the patch: patch -Np1 -i ../kbd-&kbd-patch-version;.patch Prepare Kbd to be compiled: - -./configure +./configure Continue with compiling the package: @@ -26,12 +23,3 @@ utilities. - -Command explanations - -patch -Np1 -i ../kbd-&kbd-patch-version;.patch: -This patch changes a Makefile so some utilities that are not installed by -default (setlogcons, setvesablank and getunimap) are installed. - - - diff --git a/chapter06/libtool-inst.xml b/chapter06/libtool-inst.xml index ec3476566..8cd0e499c 100644 --- a/chapter06/libtool-inst.xml +++ b/chapter06/libtool-inst.xml @@ -3,17 +3,9 @@ Installation of Libtool -This package requires its patch to be applied before you can - install it. Issue the following command to apply the patch: - - -patch -Np1 -i ../libtool-&libtool-patch-version;.patch && - - Prepare Libtool to be compiled: - -./configure --prefix=/usr +./configure --prefix=/usr Continue with compiling the package: @@ -24,12 +16,3 @@ patch -Np1 -i ../libtool-&libtool-patch-version;.patch && make install - - -Command explanations - -patch -Np1 -i ../libtool-&libtool-patch-version;.patch: -This patch fixes an incompatibility between Autoconf 2.53 and Libtool 1.4.x. -Specifically, the deprecated m4 macro AC_PROVIDE_AC_LIBTOOL is replaced by -AC_PROVIDE_ELSEIF. - diff --git a/chapter06/lilo-inst.xml b/chapter06/lilo-inst.xml index 60f87bc9c..445e877b4 100644 --- a/chapter06/lilo-inst.xml +++ b/chapter06/lilo-inst.xml @@ -16,14 +16,14 @@ GRUB, which is available at . make install It appears that compilation of this package fails on certain machines -when the -g compiler flag is used. If you can't compile Lilo at -all, you should try to remove the -g value from the CFLAGS variable in the -Makefile file. - -At the end of the installation the make install process will print a -message stating that /sbin/lilo has to be executed to complete the -update. Don't do this, as it has no use: the /etc/lilo.conf isn't present -yet. We will complete the installation of lilo in Chapter 8. +when the -g compiler flag is used. If you can't compile +Lilo at all, you should try to remove the -g value from +the CFLAGS variable in the Makefile file. + +At the end of the installation, a message will appear stating that +/sbin/lilo has to be executed. This is pointless because +the /etc/lilo.conf file isn't present yet. We will +complete the installation of lilo in Chapter 8. The standard LILO prompt, or menu, may be replaced by the LFS logo or any logo you like. Martin Imobersteg has written a diff --git a/chapter06/make-inst.xml b/chapter06/make-inst.xml index f80096f4d..6b22aacbd 100644 --- a/chapter06/make-inst.xml +++ b/chapter06/make-inst.xml @@ -15,11 +15,11 @@ make install -By default /usr/bin/make is installed setgid +By default, /usr/bin/make is installed setgid kmem. This is needed on some systems so it can check the load average by using /dev/kmem. However, on Linux systems, setgid kmem is not needed, so we remove this from our make -binary. This also fixes problems with the make +binary. This also fixes problems with make ignoring certain variables like LD_LIBRARY_PATH. chgrp root /usr/bin/make && diff --git a/chapter06/man-inst.xml b/chapter06/man-inst.xml index 4a639b329..6b9455681 100644 --- a/chapter06/man-inst.xml +++ b/chapter06/man-inst.xml @@ -3,17 +3,37 @@ Installation of Man +There are three patches for Man. The first patch comments out one of the +lines in the man.conf file (MANPATH /usr/man) to +prevent redundant results when using programs such as +whatis: +patch -Np1 -i ../man-&man-manpath-patch-version;-manpath.patch + +The second patch adds the -R option to the +PAGER variable so that escape sequences are +handled properly: + +patch -Np1 -i ../man-&man-pager-patch-version;-pager.patch + +The last patch prevents problem when man pages not formatted +with more than 80 columns are used in conjunction with recent releases +of groff: + +patch -Np1 -i ../man-&man-80cols-patch-version;-80cols.patch + +The paths to some programs are written into man's files. +Unfortunately, the configure script picks the last location in PATH +rather than the first place a program is found. By appending +/usr/bin:/bin to PATH for the +./configure command, we ensure that man doesn't +use the programs in the /static +directory. Prepare Man to be compiled: - -patch -Np1 -i ../man-&man-80cols-patch-version;-80cols.patch && -patch -Np1 -i ../man-&man-manpath-patch-version;-manpath.patch && -patch -Np1 -i ../man-&man-pager-patch-version;-pager.patch && -PATH=$PATH:/usr/bin:/bin \ -    ./configure -default -confdir=/etc - +PATH=$PATH:/usr/bin:/bin \ +    ./configure -default -confdir=/etc Continue with compiling the package: @@ -33,24 +53,3 @@ and compression issues for man pages. - -Command explanations - -patch...: -These three patches comment out one of the lines in the -man.conf file (MANPATH /usr/man) because it will create -redundant results when using programs like whatis. -It also adds the -R option to the -PAGER variable so man pages are displayed properly. -Lastly, the patch fixes the problem where man pages are not formatted with -more than 80 columns when used with the recent groff versions. - -PATH=$PATH:/usr/bin:/bin ./configure -default: -The paths to some programs get written into man's files. Unfortunately, the -configure script picks the last location in PATH rather than the first -where a program is found. By appending /usr/bin:/bin to PATH for the -./configure command, we make sure that man doesn't use the /static versions -of our programs. - - - diff --git a/chapter06/texinfo-inst.xml b/chapter06/texinfo-inst.xml index abe723e79..51db2e43a 100644 --- a/chapter06/texinfo-inst.xml +++ b/chapter06/texinfo-inst.xml @@ -5,27 +5,20 @@ Prepare Texinfo to be compiled: - -./configure --prefix=/usr +./configure --prefix=/usr Continue with compiling the package: make -And finish off installing the package: +Install the package: make install - -make TEXMF=/usr/share/texmf install-tex - - -Command explanations +Install the texinfo components which belong in a TeX +installation: -make TEXMF=/usr/share/texmf install-tex: -This installs the texinfo components that belong in a TeX -installation. Although TeX isn't installed on LFS, it's installed here -to complete the texinfo installation. +make TEXMF=/usr/share/texmf install-tex diff --git a/index.xml b/index.xml index b1ac1aceb..6057de2f3 100644 --- a/index.xml +++ b/index.xml @@ -4,8 +4,8 @@ - - + + -- cgit v1.2.3-54-g00ecf