Changeset df43be1 for chapter04/settingenviron.xml
- Timestamp:
- 03/29/2020 08:04:31 PM (4 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- caccd51
- Parents:
- 97af738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter04/settingenviron.xml
r97af738 rdf43be1 33 33 34 34 <para>The new instance of the shell is a <emphasis>non-login</emphasis> 35 shell, which does not read the<filename>/etc/profile</filename> or36 <filename>.bash_profile</filename> files, but rather reads the35 shell, which does not read, and execute, the conten of <filename>/etc/profile</filename> or 36 <filename>.bash_profile</filename> files, but rather reads, and executes, the 37 37 <filename>.bashrc</filename> file instead. Create the 38 38 <filename>.bashrc</filename> file now:</para> … … 48 48 EOF</userinput></screen> 49 49 50 <variablelist> 51 <title>The meaning of the command line options in <filename>.bashrc</filename></title> 52 53 <varlistentry> 54 <term><parameter>set +h</parameter></term> 55 <listitem> 50 56 <para>The <command>set +h</command> command turns off 51 57 <command>bash</command>'s hash function. Hashing is ordinarily a useful … … 59 65 available without remembering a previous version of the same program in a 60 66 different location.</para> 67 </listitem> 68 </varlistentry> 61 69 70 <varlistentry> 71 <term><parameter>umask 022</parameter></term> 72 <listitem> 62 73 <para>Setting the user file-creation mask (umask) to 022 ensures that newly 63 74 created files and directories are only writable by their owner, but are … … 65 76 <function>open(2)</function> system call, new files will end up with permission 66 77 mode 644 and directories with mode 755).</para> 78 </listitem> 79 </varlistentry> 67 80 81 <varlistentry> 82 <term><parameter>LFS=/mnt/lfs</parameter></term> 83 <listitem> 68 84 <para>The <envar>LFS</envar> variable should be set to the chosen mount 69 85 point.</para> 86 </listitem> 87 </varlistentry> 70 88 89 <varlistentry> 90 <term><parameter>LC_ALL=POSIX</parameter></term> 91 <listitem> 71 92 <para>The <envar>LC_ALL</envar> variable controls the localization of certain 72 93 programs, making their messages follow the conventions of a specified country. … … 74 95 (the two are equivalent) ensures that everything will work as expected in 75 96 the chroot environment.</para> 97 </listitem> 98 </varlistentry> 76 99 100 <varlistentry> 101 <term><parameter>LFS_TGT=(uname -m)-lfs-linux-gnu</parameter></term> 102 <listitem> 77 103 <para>The <envar>LFS_TGT</envar> variable sets a non-default, but compatible machine 78 104 description for use when building our cross compiler and linker and when cross 79 105 compiling our temporary toolchain. More information is contained in 80 106 <xref linkend="ch-tools-toolchaintechnotes" role=""/>.</para> 107 </listitem> 108 </varlistentry> 81 109 110 <varlistentry> 111 <term><parameter>PATH=/tools/bin:/bin:/usr/bin</parameter></term> 112 <listitem> 82 113 <para>By putting <filename class="directory">/tools/bin</filename> ahead of the 83 114 standard <envar>PATH</envar>, all the programs installed in <xref … … 85 116 their installation. This, combined with turning off hashing, limits the risk 86 117 that old programs are used from the host when the same programs are available in 87 the chapter 5 environment.</para> 118 the Chapter 5 environment.</para> 119 </listitem> 120 </varlistentry> 121 122 <varlistentry> 123 <term><parameter>export LFS LC_ALL LFS_TGT PATH</parameter></term> 124 <listitem> 125 <para>While the above commands have set some variables, in order 126 to make them visible within any sub-shells, we export them</para> 127 </listitem> 128 </varlistentry> 129 130 </variablelist> 88 131 89 132 <para>Finally, to have the environment fully prepared for building the
Note:
See TracChangeset
for help on using the changeset viewer.