This page describes how to run lintian against the Ubuntu package archive. Lintian is a static checker of packages against the Debian Policy Manual and for common mistakes. It checks for things like correct ownership and permissions on files, and that the package has a copyright file, and so on.

It is very useful to run lintian on packages before they are uploaded, but it is also very useful to run in centrally on all packages: sometimes lintian is updated after the package is updated and finds new problems.


The lintian source tree has a wrapper program that takes care of running lintian on all new packages. It requires filesystem access to a mirror, so you need to arrange that somehow.

Local mirror

debmirror is one tool for maintaining a local mirror. Here is one way of running it (put this into a shell script):

debmirror \
        --ignore-small-errors \
        --ignore-release-gpg \ \
        --root=/ubuntu \
        --method=http \
        --passive \
gutsy-backports,hardy,hardy-security,hardy-updates \
multiverse,multiverse/debian-installer \
        --arch=i386,amd64 \
        --postcleanup \

You may want to optimise away some architectures or releases. Note that it takes tends of gigabytes of bandwidth and disk space to have a mirror, so don't run the above command lightly.

Get the sources

apt-get source lintian

You probably want to do this on the current development version of Ubuntu, to have a reasonably new version of lintian.

Lintian harness

Unfortunately, the lintian harness is written for Debian, not Ubuntu, which leads to two problems: a) its output is heavily branded for Debian and b) it needs to be run separately on main, universe, multiverse, and restricted. In Debian, "main" includes almost all packages, so Debian does not really care about running lintian on the other sections. For Ubuntu, you need to set up lintian for each section separately.

Setting up the harness is fairly simple.

  1. mkdir hardy-main

  2. cp lintian-1.23.46/reporting/config hardy-main

  3. cd hardy-main

Then edit the config file to change the following variables:

$HOME = "/home/liw/lintian/hardy-main";
$LINTIAN_ARCHIVEDIR = "/xxxx/mirrors/ubuntu";
$LINTIAN_DIST = "hardy";
$LINTIAN_ROOT = "/home/liw/lintian/lintian-1.23.46";

Leave all other lines untouched. Then run lintian:


This will run for a long time, even on a fast machine. The results should be some HTML files in www/reports in the hardy-main directory. You need to copy (preferably with rsync) to a publically available location, but please try to fix the Debian branding so as not to confuse people about whose packages are being tested.

Then repeat this for every release and section you are interested in.

More info/help

LarsWirzenius used to run lintian against the Ubuntu archive. He's glad to help if you have questions.

Testing/Automation/Lintian (last edited 2008-08-06 16:59:36 by localhost)