This patch tunrs the paragraph explanations of the contents of the
.bashrc file into a variable list, thereby highlighting the individual
commands before explaing them.

This appears to be a more standard way to explain command lines across
the Books.

All it does is move the existing paragraph text into a variable list.

Also alludes to the fact tha the shell executes the commands within
the .bashrc file, and not just reads them.

The revision number here is my local copy of the LFS Repo's 9.1 tag.

Index: chapter04/settingenviron.xml
===================================================================
--- chapter04/settingenviron.xml    (revision 192)
+++ chapter04/settingenviron.xml    (working copy)
@@ -32,8 +32,8 @@
   ensuring a clean environment.</para>

   <para>The new instance of the shell is a <emphasis>non-login</emphasis>
-  shell, which does not read the <filename>/etc/profile</filename> or
-  <filename>.bash_profile</filename> files, but rather reads the
+  shell, which does not read, and execute, the conten of
<filename>/etc/profile</filename> or
+  <filename>.bash_profile</filename> files, but rather reads, and executes, the
   <filename>.bashrc</filename> file instead. Create the
   <filename>.bashrc</filename> file now:</para>

@@ -47,6 +47,12 @@
 export LFS LC_ALL LFS_TGT PATH</literal>
 EOF</userinput></screen>

+  <variablelist>
+    <title>The meaning of the command line options in
<filename>.bashrc</filename></title>
+
+    <varlistentry>
+      <term><parameter>set +h</parameter></term>
+      <listitem>
   <para>The <command>set +h</command> command turns off
   <command>bash</command>'s hash function. Hashing is ordinarily a useful
   feature&mdash;<command>bash</command> uses a hash table to remember the
@@ -58,34 +64,72 @@
   <filename class="directory">$LFS/tools</filename> as soon as they are
   available without remembering a previous version of the same program in a
   different location.</para>
+      </listitem>
+    </varlistentry>

+    <varlistentry>
+      <term><parameter>umask 022</parameter></term>
+      <listitem>
   <para>Setting the user file-creation mask (umask) to 022 ensures that newly
   created files and directories are only writable by their owner, but are
   readable and executable by anyone (assuming default modes are used by the
   <function>open(2)</function> system call, new files will end up
with permission
   mode 644 and directories with mode 755).</para>
+      </listitem>
+    </varlistentry>

-  <para>The <envar>LFS</envar> variable should be set to the chosen mount
-  point.</para>
-
+    <varlistentry>
+      <term><parameter>LFS=/mnt/lfs</parameter></term>
+      <listitem>
   <para>The <envar>LC_ALL</envar> variable controls the localization of certain
   programs, making their messages follow the conventions of a
specified country.
   Setting <envar>LC_ALL</envar> to <quote>POSIX</quote> or <quote>C</quote>
   (the two are equivalent) ensures that everything will work as expected in
   the chroot environment.</para>
+      </listitem>
+    </varlistentry>

+    <varlistentry>
+      <term><parameter>LC_ALL=POSIX</parameter></term>
+      <listitem>
+        <para>This parameter prevents possible copying of files from a skeleton
+        directory (default is <filename class="directory">/etc/skel</filename>)
+        by changing the input location to the special null device.</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><parameter>LFS_TGT=(uname -m)-lfs-linux-gnu</parameter></term>
+      <listitem>
   <para>The <envar>LFS_TGT</envar> variable sets a non-default, but
compatible machine
   description for use when building our cross compiler and linker and
when cross
   compiling our temporary toolchain. More information is contained in
   <xref linkend="ch-tools-toolchaintechnotes" role=""/>.</para>
+      </listitem>
+    </varlistentry>

+    <varlistentry>
+      <term><parameter>PATH=/tools/bin:/bin:/usr/bin</parameter></term>
+      <listitem>
   <para>By putting <filename class="directory">/tools/bin</filename>
ahead of the
   standard <envar>PATH</envar>, all the programs installed in <xref
   linkend="chapter-temporary-tools"/> are picked up by the shell
immediately after
   their installation. This, combined with turning off hashing, limits the risk
   that old programs are used from the host when the same programs are
available in
-  the chapter 5 environment.</para>
+  the Chapter 5 environment.</para>
+      </listitem>
+    </varlistentry>

+    <varlistentry>
+      <term><parameter>export LFS LC_ALL LFS_TGT PATH</parameter></term>
+      <listitem>
+        <para>Whilst the above commands have set some variables, in order
+        to make them visible within any sub-shells, we export them</para>
+      </listitem>
+    </varlistentry>
+
+  </variablelist>
+
   <para>Finally, to have the environment fully prepared for building the
   temporary tools, source the just-created user profile:</para>
