[fa21b3d] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[2fa922f] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[fa21b3d] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[2fa922f] | 7 |
|
---|
[fa21b3d] | 8 | <sect1 id="ch-system-man-db" role="wrap">
|
---|
[2fa922f] | 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>
|
---|
[fa21b3d] | 22 |
|
---|
[2fa922f] | 23 | <segmentedlist>
|
---|
| 24 | <segtitle>&buildtime;</segtitle>
|
---|
| 25 | <segtitle>&diskspace;</segtitle>
|
---|
[fa21b3d] | 26 |
|
---|
[2fa922f] | 27 | <seglistitem>
|
---|
| 28 | <seg>0.1 SBU</seg>
|
---|
| 29 | <seg>1.1 MB</seg>
|
---|
| 30 | </seglistitem>
|
---|
| 31 | </segmentedlist>
|
---|
[fa21b3d] | 32 |
|
---|
[2fa922f] | 33 | <segmentedlist>
|
---|
| 34 | <segtitle>&dependencies;</segtitle>
|
---|
[fa21b3d] | 35 |
|
---|
[2fa922f] | 36 | <seglistitem>
|
---|
| 37 | <seg>Bash, Berkeley DB, Binutils, Coreutils, Gawk, GCC, Gettext,
|
---|
| 38 | Glibc, Grep, Make, and Sed</seg>
|
---|
| 39 | </seglistitem>
|
---|
| 40 | </segmentedlist>
|
---|
[fa21b3d] | 41 |
|
---|
[2fa922f] | 42 | </sect2>
|
---|
[fa21b3d] | 43 |
|
---|
[2fa922f] | 44 | <sect2 role="installation">
|
---|
| 45 | <title>Installation of Man-DB</title>
|
---|
[fa21b3d] | 46 |
|
---|
[2fa922f] | 47 | <para>Three adjustments need to be made to the sources of Man-DB.</para>
|
---|
| 48 |
|
---|
| 49 | <para>The first one changes the location of translated manual pages that come
|
---|
| 50 | with Man-DB, in order for them to be accessible in both traditional and
|
---|
| 51 | UTF-8 locales:</para>
|
---|
[fa21b3d] | 52 |
|
---|
| 53 | <screen><userinput>mv man/de{_DE.88591,} &&
|
---|
| 54 | mv man/es{_ES.88591,} &&
|
---|
| 55 | mv man/it{_IT.88591,} &&
|
---|
| 56 | mv man/ja{_JP.eucJP,} &&
|
---|
| 57 | sed -i 's,\*_\*,??,' man/Makefile.in</userinput></screen>
|
---|
| 58 |
|
---|
[2fa922f] | 59 | <para>The second change is a <command>sed</command> substitution to delete
|
---|
| 60 | the <quote>/usr/man</quote> lines in the <filename>man_db.conf</filename>
|
---|
| 61 | file to prevent redundant results when using programs such as
|
---|
| 62 | <command>whatis</command>:</para>
|
---|
[fa21b3d] | 63 |
|
---|
| 64 | <screen><userinput>sed -i '/\t\/usr\/man/d' src/man_db.conf.in</userinput></screen>
|
---|
| 65 |
|
---|
[2fa922f] | 66 | <para>The third change accounts for programs that Man-DB should be able
|
---|
| 67 | to find at runtime, but that haven't been installed yet:</para>
|
---|
[fa21b3d] | 68 |
|
---|
| 69 | <screen><userinput>cat >>include/manconfig.h.in <<"EOF"
|
---|
| 70 | <literal>#define WEB_BROWSER "exec /usr/bin/lynx"
|
---|
| 71 | #define COL "/usr/bin/col"
|
---|
| 72 | #define VGRIND "/usr/bin/vgrind"
|
---|
| 73 | #define GRAP "/usr/bin/grap"</literal>
|
---|
| 74 | EOF</userinput></screen>
|
---|
| 75 |
|
---|
[2fa922f] | 76 | <para>The <command>col</command> program is a part of the Util-linux
|
---|
| 77 | package, <command>lynx</command> is a text-based web browser (see BLFS
|
---|
| 78 | for installation instructions), <command>vgrind</command> converts
|
---|
| 79 | program sources to Groff input, and <command>grap</command> is useful
|
---|
| 80 | for typesetting graphs in Groff documents. The <command>vgrind</command>
|
---|
| 81 | and <command>grap</command> programs are not normally needed for viewing
|
---|
| 82 | manual pages. They are not part of LFS or BLFS, but you should be able
|
---|
| 83 | to install them yourself after finishing LFS if you wish to do so.</para>
|
---|
[fa21b3d] | 84 |
|
---|
[2fa922f] | 85 | <para>Prepare Man-DB for compilation:</para>
|
---|
[fa21b3d] | 86 |
|
---|
| 87 | <screen><userinput>./configure --prefix=/usr --enable-mb-groff --disable-setuid</userinput></screen>
|
---|
| 88 |
|
---|
[2fa922f] | 89 | <variablelist>
|
---|
| 90 | <title>The meaning of the configure options:</title>
|
---|
| 91 |
|
---|
| 92 | <varlistentry>
|
---|
| 93 | <term><parameter>--enable-mb-groff</parameter></term>
|
---|
| 94 | <listitem>
|
---|
| 95 | <para>This tells the <command>man</command> program to use the
|
---|
| 96 | <quote>ascii8</quote> and <quote>nippon</quote> Groff devices for
|
---|
| 97 | formatting non-ISO-8859-1 manual pages.</para>
|
---|
| 98 | </listitem>
|
---|
| 99 | </varlistentry>
|
---|
[fa21b3d] | 100 |
|
---|
[2fa922f] | 101 | <varlistentry>
|
---|
| 102 | <term><parameter>--disable-setuid</parameter></term>
|
---|
| 103 | <listitem>
|
---|
| 104 | <para>This disables making the <command>man</command> program setuid
|
---|
| 105 | to user <systemitem class="username">man</systemitem>.</para>
|
---|
| 106 | </listitem>
|
---|
| 107 | </varlistentry>
|
---|
[fa21b3d] | 108 |
|
---|
[2fa922f] | 109 | </variablelist>
|
---|
| 110 |
|
---|
| 111 | <para>Compile the package:</para>
|
---|
[fa21b3d] | 112 |
|
---|
| 113 | <screen><userinput>make</userinput></screen>
|
---|
| 114 |
|
---|
[2fa922f] | 115 | <para>Install the package:</para>
|
---|
[fa21b3d] | 116 |
|
---|
| 117 | <screen><userinput>make install</userinput></screen>
|
---|
| 118 |
|
---|
[2fa922f] | 119 | <para>Additional information regarding the compression of
|
---|
| 120 | man and info pages can be found in the BLFS book at
|
---|
| 121 | <ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/>.</para>
|
---|
| 122 |
|
---|
| 123 | </sect2>
|
---|
| 124 |
|
---|
| 125 | <sect2>
|
---|
| 126 | <title>Non-English Manual Pages in LFS</title>
|
---|
| 127 |
|
---|
| 128 | <para>Linux distributions have different policies concerning the character
|
---|
| 129 | encoding in which manual pages are stored in the filesystem. E.g., RedHat
|
---|
| 130 | stores all manual pages in UTF-8, while Debian uses language-specific
|
---|
| 131 | (mostly 8-bit) encodings. This leads to incompatibility of packages with
|
---|
| 132 | manual pages designed for different distributions.</para>
|
---|
| 133 |
|
---|
| 134 | <para>LFS uses the same conventions as Debian. The relationship between
|
---|
| 135 | language codes and the expected encoding of manual pages is listed below.
|
---|
| 136 | Man-DB automatically converts them to the locale encoding while viewing.</para>
|
---|
| 137 |
|
---|
| 138 | <!-- Origin: man-db-2.4.3/src/encodings.c -->
|
---|
| 139 | <table>
|
---|
| 140 | <title>Expected character encoding of manual pages</title>
|
---|
| 141 |
|
---|
| 142 | <tgroup cols="2">
|
---|
| 143 |
|
---|
| 144 | <thead>
|
---|
| 145 | <row>
|
---|
| 146 | <entry>Language (code)</entry>
|
---|
| 147 | <entry>Encoding</entry>
|
---|
| 148 | </row>
|
---|
| 149 | </thead>
|
---|
| 150 |
|
---|
| 151 | <tbody>
|
---|
| 152 | <row>
|
---|
| 153 | <entry>Danish (da)</entry>
|
---|
| 154 | <entry>ISO-8859-1</entry>
|
---|
| 155 | </row>
|
---|
| 156 | <row>
|
---|
| 157 | <entry>German (de)</entry>
|
---|
| 158 | <entry>ISO-8859-1</entry>
|
---|
| 159 | </row>
|
---|
| 160 | <row>
|
---|
| 161 | <entry>English (en)</entry>
|
---|
| 162 | <entry>ISO-8859-1</entry>
|
---|
| 163 | </row>
|
---|
| 164 | <row>
|
---|
| 165 | <entry>Spanish (es)</entry>
|
---|
| 166 | <entry>ISO-8859-1</entry>
|
---|
| 167 | </row>
|
---|
| 168 | <row>
|
---|
| 169 | <entry>Finnish (fi)</entry>
|
---|
| 170 | <entry>ISO-8859-1</entry>
|
---|
| 171 | </row>
|
---|
| 172 | <row>
|
---|
| 173 | <entry>French (fr)</entry>
|
---|
| 174 | <entry>ISO-8859-1</entry>
|
---|
| 175 | </row>
|
---|
| 176 | <row>
|
---|
| 177 | <entry>Irish (ga)</entry>
|
---|
| 178 | <entry>ISO-8859-1</entry>
|
---|
| 179 | </row>
|
---|
| 180 | <row>
|
---|
| 181 | <entry>Galician (gl)</entry>
|
---|
| 182 | <entry>ISO-8859-1</entry>
|
---|
| 183 | </row>
|
---|
| 184 | <row>
|
---|
| 185 | <entry>Indonesian (id)</entry>
|
---|
| 186 | <entry>ISO-8859-1</entry>
|
---|
| 187 | </row>
|
---|
| 188 | <row>
|
---|
| 189 | <entry>Icelandic (is)</entry>
|
---|
| 190 | <entry>ISO-8859-1</entry>
|
---|
| 191 | </row>
|
---|
| 192 | <row>
|
---|
| 193 | <entry>Italian (it)</entry>
|
---|
| 194 | <entry>ISO-8859-1</entry>
|
---|
| 195 | </row>
|
---|
| 196 | <row>
|
---|
| 197 | <entry>Dutch (nl)</entry>
|
---|
| 198 | <entry>ISO-8859-1</entry>
|
---|
| 199 | </row>
|
---|
| 200 | <!-- BUG: "no" is deprecated, should use "nb" or "nn" and symlinks -->
|
---|
| 201 | <row>
|
---|
| 202 | <entry>Norwegian (no)</entry>
|
---|
| 203 | <entry>ISO-8859-1</entry>
|
---|
| 204 | </row>
|
---|
| 205 | <!-- END BUG -->
|
---|
| 206 | <row>
|
---|
| 207 | <entry>Portuguese (pt)</entry>
|
---|
| 208 | <entry>ISO-8859-1</entry>
|
---|
| 209 | </row>
|
---|
| 210 | <row>
|
---|
| 211 | <entry>Swedish (sv)</entry>
|
---|
| 212 | <entry>ISO-8859-1</entry>
|
---|
| 213 | </row>
|
---|
| 214 | <!-- Languages below require patched groff -->
|
---|
| 215 | <row>
|
---|
| 216 | <entry>Czech (cs)</entry>
|
---|
| 217 | <entry>ISO-8859-2</entry>
|
---|
| 218 | </row>
|
---|
| 219 | <row>
|
---|
| 220 | <entry>Croatian (hr)</entry>
|
---|
| 221 | <entry>ISO-8859-2</entry>
|
---|
| 222 | </row>
|
---|
| 223 | <row>
|
---|
| 224 | <entry>Hungarian (hu)</entry>
|
---|
| 225 | <entry>ISO-8859-2</entry>
|
---|
| 226 | </row>
|
---|
| 227 | <row>
|
---|
| 228 | <entry>Japanese (ja)</entry>
|
---|
| 229 | <entry>EUC-JP</entry>
|
---|
| 230 | </row>
|
---|
| 231 | <row>
|
---|
| 232 | <entry>Korean (ko)</entry>
|
---|
| 233 | <entry>EUC-KR</entry>
|
---|
| 234 | </row>
|
---|
| 235 | <row>
|
---|
| 236 | <entry>Polish (pl)</entry>
|
---|
| 237 | <entry>ISO-8859-2</entry>
|
---|
| 238 | </row>
|
---|
| 239 | <row>
|
---|
| 240 | <entry>Russian (ru)</entry>
|
---|
| 241 | <entry>KOI8-R</entry>
|
---|
| 242 | </row>
|
---|
| 243 | <row>
|
---|
| 244 | <entry>Slovak (sk)</entry>
|
---|
| 245 | <entry>ISO-8859-2</entry>
|
---|
| 246 | </row>
|
---|
| 247 | <row>
|
---|
| 248 | <entry>Turkish (tr)</entry>
|
---|
| 249 | <entry>ISO-8859-9</entry>
|
---|
| 250 | </row>
|
---|
| 251 | </tbody>
|
---|
| 252 |
|
---|
| 253 | </tgroup>
|
---|
| 254 |
|
---|
| 255 | </table>
|
---|
| 256 |
|
---|
| 257 | <note>
|
---|
| 258 | <para>Manual pages in languages not in the list are not supported.
|
---|
| 259 | Norwegian doesn't work now because of the transition from no_NO to
|
---|
| 260 | nb_NO locale, and Korean is non-functional because of the incomplete
|
---|
| 261 | Groff patch.</para>
|
---|
| 262 | </note>
|
---|
| 263 |
|
---|
| 264 | <para>If upstream distributes the manual pages in the same encoding
|
---|
| 265 | as Man-DB expects, the manual pages can be copied to
|
---|
| 266 | <filename class="directory">/usr/share/man/<replaceable>[language
|
---|
| 267 | code]</replaceable></filename>. E.g., French manual pages
|
---|
| 268 | (<ulink url="http://ccb.club.fr/man/man-fr-1.58.0.tar.bz2"/>) can be
|
---|
| 269 | installed with the following command:</para>
|
---|
[fa21b3d] | 270 |
|
---|
| 271 | <screen role="nodump"><userinput>mkdir -p /usr/share/man/fr &&
|
---|
| 272 | cp -rv man? /usr/share/man/fr</userinput></screen>
|
---|
| 273 |
|
---|
[2fa922f] | 274 | <para>If upstream distributes manual pages in UTF-8 (i.e., <quote>for
|
---|
| 275 | RedHat</quote>) instead of the encoding listed in the table above, they
|
---|
| 276 | have to be converted from UTF-8 to the encoding listed in the table before
|
---|
| 277 | installation. E.g., Spanish manual pages (<ulink
|
---|
| 278 | url="http://ditec.um.es/~piernas/manpages-es/man-pages-es-1.55.tar.bz2"/>)
|
---|
| 279 | can be installed with the following commands:</para>
|
---|
[fa21b3d] | 280 |
|
---|
| 281 | <screen role="nodump"><userinput>mkdir -p /usr/share/man/es &&
|
---|
| 282 | find man? -type f | grep -v 'man7/iso_8859-7.7' | \
|
---|
| 283 | while read F ; do
|
---|
[2fa922f] | 284 | iconv -f UTF-8 -t ISO-8859-1 $F >tmp ; mv tmp $F
|
---|
[fa21b3d] | 285 | done &&
|
---|
| 286 | cp -rv man? /usr/share/man/es</userinput></screen>
|
---|
| 287 |
|
---|
[2fa922f] | 288 | <note>
|
---|
| 289 | <para>The need to exclude the <filename>man7/iso_8859-7.7</filename> file
|
---|
| 290 | from the conversion process because it is already in ISO-8859-1 is a
|
---|
| 291 | packaging bug in man-pages-es-1.55. Future versions should not require
|
---|
| 292 | this workaround.</para>
|
---|
| 293 | </note>
|
---|
| 294 |
|
---|
| 295 | </sect2>
|
---|
| 296 |
|
---|
| 297 | <sect2 id="contents-man-db" role="content">
|
---|
| 298 | <title>Contents of Man-DB</title>
|
---|
| 299 |
|
---|
| 300 | <segmentedlist>
|
---|
| 301 | <segtitle>Installed programs</segtitle>
|
---|
| 302 |
|
---|
| 303 | <seglistitem>
|
---|
| 304 | <seg>accessdb, apropos, catman, lexgrog, man, mandb, manpath,
|
---|
| 305 | and whatis</seg>
|
---|
| 306 | </seglistitem>
|
---|
| 307 | </segmentedlist>
|
---|
| 308 |
|
---|
| 309 | <variablelist>
|
---|
| 310 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 311 | <?dbfo list-presentation="list"?>
|
---|
| 312 | <?dbhtml list-presentation="table"?>
|
---|
| 313 |
|
---|
| 314 | <varlistentry id="accessdb">
|
---|
| 315 | <term><command>accessdb</command></term>
|
---|
| 316 | <listitem>
|
---|
| 317 | <para>Dumps the <command>whatis</command> database contents in
|
---|
| 318 | human-readable form</para>
|
---|
| 319 | <indexterm zone="ch-system-man-db accessdb">
|
---|
| 320 | <primary sortas="b-accessdb">accessdb</primary>
|
---|
| 321 | </indexterm>
|
---|
| 322 | </listitem>
|
---|
| 323 | </varlistentry>
|
---|
| 324 |
|
---|
| 325 | <varlistentry id="apropos">
|
---|
| 326 | <term><command>apropos</command></term>
|
---|
| 327 | <listitem>
|
---|
| 328 | <para>Searches the <command>whatis</command> database and displays
|
---|
| 329 | the short descriptions of system commands that contain a given
|
---|
| 330 | string</para>
|
---|
| 331 | <indexterm zone="ch-system-man-db apropos">
|
---|
| 332 | <primary sortas="b-apropos">apropos</primary>
|
---|
| 333 | </indexterm>
|
---|
| 334 | </listitem>
|
---|
| 335 | </varlistentry>
|
---|
| 336 |
|
---|
| 337 | <varlistentry id="catman">
|
---|
| 338 | <term><command>catman</command></term>
|
---|
| 339 | <listitem>
|
---|
| 340 | <para>Creates or updates the pre-formatted manual pages</para>
|
---|
| 341 | <indexterm zone="ch-system-man-db catman">
|
---|
| 342 | <primary sortas="b-catman">catman</primary>
|
---|
| 343 | </indexterm>
|
---|
| 344 | </listitem>
|
---|
| 345 | </varlistentry>
|
---|
| 346 |
|
---|
| 347 | <varlistentry id="lexgrog">
|
---|
| 348 | <term><command>lexgrog</command></term>
|
---|
| 349 | <listitem>
|
---|
| 350 | <para>Displays one-line summary information about a given manual
|
---|
| 351 | page</para>
|
---|
| 352 | <indexterm zone="ch-system-man-db lexgrog">
|
---|
| 353 | <primary sortas="b-lexgrog">lexgrog</primary>
|
---|
| 354 | </indexterm>
|
---|
| 355 | </listitem>
|
---|
| 356 | </varlistentry>
|
---|
| 357 |
|
---|
| 358 | <varlistentry id="man">
|
---|
| 359 | <term><command>man</command></term>
|
---|
| 360 | <listitem>
|
---|
| 361 | <para>Formats and displays the requested manual page</para>
|
---|
| 362 | <indexterm zone="ch-system-man-db man">
|
---|
| 363 | <primary sortas="b-man">man</primary>
|
---|
| 364 | </indexterm>
|
---|
| 365 | </listitem>
|
---|
| 366 | </varlistentry>
|
---|
| 367 |
|
---|
| 368 | <varlistentry id="mandb">
|
---|
| 369 | <term><command>mandb</command></term>
|
---|
| 370 | <listitem>
|
---|
| 371 | <para>Creates or updates the <command>whatis</command> database</para>
|
---|
| 372 | <indexterm zone="ch-system-man-db mandb">
|
---|
| 373 | <primary sortas="b-mandb">mandb</primary>
|
---|
| 374 | </indexterm>
|
---|
| 375 | </listitem>
|
---|
| 376 | </varlistentry>
|
---|
| 377 |
|
---|
| 378 | <varlistentry id="whatis">
|
---|
| 379 | <term><command>whatis</command></term>
|
---|
| 380 | <listitem>
|
---|
| 381 | <para>Searches the <command>whatis</command> database and displays
|
---|
| 382 | the short descriptions of system commands that contain the given
|
---|
| 383 | keyword as a separate word</para>
|
---|
| 384 | <indexterm zone="ch-system-man-db whatis">
|
---|
| 385 | <primary sortas="b-whatis">whatis</primary>
|
---|
| 386 | </indexterm>
|
---|
| 387 | </listitem>
|
---|
| 388 | </varlistentry>
|
---|
| 389 |
|
---|
| 390 | </variablelist>
|
---|
| 391 |
|
---|
| 392 | </sect2>
|
---|
[fa21b3d] | 393 |
|
---|
| 394 | </sect1>
|
---|