source: chapter06/gzip.xml@ fdcace3

6.1 6.1.1
Last change on this file since fdcace3 was fdcace3, checked in by Matthew Burgess <matthew@…>, 19 years ago

Add gzip security patch

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

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