source: chapter06/bzip2.xml@ 4c2d97d

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 4c2d97d was 4c2d97d, checked in by Ken Moffat <ken@…>, 19 years ago

clarified the vulnerability with bzgrep

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

  • Property mode set to 100644
File size: 6.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 <!ENTITY % patches-entities SYSTEM "../patches.ent">
5 %general-entities;
6 %patches-entities;
7]>
8<sect1 id="ch-system-bzip2" role="wrap">
9<title>Bzip2-&bzip2-version;</title>
10<?dbhtml filename="bzip2.html"?>
11
12<indexterm zone="ch-system-bzip2"><primary sortas="a-Bzip2">Bzip2</primary></indexterm>
13
14<sect2 role="package"><title/>
15<para>The Bzip2 package contains programs for compressing and decompressing
16files. Compressing text files with <command>bzip2</command> yields a much better
17compression percentage than with the traditional <command>gzip</command>.</para>
18
19<segmentedlist>
20<segtitle>&buildtime;</segtitle>
21<segtitle>&diskspace;</segtitle>
22<seglistitem><seg>0.1 SBU</seg><seg>3.9 MB</seg></seglistitem>
23</segmentedlist>
24
25<segmentedlist>
26<segtitle>&dependencies;</segtitle>
27<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
28GCC, Glibc, and Make</seg></seglistitem>
29</segmentedlist>
30</sect2>
31
32<sect2 role="installation">
33<title>Installation of Bzip2</title>
34
35<para>Apply a patch to install the documentation for this package:</para>
36
37<screen><userinput>patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
38
39<para><command>Bzgrep</command> does not escape '|' and '&amp;' in filenames passed
40to it. This allows arbitrary commands to be executed with the privileges of the
41user running <command>bzgrep</command>. Apply the following to address this:
42</para>
43
44<screen><userinput>patch -Np1 -i ../&bzip2-bzgrep-patch;</userinput></screen>
45
46<para>Prepare Bzip2 for compilation with:</para>
47
48<screen><userinput>make -f Makefile-libbz2_so
49make clean</userinput></screen>
50
51<para>The <parameter>-f</parameter> flag will cause Bzip2 to be built
52using a different <filename>Makefile</filename> file, in this case the
53<filename>Makefile-libbz2_so</filename> file, which creates a dynamic
54<filename class="libraryfile">libbz2.so</filename> library and links the Bzip2
55utilities against it.</para>
56
57<para>Compile the package:</para>
58
59<screen><userinput>make</userinput></screen>
60
61<para>To test the results, issue:
62<userinput>make test</userinput>.</para>
63
64<para>If reinstalling Bzip2, perform
65<userinput>rm -f /usr/bin/bz*</userinput> first, otherwise the following
66<command>make install</command> will fail.</para>
67
68<para>Install the programs:</para>
69
70<screen><userinput>make install</userinput></screen>
71
72<para>Install the shared <command>bzip2</command> binary into the
73<filename class="directory">/bin</filename> directory, make
74some necessary symbolic links, and clean up:</para>
75
76<screen><userinput>cp bzip2-shared /bin/bzip2
77cp -a libbz2.so* /lib
78ln -s ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
79rm /usr/bin/{bunzip2,bzcat,bzip2}
80ln -s bzip2 /bin/bunzip2
81ln -s bzip2 /bin/bzcat</userinput></screen>
82
83</sect2>
84
85
86<sect2 id="contents-bzip2" role="content"><title>Contents of Bzip2</title>
87
88<segmentedlist>
89<segtitle>Installed programs</segtitle>
90<segtitle>Installed libraries</segtitle>
91<seglistitem><seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff,
92bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover, bzless, and bzmore</seg>
93<seg>libbz2.[a,so]</seg></seglistitem>
94</segmentedlist>
95
96<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
97<?dbfo list-presentation="list"?>
98<?dbhtml list-presentation="table"?>
99
100<varlistentry id="bunzip2">
101<term><command>bunzip2</command></term>
102<listitem>
103<para>Decompresses bzipped files</para>
104<indexterm zone="ch-system-bzip2 bunzip2"><primary sortas="b-bunzip2">bunzip2</primary></indexterm>
105</listitem>
106</varlistentry>
107
108<varlistentry id="bzcat">
109<term><command>bzcat</command></term>
110<listitem>
111<para>Decompresses to standard output</para>
112<indexterm zone="ch-system-bzip2 bzcat"><primary sortas="b-bzcat">bzcat</primary></indexterm>
113</listitem>
114</varlistentry>
115
116<varlistentry id="bzcmp">
117<term><command>bzcmp</command></term>
118<listitem>
119<para>Runs <command>cmp</command> on bzipped files</para>
120<indexterm zone="ch-system-bzip2 bzcmp"><primary sortas="b-bzcmp">bzcmp</primary></indexterm>
121</listitem>
122</varlistentry>
123
124<varlistentry id="bzdiff">
125<term><command>bzdiff</command></term>
126<listitem>
127<para>Runs <command>diff</command> on bzipped files</para>
128<indexterm zone="ch-system-bzip2 bzdiff"><primary sortas="b-bzdiff">bzdiff</primary></indexterm>
129</listitem>
130</varlistentry>
131
132<varlistentry id="bzgrep">
133<term><command>bzgrep</command></term>
134<listitem>
135<para>Runs <command>grep</command> on bzipped files</para>
136<indexterm zone="ch-system-bzip2 bzgrep"><primary sortas="b-bzgrep">bzgrep</primary></indexterm>
137</listitem>
138</varlistentry>
139
140<varlistentry id="bzegrep">
141<term><command>bzegrep</command></term>
142<listitem>
143<para>Runs <command>egrep</command> on bzipped files</para>
144<indexterm zone="ch-system-bzip2 bzegrep"><primary sortas="b-bzegrep">bzegrep</primary></indexterm>
145</listitem>
146</varlistentry>
147
148<varlistentry id="bzfgrep">
149<term><command>bzfgrep</command></term>
150<listitem>
151<para>Runs <command>fgrep</command> on bzipped files</para>
152<indexterm zone="ch-system-bzip2 bzfgrep"><primary sortas="b-bzfgrep">bzfgrep</primary></indexterm>
153</listitem>
154</varlistentry>
155
156<varlistentry id="bzip2">
157<term><command>bzip2</command></term>
158<listitem>
159<para>Compresses files using the Burrows-Wheeler block sorting text
160compression algorithm with Huffman coding; the compression rate is
161better than that achieved by more conventional compressors using
162<quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
163<indexterm zone="ch-system-bzip2 bzip2"><primary sortas="b-bzip2">bzip2</primary></indexterm>
164</listitem>
165</varlistentry>
166
167<varlistentry id="bzip2recover">
168<term><command>bzip2recover</command></term>
169<listitem>
170<para>Tries to recover data from damaged bzipped files</para>
171<indexterm zone="ch-system-bzip2 bzip2recover"><primary sortas="b-bzip2recover">bzip2recover</primary></indexterm>
172</listitem>
173</varlistentry>
174
175<varlistentry id="bzless">
176<term><command>bzless</command></term>
177<listitem>
178<para>Runs <command>less</command> on bzipped files</para>
179<indexterm zone="ch-system-bzip2 bzless"><primary sortas="b-bzless">bzless</primary></indexterm>
180</listitem>
181</varlistentry>
182
183<varlistentry id="bzmore">
184<term><command>bzmore</command></term>
185<listitem>
186<para>Runs <command>more</command> on bzipped files</para>
187<indexterm zone="ch-system-bzip2 bzmore"><primary sortas="b-bzmore">bzmore</primary></indexterm>
188</listitem>
189</varlistentry>
190
191<varlistentry id="libbz2">
192<term><filename class="libraryfile">libbz2*</filename></term>
193<listitem>
194<para>The library implementing lossless, block-sorting data
195compression, using the Burrows-Wheeler algorithm</para>
196<indexterm zone="ch-system-bzip2 libbz2"><primary sortas="c-libbz2*">libbz2*</primary></indexterm>
197</listitem>
198</varlistentry>
199</variablelist>
200
201</sect2>
202
203</sect1>
204
Note: See TracBrowser for help on using the repository browser.