%general-entities; ]> man-db &man-db-version;
&man-db-url;
Man-DB-&man-db-version; Man-DB <para>The Man-DB package contains programs for finding and viewing man pages.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> <seg>&man-db-ch6-sbu;</seg> <seg>&man-db-ch6-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Man-DB LFS creates /usr/man and /usr/local/man as symlinks. Remove them from the man_db.conf file to prevent redundant results when using programs such as whatis: sed -i -e '\%\t/usr/man%d' -e '\%\t/usr/local/man%d' src/man_db.conf.in Prepare Man-DB for compilation: ./configure --prefix=/usr --libexecdir=/usr/lib \ --sysconfdir=/etc --disable-setuid \ --enable-mb-groff --with-browser=/usr/bin/lynx \ --with-col=/usr/bin/col --with-vgrind=/usr/bin/vgrind \ --with-grap=/usr/bin/grap The meaning of the configure options: --disable-setuid This disables making the man program setuid to user man. --enable-mb-groff This switch tells man-db to expect the Debian multibyte patched version of groff. --with-... These four parameters are used to set some default programs. The col program is a part of the Util-linux-ng package, lynx is a text-based web browser (see BLFS for installation instructions), vgrind converts program sources to Groff input, and grap is useful for typesetting graphs in Groff documents. The vgrind and grap programs are not normally needed for viewing manual pages. They are not part of LFS or BLFS, but you should be able to install them yourself after finishing LFS if you wish to do so. Compile the package: make This package does not come with a test suite. Install the package: make install Non-English Manual Pages in LFS Some packages provide non-English manual pages. They are displayed correctly only if their location and encoding matches the expectation of the "man" program. However, different Linux distributions have different policies (expressed in the choice of the man program, its configuration and patches applied to it) concerning the character encoding in which manual pages are stored in the filesystem. E.g., Debian previously required Russian manual pages to be encoded in KOI8-R and to be placed in /usr/share/man/ru. Now, in addition, their man program (Man-DB) searches for UTF-8 encoded Russian manual pages in /usr/share/man/ru.UTF-8. On the other hand, Fedora uses UTF-8 encoded manual pages exclusively. Russian manual pages are found in /usr/share/man/ru and their man program doesn't acknowledge /usr/share/man/ru.UTF-8. Many other distributions ignore the on disk encodings completely, leaving the end user with a mix of improperly encoded manual pages for their configuration. When man processes the requtested page, it will display the contents as configured, resulting in completely unreadable text if the on disk encoding is not what is expected for that configuration. Disagreement about the expected encoding of manual pages amongst distribution vendors, has led to confusion for upstream package maintainers. One package may contain UTF-8 manual pages, while another ships with manual pages in legacy encodings. man searches for manual pages based on the user's locale settings. Man-DB uses a built-in table (see below) to determine the on disk encoding of manual pages found for a user's locale, only if the directories found do not have an extension that describes the encoding. E.g., because of ".UTF-8" in the directory name, Man-DB knows that all manual pages residing in /usr/share/man/fr.UTF-8 are UTF-8 encoded and, according to the built-in table, expects all manual pages residing in /usr/share/man/ru to be encoded using KOI8-R. Expected character encoding of legacy 8-bit manual pages Language (code) Encoding Language (code) Encoding Danish (da) ISO-8859-1 Bulgarian (bg) CP1251 German (de) ISO-8859-1 Czech (cs) ISO-8859-2 English (en) ISO-8859-1 Croatian (hr) ISO-8859-2 Spanish (es) ISO-8859-1 Hungarian (hu) ISO-8859-2 Finnish (fi) ISO-8859-1 Japanese (ja) EUC-JP French (fr) ISO-8859-1 Korean (ko) EUC-KR Irish (ga) ISO-8859-1 Polish (pl) ISO-8859-2 Galician (gl) ISO-8859-1 Russian (ru) KOI8-R Indonesian (id) ISO-8859-1 Slovak (sk) ISO-8859-2 Icelandic (is) ISO-8859-1 Serbian (sr) ISO-8859-5 Italian (it) ISO-8859-1 Turkish (tr) ISO-8859-9 Dutch (nl) ISO-8859-1 Simplified Chinese (zh_CN) GBK Norwegian (no) ISO-8859-1 Simplified Chinese, Singapore (zh_SG) GBK Portuguese (pt) ISO-8859-1 Traditional Chinese (zh_TW) BIG5 Swedish (sv) ISO-8859-1 Traditional Chinese, Hong Kong (zh_HK) BIG5HKSCS
Manual pages in languages not in the list are not supported. Norwegian does not work because of the transition from no_NO to nb_NO locale, and will be fixed in the next release of Man-DB. Korean is currently non functional because of incomplete fixes in the Debian Groff patch applied in LFS. Packages may install manual pages into an improperly named directory, depending on which distributions the author develops the package for. To assist in the conversion of the manual pages to the proper encoding for the directory in which they are installed, the convert-mans script was written. It will convert manual pages to another encoding before (or after) installation. Install the convert-mans script with the following instructions: cat >> convert-mans << "EOF" #!/bin/sh -e FROM="$1" TO="$2" shift ; shift while [ $# -gt 0 ] do FILE="$1" shift iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv mv .tmp.iconv "$FILE" done EOF install -v -m755 convert-mans /usr/bin If upstream distributes the manual pages in a legacy encoding, the manual pages can simply be copied to /usr/share/man/<language code>. For example, German manual pages can be installed with the following commands: mkdir -p /usr/share/man/de cp -rv man? /usr/share/man/de If upstream distributes manual pages in UTF-8 (i.e., for RedHat) instead of the encoding listed in the table above, they can either be converted from UTF-8 to the encoding listed in the table above, or they can be installed directly into /usr/share/man/<language code>.UTF-8. For example, to install French manual pages in the legacy encoding, use the following commands: convert-mans UTF-8 ISO-8859-1 man?/*.? mkdir -p /usr/share/man/fr cp -rv man? /usr/share/man/fr The French manual pages ship with ready made scripts to do the same conversion. The above instructions are used only as an example for use of the convert-mans script. Finally, as an example installation of UTF-8 manual pages, again, the French manual pages could be installed with the following commands: mkdir -p /usr/share/man/fr.UTF-8 cp -rv man? /usr/share/man/fr.UTF-8
Contents of Man-DB Installed programs apropos, catman, convert-mans, lexgrog, man, mandb, manpath, whatis, and zsoelim Short Descriptions apropos Searches the whatis database and displays the short descriptions of system commands that contain a given string apropos catman Creates or updates the pre-formatted manual pages catman convert-mans Reformats manual pages into the chosen encoding. convert-mans lexgrog Displays one-line summary information about a given manual page lexgrog man Formats and displays the requested manual page man mandb Creates or updates the whatis database mandb manpath Displays the contents of $MANPATH or (if $MANPATH is not set) a suitable search path based on the settings in man.conf and the user's environment manpath whatis Searches the whatis database and displays the short descriptions of system commands that contain the given keyword as a separate word whatis zsoelim Reads files and replaces lines of the form .so file by the contents of the mentioned file zsoelim