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 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., 59 Temple Place - Suite 330, Boston, N: MA 02111-1307, 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 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. Once it has been decided that an
override is needed, you can easily add one by supply a 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 occour more than once (e.g. if the same error is found in more than one file). You can override a tag either completly 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).
Lintian User's Manual
version 1.23.0, 15 April 2004schwarz@debian.org
dark@xs4all.nl
shaleh@debian.org
djpig@debian.org
lintian-maint@debian.org