2 Author: Christian Schwarz <schwarz@debian.org>
7 Info: This script checks if a binary package conforms to manual page policy.
9 Tag: bad-link-to-undocumented-manpage
11 Info: The symbolic link should reference
12 `<tt>../man[237]/undocumented.[237].gz</tt>' for manual pages in
13 <tt>/usr/share/man</tt> or
14 `<tt>../../../share/man/man[237]/undocumented.[237].gz</tt>' for manual
15 pages in <tt>/usr/X11R6/man</tt>.
17 Tag: link-to-undocumented-manpage
19 Info: Symbolic links to the undocumented(7) manual page may be provided
20 if no manual page is available, but that is deprecated.
22 The lack of a manual page is still a bug, and if at all possible you
23 should write one yourself.
25 For help with writing manual pages, refer to the Man-Page-HOWTO at
26 http://www.schweikhardt.net/man_page_howto.html, the examples created
27 by <tt>debmake</tt> or <tt>dh_make</tt>, or the
28 <tt>/usr/share/doc/man-db/examples</tt> directory.
29 If the package provides <tt>--help</tt> output, you might want to use
30 the <tt>help2man</tt> utility to generate a simple manual page.
33 Tag: binary-without-manpage
35 Info: Each binary in <tt>/usr/bin</tt>, <tt>/usr/sbin</tt>, <tt>/bin</tt>,
36 <tt>/sbin</tt> or <tt>/usr/games</tt> should have a manual page
38 Note that though the man program has the capability to check for
39 several program names in the NAMES section, each of these programs
40 should have its own manual page (a symbolic link to the appropriate
41 manual page is sufficient) because other manual page viewers such as
42 xman or tkman don't support this.
44 If the name of the man page differs from the binary by case, man may
45 be able to find it anyway; however, it is still best practice to make the
46 case of the man page match the case of the binary.
48 If the man pages are provided by another package on which this package
49 depends, lintian may not be able to determine that man pages are
50 available. In this case, after confirming that all binaries do have
51 man pages after this package and its dependencies are installed, please
52 add a lintian override.
55 Tag: manpage-in-wrong-directory
57 Info: The manual page should be installed in the correct directory below
58 <tt>/usr/share/man/</tt> or <tt>/usr/share/man/<i>locale</i></tt>.
59 Only sections 1 through 9 should be used.
61 The section number in the filename should correspond with the section
62 number in the directory name.
65 Tag: manpage-has-wrong-extension
67 Info: The manual page has an extension other than
68 `<i>section</i>[<i>program</i>].gz'.
71 Tag: manpage-not-compressed
73 Info: Manual pages have to be installed compressed (using `<tt>gzip -9</tt>').
76 Tag: x11-games-should-be-in-usr-games
78 Info: Since X11 games should be installed in <tt>/usr/games</tt> (and
79 not in <tt>/usr/X11R6/bin</tt>) and the game's manual pages should be
80 installed in <tt>/usr/share/man/man6</tt>, the directory
81 <tt>/usr/X11R6/man/man6</tt> should be empty.
84 Tag: manpage-not-compressed-with-gzip
86 Info: Manual pages should be compressed with <tt>gzip -9</tt>.
89 Tag: manpage-not-compressed-with-max-compression
91 Info: Manual pages should be compressed with <tt>gzip -9</tt>.
94 Tag: manpage-has-bad-whatis-entry
96 Info: Each manual page should start with a `NAME' section, which lists the
97 name and a brief description of the page seperated by '\-'. These sections
98 are parsed by `mandb' and stored in a database for the use of `apropos' and
99 `whatis', so they must be in a certain format. This manual page apparently
100 uses the wrong format and cannot be parsed by `mandb'.
102 For information on how `NAME' sections should be written see lexgrog(1).
103 See also groff_man(7) and groff_mdoc(7) for general information on writing
106 Tag: manpage-has-useless-whatis-entry
108 Info: The whatis entry for this manual page (the brief description found
109 in the NAME section) is of the form:
111 program - manual page for program
113 This conveys no information about what the program is for and is
114 repetitive. The short description should contain brief information about
115 what the program is for to aid in searching with apropos and similar
118 If this manpage was generated by help2man, use the -n option to provide a
119 more meaningful description.
121 Tag: manpage-is-dh_make-template
123 Info: This manual page appears to be an unmodified or insufficiently
124 modified copy of the dh_make manual page template. It has a whatis entry
125 (the brief description found in the NAME section) of the form:
127 package - program to do something
129 Please double-check the manual page and replace the template language
130 with specific information about this program.
132 Tag: manpage-has-errors-from-man
134 Info: This man page provokes warnings or errors from man.
136 "cannot adjust" or "can't break" are trouble with paragraph filling,
137 usually related to long lines. Adjustment can be helped by left
138 justifying, breaks can be helped with hyphenation, see "Manipulating
139 Filling and Adjusting" and "Manipulating Hyphenation" in the manual.
141 "can't find numbered character" usually means latin1 etc in the input, and
142 this warning indicates characters will be missing from the output. You can
143 change to escapes like \[:a] described on the groff_char man page.
145 Other warnings are often formatting typos, like missing quotes around a
146 string argument to .IP. These are likely to result in lost or malformed
147 output. See the groff_man (or groff_mdoc if using mdoc) man page for
148 information on macros.
150 This test uses <tt>man</tt>'s <tt>--warnings</tt> option to enable groff
151 warnings that catch common mistakes, such as putting <tt>.</tt> or
152 <tt>'</tt> characters at the start of a line when they are intended as
153 literal text rather than groff commands. This can be fixed either by
154 reformatting the paragraph so that these characters are not at the start of
155 a line, or by adding a zero-width space (<tt>\&</tt>) immediately before
158 At worst, warning messages can be disabled with the .warn directive, see
159 "Debugging" in the groff manual.
161 Tag: manpage-for-x11-binary-in-wrong-directory
163 Info: Manual pages for binaries which are located in <tt>/usr/X11R6/bin</tt>
164 should be installed below <tt>/usr/X11R6/man</tt>.
166 Note that normally only packages that are part of X itself and those that
167 are using some arcane Imakefiles should actually install binaries into
168 <tt>/usr/X11R6/bin</tt>.
170 Tag: manpage-for-non-x11-binary-in-wrong-directory
172 Info: Manual pages for binaries that are not located in <tt>/usr/X11R6/bin</tt>
173 should not be installed below <tt>/usr/X11R6/man</tt>, but below
174 <tt>/usr/share/man</tt>.
176 Note that moving a binary into <tt>/usr/X11R6/bin</tt> is almost never the
177 proper solution for this problem; move the manual page instead.
179 Tag: no-manpage-in-correct-directory
181 Info: Manpages for executables in /sbin and /usr/sbin should be placed in
182 section 8; manpages for executables in /bin and /usr/bin in section 1;
183 manpages for executables in /usr/games in section 6. For the noted
184 executable some probable manpages were found but none in the right section.
186 This could either mean there is no manpage for the executable or that its
187 manpage is placed in the wrong section.
189 Tag: bad-so-link-within-manual-page
191 Info: Manual files that use the .so links to include other pages should
192 only point to a path relative to the top-level manual hierarchy, e.g.
194 <tt>.so man3/boo.1.gz</tt>
196 Tag: empty-manual-page
198 Info: The referenced manual page is empty.
200 Tag: manpage-section-mismatch
202 Info: A man page usually should contain a <tt>.TH</tt> header, specifying the
203 section. The section in this manpage doesn't match with the section in the
204 filename. Please consult groff_man(7) for more information about
205 <tt>.TH</tt> syntax (amongst others).
207 Tag: hyphen-used-as-minus-sign
209 Info: Manual page seems to contain a hyphen where a minus sign was intended.
210 '-' chars are interpreted as hyphens (U+2010) by groff, not as minus signs
211 (U+002D). Since options to programs use minus signs (U+002D), this means for
212 example in UTF-8 locales that you cannot cut&paste options, nor search for
215 '-' must be escaped ('\-') to be interpreted as minus. If you really intend a
216 hyphen, write it as '\(hy' to emphasise that fact. See groff(7) and
217 especially groff_char(7) for details, and also the thread starting with
218 http://lists.debian.org/debian-devel/2003/debian-devel-200303/msg01481.html
220 If you use some tool that converts your documentation to groff format, it
221 might be possible that this tool converts dashes of any kind to groff
222 hyphens, while the safe way of converting dashes is usually to convert them
225 Because this error can occur <em>very</em> often we show only the
226 first 10 occurrences for each man page and give the number of
227 suppressed occurrences. If you want to see all warnings, run
228 lintian with the -d/--debug option.
230 Tag: FSSTND-dir-in-manual-page
232 Info: The manual page references a directory that is specified
233 in the FSSTND but not in the FHS which is used by Debian.
234 This can be an indicator of a mismatch of the location of
235 files as installed for Debian and as described by the man page.
237 If you have to change file locations to abide by Debian Policy
238 please also patch the man page to mention these new locations.
240 Tag: binary-without-english-manpage
242 Info: Each binary in <tt>/usr/bin</tt>, <tt>/usr/sbin</tt>, <tt>/bin</tt>,
243 <tt>/sbin</tt> or <tt>/usr/games</tt> should have a manual page. You don't
244 provide an english, only a translated manpage. Since english is fallback,
245 shipping only a non-english man page leaves most users without a man page
248 Tag: manpage-locale-dir-country-specific
251 Info: This package installs a manual page in a locale directory that
252 includes the country name. A country name should not be included in the
253 directory name unless it indicates a significant difference in the
254 language. The known cases where country names are appropriate are pt_BR
255 and zh_*. Please file a bug against Lintian if this is another case
256 where a country name is appropriate.