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-man-db" role="wrap">
|
---|
9 | <?dbhtml filename="man-db.html"?>
|
---|
10 |
|
---|
11 | <title>Man-DB-&man-db-version;</title>
|
---|
12 |
|
---|
13 | <indexterm zone="ch-system-man-db">
|
---|
14 | <primary sortas="a-Man-DB">Man-DB</primary>
|
---|
15 | </indexterm>
|
---|
16 |
|
---|
17 | <sect2 role="package">
|
---|
18 | <title/>
|
---|
19 |
|
---|
20 | <para>The Man-DB package contains programs for finding and viewing man
|
---|
21 | pages.</para>
|
---|
22 |
|
---|
23 | <segmentedlist>
|
---|
24 | <segtitle>&buildtime;</segtitle>
|
---|
25 | <segtitle>&diskspace;</segtitle>
|
---|
26 |
|
---|
27 | <seglistitem>
|
---|
28 | <seg>0.2 SBU</seg>
|
---|
29 | <seg>9.0 MB</seg>
|
---|
30 | </seglistitem>
|
---|
31 | </segmentedlist>
|
---|
32 |
|
---|
33 | <segmentedlist>
|
---|
34 | <segtitle>&dependencies;</segtitle>
|
---|
35 |
|
---|
36 | <seglistitem>
|
---|
37 | <seg>Bash, Berkeley DB, Binutils, Coreutils, Gawk, GCC, Gettext,
|
---|
38 | Glibc, Grep, Make, and Sed</seg>
|
---|
39 | </seglistitem>
|
---|
40 | </segmentedlist>
|
---|
41 |
|
---|
42 | </sect2>
|
---|
43 |
|
---|
44 | <sect2 role="installation">
|
---|
45 | <title>Installation of Man-DB</title>
|
---|
46 |
|
---|
47 | <para>Three adjustments need to be made to the sources of Man-DB.</para>
|
---|
48 |
|
---|
49 | <para>The first one changes the location of translated manual pages that come
|
---|
50 | with Man-DB, in order for them to be accessible in both traditional and
|
---|
51 | UTF-8 locales:</para>
|
---|
52 |
|
---|
53 | <screen><userinput>mv man/de{_DE.88591,} &&
|
---|
54 | mv man/es{_ES.88591,} &&
|
---|
55 | mv man/it{_IT.88591,} &&
|
---|
56 | mv man/ja{_JP.eucJP,} &&
|
---|
57 | sed -i 's,\*_\*,??,' man/Makefile.in</userinput></screen>
|
---|
58 |
|
---|
59 | <para>The second change is a <command>sed</command> substitution to delete
|
---|
60 | the <quote>/usr/man</quote> lines in the <filename>man_db.conf</filename>
|
---|
61 | file to prevent redundant results when using programs such as
|
---|
62 | <command>whatis</command>:</para>
|
---|
63 |
|
---|
64 | <screen><userinput>sed -i '/\t\/usr\/man/d' src/man_db.conf.in</userinput></screen>
|
---|
65 |
|
---|
66 | <para>The third change accounts for programs that Man-DB should be able
|
---|
67 | to find at runtime, but that haven't been installed yet:</para>
|
---|
68 |
|
---|
69 | <screen><userinput>cat >>include/manconfig.h.in <<"EOF"
|
---|
70 | <literal>#define WEB_BROWSER "exec /usr/bin/lynx"
|
---|
71 | #define COL "/usr/bin/col"
|
---|
72 | #define VGRIND "/usr/bin/vgrind"
|
---|
73 | #define GRAP "/usr/bin/grap"</literal>
|
---|
74 | EOF</userinput></screen>
|
---|
75 |
|
---|
76 | <para>The <command>col</command> program is a part of the Util-linux
|
---|
77 | package, <command>lynx</command> is a text-based web browser (see BLFS
|
---|
78 | for installation instructions), <command>vgrind</command> converts
|
---|
79 | program sources to Groff input, and <command>grap</command> is useful
|
---|
80 | for typesetting graphs in Groff documents. The <command>vgrind</command>
|
---|
81 | and <command>grap</command> programs are not normally needed for viewing
|
---|
82 | manual pages. They are not part of LFS or BLFS, but you should be able
|
---|
83 | to install them yourself after finishing LFS if you wish to do so.</para>
|
---|
84 |
|
---|
85 | <para>Prepare Man-DB for compilation:</para>
|
---|
86 |
|
---|
87 | <screen><userinput>./configure --prefix=/usr --enable-mb-groff --disable-setuid</userinput></screen>
|
---|
88 |
|
---|
89 | <variablelist>
|
---|
90 | <title>The meaning of the configure options:</title>
|
---|
91 |
|
---|
92 | <varlistentry>
|
---|
93 | <term><parameter>--enable-mb-groff</parameter></term>
|
---|
94 | <listitem>
|
---|
95 | <para>This tells the <command>man</command> program to use the
|
---|
96 | <quote>ascii8</quote> and <quote>nippon</quote> Groff devices for
|
---|
97 | formatting non-ISO-8859-1 manual pages.</para>
|
---|
98 | </listitem>
|
---|
99 | </varlistentry>
|
---|
100 |
|
---|
101 | <varlistentry>
|
---|
102 | <term><parameter>--disable-setuid</parameter></term>
|
---|
103 | <listitem>
|
---|
104 | <para>This disables making the <command>man</command> program setuid
|
---|
105 | to user <systemitem class="username">man</systemitem>.</para>
|
---|
106 | </listitem>
|
---|
107 | </varlistentry>
|
---|
108 |
|
---|
109 | </variablelist>
|
---|
110 |
|
---|
111 | <para>Compile the package:</para>
|
---|
112 |
|
---|
113 | <screen><userinput>make</userinput></screen>
|
---|
114 |
|
---|
115 | <para>Install the package:</para>
|
---|
116 |
|
---|
117 | <screen><userinput>make install</userinput></screen>
|
---|
118 |
|
---|
119 | <para>Some packages provide UTF-8 man pages which this version of
|
---|
120 | <command>man</command> is unable to display. The following script will
|
---|
121 | allow some of these to be converted into the expected encodings shown in
|
---|
122 | the table below. Man-DB expects the manual pages to be in the encodings
|
---|
123 | in the table, and will convert them as necessary to the actual locale
|
---|
124 | encoding when it displays them, so that they will display in both UTF-8
|
---|
125 | and traditional locales. Because this script is intended for limited use
|
---|
126 | during the system build, for public data, we will not bother with error
|
---|
127 | checking, nor use a non-predictable temporary file name.</para>
|
---|
128 |
|
---|
129 | <screen><userinput>cat >>convert-mans <<"EOF"
|
---|
130 | <literal>#!/bin/sh -e
|
---|
131 | FROM="$1"
|
---|
132 | TO="$2"
|
---|
133 | shift ; shift
|
---|
134 | while [ $# -gt 0 ]
|
---|
135 | do
|
---|
136 | FILE="$1"
|
---|
137 | shift
|
---|
138 | iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv
|
---|
139 | mv .tmp.iconv "$FILE"
|
---|
140 | done
|
---|
141 | </literal>
|
---|
142 | EOF
|
---|
143 | install -m755 convert-mans /usr/bin</userinput></screen>
|
---|
144 |
|
---|
145 | <para>Additional information regarding the compression of
|
---|
146 | man and info pages can be found in the BLFS book at
|
---|
147 | <ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/>.</para>
|
---|
148 |
|
---|
149 | </sect2>
|
---|
150 |
|
---|
151 | <sect2>
|
---|
152 | <title>Non-English Manual Pages in LFS</title>
|
---|
153 |
|
---|
154 | <para>Linux distributions have different policies concerning the character
|
---|
155 | encoding in which manual pages are stored in the filesystem. E.g., RedHat
|
---|
156 | stores all manual pages in UTF-8, while Debian uses language-specific
|
---|
157 | (mostly 8-bit) encodings. This leads to incompatibility of packages with
|
---|
158 | manual pages designed for different distributions.</para>
|
---|
159 |
|
---|
160 | <para>LFS uses the same conventions as Debian. The relationship between
|
---|
161 | language codes and the expected encoding of manual pages is listed below.
|
---|
162 | Man-DB automatically converts them to the locale encoding while viewing.</para>
|
---|
163 |
|
---|
164 | <!-- Origin: man-db-2.4.3/src/encodings.c -->
|
---|
165 | <table>
|
---|
166 | <title>Expected character encoding of manual pages</title>
|
---|
167 |
|
---|
168 | <tgroup cols="2">
|
---|
169 |
|
---|
170 | <thead>
|
---|
171 | <row>
|
---|
172 | <entry>Language (code)</entry>
|
---|
173 | <entry>Encoding</entry>
|
---|
174 | </row>
|
---|
175 | </thead>
|
---|
176 |
|
---|
177 | <tbody>
|
---|
178 | <row>
|
---|
179 | <entry>Danish (da)</entry>
|
---|
180 | <entry>ISO-8859-1</entry>
|
---|
181 | </row>
|
---|
182 | <row>
|
---|
183 | <entry>German (de)</entry>
|
---|
184 | <entry>ISO-8859-1</entry>
|
---|
185 | </row>
|
---|
186 | <row>
|
---|
187 | <entry>English (en)</entry>
|
---|
188 | <entry>ISO-8859-1</entry>
|
---|
189 | </row>
|
---|
190 | <row>
|
---|
191 | <entry>Spanish (es)</entry>
|
---|
192 | <entry>ISO-8859-1</entry>
|
---|
193 | </row>
|
---|
194 | <row>
|
---|
195 | <entry>Finnish (fi)</entry>
|
---|
196 | <entry>ISO-8859-1</entry>
|
---|
197 | </row>
|
---|
198 | <row>
|
---|
199 | <entry>French (fr)</entry>
|
---|
200 | <entry>ISO-8859-1</entry>
|
---|
201 | </row>
|
---|
202 | <row>
|
---|
203 | <entry>Irish (ga)</entry>
|
---|
204 | <entry>ISO-8859-1</entry>
|
---|
205 | </row>
|
---|
206 | <row>
|
---|
207 | <entry>Galician (gl)</entry>
|
---|
208 | <entry>ISO-8859-1</entry>
|
---|
209 | </row>
|
---|
210 | <row>
|
---|
211 | <entry>Indonesian (id)</entry>
|
---|
212 | <entry>ISO-8859-1</entry>
|
---|
213 | </row>
|
---|
214 | <row>
|
---|
215 | <entry>Icelandic (is)</entry>
|
---|
216 | <entry>ISO-8859-1</entry>
|
---|
217 | </row>
|
---|
218 | <row>
|
---|
219 | <entry>Italian (it)</entry>
|
---|
220 | <entry>ISO-8859-1</entry>
|
---|
221 | </row>
|
---|
222 | <row>
|
---|
223 | <entry>Dutch (nl)</entry>
|
---|
224 | <entry>ISO-8859-1</entry>
|
---|
225 | </row>
|
---|
226 | <!-- BUG: "no" is deprecated, should use "nb" or "nn" and symlinks -->
|
---|
227 | <row>
|
---|
228 | <entry>Norwegian (no)</entry>
|
---|
229 | <entry>ISO-8859-1</entry>
|
---|
230 | </row>
|
---|
231 | <!-- END BUG -->
|
---|
232 | <row>
|
---|
233 | <entry>Portuguese (pt)</entry>
|
---|
234 | <entry>ISO-8859-1</entry>
|
---|
235 | </row>
|
---|
236 | <row>
|
---|
237 | <entry>Swedish (sv)</entry>
|
---|
238 | <entry>ISO-8859-1</entry>
|
---|
239 | </row>
|
---|
240 | <!-- Languages below require patched groff -->
|
---|
241 | <row>
|
---|
242 | <entry>Czech (cs)</entry>
|
---|
243 | <entry>ISO-8859-2</entry>
|
---|
244 | </row>
|
---|
245 | <row>
|
---|
246 | <entry>Croatian (hr)</entry>
|
---|
247 | <entry>ISO-8859-2</entry>
|
---|
248 | </row>
|
---|
249 | <row>
|
---|
250 | <entry>Hungarian (hu)</entry>
|
---|
251 | <entry>ISO-8859-2</entry>
|
---|
252 | </row>
|
---|
253 | <row>
|
---|
254 | <entry>Japanese (ja)</entry>
|
---|
255 | <entry>EUC-JP</entry>
|
---|
256 | </row>
|
---|
257 | <row>
|
---|
258 | <entry>Korean (ko)</entry>
|
---|
259 | <entry>EUC-KR</entry>
|
---|
260 | </row>
|
---|
261 | <row>
|
---|
262 | <entry>Polish (pl)</entry>
|
---|
263 | <entry>ISO-8859-2</entry>
|
---|
264 | </row>
|
---|
265 | <row>
|
---|
266 | <entry>Russian (ru)</entry>
|
---|
267 | <entry>KOI8-R</entry>
|
---|
268 | </row>
|
---|
269 | <row>
|
---|
270 | <entry>Slovak (sk)</entry>
|
---|
271 | <entry>ISO-8859-2</entry>
|
---|
272 | </row>
|
---|
273 | <row>
|
---|
274 | <entry>Turkish (tr)</entry>
|
---|
275 | <entry>ISO-8859-9</entry>
|
---|
276 | </row>
|
---|
277 | </tbody>
|
---|
278 |
|
---|
279 | </tgroup>
|
---|
280 |
|
---|
281 | </table>
|
---|
282 |
|
---|
283 | <note>
|
---|
284 | <para>Manual pages in languages not in the list are not supported.
|
---|
285 | Norwegian doesn't work now because of the transition from no_NO to
|
---|
286 | nb_NO locale, and Korean is non-functional because of the incomplete
|
---|
287 | Groff patch.</para>
|
---|
288 | </note>
|
---|
289 |
|
---|
290 | <para>If upstream distributes the manual pages in the same encoding
|
---|
291 | as Man-DB expects, the manual pages can be copied to
|
---|
292 | <filename class="directory">/usr/share/man/<replaceable>[language
|
---|
293 | code]</replaceable></filename>. E.g., French manual pages
|
---|
294 | (<ulink url="http://ccb.club.fr/man/man-fr-1.58.0.tar.bz2"/>) can be
|
---|
295 | installed with the following command:</para>
|
---|
296 |
|
---|
297 | <screen role="nodump"><userinput>mkdir -p /usr/share/man/fr &&
|
---|
298 | cp -rv man? /usr/share/man/fr</userinput></screen>
|
---|
299 |
|
---|
300 | <para>If upstream distributes manual pages in UTF-8 (i.e., <quote>for
|
---|
301 | RedHat</quote>) instead of the encoding listed in the table above, they
|
---|
302 | have to be converted from UTF-8 to the encoding listed in the table before
|
---|
303 | installation. This can be achieved with convert-mans, e.g., Spanish manual
|
---|
304 | pages (<ulink url="http://ditec.um.es/~piernas/manpages-es/man-pages-es-1.55.tar.bz2"/>)
|
---|
305 | can be installed with the following commands:</para>
|
---|
306 |
|
---|
307 | <screen role="nodump"><userinput>mv man7/iso_8859-7.7{,X}
|
---|
308 | convert-mans UTF-8 ISO-8859-1 man?/*.?
|
---|
309 | mv man7/iso_8859-7.7{X,}
|
---|
310 | make install</userinput></screen>
|
---|
311 |
|
---|
312 | <note>
|
---|
313 | <para>The need to exclude the <filename>man7/iso_8859-7.7</filename> file
|
---|
314 | from the conversion process because it is already in ISO-8859-1 is a
|
---|
315 | packaging bug in man-pages-es-1.55. Future versions should not require
|
---|
316 | this workaround.</para>
|
---|
317 | </note>
|
---|
318 |
|
---|
319 | </sect2>
|
---|
320 |
|
---|
321 | <sect2 id="contents-man-db" role="content">
|
---|
322 | <title>Contents of Man-DB</title>
|
---|
323 |
|
---|
324 | <segmentedlist>
|
---|
325 | <segtitle>Installed programs</segtitle>
|
---|
326 |
|
---|
327 | <seglistitem>
|
---|
328 | <seg>accessdb, apropos, catman, convert-mans,lexgrog, man, mandb,
|
---|
329 | manpath, and whatis</seg>
|
---|
330 | </seglistitem>
|
---|
331 | </segmentedlist>
|
---|
332 |
|
---|
333 | <variablelist>
|
---|
334 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
335 | <?dbfo list-presentation="list"?>
|
---|
336 | <?dbhtml list-presentation="table"?>
|
---|
337 |
|
---|
338 | <varlistentry id="accessdb">
|
---|
339 | <term><command>accessdb</command></term>
|
---|
340 | <listitem>
|
---|
341 | <para>Dumps the <command>whatis</command> database contents in
|
---|
342 | human-readable form</para>
|
---|
343 | <indexterm zone="ch-system-man-db accessdb">
|
---|
344 | <primary sortas="b-accessdb">accessdb</primary>
|
---|
345 | </indexterm>
|
---|
346 | </listitem>
|
---|
347 | </varlistentry>
|
---|
348 |
|
---|
349 | <varlistentry id="apropos">
|
---|
350 | <term><command>apropos</command></term>
|
---|
351 | <listitem>
|
---|
352 | <para>Searches the <command>whatis</command> database and displays
|
---|
353 | the short descriptions of system commands that contain a given
|
---|
354 | string</para>
|
---|
355 | <indexterm zone="ch-system-man-db apropos">
|
---|
356 | <primary sortas="b-apropos">apropos</primary>
|
---|
357 | </indexterm>
|
---|
358 | </listitem>
|
---|
359 | </varlistentry>
|
---|
360 |
|
---|
361 | <varlistentry id="catman">
|
---|
362 | <term><command>catman</command></term>
|
---|
363 | <listitem>
|
---|
364 | <para>Creates or updates the pre-formatted manual pages</para>
|
---|
365 | <indexterm zone="ch-system-man-db catman">
|
---|
366 | <primary sortas="b-catman">catman</primary>
|
---|
367 | </indexterm>
|
---|
368 | </listitem>
|
---|
369 | </varlistentry>
|
---|
370 |
|
---|
371 | <varlistentry id="convert-mans">
|
---|
372 | <term><command>convert-mans</command></term>
|
---|
373 | <listitem>
|
---|
374 | <para>Reformat man pages so that Man-DB can display them</para>
|
---|
375 | <indexterm zone="ch-system-man-db convert-mans">
|
---|
376 | <primary sortas="b-convert-mans">convert-mans</primary>
|
---|
377 | </indexterm>
|
---|
378 | </listitem>
|
---|
379 | </varlistentry>
|
---|
380 |
|
---|
381 | <varlistentry id="lexgrog">
|
---|
382 | <term><command>lexgrog</command></term>
|
---|
383 | <listitem>
|
---|
384 | <para>Displays one-line summary information about a given manual
|
---|
385 | page</para>
|
---|
386 | <indexterm zone="ch-system-man-db lexgrog">
|
---|
387 | <primary sortas="b-lexgrog">lexgrog</primary>
|
---|
388 | </indexterm>
|
---|
389 | </listitem>
|
---|
390 | </varlistentry>
|
---|
391 |
|
---|
392 | <varlistentry id="man">
|
---|
393 | <term><command>man</command></term>
|
---|
394 | <listitem>
|
---|
395 | <para>Formats and displays the requested manual page</para>
|
---|
396 | <indexterm zone="ch-system-man-db man">
|
---|
397 | <primary sortas="b-man">man</primary>
|
---|
398 | </indexterm>
|
---|
399 | </listitem>
|
---|
400 | </varlistentry>
|
---|
401 |
|
---|
402 | <varlistentry id="mandb">
|
---|
403 | <term><command>mandb</command></term>
|
---|
404 | <listitem>
|
---|
405 | <para>Creates or updates the <command>whatis</command> database</para>
|
---|
406 | <indexterm zone="ch-system-man-db mandb">
|
---|
407 | <primary sortas="b-mandb">mandb</primary>
|
---|
408 | </indexterm>
|
---|
409 | </listitem>
|
---|
410 | </varlistentry>
|
---|
411 |
|
---|
412 | <varlistentry id="whatis">
|
---|
413 | <term><command>whatis</command></term>
|
---|
414 | <listitem>
|
---|
415 | <para>Searches the <command>whatis</command> database and displays
|
---|
416 | the short descriptions of system commands that contain the given
|
---|
417 | keyword as a separate word</para>
|
---|
418 | <indexterm zone="ch-system-man-db whatis">
|
---|
419 | <primary sortas="b-whatis">whatis</primary>
|
---|
420 | </indexterm>
|
---|
421 | </listitem>
|
---|
422 | </varlistentry>
|
---|
423 |
|
---|
424 | </variablelist>
|
---|
425 |
|
---|
426 | </sect2>
|
---|
427 |
|
---|
428 | </sect1>
|
---|