menus.desc 12.3 KB
Newer Older
1 2 3 4
Check-Script: menus
Author: Christian Schwarz <schwarz@debian.org>
Abbrev: men
Type: binary
5 6
Info: Check if a binary package conforms to policy with respect to
 <b>menu</b> and <b>doc-base</b> files.
7
Needs-Info: bin-pkg-control, unpacked
8 9

Tag: maintainer-script-does-not-check-for-existence-of-updatemenus
10 11
Severity: important
Certainty: possible
12 13
Info: The maintainer script calls the <tt>update-menus</tt> command without
 checking for existence first. (The <tt>menu</tt> package which provides the
Russ Allbery's avatar
Russ Allbery committed
14
 command is not marked as "essential" package.)
15 16
 .
 For example, use the following code in your maintainer script:
17 18
 .
  if which update-menus &gt; /dev/null; then update-menus ; fi
Frank Lichtenheld's avatar
Frank Lichtenheld committed
19

20
Tag: maintainer-script-does-not-check-for-existence-of-installdocs
21 22
Severity: important
Certainty: possible
23 24
Info: The maintainer script calls the <tt>install-docs</tt> command without
 checking for existence first. (The <tt>doc-base</tt> package which provides
Russ Allbery's avatar
Russ Allbery committed
25
 the command is not marked as "essential" package.)
26 27
 .
 For example, use the following code in your maintainer script:
28 29
  if which install-docs &gt; /dev/null; then
    install-docs -i /usr/share/doc-base/&lt;your-package&gt;
30 31 32
  fi

Tag: preinst-calls-updatemenus
33
Severity: important
34
Certainty: certain
35 36 37 38
Info: The preinst script calls the <tt>update-menus</tt> command. Usually,
 this command should be called from the <tt>postinst</tt> maintainer script.

Tag: preinst-calls-installdocs
39
Severity: important
40
Certainty: certain
41 42 43 44
Info: The preinst script calls the <tt>install-docs</tt> command. Usually,
 this command should be called from the <tt>postinst</tt> maintainer script.

Tag: prerm-calls-updatemenus
45
Severity: important
46
Certainty: certain
47 48 49 50
Info: The prerm script calls the <tt>update-menus</tt> command. Usually,
 this command should be called from the <tt>postrm</tt> maintainer script.

Tag: postrm-calls-installdocs
51 52
Severity: important
Certainty: certain
53 54 55
Info: The postrm script calls the <tt>install-docs</tt> command. Usually,
 this command should be called from the <tt>prerm</tt> maintainer script.

Frank Lichtenheld's avatar
Frank Lichtenheld committed
56
Tag: executable-menu-file
57 58
Severity: normal
Certainty: certain
Frank Lichtenheld's avatar
Frank Lichtenheld committed
59 60 61 62
Info: Menu files should normally not be marked as executables. You only
 need to do this if your package has to generate menu entries dynamically.

Tag: menu-file-in-usr-lib
63 64
Severity: normal
Certainty: certain
Frank Lichtenheld's avatar
Frank Lichtenheld committed
65 66 67 68
Info: As of menu, version 2.1.25, /usr/lib/menu as location for menu
 files is deprecated (but still works perfectly). Menu files should
 now be placed in /usr/share/menu instead. Only menu files that are
 actually binary executables still need to go to /usr/lib/menu.
69
Ref: menu 3.1
70 71

Tag: executable-in-usr-share-docbase
72 73
Severity: important
Certainty: certain
74 75 76
Info: Files in <tt>/usr/share/doc-base</tt> may not be marked as executables.

Tag: postinst-does-not-call-updatemenus
77 78
Severity: important
Certainty: certain
79 80 81 82
Info: Since the package installs a file in <tt>/etc/menu-methods</tt>,
 <tt>/usr/share/menu</tt>, or <tt>/usr/lib/menu</tt>, the package should
 probably call the <tt>update-menus</tt> command in it's <tt>postinst</tt>
 script.
83 84
 .
 For example, use the following code in your maintainer script:
