From 6e507556d6130fdc77ce5f4e8ad5cdcf5bfd94f5 Mon Sep 17 00:00:00 2001 From: Timothy Bauscher Date: Sun, 11 May 2003 15:09:30 +0000 Subject: [PATCH] Applied Zack's patches. Untested at the moment, will do a build in a few minutes. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2555 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 36 ++++++++++++++++++++++++++++++++++++ chapter04/bash-patch.xml | 3 +++ chapter04/packages.xml | 3 ++- chapter04/zlib-patch.xml | 3 +++ chapter05/bash-inst.xml | 6 ++++++ chapter06/automake-inst.xml | 6 +++++- chapter06/bash-inst.xml | 6 ++++++ chapter06/chapter06.xml | 1 - chapter06/config-glibc.xml | 4 ++-- chapter06/configure.xml | 1 - chapter06/e2fsprogs-inst.xml | 5 ----- chapter06/make-inst.xml | 10 ---------- chapter06/shadowpwd-inst.xml | 12 ++++++++++++ chapter06/vim-inst.xml | 5 ----- chapter06/zlib-inst.xml | 6 ++++++ entities/bash.ent | 5 ++++- entities/chapter06.ent | 2 -- entities/vim.ent | 3 --- entities/zlib.ent | 3 +++ 19 files changed, 88 insertions(+), 32 deletions(-) create mode 100644 chapter04/bash-patch.xml create mode 100644 chapter04/zlib-patch.xml diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 0c1833bc7..01e3f1dae 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -9,6 +9,7 @@ Upgraded to: automake-1.7.4 +bash-2.05b e2fsprogs-1.33 file-4.02 gawk-3.1.2 @@ -35,6 +36,7 @@ Added: +bash-2.05b.patch binutils-2.13.2-libc.patch coreutils-5.0 dejagnu-1.4.3 @@ -49,6 +51,7 @@ ncurses-5.3-etip.patch perl-5.8.0-libc.patch tcl-8.4.2 +zlib-1.1.4-vsnprintf.patch @@ -63,6 +66,39 @@ +May 11th, 2003 [winkie]: Upgraded to Bash 2.05b and +added its patch + +May 11th, 2003 [winkie]: Chapter 06 - Installing Zlib: +Apply a patch to fix the buffer overflow in gzprintf(). + +May 11th, 2003 [winkie]: Chapter 06 - Configuring system +compoents: Moved the creation of the btmp, wtmp, lastlog, and utmp to +just before Shadow, so that they are detected at their proper locations. + +May 10th, 2003 [winkie]: Chapter 06 - Installing Automake: +Run "make" before installing. This is needed now with the newer releases +of Automake. + +May 10th, 2003 [winkie]: Chapter 06 - Installing Vim: +Removed the patch. It hasn't been required since GCC 3.2.1. + +May 10th, 2003 [winkie]: Chapter 06 - Creating the mtab +file: Removed. Mounting /proc has the side effect of creating /etc/mtab +for us. + +May 10th, 2003 [winkie]: Chapter 06 - Installing Make: +Removed modification of /usr/bin/make file. It is no longer mistakenly +installed with strange ownership or permissions. + +May 10th, 2003 [winkie]: Chapter 06 - Installing Glibc: +Made /etc/localtime a file instead of a symlink. The symlink method breaks +on systems where /usr is a separate partition. + +May 10th, 2003 [winkie]: Chapter 06 - Installing E2fsprogs: +Removed install-info commands for e2fsprogs. The "make install" target +handles this for us. + May 10th, 2003 [gerard]: Removed all CFLAGS and LDFLAGS variables where they are not essential (so, not including static binutils, gcc and compiling zlib with -fPIC). diff --git a/chapter04/bash-patch.xml b/chapter04/bash-patch.xml new file mode 100644 index 000000000..16771762a --- /dev/null +++ b/chapter04/bash-patch.xml @@ -0,0 +1,3 @@ +Bash Patch (&bash-patch-version;) - &bash-patch-size;: + + diff --git a/chapter04/packages.xml b/chapter04/packages.xml index 370a021ff..b42df1961 100644 --- a/chapter04/packages.xml +++ b/chapter04/packages.xml @@ -8,6 +8,7 @@ &c4-autoconf; &c4-automake; &c4-bash; +&c4-bash-patch; &c4-bin86; &c4-binutils; &c4-bison; @@ -69,8 +70,8 @@ &c4-texinfo; &c4-utillinux; &c4-vim; -&c4-vim-patch; &c4-zlib; +&c4-zlib-patch; Total size of all packages: &all-size-kb; (&all-size-mb;) diff --git a/chapter04/zlib-patch.xml b/chapter04/zlib-patch.xml new file mode 100644 index 000000000..e414e0822 --- /dev/null +++ b/chapter04/zlib-patch.xml @@ -0,0 +1,3 @@ +Zlib Patch (&zlib-patch-version;) - &zlib-patch-size;: + + diff --git a/chapter05/bash-inst.xml b/chapter05/bash-inst.xml index 7a0d7da55..cc09f03f9 100644 --- a/chapter05/bash-inst.xml +++ b/chapter05/bash-inst.xml @@ -3,6 +3,12 @@ Installation of Bash +Bash has a number of bugs in it that cause it to not behave the +way it is expected at times. Fix this behaviour with the following +patch: + +patch -Np1 -i ../bash-&bash-patch-version;.patch + ./configure --prefix=/stage1 \     --with-curses --without-bash-malloc make diff --git a/chapter06/automake-inst.xml b/chapter06/automake-inst.xml index eca0bf9f6..4214b6648 100644 --- a/chapter06/automake-inst.xml +++ b/chapter06/automake-inst.xml @@ -7,7 +7,11 @@ ./configure --prefix=/usr -Continue with compiling and installing the package: +Continue with compiling the package: + +make + +And finish off installing the package: make install diff --git a/chapter06/bash-inst.xml b/chapter06/bash-inst.xml index ea23cf607..19a54c714 100644 --- a/chapter06/bash-inst.xml +++ b/chapter06/bash-inst.xml @@ -3,6 +3,12 @@ Installation of Bash +Bash has a number of bugs in it that cause it to not behave the +way it is expected at times. Fix this behaviour with the following +patch: + +patch -Np1 -i ../bash-&bash-patch-version;.patch + Prepare Bash to be compiled: ./configure --prefix=/usr --bindir=/bin diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index b92e9a9de..1a3ad15f8 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -8,7 +8,6 @@ &c6-changingowner; &c6-creatingdirs; &c6-mountproc; -&c6-mtablink; &c6-createfiles; &c6-pwdgroup; &c6-makedev; diff --git a/chapter06/config-glibc.xml b/chapter06/config-glibc.xml index 8c22d847d..5215c9636 100644 --- a/chapter06/config-glibc.xml +++ b/chapter06/config-glibc.xml @@ -39,9 +39,9 @@ netgroup: db files When you've answered a few questions about your location, the script will output the name of your timezone, something like EST5EDT or Canada/Eastern. Then create the -/etc/localtime symlink by running: +/etc/localtime file by running: -ln -sf ../usr/share/zoneinfo/Canada/Eastern /etc/localtime +cp ../usr/share/zoneinfo/Canada/Eastern /etc/localtime Of course, instead of Canada/Eastern, fill in the name of the timezone that the tzselect script diff --git a/chapter06/configure.xml b/chapter06/configure.xml index 8d891212e..c80f29a3a 100644 --- a/chapter06/configure.xml +++ b/chapter06/configure.xml @@ -6,7 +6,6 @@ a few configuration tasks. &c6-cf-keyboard; -&c6-cf-utmp; &c6-cf-password; diff --git a/chapter06/e2fsprogs-inst.xml b/chapter06/e2fsprogs-inst.xml index fd80fe891..0f4c620f9 100644 --- a/chapter06/e2fsprogs-inst.xml +++ b/chapter06/e2fsprogs-inst.xml @@ -46,11 +46,6 @@ of. make install-libs -Update the /usr/share/info/dir file to -include E2fsprogs' info pages in the index: - -install-info /usr/share/info/libext2fs.info /usr/share/info/dir - diff --git a/chapter06/make-inst.xml b/chapter06/make-inst.xml index 6b22aacbd..b71919d79 100644 --- a/chapter06/make-inst.xml +++ b/chapter06/make-inst.xml @@ -15,15 +15,5 @@ make install -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 make -ignoring certain variables like LD_LIBRARY_PATH. - -chgrp root /usr/bin/make && -chmod 755 /usr/bin/make - diff --git a/chapter06/shadowpwd-inst.xml b/chapter06/shadowpwd-inst.xml index 2cd239541..0d8f8e245 100644 --- a/chapter06/shadowpwd-inst.xml +++ b/chapter06/shadowpwd-inst.xml @@ -9,6 +9,18 @@ regarding passwords, such as how to enable the more secure MD5 passwords and how to get the most out of this Shadow package. The Shadow hint can be found at . +Programs like login, shutdown, uptime, and others want to read +from and to the /var/run/utmp, /var/log/btmp and /var/log/wtmp. These +files contain information about who is currently logged in. They also +contain information about when the conmputer was last booted and +shutdown and a record of bas login attempts. + +Create these files with their proper permissions by running the +following commands: + +touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} && +chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp) + Prepare Shadow to be compiled: ./configure --prefix=/usr --libdir=/usr/lib \ diff --git a/chapter06/vim-inst.xml b/chapter06/vim-inst.xml index d23c0c009..86c849913 100644 --- a/chapter06/vim-inst.xml +++ b/chapter06/vim-inst.xml @@ -3,11 +3,6 @@ Installation of Vim -This package requires its patch to be applied before you can -install it. This patch fixes a compile problem with GCC-3.2: - -patch -Np1 -i ../vim-&vim-patch-version;.patch - Prepare Vim to be compiled: ./configure --prefix=/usr diff --git a/chapter06/zlib-inst.xml b/chapter06/zlib-inst.xml index 616adb20b..1de4994c3 100644 --- a/chapter06/zlib-inst.xml +++ b/chapter06/zlib-inst.xml @@ -3,6 +3,12 @@ Installation of Zlib +Zlib has a potential buffer overflow in its gzprintf() function, +that, though difficult to take advantage of, should be taken care of. Do +so by applying this patch: + +patch -Np1 -i ../zlib-&zlib-patch-version; + Prepare Zlib to be compiled: CFLAGS="$CFLAGS -fPIC" \ diff --git a/entities/bash.ent b/entities/bash.ent index a32c43982..75117fa08 100644 --- a/entities/bash.ent +++ b/entities/bash.ent @@ -1,4 +1,5 @@ + @@ -12,12 +13,14 @@ - + + + diff --git a/entities/chapter06.ent b/entities/chapter06.ent index fd8c2fc37..2eb3c3941 100644 --- a/entities/chapter06.ent +++ b/entities/chapter06.ent @@ -6,12 +6,10 @@ - - diff --git a/entities/vim.ent b/entities/vim.ent index 9ab3a1d78..d8a60b556 100644 --- a/entities/vim.ent +++ b/entities/vim.ent @@ -1,5 +1,4 @@ - @@ -16,8 +15,6 @@ - - diff --git a/entities/zlib.ent b/entities/zlib.ent index 74e4a9666..58c14c0be 100644 --- a/entities/zlib.ent +++ b/entities/zlib.ent @@ -1,4 +1,5 @@ + @@ -15,6 +16,8 @@ + +