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