source: chapter06/bzip2.xml@ ddd5542

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 ddd5542 was 8ef8304, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Indenting chapter 6, part 3

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

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