bzip2.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-bzip2" role="wrap">
  8. <?dbhtml filename="bzip2.html"?>
  9. <title>Bzip2-&bzip2-version;</title>
  10. <indexterm zone="ch-system-bzip2">
  11. <primary sortas="a-Bzip2">Bzip2</primary>
  12. </indexterm>
  13. <sect2 role="package">
  14. <title/>
  15. <para>The Bzip2 package contains programs for compressing and decompressing
  16. files. Compressing text files with <command>bzip2</command> yields a much
  17. better compression percentage than with the traditional
  18. <command>gzip</command>.</para>
  19. <segmentedlist>
  20. <segtitle>&buildtime;</segtitle>
  21. <segtitle>&diskspace;</segtitle>
  22. <seglistitem>
  23. <seg>&bzip2-ch6-sbu;</seg>
  24. <seg>&bzip2-ch6-du;</seg>
  25. </seglistitem>
  26. </segmentedlist>
  27. </sect2>
  28. <sect2 role="installation">
  29. <title>Installation of Bzip2</title>
  30. <para>Apply a patch to install the documentation for this package:</para>
  31. <screen><userinput>patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
  32. <para>The <command>bzgrep</command> command does not escape '|' and '&amp;'
  33. in filenames passed to it. This allows arbitrary commands to be executed
  34. with the privileges of the user running <command>bzgrep</command>. Apply
  35. the following to address this:</para>
  36. <screen><userinput>patch -Np1 -i ../&bzip2-bzgrep-patch;</userinput></screen>
  37. <para>The <command>bzdiff</command> script still uses the deprecated
  38. <command>tempfile</command> program. Update it to use
  39. <command>mktemp</command> instead:</para>
  40. <screen><userinput>sed -i 's@tempfile -d /tmp -p bz@mktemp -p /tmp@' bzdiff</userinput></screen>
  41. <para>Prepare Bzip2 for compilation with:</para>
  42. <screen><userinput>make -f Makefile-libbz2_so
  43. make clean</userinput></screen>
  44. <variablelist>
  45. <title>The meaning of the make parameter:</title>
  46. <varlistentry>
  47. <term><parameter>-f Makefile-libbz2_so</parameter></term>
  48. <listitem>
  49. <para>This will cause Bzip2 to be built using a different
  50. <filename>Makefile</filename> file, in this case the
  51. <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
  52. <filename class="libraryfile">libbz2.so</filename> library and links
  53. the Bzip2 utilities against it.</para>
  54. </listitem>
  55. </varlistentry>
  56. </variablelist>
  57. <para>Compile and test the package:</para>
  58. <screen><userinput>make</userinput></screen>
  59. <para>If reinstalling Bzip2, perform
  60. <userinput>rm -vf /usr/bin/bz*</userinput> first, otherwise the following
  61. <command>make install</command> will fail.</para>
  62. <para>Install the programs:</para>
  63. <screen><userinput>make install</userinput></screen>
  64. <beginpage/>
  65. <para>Install the shared <command>bzip2</command> binary into the
  66. <filename class="directory">/bin</filename> directory, make
  67. some necessary symbolic links, and clean up:</para>
  68. <screen><userinput>cp -v bzip2-shared /bin/bzip2
  69. cp -av libbz2.so* /lib
  70. ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
  71. rm -v /usr/bin/{bunzip2,bzcat,bzip2}
  72. ln -sv bzip2 /bin/bunzip2
  73. ln -sv bzip2 /bin/bzcat</userinput></screen>
  74. </sect2>
  75. <sect2 id="contents-bzip2" role="content">
  76. <title>Contents of Bzip2</title>
  77. <segmentedlist>
  78. <segtitle>Installed programs</segtitle>
  79. <segtitle>Installed libraries</segtitle>
  80. <seglistitem>
  81. <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff,
  82. bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover, bzless, and bzmore</seg>
  83. <seg>libbz2.{a,so}</seg>
  84. </seglistitem>
  85. </segmentedlist>
  86. <variablelist>
  87. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  88. <?dbfo list-presentation="list"?>
  89. <?dbhtml list-presentation="table"?>
  90. <varlistentry id="bunzip2">
  91. <term><command>bunzip2</command></term>
  92. <listitem>
  93. <para>Decompresses bzipped files</para>
  94. <indexterm zone="ch-system-bzip2 bunzip2">
  95. <primary sortas="b-bunzip2">bunzip2</primary>
  96. </indexterm>
  97. </listitem>
  98. </varlistentry>
  99. <varlistentry id="bzcat">
  100. <term><command>bzcat</command></term>
  101. <listitem>
  102. <para>Decompresses to standard output</para>
  103. <indexterm zone="ch-system-bzip2 bzcat">
  104. <primary sortas="b-bzcat">bzcat</primary>
  105. </indexterm>
  106. </listitem>
  107. </varlistentry>
  108. <varlistentry id="bzcmp">
  109. <term><command>bzcmp</command></term>
  110. <listitem>
  111. <para>Runs <command>cmp</command> on bzipped files</para>
  112. <indexterm zone="ch-system-bzip2 bzcmp">
  113. <primary sortas="b-bzcmp">bzcmp</primary>
  114. </indexterm>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry id="bzdiff">
  118. <term><command>bzdiff</command></term>
  119. <listitem>
  120. <para>Runs <command>diff</command> on bzipped files</para>
  121. <indexterm zone="ch-system-bzip2 bzdiff">
  122. <primary sortas="b-bzdiff">bzdiff</primary>
  123. </indexterm>
  124. </listitem>
  125. </varlistentry>
  126. <varlistentry id="bzgrep">
  127. <term><command>bzgrep</command></term>
  128. <listitem>
  129. <para>Runs <command>grep</command> on bzipped files</para>
  130. <indexterm zone="ch-system-bzip2 bzgrep">
  131. <primary sortas="b-bzgrep">bzgrep</primary>
  132. </indexterm>
  133. </listitem>
  134. </varlistentry>
  135. <varlistentry id="bzegrep">
  136. <term><command>bzegrep</command></term>
  137. <listitem>
  138. <para>Runs <command>egrep</command> on bzipped files</para>
  139. <indexterm zone="ch-system-bzip2 bzegrep">
  140. <primary sortas="b-bzegrep">bzegrep</primary>
  141. </indexterm>
  142. </listitem>
  143. </varlistentry>
  144. <varlistentry id="bzfgrep">
  145. <term><command>bzfgrep</command></term>
  146. <listitem>
  147. <para>Runs <command>fgrep</command> on bzipped files</para>
  148. <indexterm zone="ch-system-bzip2 bzfgrep">
  149. <primary sortas="b-bzfgrep">bzfgrep</primary>
  150. </indexterm>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry id="bzip2">
  154. <term><command>bzip2</command></term>
  155. <listitem>
  156. <para>Compresses files using the Burrows-Wheeler block sorting text
  157. compression algorithm with Huffman coding; the compression rate is
  158. better than that achieved by more conventional compressors using
  159. <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
  160. <indexterm zone="ch-system-bzip2 bzip2">
  161. <primary sortas="b-bzip2">bzip2</primary>
  162. </indexterm>
  163. </listitem>
  164. </varlistentry>
  165. <varlistentry id="bzip2recover">
  166. <term><command>bzip2recover</command></term>
  167. <listitem>
  168. <para>Tries to recover data from damaged bzipped files</para>
  169. <indexterm zone="ch-system-bzip2 bzip2recover">
  170. <primary sortas="b-bzip2recover">bzip2recover</primary>
  171. </indexterm>
  172. </listitem>
  173. </varlistentry>
  174. <varlistentry id="bzless">
  175. <term><command>bzless</command></term>
  176. <listitem>
  177. <para>Runs <command>less</command> on bzipped files</para>
  178. <indexterm zone="ch-system-bzip2 bzless">
  179. <primary sortas="b-bzless">bzless</primary>
  180. </indexterm>
  181. </listitem>
  182. </varlistentry>
  183. <varlistentry id="bzmore">
  184. <term><command>bzmore</command></term>
  185. <listitem>
  186. <para>Runs <command>more</command> on bzipped files</para>
  187. <indexterm zone="ch-system-bzip2 bzmore">
  188. <primary sortas="b-bzmore">bzmore</primary>
  189. </indexterm>
  190. </listitem>
  191. </varlistentry>
  192. <varlistentry id="libbz2">
  193. <term><filename class="libraryfile">libbz2*</filename></term>
  194. <listitem>
  195. <para>The library implementing lossless, block-sorting data
  196. compression, using the Burrows-Wheeler algorithm</para>
  197. <indexterm zone="ch-system-bzip2 libbz2">
  198. <primary sortas="c-libbz2*">libbz2*</primary>
  199. </indexterm>
  200. </listitem>
  201. </varlistentry>
  202. </variablelist>
  203. </sect2>
  204. </sect1>