bzip2.xml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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>0.1 SBU</seg>
  24. <seg>3.9 MB</seg>
  25. </seglistitem>
  26. </segmentedlist>
  27. <segmentedlist>
  28. <segtitle>&dependencies;</segtitle>
  29. <seglistitem>
  30. <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Patch,
  31. and Make</seg>
  32. </seglistitem>
  33. </segmentedlist>
  34. </sect2>
  35. <sect2 role="installation">
  36. <title>Installation of Bzip2</title>
  37. <para>Apply a patch to install the documentation for this package:</para>
  38. <screen><userinput>patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
  39. <para>The <command>bzgrep</command> command does not escape '|' and '&amp;'
  40. in filenames passed to it. This allows arbitrary commands to be executed
  41. with the privileges of the user running <command>bzgrep</command>. Apply
  42. the following to address this:</para>
  43. <screen><userinput>patch -Np1 -i ../&bzip2-bzgrep-patch;</userinput></screen>
  44. <para>The <command>bzdiff</command> script still uses the deprecated
  45. <command>tempfile</command> program. Update it to use
  46. <command>mktemp</command> instead:</para>
  47. <screen><userinput>sed -i 's@tempfile -d /tmp -p bz@mktemp -p /tmp@' bzdiff</userinput></screen>
  48. <para>Prepare Bzip2 for compilation with:</para>
  49. <screen><userinput>make -f Makefile-libbz2_so
  50. make clean</userinput></screen>
  51. <variablelist>
  52. <title>The meaning of the make parameter:</title>
  53. <varlistentry>
  54. <term><parameter>-f Makefile-libbz2_so</parameter></term>
  55. <listitem>
  56. <para>This will cause Bzip2 to be built using a different
  57. <filename>Makefile</filename> file, in this case the
  58. <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
  59. <filename class="libraryfile">libbz2.so</filename> library and links
  60. the Bzip2 utilities against it.</para>
  61. </listitem>
  62. </varlistentry>
  63. </variablelist>
  64. <para>Compile and test the package:</para>
  65. <screen><userinput>make</userinput></screen>
  66. <para>If reinstalling Bzip2, perform
  67. <userinput>rm -vf /usr/bin/bz*</userinput> first, otherwise the following
  68. <command>make install</command> will fail.</para>
  69. <para>Install the programs:</para>
  70. <screen><userinput>make install</userinput></screen>
  71. <para>Install the shared <command>bzip2</command> binary into the
  72. <filename class="directory">/bin</filename> directory, make
  73. some necessary symbolic links, and clean up:</para>
  74. <screen><userinput>cp -v bzip2-shared /bin/bzip2
  75. cp -av libbz2.so* /lib
  76. ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
  77. rm -v /usr/bin/{bunzip2,bzcat,bzip2}
  78. ln -sv bzip2 /bin/bunzip2
  79. ln -sv bzip2 /bin/bzcat</userinput></screen>
  80. </sect2>
  81. <sect2 id="contents-bzip2" role="content">
  82. <title>Contents of Bzip2</title>
  83. <segmentedlist>
  84. <segtitle>Installed programs</segtitle>
  85. <segtitle>Installed libraries</segtitle>
  86. <seglistitem>
  87. <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff,
  88. bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover, bzless, and bzmore</seg>
  89. <seg>libbz2.[a,so]</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="bunzip2">
  97. <term><command>bunzip2</command></term>
  98. <listitem>
  99. <para>Decompresses bzipped files</para>
  100. <indexterm zone="ch-system-bzip2 bunzip2">
  101. <primary sortas="b-bunzip2">bunzip2</primary>
  102. </indexterm>
  103. </listitem>
  104. </varlistentry>
  105. <varlistentry id="bzcat">
  106. <term><command>bzcat</command></term>
  107. <listitem>
  108. <para>Decompresses to standard output</para>
  109. <indexterm zone="ch-system-bzip2 bzcat">
  110. <primary sortas="b-bzcat">bzcat</primary>
  111. </indexterm>
  112. </listitem>
  113. </varlistentry>
  114. <varlistentry id="bzcmp">
  115. <term><command>bzcmp</command></term>
  116. <listitem>
  117. <para>Runs <command>cmp</command> on bzipped files</para>
  118. <indexterm zone="ch-system-bzip2 bzcmp">
  119. <primary sortas="b-bzcmp">bzcmp</primary>
  120. </indexterm>
  121. </listitem>
  122. </varlistentry>
  123. <varlistentry id="bzdiff">
  124. <term><command>bzdiff</command></term>
  125. <listitem>
  126. <para>Runs <command>diff</command> on bzipped files</para>
  127. <indexterm zone="ch-system-bzip2 bzdiff">
  128. <primary sortas="b-bzdiff">bzdiff</primary>
  129. </indexterm>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry id="bzgrep">
  133. <term><command>bzgrep</command></term>
  134. <listitem>
  135. <para>Runs <command>grep</command> on bzipped files</para>
  136. <indexterm zone="ch-system-bzip2 bzgrep">
  137. <primary sortas="b-bzgrep">bzgrep</primary>
  138. </indexterm>
  139. </listitem>
  140. </varlistentry>
  141. <varlistentry id="bzegrep">
  142. <term><command>bzegrep</command></term>
  143. <listitem>
  144. <para>Runs <command>egrep</command> on bzipped files</para>
  145. <indexterm zone="ch-system-bzip2 bzegrep">
  146. <primary sortas="b-bzegrep">bzegrep</primary>
  147. </indexterm>
  148. </listitem>
  149. </varlistentry>
  150. <varlistentry id="bzfgrep">
  151. <term><command>bzfgrep</command></term>
  152. <listitem>
  153. <para>Runs <command>fgrep</command> on bzipped files</para>
  154. <indexterm zone="ch-system-bzip2 bzfgrep">
  155. <primary sortas="b-bzfgrep">bzfgrep</primary>
  156. </indexterm>
  157. </listitem>
  158. </varlistentry>
  159. <varlistentry id="bzip2">
  160. <term><command>bzip2</command></term>
  161. <listitem>
  162. <para>Compresses files using the Burrows-Wheeler block sorting text
  163. compression algorithm with Huffman coding; the compression rate is
  164. better than that achieved by more conventional compressors using
  165. <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
  166. <indexterm zone="ch-system-bzip2 bzip2">
  167. <primary sortas="b-bzip2">bzip2</primary>
  168. </indexterm>
  169. </listitem>
  170. </varlistentry>
  171. <varlistentry id="bzip2recover">
  172. <term><command>bzip2recover</command></term>
  173. <listitem>
  174. <para>Tries to recover data from damaged bzipped files</para>
  175. <indexterm zone="ch-system-bzip2 bzip2recover">
  176. <primary sortas="b-bzip2recover">bzip2recover</primary>
  177. </indexterm>
  178. </listitem>
  179. </varlistentry>
  180. <varlistentry id="bzless">
  181. <term><command>bzless</command></term>
  182. <listitem>
  183. <para>Runs <command>less</command> on bzipped files</para>
  184. <indexterm zone="ch-system-bzip2 bzless">
  185. <primary sortas="b-bzless">bzless</primary>
  186. </indexterm>
  187. </listitem>
  188. </varlistentry>
  189. <varlistentry id="bzmore">
  190. <term><command>bzmore</command></term>
  191. <listitem>
  192. <para>Runs <command>more</command> on bzipped files</para>
  193. <indexterm zone="ch-system-bzip2 bzmore">
  194. <primary sortas="b-bzmore">bzmore</primary>
  195. </indexterm>
  196. </listitem>
  197. </varlistentry>
  198. <varlistentry id="libbz2">
  199. <term><filename class="libraryfile">libbz2*</filename></term>
  200. <listitem>
  201. <para>The library implementing lossless, block-sorting data
  202. compression, using the Burrows-Wheeler algorithm</para>
  203. <indexterm zone="ch-system-bzip2 libbz2">
  204. <primary sortas="c-libbz2*">libbz2*</primary>
  205. </indexterm>
  206. </listitem>
  207. </varlistentry>
  208. </variablelist>
  209. </sect2>
  210. </sect1>