Changeset fcc02767 for chapter06/bash.xml
- Timestamp:
- 06/07/2020 08:16:00 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, 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/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 595ff03
- Parents:
- d53fefa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/bash.xml
rd53fefa rfcc02767 6 6 ]> 7 7 8 <sect1 id="ch- system-bash" role="wrap">8 <sect1 id="ch-tools-bash" role="wrap"> 9 9 <?dbhtml filename="bash.html"?> 10 10 … … 17 17 <title>Bash-&bash-version;</title> 18 18 19 <indexterm zone="ch- system-bash">19 <indexterm zone="ch-tools-bash"> 20 20 <primary sortas="a-Bash">Bash</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Bash package contains the Bourne-Again SHell.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/bash.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&bash-ch 6-sbu;</seg>34 <seg>&bash-ch 6-du;</seg>36 <seg>&bash-ch5-sbu;</seg> 37 <seg>&bash-ch5-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 41 44 <title>Installation of Bash</title> 42 45 43 <para>Incorporate some upstream fixes:</para>44 45 <screen><userinput remap="pre">patch -Np1 -i ../&bash-fixes-patch;</userinput></screen>46 47 46 <para>Prepare Bash for compilation:</para> 48 47 49 <screen><userinput remap="configure">./configure --prefix=/usr 50 -- docdir=/usr/share/doc/bash-&bash-version;\51 -- without-bash-malloc\52 --with -installed-readline</userinput></screen>48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --build=$(support/config.guess) \ 50 --host=$LFS_TGT \ 51 --without-bash-malloc</userinput></screen> 53 52 54 53 <variablelist> 55 <title>The meaning of the new configure option:</title>54 <title>The meaning of the configure options:</title> 56 55 57 56 <varlistentry> 58 <term><parameter>--with -installed-readline</parameter></term>57 <term><parameter>--without-bash-malloc</parameter></term> 59 58 <listitem> 60 <para>This option tells Bash to use the <filename 61 class="libraryfile">readline</filename> library that is already 62 installed on the system rather than using its own readline 63 version.</para> 59 <para>This option turns off the use of Bash's memory allocation 60 (<function>malloc</function>) function which is known to cause 61 segmentation faults. By turning this option off, Bash will use 62 the <function>malloc</function> functions from Glibc which are 63 more stable.</para> 64 64 </listitem> 65 65 </varlistentry> … … 71 71 <screen><userinput remap="make">make</userinput></screen> 72 72 73 <para>Skip down to <quote>Install the 74 package</quote> if not running the test suite.</para> 73 <para>Install the package:</para> 75 74 76 <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para>75 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 77 76 78 <screen><userinput remap="test">chown -Rv tester .</userinput></screen>77 <para>Move the excutable to where it is expected to be:</para> 79 78 80 <para>Now, run the tests as the <systemitem 81 class="username">tester</systemitem> user:</para> 79 <screen><userinput remap="install">mv $LFS/usr/bin/bash $LFS/bin/bash</userinput></screen> 82 80 83 <screen><userinput remap="test">su tester << EOF 84 PATH=$PATH make tests < $(tty) 85 EOF</userinput></screen> 86 <!-- 87 <para>The <systemitem class="username">tester</systemitem> 88 user does not have enough permissions for all the tests to pass. This shows 89 up in some <quote>diff</quote> output in four test results. Portions of the 90 run-execscript, run-lastpipe, run-read, and run-test programs 91 are known to fail in the LFS chroot environment, but pass if the tests 92 are run in a full system.</para> 93 --> 94 <para>Install the package and move the main executable to 95 <filename class='directory'>/bin</filename>:</para> 81 <para>Make a link for the programs that use <command>sh</command> for 82 a shell:</para> 96 83 97 <screen><userinput remap="install">make install 98 mv -vf /usr/bin/bash /bin</userinput></screen> 99 100 <para>Run the newly compiled <command>bash</command> program (replacing the one that is 101 currently being executed):</para> 102 103 <screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen> 104 105 <note> 106 <para>The parameters used make the <command>bash</command> 107 process an interactive login shell and continue to disable hashing so 108 that new programs are found as they become available.</para> 109 </note> 84 <screen><userinput remap="install">ln -sv bash $LFS/bin/sh</userinput></screen> 110 85 111 86 </sect2> 112 87 113 <sect2 id="contents-bash"role="content">114 <title >Contents of Bash</title>88 <sect2 role="content"> 89 <title/> 115 90 116 <segmentedlist> 117 <segtitle>Installed programs</segtitle> 118 <segtitle>Installed directory</segtitle> 119 120 <seglistitem> 121 <seg>bash, bashbug, and sh (link to bash)</seg> 122 <seg>/usr/include/bash, /usr/lib/bash, and 123 /usr/share/doc/bash-&bash-version;</seg> 124 </seglistitem> 125 </segmentedlist> 126 127 <variablelist> 128 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 129 <?dbfo list-presentation="list"?> 130 <?dbhtml list-presentation="table"?> 131 132 <varlistentry id="bash"> 133 <term><command>bash</command></term> 134 <listitem> 135 <para>A widely-used command interpreter; it performs many types of 136 expansions and substitutions on a given command line before executing 137 it, thus making this interpreter a powerful tool</para> 138 <indexterm zone="ch-system-bash bash"> 139 <primary sortas="b-bash">bash</primary> 140 </indexterm> 141 </listitem> 142 </varlistentry> 143 144 <varlistentry id="bashbug"> 145 <term><command>bashbug</command></term> 146 <listitem> 147 <para>A shell script to help the user compose and mail standard 148 formatted bug reports concerning <command>bash</command></para> 149 <indexterm zone="ch-system-bash bashbug"> 150 <primary sortas="b-bashbug">bashbug</primary> 151 </indexterm> 152 </listitem> 153 </varlistentry> 154 155 <varlistentry id="sh"> 156 <term><command>sh</command></term> 157 <listitem> 158 <para>A symlink to the <command>bash</command> program; when invoked 159 as <command>sh</command>, <command>bash</command> tries to mimic the 160 startup behavior of historical versions of <command>sh</command> as 161 closely as possible, while conforming to the POSIX standard as 162 well</para> 163 <indexterm zone="ch-system-bash sh"> 164 <primary sortas="b-sh">sh</primary> 165 </indexterm> 166 </listitem> 167 </varlistentry> 168 169 </variablelist> 91 <para>Details on this package are located in 92 <xref linkend="contents-bash" role="."/></para> 170 93 171 94 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.