diff options
Diffstat (limited to 'chapter05/setting-environment.xml')
-rw-r--r-- | chapter05/setting-environment.xml | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/chapter05/setting-environment.xml b/chapter05/setting-environment.xml index 45675ea76..20d8f7ea1 100644 --- a/chapter05/setting-environment.xml +++ b/chapter05/setting-environment.xml @@ -1,6 +1,6 @@ <sect1 id="ch05-settingenviron"> <title>Setting up the environment</title> -<?dbhtml filename="settingenviron.html" dir="chapter05"?> +<?dbhtml filename="settingenvironment.html" dir="chapter05"?> <para>While logged in as user <emphasis>lfs</emphasis>, issue the following commands to set up a good work environment:</para> @@ -13,41 +13,41 @@ LC_ALL=POSIX PATH=/stage1/bin:$PATH export LFS LC_ALL PATH EOF -source ~/.bash_profile</userinput></screen></para> -<para><userinput>set +h</userinput> turns off Bash's hash function. Hash -normally is a useful feature where Bash uses a hash table to remember the -full pathnames of executable files to avoid multiple `PATH' searches. -However, we'd like the new tools to become available as soon as they are -installed. By switching off the hash function, our "interactive" commands -(make, patch, sed, cp and so forth) will always use the newest available -during the build process.</para> - -<para>This profile sets the umask to 022, so newly created files and -directories will have the correct permissions. To be more specific, only -the file owner will have write permission to new files and directories. -Other users of the system will be have read permission, and executable -permission to directories. It is advisable to keep this setting throughout -your LFS installation.</para> +source ~/.bash_profile</userinput></screen></para> +<para>The <userinput>set +h</userinput> command turns off +<userinput>bash</userinput>'s hash function. Normally hashing is a useful +feature: <userinput>bash</userinput> uses a hash table to remember the +full pathnames of executable files to avoid searching the PATH time and time +again to find the same executable. However, we'd like the new tools to be +used as soon as they are installed. By switching off the hash function, our +"interactive" commands (<userinput>make</userinput>, +<userinput>patch</userinput>, <userinput>sed</userinput>, +<userinput>cp</userinput> and so forth) will always use +the newest available version during the build process.</para> + +<para>Setting the user file-creation mask to 022 ensures that newly created +files and directories are only writable for their owner, but readable and +executable for anyone.</para> + <para>The LFS variable should of course be set to the mount point you chose.</para> <para>The LC_ALL variable controls the localization of certain programs, making their messages follow the conventions of a specified country. If your host system uses a version of <emphasis>glibc</emphasis> older than 2.2.4, -having LC_ALL set to something other than "C" or "POSIX" during this chapter +having LC_ALL set to something other than "POSIX" or "C" during this chapter may cause trouble if you exit the chroot environment and wish to return later. -By setting LC_ALL to "POSIX" ("C" is an alias for "POSIX") we ensure that +By setting LC_ALL to "POSIX" (or "C", the two are equivalent) we ensure that everything will work as expected in the chroot environment.</para> -<para>LDFLAGS is a variable we set in order to prevent debugging symbols from -being compiled into our static packages. By omitting these symbols during -the linking stage of compilation, we save hard drive space and decrease our -build time.</para> +<para>We prepend <filename>/stage1/bin</filename> to the standard PATH so +that, as we move along through this chapter, the tools we build will get used +during the rest of the building process.</para> -<para>We are now prepared to begin building the temporary tools which will -support us in later chapters.</para> +<para>Now, after sourcing the just-created profile, we're all set to begin +building the temporary tools that will support us in later chapters.</para> </sect1> |