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