From fa21b3dc894b9964620968dfae6685d69ce89fb9 Mon Sep 17 00:00:00 2001 From: Jeremy Huntwork Date: Fri, 6 Jan 2006 01:59:08 +0000 Subject: Initial support of UTF-8. Thanks Alexander Patrakov. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7245 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/man-db.xml | 265 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 chapter06/man-db.xml (limited to 'chapter06/man-db.xml') diff --git a/chapter06/man-db.xml b/chapter06/man-db.xml new file mode 100644 index 000000000..5d80c030a --- /dev/null +++ b/chapter06/man-db.xml @@ -0,0 +1,265 @@ + + + %general-entities; +]> + +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>0.1 SBU</seg><seg>1.1 MB</seg></seglistitem> +</segmentedlist> + +<segmentedlist> +<segtitle>&dependencies;</segtitle> +<seglistitem><seg>Bash, Binutils, Coreutils, Gawk, GCC, DB, +Glibc, Gettext, Grep, Make, and Sed</seg></seglistitem> +</segmentedlist> +</sect2> + +<sect2 role="installation"> +<title>Installation of Man-DB + +Three adjustments need to be made to the sources of Man-DB. + +The first one changes the location of translated manual pages that come +with Man-DB, in order for them to be accessible in both traditional and +UTF-8 locales: + +mv man/de{_DE.88591,} && +mv man/es{_ES.88591,} && +mv man/it{_IT.88591,} && +mv man/ja{_JP.eucJP,} && +sed -i 's,\*_\*,??,' man/Makefile.in + +The second change is a sed substitution to delete the +/usr/man lines in the +man_db.conf file to prevent redundant results when +using programs such as whatis: + +sed -i '/\t\/usr\/man/d' src/man_db.conf.in + +The third change accounts for programs that Man-DB should be able +to find at runtime, but that haven't been installed yet: + +cat >>include/manconfig.h.in <<"EOF" +#define WEB_BROWSER "exec /usr/bin/lynx" +#define COL "/usr/bin/col" +#define VGRIND "/usr/bin/vgrind" +#define GRAP "/usr/bin/grap" +EOF + +The col program is a part of the Util-linux 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. + +Prepare Man-DB for compilation: + +./configure --prefix=/usr --enable-mb-groff --disable-setuid + +The meaning of the configure options: + + + +--enable-mb-groff +This tells the man program to +use the ascii8 and nippon Groff devices for formatting non-ISO-8859-1 +manual pages. + + +--disable-setuid +This disables making the man program +setuid to user man. + + + +Compile the package: + +make + +Install the package: + +make install + +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 uses language-specific +(mostly 8-bit) encodings. This leads to incompatibility of packages with +manual pages designed for different distributions. + +LFS uses the same conventions as Debian. The relationship between +language codes and the expected encoding of manual pages is listed below. +Man-DB automatically converts them to the locale encoding while viewing. + + +Expected character encoding of 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 + +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 +Turkish (tr)ISO-8859-9 + + +
+ +Manual pages in languages not in the list are not supported. +Norwegian doesn't work now because of the transition from no_NO to nb_NO +locale, and Korean is non-functional because of the incomplete Groff patch. + + +If upstream distributes the manual pages in the same encoding as +Man-DB expects, the manual pages can be copied to +/usr/share/man/[language code]. +E.g., French manual pages +() +can be installed with the following command: + +mkdir -p /usr/share/man/fr && +cp -rv man? /usr/share/man/fr + +If upstream distributes manual pages in UTF-8 (i.e., for RedHat) +instead of the encoding listed in the table above, they have to be +converted from UTF-8 to the encoding listed in the table before +installation. E.g., Spanish manual pages +() +can be installed with the following commands: + +mkdir -p /usr/share/man/es && +find man? -type f | grep -v 'man7/iso_8859-7.7' | \ +while read F ; do + iconv -f UTF-8 -t ISO-8859-1 $F >tmp ; mv tmp $F +done && +cp -rv man? /usr/share/man/es + +The need to exclude the man7/iso_8859-7.7 file +from the conversion process because it is already in ISO-8859-1 is a packaging +bug in man-pages-es-1.55. Future versions should not require this workaround. + +
+ +Contents of Man-DB + + +Installed programs +accessdb, apropos, catman, lexgrog, man, mandb, manpath, +and whatis + + +Short Descriptions + + + + + +accessdb + +Dumps the whatis database contents in human-readable form +accessdb + + + + +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 + + + + +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 + + + + +whatis + +Searches the whatis database and displays the short descriptions +of system commands that contain the given keyword as a separate +word +whatis + + + + + + +
+ -- cgit v1.2.3-54-g00ecf