From 02974d8f1b3545815123a71af984aa9dc45d19ae Mon Sep 17 00:00:00 2001 From: Alex Gronenwoud Date: Sun, 14 Mar 2004 21:53:12 +0000 Subject: Re-adding HOME to the chroot command, and a few textual shuffles. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3291 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/chapter06.xml | 29 +++++++++++++++++------------ chapter06/patch.xml | 2 +- 2 files changed, 18 insertions(+), 13 deletions(-) (limited to 'chapter06') diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index da1ae8126..953fb3233 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -129,18 +129,21 @@ the following command to enter the small world that is, at the moment, populated with only the temporary tools: chroot $LFS /tools/bin/env -i \ -    TERM=$TERM PS1='\u:\w\$ ' \ +    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \     PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \     /tools/bin/bash +h -The -i option given to the -env command will clear all variables of the chroot -environment. After that, only the TERM, PS1 and PATH variables are -set again. The TERM=$TERM construct will set the TERM variable inside chroot -to the same value as outside chroot; this variable is needed for programs -like less and vim to operate -properly. If you need other variables present, such as CFLAGS, CXXFLAGS or -HOME, this is a good place to set them. +The -i option passed to the env +command will clear all variables of the chroot environment. After that, only +the HOME, TERM, PS1 and PATH variables are set again. The HOME variable is set +mainly to prevent several small warnings during the configure runs of +Diffutils, Grep and Grub. The TERM variable is set to make programs such as +less and vim, that make use of the +Ncurses package, operate properly -- the TERM=$TERM construct sets the TERM +variable inside chroot to the same value as outside chroot. The main prompt +(PS1) is set to "username:working-dir# " (since the "\$" becomes "#" for root). +If you need other variables present, such as CFLAGS, CXXFLAGS or LDFLAGS, this +is a good place to set them. From this point on there's no need to use the LFS variable anymore, because everything you do will be restricted to the LFS file system -- since @@ -402,7 +405,9 @@ Some host distributions contain a ginstall symbolic link which takes precedence in the Makefile and thus can cause a problem here. The above command takes care of this also. -You can now remove the Binutils source and build directories. +You must now remove the Binutils source and build directories. (This is +important, as you should start the next section with a fresh untarring of the +package.) The next thing to do is to amend our GCC specs file so that it points to the new dynamic linker. Just like earlier on, we use a sed to accomplish @@ -580,7 +585,7 @@ If you're not sure whether you entered chroot with the command given in Then reenter it with: chroot $LFS /tools/bin/env -i \ -    TERM=$TERM PS1='\u:\w\$ ' \ +    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \     PATH=/bin:/usr/bin:/sbin:/usr/sbin \     /tools/bin/bash @@ -610,7 +615,7 @@ destroyed. it, you should use the following modified chroot command: chroot $LFS /usr/bin/env -i \ -    TERM=$TERM PS1='\u:\w\$ ' \ +    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \     PATH=/bin:/usr/bin:/sbin:/usr/sbin \     /bin/bash diff --git a/chapter06/patch.xml b/chapter06/patch.xml index 8a8be965a..8ff7e4c69 100644 --- a/chapter06/patch.xml +++ b/chapter06/patch.xml @@ -15,7 +15,7 @@ Installation of Patch -Prepare Patch for compilation (the preprocessor flag +Prepare Patch for compilation (setting the preprocessor flags to -D_GNU_SOURCE is only needed on PowerPCs, on other machines you can leave it out): -- cgit v1.2.3-54-g00ecf