source: chapter06/gzip.xml@ 5e66a564

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 5e66a564 was 5e66a564, checked in by Matthew Burgess <matthew@…>, 18 years ago

Fix non-POSIX syntax in gzexe's calls to tail. Fixes #1876.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7787 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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