source: chapter06/bzip2.xml@ 9cdcfb1

Last change on this file since 9cdcfb1 was 9cdcfb1, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Merged r7489 from trunk to udev_update branch.

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

  • 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-bzip2" role="wrap">
9 <?dbhtml filename="bzip2.html"?>
10
11 <title>Bzip2-&bzip2-version;</title>
12
13 <indexterm zone="ch-system-bzip2">
14 <primary sortas="a-Bzip2">Bzip2</primary>
15 </indexterm>
16
17 <sect2 role="package">
18 <title/>
19
20 <para>The Bzip2 package contains programs for compressing and decompressing
21 files. Compressing text files with <command>bzip2</command> yields a much
22 better compression percentage than with the traditional
23 <command>gzip</command>.</para>
24
25 <segmentedlist>
26 <segtitle>&buildtime;</segtitle>
27 <segtitle>&diskspace;</segtitle>
28
29 <seglistitem>
30 <seg>0.1 SBU</seg>
31 <seg>3.9 MB</seg>
32 </seglistitem>
33 </segmentedlist>
34
35 <segmentedlist>
36 <segtitle>&dependencies;</segtitle>
37
38 <seglistitem>
39 <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Patch,
40 and Make</seg>
41 </seglistitem>
42 </segmentedlist>
43
44 </sect2>
45
46 <sect2 role="installation">
47 <title>Installation of Bzip2</title>
48
49 <para>Apply a patch to install the documentation for this package:</para>
50
51<screen><userinput>patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
52
53 <para>The <command>bzgrep</command> command does not escape '|' and '&amp;'
54 in filenames passed to it. This allows arbitrary commands to be executed
55 with the privileges of the user running <command>bzgrep</command>. Apply
56 the following to address this:</para>
57
58<screen><userinput>patch -Np1 -i ../&bzip2-bzgrep-patch;</userinput></screen>
59
60 <para>The <command>bzdiff</command> script still uses the deprecated
61 <command>tempfile</command> program. Update it to use
62 <command>mktemp</command> instead:</para>
63
64<screen><userinput>sed -i 's@tempfile -d /tmp -p bz@mktemp -p /tmp@' bzdiff</userinput></screen>
65
66 <para>Prepare Bzip2 for compilation with:</para>
67
68<screen><userinput>make -f Makefile-libbz2_so
69make clean</userinput></screen>
70
71 <variablelist>
72 <title>The meaning of the make parameter:</title>
73
74 <varlistentry>
75 <term><parameter>-f Makefile-libbz2_so</parameter></term>
76 <listitem>
77 <para>This will cause Bzip2 to be built using a different
78 <filename>Makefile</filename> file, in this case the
79 <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
80 <filename class="libraryfile">libbz2.so</filename> library and links
81 the Bzip2 utilities against it.</para>
82 </listitem>
83 </varlistentry>
84
85 </variablelist>
86
87 <para>Compile and test the package:</para>
88
89<screen><userinput>make</userinput></screen>
90
91 <para>If reinstalling Bzip2, perform
92 <userinput>rm -vf /usr/bin/bz*</userinput> first, otherwise the following
93 <command>make install</command> will fail.</para>
94
95 <para>Install the programs:</para>
96
97<screen><userinput>make install</userinput></screen>
98
99 <para>Install the shared <command>bzip2</command> binary into the
100 <filename class="directory">/bin</filename> directory, make
101 some necessary symbolic links, and clean up:</para>
102
103<screen><userinput>cp -v bzip2-shared /bin/bzip2
104cp -av libbz2.so* /lib
105ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
106rm -v /usr/bin/{bunzip2,bzcat,bzip2}
107ln -sv bzip2 /bin/bunzip2
108ln -sv bzip2 /bin/bzcat</userinput></screen>
109
110 </sect2>
111
112 <sect2 id="contents-bzip2" role="content">
113 <title>Contents of Bzip2</title>
114
115 <segmentedlist>
116 <segtitle>Installed programs</segtitle>
117 <segtitle>Installed libraries</segtitle>
118
119 <seglistitem>
120 <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff,
121 bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover, bzless, and bzmore</seg>
122 <seg>libbz2.[a,so]</seg>
123 </seglistitem>
124 </segmentedlist>
125
126 <variablelist>
127 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
128 <?dbfo list-presentation="list"?>
129 <?dbhtml list-presentation="table"?>
130
131 <varlistentry id="bunzip2">
132 <term><command>bunzip2</command></term>
133 <listitem>
134 <para>Decompresses bzipped files</para>
135 <indexterm zone="ch-system-bzip2 bunzip2">
136 <primary sortas="b-bunzip2">bunzip2</primary>
137 </indexterm>
138 </listitem>
139 </varlistentry>
140
141 <varlistentry id="bzcat">
142 <term><command>bzcat</command></term>
143 <listitem>
144 <para>Decompresses to standard output</para>
145 <indexterm zone="ch-system-bzip2 bzcat">
146 <primary sortas="b-bzcat">bzcat</primary>
147 </indexterm>
148 </listitem>
149 </varlistentry>
150
151 <varlistentry id="bzcmp">
152 <term><command>bzcmp</command></term>
153 <listitem>
154 <para>Runs <command>cmp</command> on bzipped files</para>
155 <indexterm zone="ch-system-bzip2 bzcmp">
156 <primary sortas="b-bzcmp">bzcmp</primary>
157 </indexterm>
158 </listitem>
159 </varlistentry>
160
161 <varlistentry id="bzdiff">
162 <term><command>bzdiff</command></term>
163 <listitem>
164 <para>Runs <command>diff</command> on bzipped files</para>
165 <indexterm zone="ch-system-bzip2 bzdiff">
166 <primary sortas="b-bzdiff">bzdiff</primary>
167 </indexterm>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry id="bzgrep">
172 <term><command>bzgrep</command></term>
173 <listitem>
174 <para>Runs <command>grep</command> on bzipped files</para>
175 <indexterm zone="ch-system-bzip2 bzgrep">
176 <primary sortas="b-bzgrep">bzgrep</primary>
177 </indexterm>
178 </listitem>
179 </varlistentry>
180
181 <varlistentry id="bzegrep">
182 <term><command>bzegrep</command></term>
183 <listitem>
184 <para>Runs <command>egrep</command> on bzipped files</para>
185 <indexterm zone="ch-system-bzip2 bzegrep">
186 <primary sortas="b-bzegrep">bzegrep</primary>
187 </indexterm>
188 </listitem>
189 </varlistentry>
190
191 <varlistentry id="bzfgrep">
192 <term><command>bzfgrep</command></term>
193 <listitem>
194 <para>Runs <command>fgrep</command> on bzipped files</para>
195 <indexterm zone="ch-system-bzip2 bzfgrep">
196 <primary sortas="b-bzfgrep">bzfgrep</primary>
197 </indexterm>
198 </listitem>
199 </varlistentry>
200
201 <varlistentry id="bzip2">
202 <term><command>bzip2</command></term>
203 <listitem>
204 <para>Compresses files using the Burrows-Wheeler block sorting text
205 compression algorithm with Huffman coding; the compression rate is
206 better than that achieved by more conventional compressors using
207 <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
208 <indexterm zone="ch-system-bzip2 bzip2">
209 <primary sortas="b-bzip2">bzip2</primary>
210 </indexterm>
211 </listitem>
212 </varlistentry>
213
214 <varlistentry id="bzip2recover">
215 <term><command>bzip2recover</command></term>
216 <listitem>
217 <para>Tries to recover data from damaged bzipped files</para>
218 <indexterm zone="ch-system-bzip2 bzip2recover">
219 <primary sortas="b-bzip2recover">bzip2recover</primary>
220 </indexterm>
221 </listitem>
222 </varlistentry>
223
224 <varlistentry id="bzless">
225 <term><command>bzless</command></term>
226 <listitem>
227 <para>Runs <command>less</command> on bzipped files</para>
228 <indexterm zone="ch-system-bzip2 bzless">
229 <primary sortas="b-bzless">bzless</primary>
230 </indexterm>
231 </listitem>
232 </varlistentry>
233
234 <varlistentry id="bzmore">
235 <term><command>bzmore</command></term>
236 <listitem>
237 <para>Runs <command>more</command> on bzipped files</para>
238 <indexterm zone="ch-system-bzip2 bzmore">
239 <primary sortas="b-bzmore">bzmore</primary>
240 </indexterm>
241 </listitem>
242 </varlistentry>
243
244 <varlistentry id="libbz2">
245 <term><filename class="libraryfile">libbz2*</filename></term>
246 <listitem>
247 <para>The library implementing lossless, block-sorting data
248 compression, using the Burrows-Wheeler algorithm</para>
249 <indexterm zone="ch-system-bzip2 libbz2">
250 <primary sortas="c-libbz2*">libbz2*</primary>
251 </indexterm>
252 </listitem>
253 </varlistentry>
254
255 </variablelist>
256
257 </sect2>
258
259</sect1>
Note: See TracBrowser for help on using the repository browser.