%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 Some packages provide UTF-8 manual pages, which previous versions of Man-DB were unable to display. This limitation has been fixed in recent versions, and Man-DB can now convert manual pages from legacy encodings to UTF-8 (and vice-versa) on the fly. This used to be a rather annoying problem across different distributions, as packages written for one distribution would require changes to work on another. The following script will allow you to convert manual pages to and from legacy and UTF-8 encodings. 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 -m755 convert-mans /usr/bin Additional information regarding the compression of man and info pages can be found in the BLFS book at . Non-English Manual Pages in LFS Linux distributions have different policies concerning the character encoding in which manual pages are stored in the filesystem. E.g., RedHat stores all manual pages in UTF-8, while Debian previously used language-specific (mostly 8-bit) encodings. As mentioned above, this leads to incompatibility of packages with manual pages designed for different distributions. LFS previously used the same convention as Debian. This was chosen because Man-DB did not understand manual pages stored in UTF-8 at the time of its introduction into LFS. For our purposes at that time, Man-DB was preferable to Man as it worked without any additional configuration in any locale. This is still true today as Man-DB with Debian patched Groff will now dynamically convert UTF-8 encoded manual pages to the user's locale. Additionally, this combination provides support for Chinese and Japanese locales, and limited support for Korean, whereas Man does not. The current offering of Man as used in RedHat requires major modifications to both the Man and Groff packages, and still falls short on Chinese, Japanese, and Korean encodings. Finally, most distributions, including Debian, are rapidly migrating to all UTF-8 encoded manual pages. Upstream packagers will very likely drop legacy encodings in favor of UTF-8, though adoption has been slow due to the hacks required to make the current Man and Groff packages work correctly together. The relationship between language codes and the expected encoding of legacy manual pages is listed below. Expected character encoding of legacy 8-bit manual pages Language (code) Encoding Danish (da) ISO-8859-1 German (de) ISO-8859-1 English (en) ISO-8859-1 Spanish (es) ISO-8859-1 Finnish (fi) ISO-8859-1 French (fr) ISO-8859-1 Irish (ga) ISO-8859-1 Galician (gl) ISO-8859-1 Indonesian (id) ISO-8859-1 Icelandic (is) ISO-8859-1 Italian (it) ISO-8859-1 Dutch (nl) ISO-8859-1 Norwegian (no) ISO-8859-1 Portuguese (pt) ISO-8859-1 Swedish (sv) ISO-8859-1 Bulgarian (bg) CP1251 Czech (cs) ISO-8859-2 Croatian (hr) ISO-8859-2 Hungarian (hu) ISO-8859-2 Japanese (ja) EUC-JP Korean (ko) EUC-KR Polish (pl) ISO-8859-2 Russian (ru) KOI8-R Slovak (sk) ISO-8859-2 Serbian (sr) ISO-8859-5 Turkish (tr) ISO-8859-9 Simplified Chinese (zh_CN) GBK Simplified Chinese,Singapore} (zh_SG) GBK Traditional Chinese (zh_TW) BIG5 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 Groff patch. 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 Spanish manual pages in the legacy encoding, use the following commands: mv man7/iso_8859-7.7{,X} convert-mans UTF-8 ISO-8859-1 man?/*.? mv man7/iso_8859-7.7{X,} make install The man7/iso_8859-7.7 file needs to be exclueded from the conversion process because it is already in ISO-8859-1 format. This is a packaging bug in man-pages-es-1.55. Future versions should not require this workaround. Finally, as an example installation of UTF-8 manual pages, the French manual pages can 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