LINTIAN(N) LINTIAN(N) NAME lintian - Debian package checker SYNOPSIS lintian [action] [options] [packages] ... DESCRIPTION Lintian dissects Debian packages and reports bugs and pol- icy violations. It contains automated checks for many aspects of Debian policy as well as some checks for common errors. It uses an archive directory, called laboratory, in which it stores information about the packages it examines. It can keep this information between multiple invocations in order to avoid repeating expensive data-collection opera- tions. There are three ways to specify binary or source packages for Lintian to process: by file name, by package name, or by naming a .changes file. If you list packages by pack- age name, you'll have to define the LINTIAN_DIST variable in the configuration file (see below). Lintian will then search for any binary or source packages in this directory for packages with the given name. (You can use the -b and -s options if you only want to process either binary or source packages.) If you specify a .changes file, Lintian will process all packages listed in that file. This is convenient when checking a new package before uploading it. OPTIONS Actions of the lintian command: (Only one action can be specified per invocation) -S, --setup-lab Set up or update the laboratory. -R, --remove-lab Remove the laboratory directory. -c, --check Run all checks over the specified packages. This is the default action. -C chk1,chk2,..., --check-part chk1,chk2,... Run only the specified checks. You can either specify the name of the check script or the abbre- viation. For details, see the CHECKS section below. -u, --unpack Unpack the specified packages up to the current unpack level. The default unpack level is 1 for this option. See the UNPACK LEVELS section below. -r, --remove Clean up the lintian directory of the specified packages up to the current unpack level. The default unpack level is 0 for this option. General options: -h, --help Display usage information and exit. -v, --verbose Display verbose messages. -V, --version Display lintian version number and exit. -d, --debug Display debugging messages. (Implies -v). Behaviour options for lintian. -i, --info Print explanatory information about discovered pol- icy violations in addition to the lintian error tags. -I, --display-info Display informational ("I:") tags as well. They are normally suppressed. -l n, --unpack-level n Set unpack level to n. See the UNPACK LEVELS sec- tion, below. -o, --no-override Don't use the overrides file. --show-overrides Output tags that have been overriden -U info1,info2,..., --unpack-info info1,info2,... Collect information info1, info2, etc. even if these are not required by the checks. -m, --md5sums Check md5sums when processing a .changes file. Normally, Lintian only checks the md5sums for .dsc files when processing a .changes file. --allow-root Override lintian's warning when it is run with superuser privileges. Configuration options: --cfg configfile Read the configuration from configfile rather than the default locations. This option overrides the LINTIAN_CFG environment variable. --lab labdir Use labdir as the permanent laboratory. This is where Lintian keeps information about the packages it checks. This option overrides the LINTIAN_LAB environment variable and the configuration file entry of the same name. --dist distdir Scan for packages in the distdir directory. Use this if you want Lintian to check the whole Debian archive instead of just single packages. This option overrides the LINTIAN_DIST environment vari- able and the configuration file entry of the same name. --arch arch When scanning for packages in the distdir, select only packages for architecture arch. This option overrides the LINTIAN_ARCH environment variable and the configuration file entry of the same name. --root rootdir Look for lintian's support files (such as check scripts and collection scripts) in rootdir. This overrides the LINTIAN_ROOT environment variable. The default location is /usr/share/lintian. Package selection options: -a, --all Check all packages in the distribution. (This requires that the LINTIAN_DIST variable is defined in the configuration file.) -b, --binary The following packages listed on the command line are binary packages. -s, --source The following packages listed on the command line are source packages. -p, --packages-file X Process all packages which are listed in file X. Each package has to be listed in a single line using the following format: type package version file where type is either `b' or `s' (binary or source package), package is the package name, version is the package's version, and file is the package file name (absolute path specification). UNPACK LEVELS 0 (none) The package does not exist in the laboratory at all. 1 (basic) A directory for this package exists in the labora- tory and basic information is extracted. This does not take much space. For binary packages, the control and fields direc- tories and the index file are unpacked, and sym- bolic links are made to the .deb file and to the lintian directory for the source package. For source packages, the binary and fields directo- ries are unpacked, and symbolic links are made to the source package files. 2 (contents) The actual package contents are unpacked as well. Lintian will unpack packages as far as is necessary to do its checks, but it will leave the package in whatever unpack level was specified when it is done. The default unpack level can be overwritten by setting the LINTIAN_UNPACK_LEVEL variable in the configuration file. CHECKS binaries (bin) Search for bugs in binaries and object files. changelog-file (chg) Check changelog files in a binary package. conffiles (cnf) Check if the conffiles control file of a binary package is correct. control-files (ctl) Check for unknown control files in the binary pack- age. copyright-file (cpy) Check if a binary package conforms to policy with respect to the copyright file. Each binary package must either have a /usr/share/doc/package/copyright file or must have a symlink /usr/share/doc/pack- age->foo, where foo comes from the same source package, and this package declares a "Depends" relation on foo. description (des) Check if the Description control field of a binary package conforms to the rules in the Packaging Man- ual (chapter 7). debian-readme (drm) Check if the README.Debian file is merely the deb- make template. debdiff (dif) Look for .orig and .rej files in the Debian diffs. fields (fld) Check control fields of a binary or source package. files (fil) Check if a binary package conforms to policy with respect to types, permissions and ownerships of files and directories. init.d (ini) Check if a binary package conforms to policy with respect to scripts in /etc/init.d. manpages (man) Check if a binary package conforms to policy with respect to manual pages. md5sums (md5) If the md5sum control file of a binary package exists, check if it is valid. menus (men) Check if a binary package conforms to policy with respect to menu and doc-base files. menu-format (mnf) Check the syntax of menu files installed by the package. perl (prl) Check perl scripts installed by the package for the usage of perl modules, and check that the package declares the appropriate dependencies. scripts (scr) Check the the #! lines of scripts in a binary pack- age. shared-libs (shl) Check if a binary package conforms to policy with respect to shared libraries and the shlibs control file. spelling (spl) Check a binary package's "Description:" field and copyright file for common spelling errors. standards-version (std) Check if a source package contains a valid Stan- dards-Version field in its debian/control file. COLLECTION changelog-file Copy the changelog file of a package into the lin- tian directory. copyright-file Copy the copyright file of a package into the lin- tian directory. debian-readme Copy the README.Debian file of a package into the lintian directory. diffstat Collect the output of the diffstat(t) utility for the Debian diff in a source package. file-info Collect the output of the file(e) utility for each file in a binary package. init.d Copy /etc/init.d scripts into the lintian directory (below init.d). md5sums Collect the md5sums of all files in a binary pack- age. menu-files Copy the contents of a binary package's usr/share/doc/menu directory into the menu direc- tory in the lab. objdump-info Collect the output of the obj-dump(p) utility for each file in a binary package. perlmods Search the perl scripts in a binary package for use and require directives. scripts Collect information about scripts in binary pack- age. FILES Lintian looks for its configuration file in the following locations: The directory given with the --cfg option $LINTIAN_CFG $LINTIAN_ROOT/lintianrc $HOME/.lintianrc /etc/lintianrc Lintian uses the following directories: /usr/share/lintian/checks Scripts that check aspects of a package. /usr/share/lintian/collection Scripts that collect information about a package and store it for use by the check scripts. /usr/share/lintian/info Information used by lintian collected from external sources. /usr/share/lintian/lib Utility scripts used by the other lintian scripts. /usr/share/lintian/unpack Scripts that manage the laboratory. The /usr/share/lintian directory can be overridden with the LINTIAN_ROOT environment variable or the --root option. EXIT STATUS 0 No policy violations (errors) detected. (There might have been warnings, though.) 1 Policy violations detected. 2 Lintian run-time error. An error message is sent to stderr. USAGE Examples: $ lintian foo.deb Check binary package foo given by foo.deb. $ lintian foo.dsc Check source package foo given by foo.dsc. $ lintian foo Search for package foo in the Debian archive and check it. (Depending on what is found, this command will check either the source or binary package foo, or both.) $ lintian -i foo.changes Check the changes file and, if listed, the source and binary package of the upload. The output will contain detailed information about the reported tags. $ lintian -c --binary foo Search for binary package foo in the Debian archive and check it. $ lintian -C cpy --source foo Run the copyright checks on source package foo. $ lintian -u foo Unpack package foo in the Lintian laboratory up to level 1. (If it's already unpacked at level 1 or 2, nothing is done.) $ lintian -l1 -r foo Search for package foo in the Debian archive and, if found, reduce the package disk usage in the lab- oratory to level 1. $ lintian -r foo Remove package foo from the Lintian laboratory. BUGS Lintian does not handle packages with different binary and source version numbers correctly. Lintian does not have any locking mechanisms yet. (Running several checks simultaneously is likely to fail.) If you discover any other bugs in Lintian, please contact the authors. SEE ALSO lintian-info(o), Lintian User's Manual (file:/usr/share/doc/lintian/lintian.html/index.html) AUTHORS Richard Braakman <dark@xs4all.nl> Christian Schwarz <schwarz@monet.m.isar.de> Please use the email address <lintian-maint@debian.org> for Lintian related comments. Debian GNU/Linux April 6, 1998 LINTIAN(N)