lfs/chapter08/bash.xml
Bruce Dubbs dd151db302 Package updates.
Update to bash-5.2.32.
Update to iana-etc-20240801.
Update to vim-9.1.0660.
Update to binutils-2.43.
Update to linux-6.10.3.
Update to readline-8.2.13.
Update to wheel-0.44.0.
2024-08-05 13:07:12 -05:00

176 lines
5.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="ch-system-bash" role="wrap">
<?dbhtml filename="bash.html"?>
<sect1info condition="script">
<productname>bash</productname>
<productnumber>&bash-version;</productnumber>
<address>&bash-url;</address>
</sect1info>
<title>Bash-&bash-version;</title>
<indexterm zone="ch-system-bash">
<primary sortas="a-Bash">Bash</primary>
</indexterm>
<sect2 role="package">
<title/>
<para>The Bash package contains the Bourne-Again Shell.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem>
<seg>&bash-fin-sbu;</seg>
<seg>&bash-fin-du;</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Bash</title>
<para>Prepare Bash for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
--without-bash-malloc \
--with-installed-readline \
bash_cv_strtold_broken=no \
--docdir=/usr/share/doc/bash-&bash-version;</userinput></screen>
<variablelist>
<title>The meaning of the new configure option:</title>
<varlistentry>
<term><parameter>--with-installed-readline</parameter></term>
<listitem>
<para>This option tells Bash to use the <filename
class="libraryfile">readline</filename> library that is already
installed on the system rather than using its own readline
version.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Compile the package:</para>
<screen><userinput remap="make">make</userinput></screen>
<para>Skip down to <quote>Install the
package</quote> if not running the test suite.</para>
<para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para>
<screen><userinput remap="test">chown -R tester .</userinput></screen>
<para>The test suite of this package is designed to be run as a non-&root;
user who owns the terminal connected to standard input. To satisfy the
requirement, spawn a new pseudo terminal using
<application>Expect</application> and run the tests as the <systemitem
class="username">tester</systemitem> user:</para>
<screen><userinput remap="test">su -s /usr/bin/expect tester &lt;&lt; "EOF"
set timeout -1
spawn make tests
expect eof
lassign [wait] _ _ _ value
exit $value
EOF</userinput></screen>
<para>The test suite uses <command>diff</command> to detect the
difference between test script output and the expected output. Any
output from <command>diff</command> (prefixed with
<computeroutput>&lt;</computeroutput> and
<computeroutput>&gt;</computeroutput>) indicates a test failure, unless
there is a message saying the difference can be ignored.
<!-- Some host distros set core file size hard limit < 1000, then the
test "ulimit -c -S 1000" attempts to set soft limit > hard limit
and fail. -->
One test named <filename>run-builtins</filename> is known to fail on
some host distros with a difference on the first line of the
output.</para>
<para>Install the package:</para>
<screen><userinput remap="install">make install</userinput></screen>
<para>Run the newly compiled <command>bash</command> program (replacing the one that is
currently being executed):</para>
<screen role="nodump"><userinput>exec /usr/bin/bash --login</userinput></screen>
</sect2>
<sect2 id="contents-bash" role="content">
<title>Contents of Bash</title>
<segmentedlist>
<segtitle>Installed programs</segtitle>
<segtitle>Installed directory</segtitle>
<seglistitem>
<seg>bash, bashbug, and sh (link to bash)</seg>
<seg>/usr/include/bash, /usr/lib/bash, and
/usr/share/doc/bash-&bash-version;</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="bash">
<term><command>bash</command></term>
<listitem>
<para>A widely-used command interpreter; it performs many types of
expansions and substitutions on a given command line before executing
it, thus making this interpreter a powerful tool</para>
<indexterm zone="ch-system-bash bash">
<primary sortas="b-bash">bash</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="bashbug">
<term><command>bashbug</command></term>
<listitem>
<para>A shell script to help the user compose and mail standard
formatted bug reports concerning <command>bash</command></para>
<indexterm zone="ch-system-bash bashbug">
<primary sortas="b-bashbug">bashbug</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="sh">
<term><command>sh</command></term>
<listitem>
<para>A symlink to the <command>bash</command> program; when invoked
as <command>sh</command>, <command>bash</command> tries to mimic the
startup behavior of historical versions of <command>sh</command> as
closely as possible, while conforming to the POSIX standard as
well</para>
<indexterm zone="ch-system-bash sh">
<primary sortas="b-sh">sh</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>