This patch tunrs the paragraph explanations of the contents of the
.bashrc file into a variable list, thereby highlighting the individual
commands before explaing them.

This appears to be a more standard way to explain command lines across
the Books.

All it does is move the existing paragraph text into a variable list.

Also alludes to the fact tha the shell executes the commands within
the .bashrc file, and not just reads them.

The revision number here is my local copy of the LFS Repo's 9.1 tag.

Index: chapter04/settingenviron.xml
===================================================================
--- chapter04/settingenviron.xml	(revision 192)
+++ chapter04/settingenviron.xml	(working copy)
@@ -32,8 +32,8 @@
   ensuring a clean environment.</para>
 
   <para>The new instance of the shell is a <emphasis>non-login</emphasis>
-  shell, which does not read the <filename>/etc/profile</filename> or
-  <filename>.bash_profile</filename> files, but rather reads the
+  shell, which does not read, and execute, the conten of <filename>/etc/profile</filename> or
+  <filename>.bash_profile</filename> files, but rather reads, and executes, the
   <filename>.bashrc</filename> file instead. Create the
   <filename>.bashrc</filename> file now:</para>
 
@@ -47,6 +47,12 @@
 export LFS LC_ALL LFS_TGT PATH</literal>
 EOF</userinput></screen>
 
+  <variablelist>
+    <title>The meaning of the command line options in <filename>.bashrc</filename></title>
+
+    <varlistentry>
+      <term><parameter>set +h</parameter></term>
+      <listitem>
   <para>The <command>set +h</command> command turns off
   <command>bash</command>'s hash function. Hashing is ordinarily a useful
   feature&mdash;<command>bash</command> uses a hash table to remember the
@@ -58,34 +64,72 @@
   <filename class="directory">$LFS/tools</filename> as soon as they are
   available without remembering a previous version of the same program in a
   different location.</para>
+      </listitem>
+    </varlistentry>
 
+    <varlistentry>
+      <term><parameter>umask 022</parameter></term>
+      <listitem>
   <para>Setting the user file-creation mask (umask) to 022 ensures that newly
   created files and directories are only writable by their owner, but are
   readable and executable by anyone (assuming default modes are used by the
   <function>open(2)</function> system call, new files will end up with permission
   mode 644 and directories with mode 755).</para>
+      </listitem>
+    </varlistentry>
 
-  <para>The <envar>LFS</envar> variable should be set to the chosen mount
-  point.</para>
-
+    <varlistentry>
+      <term><parameter>LFS=/mnt/lfs</parameter></term>
+      <listitem>
   <para>The <envar>LC_ALL</envar> variable controls the localization of certain
   programs, making their messages follow the conventions of a specified country.
   Setting <envar>LC_ALL</envar> to <quote>POSIX</quote> or <quote>C</quote>
   (the two are equivalent) ensures that everything will work as expected in
   the chroot environment.</para>
+      </listitem>
+    </varlistentry>
 
+    <varlistentry>
+      <term><parameter>LC_ALL=POSIX</parameter></term>
+      <listitem>
+        <para>This parameter prevents possible copying of files from a skeleton
+        directory (default is <filename class="directory">/etc/skel</filename>)
+        by changing the input location to the special null device.</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><parameter>LFS_TGT=(uname -m)-lfs-linux-gnu</parameter></term>
+      <listitem>
   <para>The <envar>LFS_TGT</envar> variable sets a non-default, but compatible machine
   description for use when building our cross compiler and linker and when cross
   compiling our temporary toolchain. More information is contained in
   <xref linkend="ch-tools-toolchaintechnotes" role=""/>.</para>
+      </listitem>
+    </varlistentry>
 
+    <varlistentry>
+      <term><parameter>PATH=/tools/bin:/bin:/usr/bin</parameter></term>
+      <listitem>
   <para>By putting <filename class="directory">/tools/bin</filename> ahead of the
   standard <envar>PATH</envar>, all the programs installed in <xref
   linkend="chapter-temporary-tools"/> are picked up by the shell immediately after
   their installation. This, combined with turning off hashing, limits the risk
   that old programs are used from the host when the same programs are available in
-  the chapter 5 environment.</para>
+  the Chapter 5 environment.</para>
+      </listitem>
+    </varlistentry>
 
+    <varlistentry>
+      <term><parameter>export LFS LC_ALL LFS_TGT PATH</parameter></term>
+      <listitem>
+        <para>Whilst the above commands have set some variables, in order
+        to make them visible within any sub-shells, we export them</para>
+      </listitem>
+    </varlistentry>
+
+  </variablelist>
+
   <para>Finally, to have the environment fully prepared for building the
   temporary tools, source the just-created user profile:</para>
 
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to