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
12 Info: The symbolic link should reference
13 "<tt>../man[237]/undocumented.[237].gz</tt>" for manual pages in
14 <tt>/usr/share/man</tt> or
15 "<tt>../../../share/man/man[237]/undocumented.[237].gz</tt>" for manual
16 pages in <tt>/usr/X11R6/man</tt>.
18 Tag: link-to-undocumented-manpage
21 Info: Symbolic links to the undocumented(7) manual page may be provided
22 if no manual page is available, but that is deprecated.
24 The lack of a manual page is still a bug, and if at all possible you
25 should write one yourself.
27 For help with writing manual pages, refer to the Man-Page-HOWTO at
28 http://www.schweikhardt.net/man_page_howto.html, the examples created
29 by <tt>debmake</tt> or <tt>dh_make</tt>, or the
30 <tt>/usr/share/doc/man-db/examples</tt> directory.
31 If the package provides <tt>--help</tt> output, you might want to use
32 the <tt>help2man</tt> utility to generate a simple manual page.
35 Tag: binary-without-manpage
38 Info: Each binary in <tt>/usr/bin</tt>, <tt>/usr/sbin</tt>, <tt>/bin</tt>,
39 <tt>/sbin</tt> or <tt>/usr/games</tt> should have a manual page
41 Note that though the man program has the capability to check for
42 several program names in the NAMES section, each of these programs
43 should have its own manual page (a symbolic link to the appropriate
44 manual page is sufficient) because other manual page viewers such as
45 xman or tkman don't support this.
47 If the name of the man page differs from the binary by case, man may
48 be able to find it anyway; however, it is still best practice to make the
49 case of the man page match the case of the binary.
51 If the man pages are provided by another package on which this package
52 depends, lintian may not be able to determine that man pages are
53 available. In this case, after confirming that all binaries do have
54 man pages after this package and its dependencies are installed, please
55 add a lintian override.
58 Tag: manpage-in-wrong-directory
61 Info: The manual page should be installed in the correct directory below
62 <tt>/usr/share/man/</tt> or <tt>/usr/share/man/<i>locale</i></tt>.
63 Only sections 1 through 9 should be used.
65 The section number in the filename should correspond with the section
66 number in the directory name.
69 Tag: manpage-has-wrong-extension
72 Info: The manual page has an extension other than
73 "<i>section</i>[<i>program</i>].gz".
76 Tag: manpage-not-compressed
79 Info: Manual pages have to be installed compressed (using "<tt>gzip -9</tt>").
82 Tag: x11-games-should-be-in-usr-games
85 Info: Since X11 games should be installed in <tt>/usr/games</tt> (and
86 not in <tt>/usr/X11R6/bin</tt>) and the game's manual pages should be
87 installed in <tt>/usr/share/man/man6</tt>, the directory
88 <tt>/usr/X11R6/man/man6</tt> should be empty.
91 Tag: manpage-not-compressed-with-gzip
94 Info: Manual pages should be compressed with <tt>gzip -9</tt>.
97 Tag: manpage-not-compressed-with-max-compression
100 Info: Manual pages should be compressed with <tt>gzip -9</tt>.
103 Tag: manpage-has-bad-whatis-entry
106 Info: Each manual page should start with a "NAME" section, which lists the
107 name and a brief description of the page separated by "\-". These sections
108 are parsed by "mandb" and stored in a database for the use of "apropos" and
109 "whatis", so they must be in a certain format. This manual page apparently
110 uses the wrong format and cannot be parsed by "mandb".
111 Ref: lexgrog(1), groff_man(7), groff_mdoc(7)
113 Tag: manpage-has-useless-whatis-entry
116 Info: The whatis entry for this manual page (the brief description found
117 in the NAME section) is of the form:
119 program - manual page for program
121 This conveys no information about what the program is for and is
122 repetitive. The short description should contain brief information about
123 what the program is for to aid in searching with apropos and similar
126 If this manpage was generated by help2man, use the -n option to provide a
127 more meaningful description.
129 Tag: manpage-is-dh_make-template
132 Info: This manual page appears to be an unmodified or insufficiently
133 modified copy of the dh_make manual page template. It has a whatis entry
134 (the brief description found in the NAME section) of the form:
136 package - program to do something
138 Please double-check the manual page and replace the template language
139 with specific information about this program.
141 Tag: manpage-has-errors-from-man
144 Info: This man page provokes warnings or errors from man.
146 "cannot adjust" or "can't break" are trouble with paragraph filling,
147 usually related to long lines. Adjustment can be helped by left
148 justifying, breaks can be helped with hyphenation, see "Manipulating
149 Filling and Adjusting" and "Manipulating Hyphenation" in the manual.
151 "can't find numbered character" usually means latin1 etc in the input, and
152 this warning indicates characters will be missing from the output. You can
153 change to escapes like \[:a] described on the groff_char man page.
155 Other warnings are often formatting typos, like missing quotes around a
156 string argument to .IP. These are likely to result in lost or malformed
157 output. See the groff_man (or groff_mdoc if using mdoc) man page for
158 information on macros.
160 This test uses <tt>man</tt>'s <tt>--warnings</tt> option to enable groff
161 warnings that catch common mistakes, such as putting <tt>.</tt> or
162 <tt>'</tt> characters at the start of a line when they are intended as
163 literal text rather than groff commands. This can be fixed either by
164 reformatting the paragraph so that these characters are not at the start of
165 a line, or by adding a zero-width space (<tt>\&</tt>) immediately before
168 At worst, warning messages can be disabled with the .warn directive, see
169 "Debugging" in the groff manual.
171 To test this for yourself you can use the following command:
172 LANG=C man --warnings -l manpage-file >/dev/null
174 Tag: manpage-has-errors-from-pod2man
177 Info: This man page contains a section "POD ERRORS" generated by pod2man.
178 This sections lists errors in the POD syntax found by pod2man during the
179 generation of the man page.
181 Tag: manpage-for-x11-binary-in-wrong-directory
184 Info: Manual pages for binaries which are located in <tt>/usr/X11R6/bin</tt>
185 should be installed below <tt>/usr/X11R6/man</tt>.
187 Note that normally only packages that are part of X itself and those that
188 are using some arcane Imakefiles should actually install binaries into
189 <tt>/usr/X11R6/bin</tt>.
190 Ref: fhs usrsharemanmanualpages
192 Tag: manpage-for-non-x11-binary-in-wrong-directory
195 Info: Manual pages for binaries that are not located in <tt>/usr/X11R6/bin</tt>
196 should not be installed below <tt>/usr/X11R6/man</tt>, but below
197 <tt>/usr/share/man</tt>.
199 Note that moving a binary into <tt>/usr/X11R6/bin</tt> is almost never the
200 proper solution for this problem; move the manual page instead.
201 Ref: fhs usrsharemanmanualpages
203 Tag: bad-so-link-within-manual-page
206 Info: Manual files that use the .so links to include other pages should
207 only point to a path relative to the top-level manual hierarchy, e.g.
209 <tt>.so man3/boo.1.gz</tt>
211 Tag: empty-manual-page
214 Info: The referenced manual page is empty.
216 Tag: manpage-section-mismatch
219 Info: A man page usually should contain a <tt>.TH</tt> header, specifying the
220 section. The section in this manpage doesn't match with the section in the
222 Ref: groff_man(7), man(1)
224 Tag: hyphen-used-as-minus-sign
227 Info: Manual page seems to contain a hyphen where a minus sign was intended.
228 "-" chars are interpreted as hyphens (U+2010) by groff, not as minus signs
229 (U+002D). Since options to programs use minus signs (U+002D), this means for
230 example in UTF-8 locales that you cannot cut&paste options, nor search for
233 "-" must be escaped ("\-") to be interpreted as minus. If you really intend a
234 hyphen, write it as "\(hy" to emphasise that fact. See groff(7) and
235 especially groff_char(7) for details, and also the thread starting with
236 http://lists.debian.org/debian-devel/2003/debian-devel-200303/msg01481.html
238 If you use some tool that converts your documentation to groff format, it
239 might be possible that this tool converts dashes of any kind to groff
240 hyphens, while the safe way of converting dashes is usually to convert them
243 Because this error can occur <em>very</em> often we show only the
244 first 10 occurrences for each man page and give the number of
245 suppressed occurrences. If you want to see all warnings, run
246 lintian with the -d/--debug option.
248 Tag: FSSTND-dir-in-manual-page
251 Info: The manual page references a directory that is specified
252 in the FSSTND but not in the FHS which is used by Debian.
253 This can be an indicator of a mismatch of the location of
254 files as installed for Debian and as described by the man page.
256 If you have to change file locations to abide by Debian Policy
257 please also patch the man page to mention these new locations.
259 Tag: binary-without-english-manpage
262 Info: Each binary in <tt>/usr/bin</tt>, <tt>/usr/sbin</tt>, <tt>/bin</tt>,
263 <tt>/sbin</tt> or <tt>/usr/games</tt> should have a manual page. You don't
264 provide an english, only a translated manpage. Since english is fallback,
265 shipping only a non-english man page leaves most users without a man page
268 Tag: manpage-locale-dir-country-specific
272 Info: This package installs a manual page in a locale directory that
273 includes the country name. A country name should not be included in the
274 directory name unless it indicates a significant difference in the
275 language. The known cases where country names are appropriate are pt_BR
276 and zh_*. Please file a bug against Maemian if this is another case
277 where a country name is appropriate.