source: chapter06/man-db.xml@ f9dcd750

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 f9dcd750 was f9dcd750, checked in by Matthew Burgess <matthew@…>, 16 years ago

Add --libexecdir parameter to Man-DB's configure command. Fixes #2153. Also, remove the --enable-mb-groff parameter as the groff multibyte patch is detected automatically by configure now.

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

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