aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/setting-environment.xml
diff options
context:
space:
mode:
authorTimothy Bauscher <timothy@linuxfromscratch.org>2003-01-05 16:19:00 +0000
committerTimothy Bauscher <timothy@linuxfromscratch.org>2003-01-05 16:19:00 +0000
commit5e40325fc2ddf3e60af6d47cb434e26099aebce6 (patch)
tree22135e55be865d0809f7be116369b7d1b52cca50 /chapter05/setting-environment.xml
parent2ae2d484bd3ccf46810df229c7986b1f5581ccbb (diff)
Applied a modified version of Alex's patch to split the in two.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2283 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter05/setting-environment.xml')
-rw-r--r--chapter05/setting-environment.xml45
1 files changed, 45 insertions, 0 deletions
diff --git a/chapter05/setting-environment.xml b/chapter05/setting-environment.xml
new file mode 100644
index 000000000..f143b8b69
--- /dev/null
+++ b/chapter05/setting-environment.xml
@@ -0,0 +1,45 @@
+<sect1 id="ch05-settingenviron">
+<title>Setting up the environment</title>
+<?dbhtml filename="settingenviron.html" dir="chapter05"?>
+
+<para>While logged in as user <emphasis>lfs</emphasis>, issue the
+following commands to set up a good work environment:</para>
+
+<para><screen><userinput>cat &gt; ~/.bash_profile &lt;&lt; "EOF"
+umask 022
+LFS=/mnt/lfs
+LC_ALL=POSIX
+CC="gcc -s"
+export LFS LC_ALL CC
+EOF
+source ~/.bash_profile</userinput></screen></para>
+
+<para>This profile sets the umask to 022, so newly created files will 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>
+
+<para>The LFS, LC_ALL, and CC environment variables are also set. The LFS
+variable has been explained in previous chapters. LC_ALL is a variable used
+for internationalization.</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 Chapter 5
+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
+everything will work as expected in the chroot environment.</para>
+
+<para>CC 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 are now prepared to begin building the temporary tools which will
+support us in later chapters.</para>
+
+</sect1>
+