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 |
|
---|
8 | <sect1 id="ch-system-gzip" role="wrap">
|
---|
9 | <?dbhtml filename="gzip.html"?>
|
---|
10 |
|
---|
11 | <title>Gzip-&gzip-version;</title>
|
---|
12 |
|
---|
13 | <indexterm zone="ch-system-gzip">
|
---|
14 | <primary sortas="a-Gzip">Gzip</primary>
|
---|
15 | </indexterm>
|
---|
16 |
|
---|
17 | <sect2 role="package">
|
---|
18 | <title/>
|
---|
19 |
|
---|
20 | <para>The Gzip package contains programs for compressing and decompressing
|
---|
21 | files.</para>
|
---|
22 |
|
---|
23 | </sect2>
|
---|
24 |
|
---|
25 | <sect2 role="installation">
|
---|
26 | <title>Installation of Gzip</title>
|
---|
27 |
|
---|
28 | <para os="p1">The following patch fixes two security vulnerabilities in Gzip.
|
---|
29 | First, a path traversal bug when using the <option>-N</option> option
|
---|
30 | (CAN-2005-1228) Second, a race condition in the file permission restore
|
---|
31 | code (CAN-2005-0998)</para>
|
---|
32 |
|
---|
33 | <screen os="p2"><userinput>patch -Np1 -i ../&gzip-security_fix-patch;</userinput></screen>
|
---|
34 |
|
---|
35 | <para os="a">Prepare Gzip for compilation:</para>
|
---|
36 |
|
---|
37 | <screen os="b"><userinput>./configure --prefix=/usr</userinput></screen>
|
---|
38 |
|
---|
39 | <para os="c">The <command>gzexe</command> script has the location of the
|
---|
40 | <command>gzip</command> binary hard-wired into it. Because the
|
---|
41 | location of the binary is changed later, the following command ensures
|
---|
42 | that the new location gets placed into the script:</para>
|
---|
43 |
|
---|
44 | <screen os="d"><userinput>sed -i 's@"BINDIR"@/bin@g' gzexe.in</userinput></screen>
|
---|
45 |
|
---|
46 | <para os="e">Compile the package:</para>
|
---|
47 |
|
---|
48 | <screen os="f"><userinput>make</userinput></screen>
|
---|
49 |
|
---|
50 | <para os="g">This package does not come with a test suite.</para>
|
---|
51 |
|
---|
52 | <para os="h">Install the package:</para>
|
---|
53 |
|
---|
54 | <screen os="i"><userinput>make install</userinput></screen>
|
---|
55 |
|
---|
56 | <para os="j">Move the <command>gzip</command> program to the <filename
|
---|
57 | class="directory">/bin</filename> directory and create some commonly
|
---|
58 | used symlinks to it:</para>
|
---|
59 |
|
---|
60 | <screen os="k"><userinput>mv -v /usr/bin/gzip /bin
|
---|
61 | rm -v /usr/bin/{gunzip,zcat}
|
---|
62 | ln -sv gzip /bin/gunzip
|
---|
63 | ln -sv gzip /bin/zcat
|
---|
64 | ln -sv gzip /bin/compress
|
---|
65 | ln -sv gunzip /bin/uncompress</userinput></screen>
|
---|
66 |
|
---|
67 | </sect2>
|
---|
68 |
|
---|
69 | <sect2 id="contents-gzip" role="content">
|
---|
70 | <title>Contents of Gzip</title>
|
---|
71 |
|
---|
72 | <segmentedlist>
|
---|
73 | <segtitle>Installed programs</segtitle>
|
---|
74 |
|
---|
75 | <seglistitem>
|
---|
76 | <seg>compress (link to gzip), gunzip (link to gzip), gzexe, gzip,
|
---|
77 | uncompress (link to gunzip), zcat (link to gzip), zcmp, zdiff,
|
---|
78 | zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg>
|
---|
79 | </seglistitem>
|
---|
80 | </segmentedlist>
|
---|
81 |
|
---|
82 | <variablelist>
|
---|
83 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
84 | <?dbfo list-presentation="list"?>
|
---|
85 | <?dbhtml list-presentation="table"?>
|
---|
86 |
|
---|
87 | <varlistentry id="compress">
|
---|
88 | <term><command>compress</command></term>
|
---|
89 | <listitem>
|
---|
90 | <para>Compresses and decompresses files</para>
|
---|
91 | <indexterm zone="ch-system-gzip compress">
|
---|
92 | <primary sortas="b-compress">compress</primary>
|
---|
93 | </indexterm>
|
---|
94 | </listitem>
|
---|
95 | </varlistentry>
|
---|
96 |
|
---|
97 | <varlistentry id="gunzip">
|
---|
98 | <term><command>gunzip</command></term>
|
---|
99 | <listitem>
|
---|
100 | <para>Decompresses gzipped files</para>
|
---|
101 | <indexterm zone="ch-system-gzip gunzip">
|
---|
102 | <primary sortas="b-gunzip">gunzip</primary>
|
---|
103 | </indexterm>
|
---|
104 | </listitem>
|
---|
105 | </varlistentry>
|
---|
106 |
|
---|
107 | <varlistentry id="gzexe">
|
---|
108 | <term><command>gzexe</command></term>
|
---|
109 | <listitem>
|
---|
110 | <para>Creates self-decompressing executable files</para>
|
---|
111 | <indexterm zone="ch-system-gzip gzexe">
|
---|
112 | <primary sortas="b-gzexe">gzexe</primary>
|
---|
113 | </indexterm>
|
---|
114 | </listitem>
|
---|
115 | </varlistentry>
|
---|
116 |
|
---|
117 | <varlistentry id="gzip">
|
---|
118 | <term><command>gzip</command></term>
|
---|
119 | <listitem>
|
---|
120 | <para>Compresses the given files using Lempel-Ziv (LZ77) coding</para>
|
---|
121 | <indexterm zone="ch-system-gzip gzip">
|
---|
122 | <primary sortas="b-gzip">gzip</primary>
|
---|
123 | </indexterm>
|
---|
124 | </listitem>
|
---|
125 | </varlistentry>
|
---|
126 |
|
---|
127 | <varlistentry id="uncompress">
|
---|
128 | <term><command>uncompress</command></term>
|
---|
129 | <listitem>
|
---|
130 | <para>Decompresses compressed files</para>
|
---|
131 | <indexterm zone="ch-system-gzip uncompress">
|
---|
132 | <primary sortas="b-uncompress">uncompress</primary>
|
---|
133 | </indexterm>
|
---|
134 | </listitem>
|
---|
135 | </varlistentry>
|
---|
136 |
|
---|
137 | <varlistentry id="zcat">
|
---|
138 | <term><command>zcat</command></term>
|
---|
139 | <listitem>
|
---|
140 | <para>Decompresses the given gzipped files to standard output</para>
|
---|
141 | <indexterm zone="ch-system-gzip zcat">
|
---|
142 | <primary sortas="b-zcat">zcat</primary>
|
---|
143 | </indexterm>
|
---|
144 | </listitem>
|
---|
145 | </varlistentry>
|
---|
146 |
|
---|
147 | <varlistentry id="zcmp">
|
---|
148 | <term><command>zcmp</command></term>
|
---|
149 | <listitem>
|
---|
150 | <para>Runs <command>cmp</command> on gzipped files</para>
|
---|
151 | <indexterm zone="ch-system-gzip zcmp">
|
---|
152 | <primary sortas="b-zcmp">zcmp</primary>
|
---|
153 | </indexterm>
|
---|
154 | </listitem>
|
---|
155 | </varlistentry>
|
---|
156 |
|
---|
157 | <varlistentry id="zdiff">
|
---|
158 | <term><command>zdiff</command></term>
|
---|
159 | <listitem>
|
---|
160 | <para>Runs <command>diff</command> on gzipped files</para>
|
---|
161 | <indexterm zone="ch-system-gzip zdiff">
|
---|
162 | <primary sortas="b-zdiff">zdiff</primary>
|
---|
163 | </indexterm>
|
---|
164 | </listitem>
|
---|
165 | </varlistentry>
|
---|
166 |
|
---|
167 | <varlistentry id="zegrep">
|
---|
168 | <term><command>zegrep</command></term>
|
---|
169 | <listitem>
|
---|
170 | <para>Runs <command>egrep</command> on gzipped files</para>
|
---|
171 | <indexterm zone="ch-system-gzip zegrep">
|
---|
172 | <primary sortas="b-zegrep">zegrep</primary>
|
---|
173 | </indexterm>
|
---|
174 | </listitem>
|
---|
175 | </varlistentry>
|
---|
176 |
|
---|
177 | <varlistentry id="zfgrep">
|
---|
178 | <term><command>zfgrep</command></term>
|
---|
179 | <listitem>
|
---|
180 | <para>Runs <command>fgrep</command> on gzipped files</para>
|
---|
181 | <indexterm zone="ch-system-gzip zfgrep">
|
---|
182 | <primary sortas="b-zfgrep">zfgrep</primary>
|
---|
183 | </indexterm>
|
---|
184 | </listitem>
|
---|
185 | </varlistentry>
|
---|
186 |
|
---|
187 | <varlistentry id="zforce">
|
---|
188 | <term><command>zforce</command></term>
|
---|
189 | <listitem>
|
---|
190 | <para>Forces a <filename class="extension">.gz</filename> extension on
|
---|
191 | all given files that are gzipped files, so that <command>gzip</command>
|
---|
192 | will not compress them again; this can be useful when file names were
|
---|
193 | truncated during a file transfer</para>
|
---|
194 | <indexterm zone="ch-system-gzip zforce">
|
---|
195 | <primary sortas="b-zforce">zforce</primary>
|
---|
196 | </indexterm>
|
---|
197 | </listitem>
|
---|
198 | </varlistentry>
|
---|
199 |
|
---|
200 | <varlistentry id="zgrep">
|
---|
201 | <term><command>zgrep</command></term>
|
---|
202 | <listitem>
|
---|
203 | <para>Runs <command>grep</command> on gzipped files</para>
|
---|
204 | <indexterm zone="ch-system-gzip zgrep">
|
---|
205 | <primary sortas="b-zgrep">zgrep</primary>
|
---|
206 | </indexterm>
|
---|
207 | </listitem>
|
---|
208 | </varlistentry>
|
---|
209 |
|
---|
210 | <varlistentry id="zless">
|
---|
211 | <term><command>zless</command></term>
|
---|
212 | <listitem>
|
---|
213 | <para>Runs <command>less</command> on gzipped files</para>
|
---|
214 | <indexterm zone="ch-system-gzip zless">
|
---|
215 | <primary sortas="b-zless">zless</primary>
|
---|
216 | </indexterm>
|
---|
217 | </listitem>
|
---|
218 | </varlistentry>
|
---|
219 |
|
---|
220 | <varlistentry id="zmore">
|
---|
221 | <term><command>zmore</command></term>
|
---|
222 | <listitem>
|
---|
223 | <para>Runs <command>more</command> on gzipped files</para>
|
---|
224 | <indexterm zone="ch-system-gzip zmore">
|
---|
225 | <primary sortas="b-zmore">zmore</primary>
|
---|
226 | </indexterm>
|
---|
227 | </listitem>
|
---|
228 | </varlistentry>
|
---|
229 |
|
---|
230 | <varlistentry id="znew">
|
---|
231 | <term><command>znew</command></term>
|
---|
232 | <listitem>
|
---|
233 | <para>Re-compresses files from <command>compress</command> format to
|
---|
234 | <command>gzip</command> format—<filename
|
---|
235 | class="extension">.Z</filename> to <filename
|
---|
236 | class="extension">.gz</filename></para>
|
---|
237 | <indexterm zone="ch-system-gzip znew">
|
---|
238 | <primary sortas="b-znew">znew</primary>
|
---|
239 | </indexterm>
|
---|
240 | </listitem>
|
---|
241 | </varlistentry>
|
---|
242 |
|
---|
243 | </variablelist>
|
---|
244 |
|
---|
245 | </sect2>
|
---|
246 |
|
---|
247 | </sect1>
|
---|