source: chapter06/man.xml@ a9fde34e

Last change on this file since a9fde34e was 6a0e6f3, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • Remove the spurious <info> tags that I thought were necessary but evidently aren't

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/LFS-RNG/BOOK@4387 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 6.7 KB
RevLine 
[673b0d8]1<?xml version="1.0" encoding="ISO-8859-1"?>
[1fe35e1]2<!DOCTYPE section [
[673b0d8]3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
[1fe35e1]6<section xmlns="http://docbook.org/docbook-ng"
7 xmlns:xlink="http://www.w3.org/1999/xlink"
8 xml:id="ch-system-man" xreflabel="Man" role="wrap">
[6a0e6f3]9<title>Man-&man-version;</title>
[673b0d8]10<?dbhtml filename="man.html"?>
11
12<indexterm zone="ch-system-man"><primary sortas="a-Man">Man</primary></indexterm>
[6370fa6]13
[6a0e6f3]14<section role="package"><title/>
[5888299]15<para>The Man package contains programs for finding and viewing manual pages.</para>
16
[a001133]17<segmentedlist>
18<segtitle>&buildtime;</segtitle>
19<segtitle>&diskspace;</segtitle>
20<seglistitem><seg>0.1 SBU</seg><seg>1.9MB</seg></seglistitem>
21</segmentedlist>
[673b0d8]22
[a001133]23<segmentedlist>
24<segtitle>Man installation depends on</segtitle>
25<seglistitem><seg>Bash, Binutils, Coreutils, Gawk, GCC,
26Glibc, Grep, Make, Sed</seg></seglistitem>
27</segmentedlist>
[1fe35e1]28</section>
[3554fa3a]29
[1fe35e1]30<section role="installation">
[6a0e6f3]31<title>Installation of Man</title>
[73aedd1d]32
33<para>We'll make three adjustments to the sources of Man.</para>
34
[37dcf2a]35<para>The first is a patch which allows Man to work better with recent releases
36of Groff. In particular, man pages will now display using the full terminal
37width instead of being limited to 80 characters:</para>
[73aedd1d]38
[c8ba565]39<screen><userinput>patch -Np1 -i ../man-&man-version;-80cols-1.patch</userinput></screen>
[73aedd1d]40
[ef57e3b]41<para>The second is a sed substitution to add the <parameter>-R</parameter>
[37dcf2a]42switch to the <emphasis>PAGER</emphasis> variable so that escape sequences are
43properly handled by Less:</para>
[73aedd1d]44
[8dffa04]45<screen><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
[73aedd1d]46
[673b0d8]47<para>The third is also a sed substitution to comment out the <quote>MANPATH
48/usr/man</quote> line in the <filename>man.conf</filename> file to prevent
49redundant results when using programs such as <command>whatis</command>:</para>
[73aedd1d]50
[2ec4b60]51<screen><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
[37dcf2a]52
[73aedd1d]53<para>Now prepare Man for compilation:</para>
54
[e5f8a42]55<screen><userinput>./configure -confdir=/etc</userinput></screen>
[73aedd1d]56
57<para>The meaning of the configure options:</para>
58
[df8334f]59<variablelist>
60<varlistentry>
[ef57e3b]61<term><parameter>-confdir=/etc</parameter></term>
[df8334f]62<listitem><para>This tells the
[90e3cb3]63<command>man</command> program to look for the <filename>man.conf</filename>
[ef57e3b]64configuration file in the <filename class="directory">/etc</filename> directory.</para></listitem>
[df8334f]65</varlistentry>
66</variablelist>
[73aedd1d]67
68<para>Compile the package:</para>
69
70<screen><userinput>make</userinput></screen>
71
[673b0d8]72<para>Lastly, install it:</para>
[73aedd1d]73
74<screen><userinput>make install</userinput></screen>
75
[673b0d8]76<note><para>If you wish to disable SGR (Select Graphic Rendition) escape sequences, you should edit the
[ef57e3b]77<filename>man.conf</filename> file and add the <parameter>-c</parameter> switch
[90e3cb3]78to NROFF.</para></note>
[73aedd1d]79
[b32e803]80<para>If your character set uses 8-bit characters, search for the line
[ef57e3b]81beginning with <quote>NROFF</quote> in <filename>/etc/man.conf</filename>, and verify that it coincides
[b32e803]82with the following:</para>
83
84<screen>NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen>
85
[ef57e3b]86<para>Note that you should use <quote>latin1</quote> even if it is not the character set
[b32e803]87of your locale. The reason is that,
88according to the specification, <application>groff</application> has
89no means of typesetting characters outside ISO-8859-1
90without some strange escape codes, and localized manual
91pages are therefore really a hack. When formatting manual pages,
92<application>groff</application> thinks that they are in the ISO-8859-1
[ef57e3b]93encoding and this <parameter>-Tlatin1</parameter> switch tells
[b32e803]94<application>groff</application> to use the same encoding for output.
95Since <application>groff</application> does no recoding of input characters,
96the formatted result is really in the same encoding as input (although
97<application>groff</application> doesn't know that it is not ISO-8859-1)
98and therefore it is usable as the input for a pager.</para>
99
100<para>Of course, this hack does not solve the problem of non-working
101<command>man2dvi</command> program for localized manual
102pages in non-ISO-8859-1 locales.
103Also, it does not work at all with multibyte character sets.
104The first problem does not have a solution currently. The second
105one is not of a concern because the LFS installation does not support
106multibyte character sets properly anyway. You may want to look at
107internationalization related hints, though.</para>
108
[73aedd1d]109<para>You may want to also take a look at the BLFS page at
[1fe35e1]110<uri xlink:href="&blfs-root;view/cvs/postlfs/compressdoc.html"/> which deals with
[73aedd1d]111formatting and compression issues for man pages.</para>
112
[1fe35e1]113</section>
[6370fa6]114
[5888299]115
[6a0e6f3]116<section xml:id="contents-man" role="content"><title>Contents of Man</title>
[673b0d8]117
[c6cb3aa]118<segmentedlist>
119<segtitle>Installed programs</segtitle>
120<seglistitem><seg>apropos, makewhatis, man,
121man2dvi, man2html and whatis</seg></seglistitem>
122</segmentedlist>
[673b0d8]123
[c6cb3aa]124<variablelist><title>Short descriptions</title>
[673b0d8]125
[1fe35e1]126<varlistentry xml:id="apropos">
[b8a819f]127<term><command>apropos</command></term>
[c6cb3aa]128<listitem>
[673b0d8]129<indexterm zone="ch-system-man apropos"><primary sortas="b-apropos">apropos</primary></indexterm>
[c6cb3aa]130<para>searches the whatis database and displays
[673b0d8]131the short descriptions of system commands that contain a given string.</para>
[c6cb3aa]132</listitem>
133</varlistentry>
[673b0d8]134
[1fe35e1]135<varlistentry xml:id="makewhatis">
[b8a819f]136<term><command>makewhatis</command></term>
[c6cb3aa]137<listitem>
[673b0d8]138<indexterm zone="ch-system-man makewhatis"><primary sortas="b-makewhatis">makewhatis</primary></indexterm>
[c6cb3aa]139<para>builds the whatis database. It reads
[673b0d8]140all the manual pages in the manpath and for each page writes the name and a
141short description in the whatis database.</para>
[c6cb3aa]142</listitem>
143</varlistentry>
[6370fa6]144
[1fe35e1]145<varlistentry xml:id="man">
[b8a819f]146<term><command>man</command></term>
[c6cb3aa]147<listitem>
[673b0d8]148<indexterm zone="ch-system-man man"><primary sortas="b-man">man</primary></indexterm>
[c6cb3aa]149<para>formats and displays the requested on-line manual page.</para>
150</listitem>
151</varlistentry>
[673b0d8]152
[1fe35e1]153<varlistentry xml:id="man2dvi">
[b8a819f]154<term><command>man2dvi</command></term>
[c6cb3aa]155<listitem>
[673b0d8]156<indexterm zone="ch-system-man man2dvi"><primary sortas="b-man2dvi">man2dvi</primary></indexterm>
[c6cb3aa]157<para>converts a manual page into dvi format.</para>
158</listitem>
159</varlistentry>
[673b0d8]160
[1fe35e1]161<varlistentry xml:id="man2html">
[b8a819f]162<term><command>man2html</command></term>
[c6cb3aa]163<listitem>
[673b0d8]164<indexterm zone="ch-system-man man2html"><primary sortas="b-man2html">man2html</primary></indexterm>
[c6cb3aa]165<para>converts a manual page into html.</para>
166</listitem>
167</varlistentry>
[673b0d8]168
[1fe35e1]169<varlistentry xml:id="whatis">
[b8a819f]170<term><command>whatis</command></term>
[c6cb3aa]171<listitem>
[673b0d8]172<indexterm zone="ch-system-man whatis"><primary sortas="b-whatis">whatis</primary></indexterm>
[c6cb3aa]173<para>searches the whatis database and displays the short descriptions of system
174commands that contain the given keyword as a separate word.</para>
175</listitem>
176</varlistentry>
177</variablelist>
[673b0d8]178
[1fe35e1]179</section>
[673b0d8]180
[1fe35e1]181</section>
Note: See TracBrowser for help on using the repository browser.