source: chapter06/bzip2.xml@ 72d7e28

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 72d7e28 was 72d7e28, checked in by Jeremy Huntwork <jhuntwork@…>, 18 years ago

Moved all dependency information to a new page, Appendix C.
Appendix C also contains information concerning the build order.
While there might need to be a few tweaks yet, this information is complete
enough at this point to close out the long-standing ticket #684.
Many thanks to Chris Staub, Dan Nicholson and Manuel Canales Esparcia for
helping get this finished.

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

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