bash.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-bash" role="wrap">
  8. <?dbhtml filename="bash.html"?>
  9. <sect1info condition="script">
  10. <productname>bash</productname>
  11. <productnumber>&bash-version;</productnumber>
  12. <address>&bash-url;</address>
  13. </sect1info>
  14. <title>Bash-&bash-version;</title>
  15. <indexterm zone="ch-system-bash">
  16. <primary sortas="a-Bash">Bash</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Bash package contains the Bourne-Again SHell.</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&bash-ch6-sbu;</seg>
  26. <seg>&bash-ch6-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>Installation of Bash</title>
  32. <para>Incorporate some upstream fixes:</para>
  33. <screen><userinput remap="pre">patch -Np1 -i ../&bash-fixes-patch;</userinput></screen>
  34. <para>Prepare Bash for compilation:</para>
  35. <screen><userinput remap="configure">./configure --prefix=/usr \
  36. --docdir=/usr/share/doc/bash-&bash-version; \
  37. --without-bash-malloc \
  38. --with-installed-readline</userinput></screen>
  39. <variablelist>
  40. <title>The meaning of the new configure option:</title>
  41. <varlistentry>
  42. <term><parameter>--with-installed-readline</parameter></term>
  43. <listitem>
  44. <para>This option tells Bash to use the <filename
  45. class="libraryfile">readline</filename> library that is already
  46. installed on the system rather than using its own readline
  47. version.</para>
  48. </listitem>
  49. </varlistentry>
  50. </variablelist>
  51. <para>Compile the package:</para>
  52. <screen><userinput remap="make">make</userinput></screen>
  53. <para>Skip down to <quote>Install the
  54. package</quote> if not running the test suite.</para>
  55. <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para>
  56. <screen><userinput remap="test">chown -Rv tester .</userinput></screen>
  57. <para>Now, run the tests as the <systemitem
  58. class="username">tester</systemitem> user:</para>
  59. <screen><userinput remap="test">su tester &lt;&lt; EOF
  60. PATH=$PATH make tests &lt; $(tty)
  61. EOF</userinput></screen>
  62. <para>The <systemitem class="username">tester</systemitem>
  63. user does not have enough permissions for all the tests to pass. This shows
  64. up in some <quote>diff</quote> output in four test results. Portions of the
  65. run-execscript, run-lastpipe, run-read, and run-test programs
  66. are known to fail in the LFS chroot environment, but pass if the tests
  67. are run in a full system.</para>
  68. <para>Install the package and move the main executable to
  69. <filename class='directory'>/bin</filename>:</para>
  70. <screen><userinput remap="install">make install
  71. mv -vf /usr/bin/bash /bin</userinput></screen>
  72. <para>Run the newly compiled <command>bash</command> program (replacing the one that is
  73. currently being executed):</para>
  74. <screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen>
  75. <note>
  76. <para>The parameters used make the <command>bash</command>
  77. process an interactive login shell and continue to disable hashing so
  78. that new programs are found as they become available.</para>
  79. </note>
  80. </sect2>
  81. <sect2 id="contents-bash" role="content">
  82. <title>Contents of Bash</title>
  83. <segmentedlist>
  84. <segtitle>Installed programs</segtitle>
  85. <segtitle>Installed directory</segtitle>
  86. <seglistitem>
  87. <seg>bash, bashbug, and sh (link to bash)</seg>
  88. <seg>/usr/include/bash, /usr/lib/bash, and
  89. /usr/share/doc/bash-&bash-version;</seg>
  90. </seglistitem>
  91. </segmentedlist>
  92. <variablelist>
  93. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  94. <?dbfo list-presentation="list"?>
  95. <?dbhtml list-presentation="table"?>
  96. <varlistentry id="bash">
  97. <term><command>bash</command></term>
  98. <listitem>
  99. <para>A widely-used command interpreter; it performs many types of
  100. expansions and substitutions on a given command line before executing
  101. it, thus making this interpreter a powerful tool</para>
  102. <indexterm zone="ch-system-bash bash">
  103. <primary sortas="b-bash">bash</primary>
  104. </indexterm>
  105. </listitem>
  106. </varlistentry>
  107. <varlistentry id="bashbug">
  108. <term><command>bashbug</command></term>
  109. <listitem>
  110. <para>A shell script to help the user compose and mail standard
  111. formatted bug reports concerning <command>bash</command></para>
  112. <indexterm zone="ch-system-bash bashbug">
  113. <primary sortas="b-bashbug">bashbug</primary>
  114. </indexterm>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry id="sh">
  118. <term><command>sh</command></term>
  119. <listitem>
  120. <para>A symlink to the <command>bash</command> program; when invoked
  121. as <command>sh</command>, <command>bash</command> tries to mimic the
  122. startup behavior of historical versions of <command>sh</command> as
  123. closely as possible, while conforming to the POSIX standard as
  124. well</para>
  125. <indexterm zone="ch-system-bash sh">
  126. <primary sortas="b-sh">sh</primary>
  127. </indexterm>
  128. </listitem>
  129. </varlistentry>
  130. </variablelist>
  131. </sect2>
  132. </sect1>