Tag LFS-7.9-systemd-rc2
[linux_from_scratch.git] / chapter06 / man-db.xml
blob4e81cc998801545090f86b27f080194fe34e4a40
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 ]>
8 <sect1 id="ch-system-man-db" role="wrap">
9   <?dbhtml filename="man-db.html"?>
11   <sect1info condition="script">
12     <productname>man-db</productname>
13     <productnumber>&man-db-version;</productnumber>
14     <address>&man-db-url;</address>
15   </sect1info>
17   <title>Man-DB-&man-db-version;</title>
19   <indexterm zone="ch-system-man-db">
20     <primary sortas="a-Man-DB">Man-DB</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The Man-DB package contains programs for finding and viewing man
27     pages.</para>
29     <segmentedlist>
30       <segtitle>&buildtime;</segtitle>
31       <segtitle>&diskspace;</segtitle>
33       <seglistitem>
34         <seg>&man-db-ch6-sbu;</seg>
35         <seg>&man-db-ch6-du;</seg>
36       </seglistitem>
37     </segmentedlist>
39   </sect2>
41   <sect2 role="installation">
42     <title>Installation of Man-DB</title>
44     <para>Prepare Man-DB for compilation:</para>
46 <screen><userinput remap="configure">./configure --prefix=/usr                        \
47             --docdir=/usr/share/doc/man-db-&man-db-version; \
48             --sysconfdir=/etc                    \
49             --disable-setuid                     \
50             --with-browser=/usr/bin/lynx         \
51             --with-vgrind=/usr/bin/vgrind        \
52             --with-grap=/usr/bin/grap</userinput></screen>
54     <variablelist>
55       <title>The meaning of the configure options:</title>
57       <varlistentry>
58         <term><parameter>--disable-setuid</parameter></term>
59         <listitem>
60           <para>This disables making the <command>man</command> program setuid
61           to user <systemitem class="username">man</systemitem>.</para>
62         </listitem>
63       </varlistentry>
65       <varlistentry>
66         <term><parameter>--with-...</parameter></term>
67         <listitem>
68           <para>These three parameters are used to set some default programs.
69           <command>lynx</command> is a text-based web browser (see
70           BLFS for installation instructions), <command>vgrind</command>
71           converts program sources to Groff input, and <command>grap</command>
72           is useful for typesetting graphs in Groff documents. The
73           <command>vgrind</command> and <command>grap</command> programs are
74           not normally needed for viewing manual pages. They are not part of
75           LFS or BLFS, but you should be able to install them yourself after
76           finishing LFS if you wish to do so.</para>
77         </listitem>
78       </varlistentry>
80     </variablelist>
82     <para>Compile the package:</para>
84 <screen><userinput remap="make">make</userinput></screen>
86    <para>To test the results, issue:</para>
88 <screen><userinput remap="test">make check</userinput></screen>
90     <para>Install the package:</para>
92 <screen><userinput remap="install">make install</userinput></screen>
94     <para>Remove a reference to a non-existent user:</para>
96 <screen><userinput remap="install">sed -i "s:man root:root root:g" /usr/lib/tmpfiles.d/man-db.conf</userinput></screen>
98   </sect2>
100   <sect2>
101     <title>Non-English Manual Pages in LFS</title>
103     <para>The following table shows the character set that Man-DB assumes
104     manual pages installed under
105     <filename class="directory">/usr/share/man/&lt;ll&gt;</filename> will be
106     encoded with.  In addition to this, Man-DB correctly determines if manual
107     pages installed in that directory are UTF-8 encoded.</para>
109     <!-- Origin: man-db-2.5.9/lib/encodings.c -->
110     <table>
111 <title>Expected character encoding of legacy 8-bit manual pages</title>
112       <?dbfo table-width="6in" ?>
114       <tgroup cols="4">
116         <colspec colnum="1" colwidth="1.5in"/>
117         <colspec colnum="2" colwidth="1in"/>
118         <colspec colnum="3" colwidth="2.5in"/>
119         <colspec colnum="4" colwidth="1in"/>
121         <thead>
122           <row>
123             <entry>Language (code)</entry>
124             <entry>Encoding</entry>
125             <entry>Language (code)</entry>
126             <entry>Encoding</entry>
127           </row>
128         </thead>
130         <tbody>
131           <row>
132             <entry>Danish (da)</entry>
133             <entry>ISO-8859-1</entry>
134             <entry>Croatian (hr)</entry>
135             <entry>ISO-8859-2</entry>
136           </row>
137           <row>
138             <entry>German (de)</entry>
139             <entry>ISO-8859-1</entry>
140             <entry>Hungarian (hu)</entry>
141             <entry>ISO-8859-2</entry>
142           </row>
143           <row>
144             <entry>English (en)</entry>
145             <entry>ISO-8859-1</entry>
146             <entry>Japanese (ja)</entry>
147             <entry>EUC-JP</entry>
148           </row>
149           <row>
150             <entry>Spanish (es)</entry>
151             <entry>ISO-8859-1</entry>
152             <entry>Korean (ko)</entry>
153             <entry>EUC-KR</entry>
154           </row>
155           <row>
156             <entry>Estonian (et)</entry>
157             <entry>ISO-8859-1</entry>
158             <entry>Lithuanian (lt)</entry>
159             <entry>ISO-8859-13</entry>
160           </row>
161           <row>
162             <entry>Finnish (fi)</entry>
163             <entry>ISO-8859-1</entry>
164             <entry>Latvian (lv)</entry>
165             <entry>ISO-8859-13</entry>
166           </row>
167           <row>
168             <entry>French (fr)</entry>
169             <entry>ISO-8859-1</entry>
170             <entry>Macedonian (mk)</entry>
171             <entry>ISO-8859-5</entry>
172           </row>
173           <row>
174             <entry>Irish (ga)</entry>
175             <entry>ISO-8859-1</entry>
176             <entry>Polish (pl)</entry>
177             <entry>ISO-8859-2</entry>
178           </row>
179           <row>
180             <entry>Galician (gl)</entry>
181             <entry>ISO-8859-1</entry>
182             <entry>Romanian (ro)</entry>
183             <entry>ISO-8859-2</entry>
184           </row>
185           <row>
186             <entry>Indonesian (id)</entry>
187             <entry>ISO-8859-1</entry>
188             <entry>Russian (ru)</entry>
189             <entry>KOI8-R</entry>
190           </row>
191           <row>
192             <entry>Icelandic (is)</entry>
193             <entry>ISO-8859-1</entry>
194             <entry>Slovak (sk)</entry>
195             <entry>ISO-8859-2</entry>
196           </row>
197           <row>
198             <entry>Italian (it)</entry>
199             <entry>ISO-8859-1</entry>
200             <entry>Slovenian (sl)</entry>
201             <entry>ISO-8859-2</entry>
202           </row>
203           <row>
204             <entry>Norwegian Bokmal (nb)</entry>
205             <entry>ISO-8859-1</entry>
206             <entry>Serbian Latin (sr@latin)</entry>
207             <entry>ISO-8859-2</entry>
208           </row>
209           <row>
210             <entry>Dutch (nl)</entry>
211             <entry>ISO-8859-1</entry>
212             <entry>Serbian (sr)</entry>
213             <entry>ISO-8859-5</entry>
214           </row>
215           <row>
216             <entry>Norwegian Nynorsk (nn)</entry>
217             <entry>ISO-8859-1</entry>
218             <entry>Turkish (tr)</entry>
219             <entry>ISO-8859-9</entry>
220           </row>
221           <row>
222             <entry>Norwegian (no)</entry>
223             <entry>ISO-8859-1</entry>
224             <entry>Ukrainian (uk)</entry>
225             <entry>KOI8-U</entry>
226           </row>
227           <row>
228             <entry>Portuguese (pt)</entry>
229             <entry>ISO-8859-1</entry>
230             <entry>Vietnamese (vi)</entry>
231             <entry>TCVN5712-1</entry>
232           </row>
233           <row>
234             <entry>Swedish (sv)</entry>
235             <entry>ISO-8859-1</entry>
236             <entry>Simplified Chinese (zh_CN)</entry>
237             <entry>GBK</entry>
238           </row>
239           <row>
240             <entry>Belarusian (be)</entry>
241             <entry>CP1251</entry>
242             <entry>Simplified Chinese, Singapore (zh_SG)</entry>
243             <entry>GBK</entry>
244           </row>
245           <row>
246             <entry>Bulgarian (bg)</entry>
247             <entry>CP1251</entry>
248             <entry>Traditional Chinese, Hong Kong (zh_HK)</entry>
249             <entry>BIG5HKSCS</entry>
250           </row>
251           <row>
252             <entry>Czech (cs)</entry>
253             <entry>ISO-8859-2</entry>
254             <entry>Traditional Chinese (zh_TW)</entry>
255             <entry>BIG5</entry>
256           </row>
257           <row>
258             <entry>Greek (el)</entry>
259             <entry>ISO-8859-7</entry>
260             <entry></entry>
261             <entry></entry>
262           </row>
264         </tbody>
266       </tgroup>
268     </table>
270     <note>
271       <para>Manual pages in languages not in the list are not supported.</para>
272     </note>
274   </sect2>
276   <sect2 id="contents-man-db" role="content">
277     <title>Contents of Man-DB</title>
279     <segmentedlist>
280       <segtitle>Installed programs</segtitle>
281       <segtitle>Installed libraries</segtitle>
282       <segtitle>Installed directories</segtitle>
284       <seglistitem>
285         <seg>accessdb, apropos (link to whatis), catman, lexgrog, man, mandb,
286         manpath, and whatis</seg>
287         <seg>libman.so and libmandb.so</seg>
288         <seg>/usr/lib/man-db, /usr/lib/tmpfiles.d, /usr/libexec/man-db,
289         and /usr/share/doc/man-db-&man-db-version;</seg>
290       </seglistitem>
291     </segmentedlist>
293     <variablelist>
294       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
295       <?dbfo list-presentation="list"?>
296       <?dbhtml list-presentation="table"?>
298       <varlistentry id="accessdb">
299         <term><command>accessdb</command></term>
300         <listitem>
301           <para>Dumps the <command>whatis</command> database contents in
302           human-readable form</para>
303           <indexterm zone="ch-system-man-db accessdb">
304             <primary sortas="b-accessdb">accessdb</primary>
305           </indexterm>
306         </listitem>
307       </varlistentry>
309       <varlistentry id="apropos">
310         <term><command>apropos</command></term>
311         <listitem>
312           <para>Searches the <command>whatis</command> database and displays
313           the short descriptions of system commands that contain a given
314           string</para>
315           <indexterm zone="ch-system-man-db apropos">
316             <primary sortas="b-apropos">apropos</primary>
317           </indexterm>
318         </listitem>
319       </varlistentry>
321       <varlistentry id="catman">
322         <term><command>catman</command></term>
323         <listitem>
324           <para>Creates or updates the pre-formatted manual pages</para>
325           <indexterm zone="ch-system-man-db catman">
326             <primary sortas="b-catman">catman</primary>
327           </indexterm>
328         </listitem>
329       </varlistentry>
331       <varlistentry id="lexgrog">
332         <term><command>lexgrog</command></term>
333         <listitem>
334           <para>Displays one-line summary information about a given manual
335           page</para>
336           <indexterm zone="ch-system-man-db lexgrog">
337             <primary sortas="b-lexgrog">lexgrog</primary>
338           </indexterm>
339         </listitem>
340       </varlistentry>
342       <varlistentry id="man">
343         <term><command>man</command></term>
344         <listitem>
345           <para>Formats and displays the requested manual page</para>
346           <indexterm zone="ch-system-man-db man">
347             <primary sortas="b-man">man</primary>
348           </indexterm>
349         </listitem>
350       </varlistentry>
352       <varlistentry id="mandb">
353         <term><command>mandb</command></term>
354         <listitem>
355           <para>Creates or updates the <command>whatis</command> database</para>
356           <indexterm zone="ch-system-man-db mandb">
357             <primary sortas="b-mandb">mandb</primary>
358           </indexterm>
359         </listitem>
360       </varlistentry>
362       <varlistentry id="manpath">
363         <term><command>manpath</command></term>
364         <listitem>
365           <para>Displays the contents of $MANPATH or (if $MANPATH is not set)
366           a suitable search path based on the settings in man.conf and the
367           user's environment</para>
368           <indexterm zone="ch-system-man-db manpath">
369             <primary sortas="b-manpath">manpath</primary>
370           </indexterm>
371         </listitem>
372       </varlistentry>
374       <varlistentry id="whatis">
375         <term><command>whatis</command></term>
376         <listitem>
377           <para>Searches the <command>whatis</command> database and displays
378           the short descriptions of system commands that contain the given
379           keyword as a separate word</para>
380           <indexterm zone="ch-system-man-db whatis">
381             <primary sortas="b-whatis">whatis</primary>
382           </indexterm>
383         </listitem>
384       </varlistentry>
386       <varlistentry id="libman">
387         <term><filename class="libraryfile">libman</filename></term>
388         <listitem>
389           <para>Contains run-time support for <command>man</command></para>
390           <indexterm zone="ch-system-man-db libman">
391             <primary sortas="c-libman">libman</primary>
392           </indexterm>
393         </listitem>
394       </varlistentry>
396       <varlistentry id="libmandb">
397         <term><filename class="libraryfile">libmandb</filename></term>
398         <listitem>
399           <para>Contains run-time support for <command>man</command></para>
400           <indexterm zone="ch-system-man-db libmandb">
401             <primary sortas="c-libmandb">libmandb</primary>
402           </indexterm>
403         </listitem>
404       </varlistentry>
406     </variablelist>
408   </sect2>
410 </sect1>