gzip.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. <!ENTITY % patches-entities SYSTEM "../patches.ent">
  5. %general-entities;
  6. %patches-entities;
  7. ]>
  8. <sect1 id="ch-system-gzip" role="wrap">
  9. <title>Gzip-&gzip-version;</title>
  10. <?dbhtml filename="gzip.html"?>
  11. <indexterm zone="ch-system-gzip"><primary sortas="a-Gzip">Gzip</primary></indexterm>
  12. <sect2 role="package"><title/>
  13. <para>The Gzip package contains programs for compressing and decompressing
  14. files.</para>
  15. <segmentedlist>
  16. <segtitle>&buildtime;</segtitle>
  17. <segtitle>&diskspace;</segtitle>
  18. <seglistitem><seg>0.1 SBU</seg><seg>2.2 MB</seg></seglistitem>
  19. </segmentedlist>
  20. <segmentedlist>
  21. <segtitle>&dependencies;</segtitle>
  22. <seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
  23. GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
  24. </segmentedlist>
  25. </sect2>
  26. <sect2 role="installation">
  27. <title>Installation of Gzip</title>
  28. <para>Gzip has 2 known security vulnerabilities. The following patch
  29. addresses both of them:</para>
  30. <screen><userinput>patch -Np1 -i ../&gzip-security_fix-patch;</userinput></screen>
  31. <para>Prepare Gzip for compilation:</para>
  32. <screen><userinput>./configure --prefix=/usr</userinput></screen>
  33. <para>The <command>gzexe</command> script has the location of the
  34. <command>gzip</command> binary hard-wired into it. Because the
  35. location of the binary is changed later, the following command ensures
  36. that the new location gets placed into the script:</para>
  37. <screen><userinput>sed -i 's@"BINDIR"@/bin@g' gzexe.in</userinput></screen>
  38. <para>Compile the package:</para>
  39. <screen><userinput>make</userinput></screen>
  40. <para>Install the package:</para>
  41. <screen><userinput>make install</userinput></screen>
  42. <para>Move the <command>gzip</command> program to the <filename
  43. class="directory">/bin</filename> directory and create some commonly used
  44. symlinks to it:</para>
  45. <screen><userinput>mv /usr/bin/gzip /bin
  46. rm /usr/bin/{gunzip,zcat}
  47. ln -s gzip /bin/gunzip
  48. ln -s gzip /bin/zcat
  49. ln -s gzip /bin/compress
  50. ln -s gunzip /bin/uncompress</userinput></screen>
  51. </sect2>
  52. <sect2 id="contents-gzip" role="content"><title>Contents of Gzip</title>
  53. <segmentedlist>
  54. <segtitle>Installed programs</segtitle>
  55. <seglistitem><seg>compress (link to gzip), gunzip (link to gzip), gzexe,
  56. gzip, uncompress (link to gunzip), zcat (link to gzip), zcmp, zdiff,
  57. zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg></seglistitem>
  58. </segmentedlist>
  59. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  60. <?dbfo list-presentation="list"?>
  61. <?dbhtml list-presentation="table"?>
  62. <varlistentry id="compress">
  63. <term><command>compress</command></term>
  64. <listitem>
  65. <para>Compresses and decompresses files</para>
  66. <indexterm zone="ch-system-gzip compress"><primary sortas="b-compress">compress</primary></indexterm>
  67. </listitem>
  68. </varlistentry>
  69. <varlistentry id="gunzip">
  70. <term><command>gunzip</command></term>
  71. <listitem>
  72. <para>Decompresses gzipped files</para>
  73. <indexterm zone="ch-system-gzip gunzip"><primary sortas="b-gunzip">gunzip</primary></indexterm>
  74. </listitem>
  75. </varlistentry>
  76. <varlistentry id="gzexe">
  77. <term><command>gzexe</command></term>
  78. <listitem>
  79. <para>Creates self-decompressing executable files</para>
  80. <indexterm zone="ch-system-gzip gzexe"><primary sortas="b-gzexe">gzexe</primary></indexterm>
  81. </listitem>
  82. </varlistentry>
  83. <varlistentry id="gzip">
  84. <term><command>gzip</command></term>
  85. <listitem>
  86. <para>Compresses the given files using Lempel-Ziv (LZ77) coding</para>
  87. <indexterm zone="ch-system-gzip gzip"><primary sortas="b-gzip">gzip</primary></indexterm>
  88. </listitem>
  89. </varlistentry>
  90. <varlistentry id="uncompress">
  91. <term><command>uncompress</command></term>
  92. <listitem>
  93. <para>Decompresses compressed files</para>
  94. <indexterm zone="ch-system-gzip uncompress"><primary sortas="b-uncompress">uncompress</primary></indexterm>
  95. </listitem>
  96. </varlistentry>
  97. <varlistentry id="zcat">
  98. <term><command>zcat</command></term>
  99. <listitem>
  100. <para>Uncompresses the given gzipped files to standard output</para>
  101. <indexterm zone="ch-system-gzip zcat"><primary sortas="b-zcat">zcat</primary></indexterm>
  102. </listitem>
  103. </varlistentry>
  104. <varlistentry id="zcmp">
  105. <term><command>zcmp</command></term>
  106. <listitem>
  107. <para>Runs <command>cmp</command> on gzipped files</para>
  108. <indexterm zone="ch-system-gzip zcmp"><primary sortas="b-zcmp">zcmp</primary></indexterm>
  109. </listitem>
  110. </varlistentry>
  111. <varlistentry id="zdiff">
  112. <term><command>zdiff</command></term>
  113. <listitem>
  114. <para>Runs <command>diff</command> on gzipped files</para>
  115. <indexterm zone="ch-system-gzip zdiff"><primary sortas="b-zdiff">zdiff</primary></indexterm>
  116. </listitem>
  117. </varlistentry>
  118. <varlistentry id="zegrep">
  119. <term><command>zegrep</command></term>
  120. <listitem>
  121. <para>Runs <command>egrep</command> on gzipped files</para>
  122. <indexterm zone="ch-system-gzip zegrep"><primary sortas="b-zegrep">zegrep</primary></indexterm>
  123. </listitem>
  124. </varlistentry>
  125. <varlistentry id="zfgrep">
  126. <term><command>zfgrep</command></term>
  127. <listitem>
  128. <para>Runs <command>fgrep</command> on gzipped files</para>
  129. <indexterm zone="ch-system-gzip zfgrep"><primary sortas="b-zfgrep">zfgrep</primary></indexterm>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry id="zforce">
  133. <term><command>zforce</command></term>
  134. <listitem>
  135. <para>Forces a <filename class="extension">.gz</filename> extension on all given files
  136. that are gzipped files, so that <command>gzip</command> will not compress them again; this can be
  137. useful when file names were truncated during a file transfer</para>
  138. <indexterm zone="ch-system-gzip zforce"><primary sortas="b-zforce">zforce</primary></indexterm>
  139. </listitem>
  140. </varlistentry>
  141. <varlistentry id="zgrep">
  142. <term><command>zgrep</command></term>
  143. <listitem>
  144. <para>Runs <command>grep</command> on gzipped files</para>
  145. <indexterm zone="ch-system-gzip zgrep"><primary sortas="b-zgrep">zgrep</primary></indexterm>
  146. </listitem>
  147. </varlistentry>
  148. <varlistentry id="zless">
  149. <term><command>zless</command></term>
  150. <listitem>
  151. <para>Runs <command>less</command> on gzipped files</para>
  152. <indexterm zone="ch-system-gzip zless"><primary sortas="b-zless">zless</primary></indexterm>
  153. </listitem>
  154. </varlistentry>
  155. <varlistentry id="zmore">
  156. <term><command>zmore</command></term>
  157. <listitem>
  158. <para>Runs <command>more</command> on gzipped files</para>
  159. <indexterm zone="ch-system-gzip zmore"><primary sortas="b-zmore">zmore</primary></indexterm>
  160. </listitem>
  161. </varlistentry>
  162. <varlistentry id="znew">
  163. <term><command>znew</command></term>
  164. <listitem>
  165. <para>Re-compresses files from <command>compress</command> format to
  166. <command>gzip</command> format&mdash;<filename class="extension">.Z</filename>
  167. to <filename class="extension">.gz</filename></para>
  168. <indexterm zone="ch-system-gzip znew"><primary sortas="b-znew">znew</primary></indexterm>
  169. </listitem>
  170. </varlistentry>
  171. </variablelist>
  172. </sect2>
  173. </sect1>