85 86
 .
  if which update-menus &gt; /dev/null; then update-menus ; fi
87
Ref: menu 4.2
88 89

Tag: postrm-does-not-call-updatemenus
90 91
Severity: important
Certainty: certain
92 93 94 95
Info: Since the package installs a file in <tt>/etc/menu-methods</tt>,
 <tt>/usr/share/menu</tt>, or <tt>/usr/lib/menu</tt>, the package should
 probably call the <tt>update-menus</tt> command in it's <tt>postrm</tt>
 script.
96 97
 .
 For example, use the following code in your maintainer script:
98 99
 .
  if which update-menus &gt; /dev/null; then update-menus ; fi
100
Ref: menu 4.2
101 102

Tag: postinst-has-useless-call-to-update-menus
103
Severity: minor
104
Certainty: certain
105
Info: The <tt>postinst</tt> script calls the <tt>update-menus</tt> program
106 107
 though no file is installed in <tt>/etc/menu-methods</tt>,
 <tt>/usr/share/menu</tt>, or <tt>/usr/lib/menu</tt>.
108 109

Tag: postrm-has-useless-call-to-update-menus
110
Severity: minor
111
Certainty: certain
112
Info: The <tt>postrm</tt> script calls the <tt>update-menus</tt> program
113 114
 though no file is installed in <tt>/etc/menu-methods</tt>,
 <tt>/usr/share/menu</tt>, or <tt>/usr/lib/menu</tt>.
115 116

Tag: postinst-has-useless-call-to-install-docs
117
Severity: minor
118
Certainty: certain
119 120 121 122
Info: Explicitly calling <tt>install-docs</tt> in <tt>postinst</tt> is no
 longer required since doc-base file processing is handled by triggers.
 If the <tt>install-docs</tt> call was added by debhelper, rebuilding the
 package with debhelper 7.2.3 or later will fix this problem.
123

Russ Allbery's avatar
Russ Allbery committed
124
Tag: prerm-has-useless-call-to-install-docs
125
Severity: minor
126
Certainty: certain
127 128 129 130
Info: Explicitly calling <tt>install-docs</tt> in <tt>prerm</tt> is no
 longer required since doc-base file processing is handled by triggers.
 If the <tt>install-docs</tt> call was added by debhelper, rebuilding the
 package with debhelper 7.2.3 or later will fix this problem.
131 132

Tag: bad-menu-file-name
133 134
Severity: important
Certainty: certain
135
Info: The package installs a file <tt>/usr/lib/menu/menu</tt>, which is
136
 already in use by the <tt>menu</tt> package itself. The menu file should
137 138
 be named after the package that installs it.

Russ Allbery's avatar
Russ Allbery committed
139
Tag: doc-base-index-references-multiple-files
140 141
Severity: important
Certainty: certain
Russ Allbery's avatar
Russ Allbery committed
142
Info: The Index field in a doc-base file should reference the single index
143
 file for that document. Any other files belonging to the same document
Russ Allbery's avatar
Russ Allbery committed
144
 should be listed in the Files field.
145
Ref: doc-base 2.3.2.2
Russ Allbery's avatar
Russ Allbery committed
146

147 148 149 150 151 152 153 154
Tag: doc-base-file-references-wrong-path
Severity: important
Certainty: certain
Info: The specified doc-base control file references a file in an
 <tt>Index</tt> or <tt>Files</tt> field that does not start with
 <tt>/usr/share/doc</tt> or <tt>/usr/share/info</tt>.
Ref: doc-base 2.3.2.2

Russ Allbery's avatar
Russ Allbery committed
155
Tag: doc-base-file-references-missing-file
156 157
Severity: important
Certainty: certain
Russ Allbery's avatar
Russ Allbery committed
158
Info: One of the files referenced in an Index or Files field in this
159
 doc-base control file does not exist in the package. The doc-base
Russ Allbery's avatar
Russ Allbery committed
160 161 162 163
 control files should be installed by the package that provides the
 documents they are registering.

