source: clfs-sysroot/BOOK/final-system/common/bzip2.xml@ d5d4d82

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

Text and entity updates.

  • Property mode set to 100644
File size: 8.6 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
21 decompressing files. Compressing text files with <command>bzip2</command>
22 yields a much better compression percentage than with the traditional
23 <command>gzip</command>.</para>
24
25 </sect2>
26
27 <sect2 role="installation">
28 <title>Installation of Bzip2</title>
29
30 <para os="p1">Apply a patch to install the documentation for this
31 package:</para>
32
33<screen os="p2"><userinput>patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
34
35 <para os="p3">The <command>bzgrep</command> command does not escape '|' and
36 '&amp;' in filenames passed to it. This allows arbitrary commands to be
37 executed with the privileges of the user running <command>bzgrep</command>.
38 Apply the following patch to address this:</para>
39
40<screen os="p4"><userinput>patch -Np1 -i ../&bzip2-bzgrep-patch;</userinput></screen>
41
42 <para os="p5">The <command>bzdiff</command> script depends on tempfile.
43 We remove that dependency with this patch:</para>
44
45<screen os="p6"><userinput>patch -Np1 -i ../&bzip2-remove_tempfile-patch;</userinput></screen>
46
47 <para os="s1">Bzip2's default Makefile target automatically runs
48 the testsuite as well. Disable the tests since they won't work on a
49 multi-architecture build:</para>
50
51<screen os="s2"><userinput>cp Makefile{,.orig}
52sed -e "/^all:/s/ test//" Makefile.orig &gt; Makefile</userinput></screen>
53
54 <para os="a">The Bzip2 package does not contain a <command>configure</command>
55 script. Compile it with:</para>
56
57<screen os="b"><userinput>make -f Makefile-libbz2_so CC="${CC}" AR="${AR}" RANLIB="${RANLIB}"
58make clean</userinput></screen>
59
60 <para os="c">The <parameter>-f</parameter> flag will cause Bzip2 to be built
61 using a different <filename>Makefile</filename> file, in this case the
62 <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
63 <filename class="libraryfile">libbz2.so</filename> library and links the
64 Bzip2 utilities against it.</para>
65
66 <para os="d">Recompile the package using a non-shared library.</para>
67
68<screen os="e"><userinput>make CC="${CC}" AR="${AR}" RANLIB="${RANLIB}"</userinput></screen>
69
70 <note os="f">
71 <para>If reinstalling Bzip2, perform
72 <userinput>rm -vf ${CLFS}/usr/bin/bz*</userinput> first, otherwise the
73 following <command>make PREFIX=${CLFS}/usr install</command> will fail.</para>
74 </note>
75
76 <para os="g">Install the programs:</para>
77
78<screen os="h"><userinput>make PREFIX=${CLFS}/usr install</userinput></screen>
79
80 <para os="i">Install the shared <command>bzip2</command> binary into the
81 <filename class="directory">/bin</filename> directory, make
82 some necessary symbolic links, and clean up:</para>
83
84<screen os="j"><userinput>cp -v bzip2-shared ${CLFS}/bin/bzip2
85cp -av libbz2.so* ${CLFS}/lib
86ln -sv ../../lib/libbz2.so.1.0 ${CLFS}/usr/lib/libbz2.so
87rm -v ${CLFS}/usr/bin/{bunzip2,bzcat,bzip2}
88ln -sv bzip2 ${CLFS}/bin/bunzip2
89ln -sv bzip2 ${CLFS}/bin/bzcatt</userinput></screen>
90
91 </sect2>
92
93 <sect2 id="contents-bzip2" role="content">
94 <title>Contents of Bzip2</title>
95
96 <segmentedlist>
97 <segtitle>Installed programs</segtitle>
98 <segtitle>Installed libraries</segtitle>
99
100 <seglistitem>
101 <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff,
102 bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover, bzless, and bzmore</seg>
103 <seg>libbz2.a, libbz2.so (link to libbz2.so.1.0), libbz2.so.1.0 (link to
104 libbz2.so.&bzip2-version;), and libbz2.so.&bzip2-version;</seg>
105 </seglistitem>
106 </segmentedlist>
107
108 <variablelist>
109 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
110 <?dbfo list-presentation="list"?>
111 <?dbhtml list-presentation="table"?>
112
113 <varlistentry id="bunzip2">
114 <term><command>bunzip2</command></term>
115 <listitem>
116 <para>Decompresses bzipped files</para>
117 <indexterm zone="ch-system-bzip2 bunzip2">
118 <primary sortas="b-bunzip2">bunzip2</primary>
119 </indexterm>
120 </listitem>
121 </varlistentry>
122
123 <varlistentry id="bzcat">
124 <term><command>bzcat</command></term>
125 <listitem>
126 <para>Decompresses to standard output</para>
127 <indexterm zone="ch-system-bzip2 bzcat">
128 <primary sortas="b-bzcat">bzcat</primary>
129 </indexterm>
130 </listitem>
131 </varlistentry>
132
133 <varlistentry id="bzcmp">
134 <term><command>bzcmp</command></term>
135 <listitem>
136 <para>Runs <command>cmp</command> on bzipped files</para>
137 <indexterm zone="ch-system-bzip2 bzcmp">
138 <primary sortas="b-bzcmp">bzcmp</primary>
139 </indexterm>
140 </listitem>
141 </varlistentry>
142
143 <varlistentry id="bzdiff">
144 <term><command>bzdiff</command></term>
145 <listitem>
146 <para>Runs <command>diff</command> on bzipped files</para>
147 <indexterm zone="ch-system-bzip2 bzdiff">
148 <primary sortas="b-bzdiff">bzdiff</primary>
149 </indexterm>
150 </listitem>
151 </varlistentry>
152
153 <varlistentry id="bzgrep">
154 <term><command>bzgrep</command></term>
155 <listitem>
156 <para>Runs <command>grep</command> on bzipped files</para>
157 <indexterm zone="ch-system-bzip2 bzgrep">
158 <primary sortas="b-bzgrep">bzgrep</primary>
159 </indexterm>
160 </listitem>
161 </varlistentry>
162
163 <varlistentry id="bzegrep">
164 <term><command>bzegrep</command></term>
165 <listitem>
166 <para>Runs <command>egrep</command> on bzipped files</para>
167 <indexterm zone="ch-system-bzip2 bzegrep">
168 <primary sortas="b-bzegrep">bzegrep</primary>
169 </indexterm>
170 </listitem>
171 </varlistentry>
172
173 <varlistentry id="bzfgrep">
174 <term><command>bzfgrep</command></term>
175 <listitem>
176 <para>Runs <command>fgrep</command> on bzipped files</para>
177 <indexterm zone="ch-system-bzip2 bzfgrep">
178 <primary sortas="b-bzfgrep">bzfgrep</primary>
179 </indexterm>
180 </listitem>
181 </varlistentry>
182
183 <varlistentry id="bzip2">
184 <term><command>bzip2</command></term>
185 <listitem>
186 <para>Compresses files using the Burrows-Wheeler block sorting text
187 compression algorithm with Huffman coding; the compression rate is
188 better than that achieved by more conventional compressors using
189 <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
190 <indexterm zone="ch-system-bzip2 bzip2">
191 <primary sortas="b-bzip2">bzip2</primary>
192 </indexterm>
193 </listitem>
194 </varlistentry>
195
196 <varlistentry id="bzip2recover">
197 <term><command>bzip2recover</command></term>
198 <listitem>
199 <para>Tries to recover data from damaged bzipped files</para>
200 <indexterm zone="ch-system-bzip2 bzip2recover">
201 <primary sortas="b-bzip2recover">bzip2recover</primary>
202 </indexterm>
203 </listitem>
204 </varlistentry>
205
206 <varlistentry id="bzless">
207 <term><command>bzless</command></term>
208 <listitem>
209 <para>Runs <command>less</command> on bzipped files</para>
210 <indexterm zone="ch-system-bzip2 bzless">
211 <primary sortas="b-bzless">bzless</primary>
212 </indexterm>
213 </listitem>
214 </varlistentry>
215
216 <varlistentry id="bzmore">
217 <term><command>bzmore</command></term>
218 <listitem>
219 <para>Runs <command>more</command> on bzipped files</para>
220 <indexterm zone="ch-system-bzip2 bzmore">
221 <primary sortas="b-bzmore">bzmore</primary>
222 </indexterm>
223 </listitem>
224 </varlistentry>
225
226 <varlistentry id="libbz2">
227 <term><filename class="libraryfile">libbz2*</filename></term>
228 <listitem>
229 <para>The library implementing lossless, block-sorting data
230 compression, using the Burrows-Wheeler algorithm</para>
231 <indexterm zone="ch-system-bzip2 libbz2">
232 <primary sortas="c-libbz2*">libbz2*</primary>
233 </indexterm>
234 </listitem>
235 </varlistentry>
236
237 </variablelist>
238
239 </sect2>
240
241</sect1>
Note: See TracBrowser for help on using the repository browser.