[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ next ]
Before you can start to check your packages with Lintian, you'll have to
install the lintian
Debian package.
After that, you can run Lintian over any Debian binary, udeb or source packages like this:
$ lintian libc5_5.4.38-1.deb E: libc5: old-fsf-address-in-copyright-file W: libc5: shlib-without-dependency-information usr/lib/libgnumalloc.so.5.4.38 W: libc5: shlib-without-dependency-information lib/libc.so.5.4.38 W: libc5: shlib-without-dependency-information lib/libm.so.5.0.9 E: libc5: shlib-with-executable-bit lib/libc.so.5.4.38 0755 E: libc5: shlib-with-executable-bit lib/libm.so.5.0.9 0755 E: libc5: shlib-missing-in-control-file libgnumalloc usr/lib/libgnumalloc.so.5.4.38 $
As you can see, Lintian uses a special format for all its error and warning messages. With that, its very easy to write other programs which run Lintian and interpret the displayed messages.
The first character of each line indicates the type of message. Currently, the following types are supported:
The displayed message indicates a policy violation or a packaging error. For policy violations, Lintian will cite the appropriate policy section when it is invoked with the -i option.
The displayed message might be a policy violation or packaging error. A warning is usually an indication that the test is known to sometimes produce false positive alarms, because either the corresponding rule in policy has many exceptions or the test uses some sort of heuristic to find errors.
The displayed message is meant to inform the maintainer about a certain packaging aspect. Such messages do not usually indicate errors, but might still be of interest to the curious. They are not displayed unless the -I option is set.
The displayed message is a debugging message which informs you about the current state of Lintian.
The displayed message is one of the types listed above, but has been flagged as `experimental' by the Lintian maintainers. This means that the code that generates this message is not as well tested as the rest of Lintian, and might still give surprising results. Feel free to ignore Experimental messages that do not seem to make sense, though of course bug reports are always welcomed. They are not displayed unless the -E option is set.
The displayed message indicates a previous Warning or Error message which has been overridden (see below). They are not displayed unless the --show-overrides option is set.
The displayed message indicates a message of Lintian at its most pickiest and include checks for particular Debian packaging styles, checks that are very frequently wrong, and checks that many people disagree with. They are not displayed unless the --pedantic option is set.
The following parameters after the type indicator tell you about the package that has been processed (this can either be a binary or a source package) and about the problem that has been discovered. The problem is identified by a so-called tag (for example, old-fsf-address-in-copyright-file).
Depending on which tag has been reported, the line may contain additional arguments which tell you, for example, which files are involved.
If you do not understand what a certain tag is about, you can specify the -i option when calling Lintian to get a detailed description of the reported tags:
$ lintian -i libc5_5.4.38-1.deb E: libc5: old-fsf-address-in-copyright-file N: N: The /usr/doc/<pkg>/copyright file refers to the old postal address of N: the Free Software Foundation (FSF). The new address is: N: N: Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, N: MA 02110-1301, USA. N: [...] $
In some cases, the messages contain some additional text with a leading hash character (#). This text should be ignored by any other programs which interpret Lintian's output because it doesn't follow a unique format between different messages and it's only meant as additional information for the maintainer.
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 the -d (or --debug) option, 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.
If the override is for a source package, you have to place it at
debian/source.lintian-overrides
. 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 support for source overrides was
added in Lintian version 1.23.0.
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>[ <type>]: ]<lintian-tag>[ [*]<lintian-info>[*]]. <package> is the package name; <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 (*) at the start and/or end of the additional info, this will match arbitrary strings similar to the shell wildcard. Asterisks located at any other place in the info have no special meaning. This wildcard support was added in Lintian version 2.0.0.
[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ next ]
Lintian User's Manual
version 2.0.0, 02 September 2008schwarz@debian.org
dark@xs4all.nl
shaleh@debian.org
djpig@debian.org
lintian-maint@debian.org