Tag: doc-base-file-unknown-format
164 165
Severity: normal
Certainty: certain
Russ Allbery's avatar
Russ Allbery committed
166
Info: The Format field in this doc-base control file declares a format
167
 that is not supported. Recognized formats are "HTML", "Text", "PDF",
Russ Allbery's avatar
Russ Allbery committed
168
 "PostScript", "Info", "DVI", and "DebianDoc-SGML" (case-insensitive).
169
Ref: doc-base 2.3.2.2
Russ Allbery's avatar
Russ Allbery committed
170 171

Tag: doc-base-file-no-format
172 173
Severity: important
Certainty: certain
Russ Allbery's avatar
Russ Allbery committed
174
Info: A format section of this doc-base control file didn't specify a
175
 format. Each section after the first must specify a format.
176
Ref: doc-base 2.3.2.2
Russ Allbery's avatar
Russ Allbery committed
177

178
Tag: doc-base-file-no-format-section
179 180
Severity: important
Certainty: certain
181 182
Info: This doc-base control file didn't specify any format
 section.
183
Ref: doc-base 2.3.2.2
184

Russ Allbery's avatar
Russ Allbery committed
185
Tag: doc-base-file-no-index
186 187
Severity: important
Certainty: certain
Russ Allbery's avatar
Russ Allbery committed
188 189
Info: Format sections in doc-base control files for HTML or Info documents
 must contain an Index field specifying the starting document for the
190
 documentation. Even if the documentation is a single file, this field
Russ Allbery's avatar
Russ Allbery committed
191
 must be present.
192
Ref: doc-base 2.3.2.2
193 194

Tag: doc-base-document-field-ends-in-whitespace
195 196
Severity: important
Certainty: certain
197 198 199 200
Info: The Document field in a doc-base file should not end in whitespace.
 doc-base (at least as of 0.8.5) cannot cope with such fields and
 debhelper 5.0.57 or earlier may create files ending in whitespace when
 installing such files.
201 202

Tag: doc-base-document-field-not-in-first-line
203 204
Severity: important
Certainty: certain
205
Info: The Document field in doc-base control file must be located at
206
 first line of the file. While unregistering documents, doc-base 0.8
207 208
 and later parses only the first line of the control file for performance
 reasons.
209
Ref: doc-base 2.3.2.1
210 211

Tag: doc-base-file-unknown-field
212 213
Severity: important
Certainty: certain
214
Info: The doc-base control file contains field which is either unknown
215
 or not valid for the section where was found. Possible reasons for this
216 217
 error are: a typo in field name, missing empty line between control file
 sections, or an extra empty line separating sections.
218
Ref: doc-base 2.3.2.1, doc-base 2.3.2.2
219 220

Tag: doc-base-file-duplicated-field
221 222
Severity: important
Certainty: certain
223
Info: The doc-base control file contains a duplicated field.
224 225

Tag: doc-base-file-duplicated-format
226 227
Severity: important
Certainty: certain
228
Info: The doc-base control file contains a duplicated format. Doc-base
229
 files must not register different documents in one control file.
230
Ref: doc-base 2.3.2.2
231 232

Tag: doc-base-file-lacks-required-field
233 234
Severity: important
Certainty: certain
235 236
Info: The doc-base control file does not contain a required field for the
 appropriate section.
237
Ref: doc-base 2.3.2.1, doc-base 2.3.2.2
238 239

Tag: doc-base-invalid-document-field
240 241
Severity: important
Certainty: certain
242
Info: The Document field should consists only of letters (a-z), digits
243
 (0-9), plus (+) or minus (-) signs, and dots (.). In particular,
244
 uppercase letters are not allowed.
245
Ref: doc-base 2.2
246 247

Tag: doc-base-abstract-field-is-template
248 249
Severity: normal
Certainty: possible
250 251 252 253
Info: The Abstract field of doc-base contains a "manage online manuals"
 phrase, which was copied verbatim from an example control file found in
 section 2.3.1 of the Debian doc-base Manual.

