In some cases, the checked package does not have a bug or does not violate policy, but Lintian still reports an error or warning. This can have the following reasons: Lintian has a bug itself, a specific Lintian check is not smart enough to know about a special case allowed by policy, or the policy does allow exceptions to some rule in general.
In the first case (where Lintian has a bug) you should send a
bug report to the Debian bug tracking system and describe
which package you checked, which messages have been displayed,
and why you think Lintian has a bug. Best would be, if you
would run Lintian again over your packages using
which will cause Lintian to output much more information
(debugging info), and include these messages in your bug
report. This will simplify the debugging process for the
authors of Lintian.
In the other two cases (where the error is actually an exception to policy), you should probably add an override. If you're unsure though whether it's indeed a good case for an override, you should contact the Lintian maintainers too, including the Lintian error message and a short note, stating why you think this is an exception. This way, the Lintian maintainers can be sure the problem is not actually a bug in Lintian or an error in the author's reading of policy. Please do not override bugs in lintian, they should rather be fixed than overridden.
Once it has been decided that an override is needed, you can easily add one by supplying an overrides file. If the override is for a binary or udeb package, you have to place it at /usr/share/lintian/overrides/<package> inside the package. The tool dh_lintian from the Debian package debhelper may be useful for this purpose.
If the override is for a source package, you have to place it at debian/source/lintian-overrides or debian/source.lintian-overrides (the former path is preferred). With that, Lintian will know about this exception and not report the problem again when checking your package. (Actually, Lintian will report the problem again, but with type overridden, see above.)
Note that Lintian extracts the override file from the (u)deb and stores it in the laboratory. The files currently installed on the system are not used in current Lintian versions.
The format of the overrides file is simple, it consists of one override per line (and may contain empty lines and comments, starting with a #, on others): [[<package>][ <archlist>][ <type>]: ]<lintian-tag>[ [*]<lintian-info>[*]]. <package> is the package name; <archlist> is an architecture list (see Architecture specific overrides for more info); <type> is one of binary, udeb and source, and <lintian-info> is all additional information provided by Lintian except for the tag. What's inside brackets is optional and may be omitted if you want to match it all. An example file for a binary package would look like:
/usr/share/lintian/overrides/foo, where foo is the name of your package # We use a non-standard dir permission to only allow the webserver to look # into this directory: foo binary: non-standard-dir-perm foo binary: FSSTND-dir-in-usr /usr/man/man1/foo.1.gz
An example file for a source package would look like:
debian/source/lintian-overrides in your base source directory foo source: debian-files-list-in-source # Upstream distributes it like this, repacking would be overkill though, so # tell lintian to not complain: foo source: configure-generated-file-in-source config.cache
Many tags can occur more than once (e.g. if the same error is found in more than one file). You can override a tag either completely by specifying its name (first line in the examples) or only one occurrence of it by specifying the additional info, too (second line in the examples). If you add an asterisk (*) in the additional info, this will match arbitrary strings similar to the shell wildcard. For example:
# The "help text" must also be covered by the override source-is-missing apidoc/html/api_data.js *
The first wildcard support appeared in Lintian 2.0.0, which only allowed the wildcards in the very beginning or end. Version 2.5.0~rc4 extended this to allow wildcards any where in the additional info.
To assist reviewers, Lintian will extract the comments from the overrides file and display the related comments next to the overridden tags.
Comments directly above an override will be shown next to all tags it overrides. If an override for the same tags appears on the very next line, it will inherit the comment from the override above it.
# This comment will be shown above all tags overridden by the following # two overrides, (because they apply to the same tag and there is no # empty line between them) foo source: some-tag exact match foo source: some-tag wildcard * match # This override has its own comment, and it is not shared with the # override below (because there is an empty line in between them). foo source: some-tag another exact match foo source: some-tag override without a comment
Empty lines can be used to disassociate a comment from an override following it. This can also be used to make a general comment about the overrides that will not be displayed.
# This is a general comment not connected to any override, since there # is one (or more) empty lines after it. foo source: another-tag without any comments
In rare cases, Lintian tags may be architecture specific. It is possible to mark overrides architecture specific by using the optional architecture list.
The architecture list has the same syntax as the architecture list in the "Build-Depends" field of a source package. This is described in detail in the Debian Policy Manual §7.1. Examples:
# This is an example override that only applies to the i386 # architecture. foo [i386] binary: some-tag optional-extra # An architecture wildcard would look like: foo [any-i386] binary: another-tag optional-extra # Negation also works foo [!amd64 !i386] binary: some-random-tag optional-extra # Negation even works for wildcards foo [!any-i386] binary: some-tag-not-for-i386 optional-extra # The package name and the package type is optional, so this # also works [linux-any]: tag-only-for-linux optional-extra.
Support for architecture specific overrides was added in Lintian 2.5.0. Wildcard support was added in 2.5.5. Basic sanity checking was also added in 2.5.5, where unknown architectures trigger a malformed-override tag. As does an architecture specific override for architecture independent packages.