source: chapter06/man-db.xml@ f2f15e5

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.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 f2f15e5 was f2f15e5, checked in by Randy McMurchy <randy@…>, 16 years ago

Updated Man-DB to 2.5.2

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

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