source: chapter06/man-db.xml@ 72d7e28

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 72d7e28 was 72d7e28, checked in by Jeremy Huntwork <jhuntwork@…>, 18 years ago

Moved all dependency information to a new page, Appendix C.
Appendix C also contains information concerning the build order.
While there might need to be a few tweaks yet, this information is complete
enough at this point to close out the long-standing ticket #684.
Many thanks to Chris Staub, Dan Nicholson and Manuel Canales Esparcia for
helping get this finished.

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

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