254
Tag: doc-base-abstract-might-contain-extra-leading-whitespace
255 256
Severity: normal
Certainty: possible
257 258
Info: Continuation lines of the Abstract field of doc-base control file
 should start with only one space unless they are meant to be displayed
259
 verbatim by frontends.
260
Ref: doc-base 2.3.2
261

262
Tag: doc-base-abstract-field-separator-extra-whitespace
263 264
Severity: normal
Certainty: certain
265
Info: Unnecessary spaces were found in the paragraph separator line of the
266
 doc-base's Abstract field. The separator line should consist of a single
267
 space followed by a single dot.
268
Ref: doc-base 2.3.2
269 270

Tag: spelling-error-in-doc-base-title-field
271 272
Severity: minor
Certainty: certain
273 274 275 276
Info: Lintian found a spelling, grammar or capitalization error in the
 Title field of this doc-base control file. Lintian has a list of common
 misspellings that it looks for. It does not have a dictionary like a
 spelling checker does.
277 278

Tag: spelling-error-in-doc-base-abstract-field
279 280
Severity: minor
Certainty: certain
281 282 283
Info: Lintian found a spelling, grammar or capitalization error in the
 Abstract field of this doc-base control file. Lintian has a list of
 common misspellings that looks for. It does not have a dictionary like a
284
 spelling checker does.
285 286

Tag: doc-base-file-syntax-error
287 288
Severity: important
Certainty: certain
289
Info: Lintian found a syntax error in the doc-base control file.
290
Ref: doc-base 2.3.2.2
291

292
Tag: doc-base-file-separator-extra-whitespace
293 294
Severity: normal
Certainty: certain
295
Info: Unnecessary spaces were found in the doc-base file sections'
296
 separator. The section separator is an empty line and should not contain
297
 any whitespace.
298
Ref: doc-base 2.3.2
Russ Allbery's avatar
Russ Allbery committed
299 300

Tag: doc-base-file-uses-obsolete-national-encoding
301 302
Severity: important
Certainty: certain
Russ Allbery's avatar
Russ Allbery committed
303 304 305 306
Info: doc-base files must be valid UTF-8, an encoding of the Unicode
 character set.
 .
 There are many ways to convert a doc-base file from an obsolete encoding
307
 like ISO-8859-1. You may, for example, use "iconv" like:
Russ Allbery's avatar
Russ Allbery committed
308 309 310
 .
  $ iconv -f ISO-8859-1 -t UTF-8 doc-base &gt; doc-base.new
  $ mv doc-base.new doc-base
311
Ref: doc-base 2.3.2
312

313 314 315 316 317
Tag: doc-base-uses-applications-section
Severity: normal
Certainty: certain
Info: The section indicated in this doc-base control file has a top-level
 section of Apps or Applications. This section is only used in menu, not
318 319
 in doc-base. Simply removing the <tt>Applications/</tt> part of the
 section will lead to a valid doc-base section.
320 321
Ref: doc-base 2.3.3

322
Tag: doc-base-unknown-section
323 324
Severity: normal
Certainty: certain
325
Info: The section indicated in this doc-base control file is not one of
326
 the standard doc-base sections. The doc-base sections are based on the
327
 menu sections but are not exactly the same.
328
Ref: doc-base 2.3.3, /usr/share/doc/doc-base/doc-base.html/index.html
329 330

Tag: menu-method-should-include-menu-h
331 332
Severity: important
Certainty: certain
333 334
Info: A menu-method file must include the menu.h configuration file
 (using "!include menu.h").
335
Ref: menu 5
336 337 338 339 340 341

Tag: possible-documentation-but-no-doc-base-registration
Severity: wishlist
Certainty: possible
Info: The package ships a <tt>.html</tt> or <tt>.pdf</tt> file under
 <tt>/usr/share/doc/</tt>, which are usually documentation, but it does
342
 not register anything in doc-base. (Files under an <tt>examples</tt>
343
 directory are excluded.)
344
Ref: policy 9.10