source: BOOK/final-system/common/gzip.xml@ 548b3b3

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 548b3b3 was 64eda1b, checked in by Jim Gifford <clfs@…>, 18 years ago

Added Robert's gzexe fix http://wiki.linuxfromscratch.org/lfs/ticket/1876

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