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