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

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

Updated the bootscripts package and make LFS to CLFS updates.

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