[02095ae] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[c439b8a] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[02095ae] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-man" role="wrap">
|
---|
| 9 | <?dbhtml filename="man.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Man-&man-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-system-man">
|
---|
| 14 | <primary sortas="a-Man">Man</primary>
|
---|
| 15 | </indexterm>
|
---|
| 16 |
|
---|
| 17 | <sect2 role="package">
|
---|
| 18 | <title/>
|
---|
| 19 |
|
---|
| 20 | <para>The Man package contains programs for finding and viewing man
|
---|
| 21 | pages.</para>
|
---|
| 22 |
|
---|
| 23 | </sect2>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="installation">
|
---|
| 26 | <title>Installation of Man</title>
|
---|
| 27 |
|
---|
[7b3c921] | 28 | <para os="p1">This patch adds support for Internationalization:</para>
|
---|
| 29 |
|
---|
| 30 | <screen os="p2"><userinput>patch -Np1 -i ../&man-i18n-patch;</userinput></screen>
|
---|
| 31 |
|
---|
[f3547a3] | 32 | <para os="p3">The following patch will add support for new compressors like XZ Utils:</para>
|
---|
| 33 |
|
---|
| 34 | <screen os="p4"><userinput>patch -Np1 -i ../&man-new_compressors-patch;</userinput></screen>
|
---|
| 35 |
|
---|
[02095ae] | 36 | <para os="a">A few adjustments need to be made to the sources of Man.</para>
|
---|
| 37 |
|
---|
[6b1f979] | 38 | <para os="b">First, a <command>sed</command> substitution is needed to
|
---|
| 39 | modify <command>configure</command>'s default search path for executables.
|
---|
| 40 | It cycles through the values in <envar>PREPATH</envar> until it finds the
|
---|
[4f85e0f] | 41 | program it is looking for. The <option>-R</option> switch is also added to
|
---|
| 42 | the <envar>PAGER</envar> variable so that escape sequences are properly
|
---|
| 43 | handled by Less:</para>
|
---|
[02095ae] | 44 |
|
---|
[3349a3a] | 45 | <screen os="c"><userinput>cp configure{,.orig}
|
---|
[6b1f979] | 46 | sed -e "/PREPATH=/s@=.*@=\"$(eval echo ${CLFS}/{,usr/}{sbin,bin})\"@g" \
|
---|
| 47 | -e 's@-is@&R@g' configure.orig > configure</userinput></screen>
|
---|
[02095ae] | 48 |
|
---|
[c413747] | 49 | <para os="d">Another couple of <command>sed</command> substitutions
|
---|
| 50 | comment out the <quote>MANPATH /usr/man</quote> and
|
---|
| 51 | <quote>MANPATH /usr/local/man</quote> lines in the
|
---|
| 52 | <filename>man.conf</filename> file to prevent redundant
|
---|
[f386fcc] | 53 | results when using programs such as <command>whatis</command>:</para>
|
---|
[02095ae] | 54 |
|
---|
[3349a3a] | 55 | <screen os="e"><userinput>cp src/man.conf.in{,.orig}
|
---|
[f386fcc] | 56 | sed -e 's@MANPATH./usr/man@#&@g' \
|
---|
| 57 | -e 's@MANPATH./usr/local/man@#&@g' \
|
---|
| 58 | src/man.conf.in.orig > src/man.conf.in</userinput></screen>
|
---|
[02095ae] | 59 |
|
---|
[d11b860] | 60 | <para os="f">Prepare Man for compilation:</para>
|
---|
[02095ae] | 61 |
|
---|
[d11b860] | 62 | <screen os="g"><userinput>./configure -confdir=/etc</userinput></screen>
|
---|
[02095ae] | 63 |
|
---|
[d11b860] | 64 | <variablelist os="h">
|
---|
[02095ae] | 65 | <title>The meaning of the configure options:</title>
|
---|
| 66 |
|
---|
| 67 | <varlistentry>
|
---|
| 68 | <term><parameter>-confdir=/etc</parameter></term>
|
---|
| 69 | <listitem>
|
---|
| 70 | <para>This tells the <command>man</command> program to look for the
|
---|
| 71 | <filename>man.conf</filename> configuration file in the <filename
|
---|
| 72 | class="directory">/etc</filename> directory.</para>
|
---|
| 73 | </listitem>
|
---|
| 74 | </varlistentry>
|
---|
| 75 | </variablelist>
|
---|
| 76 |
|
---|
[d11b860] | 77 | <para os="i">Configure was modified to look in <filename
|
---|
[6b1f979] | 78 | class="directory">${CLFS}</filename> for the paths of helper
|
---|
| 79 | programs. Right now all of the programs have <filename
|
---|
| 80 | class="directory">${CLFS}</filename> as a prefix. Remove that prefix
|
---|
| 81 | with the following command:</para>
|
---|
[02095ae] | 82 |
|
---|
[d11b860] | 83 | <screen os="j"><userinput>cp conf_script{,.orig}
|
---|
[6b1f979] | 84 | sed "s@${CLFS}@@" conf_script.orig > conf_script</userinput></screen>
|
---|
[02095ae] | 85 |
|
---|
[977c5d0] | 86 | <para os="k">The <command>makemsg</command> program, in Man's source, is
|
---|
| 87 | executed during the build. Compile it using the host's <command>gcc</command>:</para>
|
---|
[02095ae] | 88 |
|
---|
[d11b860] | 89 | <screen os="l"><userinput>gcc src/makemsg.c -o src/makemsg</userinput></screen>
|
---|
[02095ae] | 90 |
|
---|
[d11b860] | 91 | <para os="m">Compile the package:</para>
|
---|
[02095ae] | 92 |
|
---|
[d11b860] | 93 | <screen os="n"><userinput>make</userinput></screen>
|
---|
[02095ae] | 94 |
|
---|
[d11b860] | 95 | <para os="o">Install the package:</para>
|
---|
[6b1f979] | 96 |
|
---|
[d11b860] | 97 | <screen os="p"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
|
---|
[6b1f979] | 98 |
|
---|
[d11b860] | 99 | <note os="q">
|
---|
[02095ae] | 100 | <para>If you will be working on a terminal that does not support
|
---|
| 101 | text attributes such as color and bold, you can disable Select
|
---|
| 102 | Graphic Rendition (SGR) escape sequences by editing the
|
---|
| 103 | <filename>man.conf</filename> file and adding the <option>-c</option>
|
---|
| 104 | option to the <envar>NROFF</envar> variable. If you use multiple
|
---|
| 105 | terminal types for one computer it may be better to selectively add
|
---|
| 106 | the <envar>GROFF_NO_SGR</envar> environment variable for the terminals
|
---|
| 107 | that do not support SGR.</para>
|
---|
| 108 | </note>
|
---|
| 109 |
|
---|
[d11b860] | 110 | <para os="r">If the character set of the locale uses 8-bit characters, search
|
---|
[02095ae] | 111 | for the line beginning with <quote>NROFF</quote> in
|
---|
| 112 | <filename>/etc/man.conf</filename>, and verify that it matches the
|
---|
| 113 | following:</para>
|
---|
| 114 |
|
---|
[d11b860] | 115 | <screen os="s">NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen>
|
---|
[02095ae] | 116 |
|
---|
[d11b860] | 117 | <para os="t">Note that <quote>latin1</quote> should be used even if it is not
|
---|
[02095ae] | 118 | the character set of the locale. The reason is that, according to the
|
---|
| 119 | specification, <command>groff</command> has no means of typesetting
|
---|
| 120 | characters outside International Organization for Standards (ISO) 8859-1
|
---|
| 121 | without some strange escape codes. When formatting man pages,
|
---|
| 122 | <command>groff</command> thinks that they are in the ISO 8859-1 encoding
|
---|
| 123 | and this <parameter>-Tlatin1</parameter> switch tells
|
---|
| 124 | <command>groff</command> to use the same encoding for output. Since
|
---|
| 125 | <command>groff</command> does no recoding of input characters, the f
|
---|
| 126 | ormatted result is really in the same encoding as input, and therefore
|
---|
| 127 | it is usable as the input for a pager.</para>
|
---|
| 128 |
|
---|
[d11b860] | 129 | <para os="u">This does not solve the problem of a non-working
|
---|
[02095ae] | 130 | <command>man2dvi</command> program for localized man pages in
|
---|
| 131 | non-ISO 8859-1 locales. Also, it does not work with multibyte
|
---|
| 132 | character sets. The first problem does not currently have a solution.
|
---|
[755f44a] | 133 | The second issue is not of concern because the CLFS installation does
|
---|
[02095ae] | 134 | not support multibyte character sets.</para>
|
---|
| 135 |
|
---|
| 136 | </sect2>
|
---|
| 137 |
|
---|
| 138 | <sect2 id="contents-man" role="content">
|
---|
| 139 | <title>Contents of Man</title>
|
---|
| 140 |
|
---|
| 141 | <segmentedlist>
|
---|
| 142 | <segtitle>Installed programs</segtitle>
|
---|
| 143 |
|
---|
| 144 | <seglistitem>
|
---|
| 145 | <seg>apropos, makewhatis, man, man2dvi, man2html, and whatis</seg>
|
---|
| 146 | </seglistitem>
|
---|
| 147 | </segmentedlist>
|
---|
| 148 |
|
---|
| 149 | <variablelist>
|
---|
| 150 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 151 | <?dbfo list-presentation="list"?>
|
---|
| 152 | <?dbhtml list-presentation="table"?>
|
---|
| 153 |
|
---|
| 154 | <varlistentry id="apropos">
|
---|
| 155 | <term><command>apropos</command></term>
|
---|
| 156 | <listitem>
|
---|
| 157 | <para>Searches the <command>whatis</command> database and
|
---|
| 158 | displays the short descriptions of system commands that contain
|
---|
| 159 | a given string</para>
|
---|
| 160 | <indexterm zone="ch-system-man apropos">
|
---|
| 161 | <primary sortas="b-apropos">apropos</primary>
|
---|
| 162 | </indexterm>
|
---|
| 163 | </listitem>
|
---|
| 164 | </varlistentry>
|
---|
| 165 |
|
---|
| 166 | <varlistentry id="makewhatis">
|
---|
| 167 | <term><command>makewhatis</command></term>
|
---|
| 168 | <listitem>
|
---|
| 169 | <para>Builds the <command>whatis</command> database; it reads all
|
---|
| 170 | the man pages in the <envar>MANPATH</envar> and writes the name
|
---|
| 171 | and a short description in the <command>whatis</command> database
|
---|
| 172 | for each page</para>
|
---|
| 173 | <indexterm zone="ch-system-man makewhatis">
|
---|
| 174 | <primary sortas="b-makewhatis">makewhatis</primary>
|
---|
| 175 | </indexterm>
|
---|
| 176 | </listitem>
|
---|
| 177 | </varlistentry>
|
---|
| 178 |
|
---|
| 179 | <varlistentry id="man">
|
---|
| 180 | <term><command>man</command></term>
|
---|
| 181 | <listitem>
|
---|
| 182 | <para>Formats and displays the requested on-line man page</para>
|
---|
| 183 | <indexterm zone="ch-system-man man">
|
---|
| 184 | <primary sortas="b-man">man</primary>
|
---|
| 185 | </indexterm>
|
---|
| 186 | </listitem>
|
---|
| 187 | </varlistentry>
|
---|
| 188 |
|
---|
| 189 | <varlistentry id="man2dvi">
|
---|
| 190 | <term><command>man2dvi</command></term>
|
---|
| 191 | <listitem>
|
---|
| 192 | <para>Converts a man page into dvi format</para>
|
---|
| 193 | <indexterm zone="ch-system-man man2dvi">
|
---|
| 194 | <primary sortas="b-man2dvi">man2dvi</primary>
|
---|
| 195 | </indexterm>
|
---|
| 196 | </listitem>
|
---|
| 197 | </varlistentry>
|
---|
| 198 |
|
---|
| 199 | <varlistentry id="man2html">
|
---|
| 200 | <term><command>man2html</command></term>
|
---|
| 201 | <listitem>
|
---|
| 202 | <para>Converts a man page into HTML</para>
|
---|
| 203 | <indexterm zone="ch-system-man man2html">
|
---|
| 204 | <primary sortas="b-man2html">man2html</primary>
|
---|
| 205 | </indexterm>
|
---|
| 206 | </listitem>
|
---|
| 207 | </varlistentry>
|
---|
| 208 |
|
---|
| 209 | <varlistentry id="whatis">
|
---|
| 210 | <term><command>whatis</command></term>
|
---|
| 211 | <listitem>
|
---|
| 212 | <para>Searches the <command>whatis</command> database and
|
---|
| 213 | displays the short descriptions of system commands that
|
---|
| 214 | contain the given keyword as a separate word</para>
|
---|
| 215 | <indexterm zone="ch-system-man whatis">
|
---|
| 216 | <primary sortas="b-whatis">whatis</primary>
|
---|
| 217 | </indexterm>
|
---|
| 218 | </listitem>
|
---|
| 219 | </varlistentry>
|
---|
| 220 |
|
---|
| 221 | </variablelist>
|
---|
| 222 |
|
---|
| 223 | </sect2>
|
---|
| 224 |
|
---|
| 225 | </sect1>
|
---|