source: clfs-sysroot/BOOK/final-system/common/gzip.xml@ 4c1e84e

Last change on this file since 4c1e84e was d232e67, checked in by Joe Ciccone <jciccone@…>, 18 years ago

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

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