diff options
-rw-r--r-- | chapter01/changelog.xml | 16 | ||||
-rw-r--r-- | chapter04/ed-patch.xml | 3 | ||||
-rw-r--r-- | chapter04/fileutils-patch.xml | 3 | ||||
-rw-r--r-- | chapter04/gawk-patch.xml | 3 | ||||
-rw-r--r-- | chapter04/glibc-patch.xml | 3 | ||||
-rw-r--r-- | chapter04/packages.xml | 4 | ||||
-rw-r--r-- | chapter05/fileutils-exp.xml | 12 | ||||
-rw-r--r-- | chapter05/fileutils-inst.xml | 29 | ||||
-rw-r--r-- | chapter06/ed-exp.xml | 9 | ||||
-rw-r--r-- | chapter06/ed-inst.xml | 10 | ||||
-rw-r--r-- | chapter06/gawk-inst.xml | 11 | ||||
-rw-r--r-- | chapter06/gawk.xml | 1 | ||||
-rw-r--r-- | chapter06/glibc-exp.xml | 28 | ||||
-rw-r--r-- | chapter06/glibc-inst.xml | 12 | ||||
-rw-r--r-- | chapter06/ncurses-inst.xml | 4 | ||||
-rw-r--r-- | chapter06/perl-inst.xml | 4 | ||||
-rw-r--r-- | chapter06/vim-inst.xml | 4 | ||||
-rw-r--r-- | entities/ed.ent | 2 | ||||
-rw-r--r-- | entities/fileutils.ent | 2 | ||||
-rw-r--r-- | entities/gawk.ent | 3 | ||||
-rw-r--r-- | entities/glibc.ent | 2 | ||||
-rw-r--r-- | index.xml | 10 |
22 files changed, 112 insertions, 63 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 99e1d774b..75407b2c8 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -27,6 +27,10 @@ <listitem><para>Added: <itemizedlist> +<listitem><para>ed-0.2.patch</para></listitem> +<listitem><para>fileutils-4.1.patch</para></listitem> +<listitem><para>gawk-3.1.1.patch</para></listitem> +<listitem><para>glibc-2.2.5.patch</para></listitem> <listitem><para>ncurses-5.2.patch</para></listitem> <listitem><para>perl-5.6.1.patch</para></listitem> <listitem><para>vim-6.1.patch</para></listitem> @@ -40,6 +44,18 @@ </itemizedlist> </para></listitem> +<listitem><para>May 30th, 2002 [gerard]: Chapter 06 - Glibc: Replaced the +various sed fixes with a regular patch.</para></listitem> + +<listitem><para>May 30th, 2002 [gerard]: Chapter 06 - Gawk: Replaced the +sed fix with a regular patch.</para></listitem> + +<listitem><para>May 30th, 2002 [gerard]: Chapter 05 - Fileutils: Replaced +the sed fix with a regular patch.</para></listitem> + +<listitem><para>May 30th, 2002 [gerard]: Chapter 06 - Ed: Replaced the +sed fix with a regular patch.</para></listitem> + <listitem><para>May 28th, 2002 [gerard]: Chapter 06 - Changing ownership: removed the explicit command to chown <filename class="directory">/lost+found</filename>. This is done by the first command diff --git a/chapter04/ed-patch.xml b/chapter04/ed-patch.xml new file mode 100644 index 000000000..dee89bece --- /dev/null +++ b/chapter04/ed-patch.xml @@ -0,0 +1,3 @@ +Ed Patch (&ed-version;) - &ed-patch-size;: +<ulink url="&ftp;/ed-&ed-version;.patch.bz2"/> +<ulink url="&http;/ed-&ed-version;.patch.bz2"/> diff --git a/chapter04/fileutils-patch.xml b/chapter04/fileutils-patch.xml new file mode 100644 index 000000000..5daeaa4a7 --- /dev/null +++ b/chapter04/fileutils-patch.xml @@ -0,0 +1,3 @@ +Fileutils Patch (&fileutils-version;) - &fileutils-patch-size;: +<ulink url="&ftp;/fileutils-&fileutils-version;.patch.bz2"/> +<ulink url="&http;/fileutils-&fileutils-version;.patch.bz2"/> diff --git a/chapter04/gawk-patch.xml b/chapter04/gawk-patch.xml new file mode 100644 index 000000000..ad1ed2ada --- /dev/null +++ b/chapter04/gawk-patch.xml @@ -0,0 +1,3 @@ +Gawk Patch (&gawk-version;) - &gawk-patch-size;: +<ulink url="&ftp;/gawk-&gawk-version;.patch.bz2"/> +<ulink url="&http;/gawk-&gawk-version;.patch.bz2"/> diff --git a/chapter04/glibc-patch.xml b/chapter04/glibc-patch.xml new file mode 100644 index 000000000..5ce5d649b --- /dev/null +++ b/chapter04/glibc-patch.xml @@ -0,0 +1,3 @@ +Glibc Patch (&glibc-version;) - &glibc-patch-size;: +<ulink url="&ftp;/glibc-&glibc-version;.patch.bz2"/> +<ulink url="&http;/glibc-&glibc-version;.patch.bz2"/> diff --git a/chapter04/packages.xml b/chapter04/packages.xml index 6a761c084..43c3f2532 100644 --- a/chapter04/packages.xml +++ b/chapter04/packages.xml @@ -10,6 +10,7 @@ &c3-bzip2; &c3-diffutils; &c3-fileutils; +&c3-fileutils-patch; &c3-gcc; &c3-kernel; &c3-grep; @@ -21,13 +22,16 @@ &c3-tar-patch; &c3-textutils; &c3-gawk; +&c3-gawk-patch; &c3-texinfo; &c3-patch; &c3-makedev; &c3-glibc; &c3-glibc-threads; +&c3-glibc-patch; &c3-manpages; &c3-ed; +&c3-ed-patch; &c3-findutils; &c3-findutils-patch; &c3-ncurses; diff --git a/chapter05/fileutils-exp.xml b/chapter05/fileutils-exp.xml index 99bc82a1e..2accc77ed 100644 --- a/chapter05/fileutils-exp.xml +++ b/chapter05/fileutils-exp.xml @@ -5,14 +5,10 @@ run this command in order to keep a backup of the file we are about to change.</para> -<para><userinput>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:</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 -in chapter 6.</para> +<para><userinput>patch -Np1 -i ../fileutils-&fileutils-version;.patch:</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 in chapter 6.</para> </sect2> diff --git a/chapter05/fileutils-inst.xml b/chapter05/fileutils-inst.xml index adfff9733..ee0cbfc5d 100644 --- a/chapter05/fileutils-inst.xml +++ b/chapter05/fileutils-inst.xml @@ -1,30 +1,31 @@ <sect2> <title>Installation of Fileutils</title> +<para>This package requires its patch to be applied before you can +install it. Make sure it's unpacked before running the installation +commands.</para> + <para>The programs from a statically linked Fileutils package may cause segmentation faults on certain systems, if your distribution has Glibc-2.2.3 or higher installed. It seems to happen mostly on machines powered by an AMD CPU, but there is a case or two where an Intel system -is affected as well. If your system falls in this category, try the -following fix.</para> +is affected as well. If your system falls in this category, apply the +patch.</para> -<para>Note that in some cases using these sed commands will result in -not being able to compile this package at all, even when your -system has an AMD CPU and has Glibc-2.2.3 (or higher) installed. If that's -the case, you'll need to remove the fileutils-&fileutils-version; directory -and unpack it again from the tarball before continuing. We believe this -may be the case when your distribution has altered Glibc-2.2.3 somehow, -but details are unavailable at the time.</para> +<para>Note that in some cases using this patch will result in not being +able to compile this package at all, even when your system has an AMD CPU +and has Glibc-2.2.3 (or higher) installed. If that's the case, you'll need +to remove the fileutils-&fileutils-version; directory and unpack it again +from the tarball before continuing. We believe this may be the case when +your distribution has altered Glibc-2.2.3 somehow, but details are +unavailable at the time.</para> <para>To fix this package to compile properly on AMD/Glibc-2.2.3 -machines, run the following commands. Do <emphasis>not</emphasis> +machines, run the following command. Do <emphasis>not</emphasis> attempt this fix if you don't have Glibc-2.2.3 installed. It will more than likely result in all kinds of compile time problems.</para> -<para><screen><userinput>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</userinput></screen></para> +<para><screen><userinput>patch -Np1 -i ../fileutils-&fileutils-version;.patch</userinput></screen></para> <para>Install Fileutils by running the following commands:</para> diff --git a/chapter06/ed-exp.xml b/chapter06/ed-exp.xml index 41e4d35e4..a9a2792a3 100644 --- a/chapter06/ed-exp.xml +++ b/chapter06/ed-exp.xml @@ -1,10 +1,11 @@ <sect2> <title>Command explanations</title> -<para>The sed commands fix 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 various files, etc.</para> +<para><userinput>patch -Np1 -i ../ed-&ed-version;.patch:</userinput> 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.</para> </sect2> diff --git a/chapter06/ed-inst.xml b/chapter06/ed-inst.xml index 4fdcf6358..38ca3d528 100644 --- a/chapter06/ed-inst.xml +++ b/chapter06/ed-inst.xml @@ -1,6 +1,10 @@ <sect2> <title>Installation of Ed</title> +<para>This package requires its patch to be applied before you can +install it. Make sure it's unpacked before running the installation +commands.</para> + <para>Ed isn't something you would personally use. It's installed here because it can be used by the patch program if you encounter an ed-based patch file. This happens rarely because diff-based patches are preferred these @@ -8,11 +12,7 @@ days.</para> <para>Install Ed by running the following commands:</para> -<para><screen><userinput>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 && +<para><screen><userinput>patch -Np1 -i ../ed-&ed-version;.patch && ./configure --prefix=/usr && make && make install && diff --git a/chapter06/gawk-inst.xml b/chapter06/gawk-inst.xml index 49555c5cf..f480e1ea4 100644 --- a/chapter06/gawk-inst.xml +++ b/chapter06/gawk-inst.xml @@ -1,8 +1,12 @@ <sect2> <title>Installation of Gawk</title> +<para>This package requires its patch to be applied before you can +install it. Make sure it's unpacked before running the installation +commands.</para> + <para>Warning: do NOT run <userinput>make uninstall</userinput> on this -package if you apply the <emphasis>sed</emphasis> fix to change the +package if you apply the patch to change the <filename class="directory">libexec</filename> directory definition. The <emphasis>uninstall</emphasis> rule in the <filename>Makefile</filename> file runs a command like <userinput>rm -rf @@ -13,10 +17,7 @@ class="directory">/usr/bin</filename> it'll run <userinput>rm -rf <para>Install Gawk by running the following commands:</para> -<para><screen><userinput>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 && +<para><screen><userinput>patch -Np1 -i ../gawk-&gawk-version;.patch && ./configure --prefix=/usr --libexecdir=/usr/bin && make && make install</userinput></screen></para> diff --git a/chapter06/gawk.xml b/chapter06/gawk.xml index 8ac989cb4..e824fc9d2 100644 --- a/chapter06/gawk.xml +++ b/chapter06/gawk.xml @@ -6,6 +6,7 @@ Estimated required disk space: &gawk-compsize;</screen> &c6-gawk-inst; +&c6-gawk-exp; &aa-gawk-desc; &aa-gawk-dep; diff --git a/chapter06/glibc-exp.xml b/chapter06/glibc-exp.xml index bd2bab1d2..6efbae47a 100644 --- a/chapter06/glibc-exp.xml +++ b/chapter06/glibc-exp.xml @@ -1,28 +1,24 @@ <sect2> <title>Command explanations</title> +<para><userinput>patch -Np1 -i ../glibc-&glibc-version;.patch:</userinput> +This patch converts all occurances of <filename>$(PERL)</filename> to +<filename>/usr/bin/perl</filename> in the +<filename>malloc/Makefile</filename> file. This is done because Glibc can't +autodetect the location of perl because perl has yet to be installed. The +patch also replaces all occurances of <emphasis>root</emphasis> with +<emphasis>0</emphasis> in the <filename>login/Makefile</filename> file. +This is done because Glibc itself isn't installed yet and therefore +username to userid resolving isn't working yet, so a <userinput>chown root +file</userinput> will fail, however it'll work fine if you use straight +IDs.</para> + <para><userinput>touch /etc/ld.so.conf:</userinput> One of the final steps of the Glibc installation is running ldconfig to update the dynamic loader cache. If this file doesn't exist, the installation will abort with an error that it can't read the file, so we simply create an empty file (the empty file will have Glibc default to using /lib and /usr/lib which is fine).</para> -<para><userinput>sed 's%\$(PERL)%/usr/bin/perl%' -malloc/Makefile.backup > malloc/Makefile:</userinput> This sed command -searches through <filename>malloc/Makefile.backup</filename> and -converts all occurrences of <filename>$(PERL)</filename> to -<filename>/usr/bin/perl</filename>. The output is then written to the -original <filename>malloc/Makefile.in</filename> which is used during -configuration. This is done because Glibc can't autodetect perl since -it hasn't been installed yet.</para> - -<para><userinput>sed 's/root/0' login/Makefile.backup > -login/Makefile:</userinput> This sed command replaces all occurrences of -<filename>root</filename> in <filename>login/Makefile.backup</filename> -with 0. This is necessary because we don't have glibc on the LFS system yet, so -user names can't be resolved to their user IDs. Therefore, we replace -the user name "root" with user ID 0.</para> - <para><userinput>--enable-add-ons:</userinput> This enables the add-on that we install with Glibc: linuxthreads</para> diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index 63a885916..8f83dcd60 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -1,6 +1,10 @@ <sect2> <title>Installation of Glibc</title> +<para>This package requires its patch to be applied before you can +install it. Make sure it's unpacked before running the installation +commands.</para> + <para>Before starting to install glibc, you must cd into the glibc-&glibc-version; directory and unpack glibc-linuxthreads inside the glibc-&glibc-version; directory, not in /usr/src as you normally @@ -22,12 +26,8 @@ is putting your system at very high risk.</para> <para>Install Glibc by running the following commands:</para> -<para><screen><userinput>touch /etc/ld.so.conf && -cp malloc/Makefile malloc/Makefile.backup && -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 && +<para><screen><userinput>patch -Np1 -i ../glibc-&glibc-version;.patch && +touch /etc/ld.so.conf && mkdir ../glibc-build && cd ../glibc-build && ../glibc-&glibc-version;/configure --prefix=/usr \ diff --git a/chapter06/ncurses-inst.xml b/chapter06/ncurses-inst.xml index 2d532ba72..2b49b3770 100644 --- a/chapter06/ncurses-inst.xml +++ b/chapter06/ncurses-inst.xml @@ -1,6 +1,10 @@ <sect2> <title>Installation of Ncurses</title> +<para>This package requires its patch to be applied before you can +install it. Make sure it's unpacked before running the installation +commands.</para> + <para>Install Ncurses by running the following commands:</para> <para><screen><userinput>patch -Np1 -i ../ncurses-&ncurses-patch-version;.patch && diff --git a/chapter06/perl-inst.xml b/chapter06/perl-inst.xml index 313fcf3fc..c14b4ef0e 100644 --- a/chapter06/perl-inst.xml +++ b/chapter06/perl-inst.xml @@ -1,6 +1,10 @@ <sect2> <title>Installation of Perl</title> +<para>This package requires its patch to be applied before you can +install it. Make sure it's unpacked before running the installation +commands.</para> + <para>Install Perl by running the following commands:</para> <para><screen><userinput>patch -Np1 -i ../perl-&perl-version;.patch && diff --git a/chapter06/vim-inst.xml b/chapter06/vim-inst.xml index 2d722292e..67b86fc58 100644 --- a/chapter06/vim-inst.xml +++ b/chapter06/vim-inst.xml @@ -1,6 +1,10 @@ <sect2> <title>Installation of Vim</title> +<para>This package requires its patch to be applied before you can +install it. Make sure it's unpacked before running the installation +commands.</para> + <para>If you don't like vim to be installed as an editor on your LFS system, you may want to download an alternative and install the editor you prefer. There are a few hints on how to install different editors diff --git a/entities/ed.ent b/entities/ed.ent index e40326335..e10244241 100644 --- a/entities/ed.ent +++ b/entities/ed.ent @@ -1,4 +1,5 @@ <!ENTITY c3-ed SYSTEM "../chapter03/ed.xml"> +<!ENTITY c3-ed-patch SYSTEM "../chapter03/ed-patch.xml"> <!ENTITY c6-ed SYSTEM "../chapter06/ed.xml"> <!ENTITY c6-ed-inst SYSTEM "../chapter06/ed-inst.xml"> @@ -13,6 +14,7 @@ <!ENTITY ed-depversion "0.2"> <!ENTITY ed-contversion "0.2"> <!ENTITY ed-size "158 KB"> +<!ENTITY ed-patch-size "1 KB"> <!ENTITY ed-dir "ed-&ed-version;"> <!ENTITY ed-package "ed-&ed-version;.tar.bz2"> diff --git a/entities/fileutils.ent b/entities/fileutils.ent index 993d063e9..9ff6d1c7e 100644 --- a/entities/fileutils.ent +++ b/entities/fileutils.ent @@ -1,4 +1,5 @@ <!ENTITY c3-fileutils SYSTEM "../chapter03/fileutils.xml"> +<!ENTITY c3-fileutils-patch SYSTEM "../chapter03/fileutils-patch.xml"> <!ENTITY c5-fileutils SYSTEM "../chapter05/fileutils.xml"> <!ENTITY c5-fileutils-inst SYSTEM "../chapter05/fileutils-inst.xml"> @@ -16,6 +17,7 @@ <!ENTITY fileutils-depversion "4.1"> <!ENTITY fileutils-contversion "4.1"> <!ENTITY fileutils-size "1,217 KB"> +<!ENTITY fileutils-patch-size "1 KB"> <!ENTITY fileutils-package "fileutils-&fileutils-version;.tar.bz2"> <!ENTITY fileutils-dir "fileutils-&fileutils-version;"> diff --git a/entities/gawk.ent b/entities/gawk.ent index f97af4ec9..0296f2adf 100644 --- a/entities/gawk.ent +++ b/entities/gawk.ent @@ -1,10 +1,12 @@ <!ENTITY c3-gawk SYSTEM "../chapter03/gawk.xml"> +<!ENTITY c3-gawk-patch SYSTEM "../chapter03/gawk-patch.xml"> <!ENTITY c5-gawk SYSTEM "../chapter05/gawk.xml"> <!ENTITY c5-gawk-inst SYSTEM "../chapter05/gawk-inst.xml"> <!ENTITY c6-gawk SYSTEM "../chapter06/gawk.xml"> <!ENTITY c6-gawk-inst SYSTEM "../chapter06/gawk-inst.xml"> +<!ENTITY c6-gawk-exp SYSTEM "../chapter06/gawk-exp.xml"> <!ENTITY aa-gawk SYSTEM "../appendixa/gawk.xml"> <!ENTITY aa-gawk-desc SYSTEM "../appendixa/gawk-desc.xml"> @@ -15,6 +17,7 @@ <!ENTITY gawk-depversion "3.1.0"> <!ENTITY gawk-contversion "3.1.0"> <!ENTITY gawk-size "1,420 KB"> +<!ENTITY gawk-patch-size "1 KB"> <!ENTITY gawk-dir "gawk-&gawk-version;"> <!ENTITY gawk-package "gawk&gawk-version;.tar.bz2"> diff --git a/entities/glibc.ent b/entities/glibc.ent index 7a9e6c44c..b2243ef16 100644 --- a/entities/glibc.ent +++ b/entities/glibc.ent @@ -1,5 +1,6 @@ <!ENTITY c3-glibc SYSTEM "../chapter03/glibc.xml"> <!ENTITY c3-glibc-threads SYSTEM "../chapter03/glibc-threads.xml"> +<!ENTITY c3-glibc-patch SYSTEM "../chapter03/glibc-patch.xml"> <!ENTITY c6-glibc SYSTEM "../chapter06/glibc.xml"> <!ENTITY c6-glibc-inst SYSTEM "../chapter06/glibc-inst.xml"> @@ -16,6 +17,7 @@ <!ENTITY glibc-contversion "2.2.5"> <!ENTITY glibc-size "12,114 KB"> <!ENTITY glibc-threads-size "164 KB"> +<!ENTITY glibc-patch-size "1 KB"> <!ENTITY glibc-dir "glibc-&glibc-version;"> <!ENTITY glibc-threads-dir "linuxthreads, linuxthreads_db"> <!ENTITY glibc-package "glibc-&glibc-version;.tar.bz2"> @@ -4,8 +4,8 @@ <!ENTITY book SYSTEM "book/book.xml"> -<!ENTITY version "20020529"> -<!ENTITY releasedate "May 29th, 2002"> +<!ENTITY version "20020530"> +<!ENTITY releasedate "May 30th, 2002"> <!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org"> <!ENTITY http-root "http://ftp.linuxfromscratch.org"> @@ -13,9 +13,9 @@ <!ENTITY http "http://ftp.linuxfromscratch.org/lfs-packages/cvs"> <!ENTITY hints-root "http://hints.linuxfromscratch.org/hints/"> -<!ENTITY all-version "cvs-20020527-0509"> -<!ENTITY all-size-kb "97,940 KB"> -<!ENTITY all-size-mb "95.64 MB"> +<!ENTITY all-version "cvs-20020530-0447"> +<!ENTITY all-size-kb "97,950 KB"> +<!ENTITY all-size-mb "95.65 MB"> <!ENTITY % parts SYSTEM "entities/parts.ent"> <!ENTITY % bookinfo SYSTEM "entities/bookinfo.ent"> |