1 .\" Copyright (C) 1998 Richard Braakman and Christian Schwarz
3 .\" This manual page is free software. It is distributed under the
4 .\" terms of the GNU General Public License as published by the Free
5 .\" Software Foundation; either version 2 of the License, or (at your
6 .\" option) any later version.
8 .\" This manual page is distributed in the hope that it will be useful,
9 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
10 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 .\" GNU General Public License for more details.
13 .\" You should have received a copy of the GNU General Public License
14 .\" along with this manual page; if not, write to the Free Software
15 .\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
18 .TH LINTIAN 1 "June 21, 2008" "Debian GNU/Linux"
23 lintian \- Debian package checker
34 Lintian dissects Debian packages and reports bugs and policy
35 violations. It contains automated checks for many aspects of Debian
36 policy as well as some checks for common errors.
38 It uses an archive directory, called \fIlaboratory\fR, in which it
39 stores information about the packages it examines. It can keep this
40 information between multiple invocations in order to avoid repeating
41 expensive data-collection operations.
43 There are three ways to specify binary, udeb or source packages for Lintian
44 to process: by file name (the .deb file for a binary package or the .dsc
45 file for a source package), by package name, or by naming a
48 If you list packages by package name, you'll have to
51 variable in the configuration file (see below). Lintian will then
52 search for any binary or source packages in this directory for
53 packages with the given name. (You can use the
54 .BR \-b " (" \-\-binary "), " \-\-udeb
56 .BR \-s " (" \-\-source )
57 options if you only want to process binary, udeb or source packages.)
61 file, Lintian will process all packages listed in that file.
62 This is convenient when checking a new package before uploading it.
69 command: (Only one action can be specified per invocation)
72 .BR \-S ", " \-\-setup\-lab
73 Set up or update the laboratory.
76 .BR \-R ", " \-\-remove\-lab
77 Remove the laboratory directory.
80 .BR \-c ", " \-\-check
81 Run all checks over the specified packages.
82 This is the default action.
85 .BR \-C " chk1,chk2,..., " \-\-check\-part " chk1,chk2,..."
86 Run only the specified checks. You can either specify the
87 name of the check script or the abbreviation.
88 For details, see the CHECKS section below.
91 .BR \-X " chk1,chk2,..., " \-\-dont\-check\-part " chk1,chk2,..."
92 Run all but the the specified checks. You can either specify
93 the name of the check script or the abbreviation.
94 For details, see the CHECKS section below.
97 .BR \-u ", " \-\-unpack
98 Unpack the specified packages up to the current unpack level.
99 The default unpack level is 1 for this option. See the UNPACK
100 LEVELS section below.
103 .BR \-r ", " \-\-remove
104 Clean up the lintian directory of the specified packages up to
105 the current unpack level. The default unpack level is 0 for
112 .BR \-h ", " \-\-help
113 Display usage information and exit.
116 .BR \-V ", " \-\-version
117 Display lintian version number and exit.
120 .BR \-\-print\-version
121 Print unadorned version number and exit.
124 .BR \-v ", " \-\-verbose
125 Display verbose messages.
128 .BR \-d ", " \-\-debug
129 Display debugging messages. (Implies
133 .BR \-q ", " \-\-quiet
134 Suppress all informational messages. Currently, the only message this
135 suppresses is the message at the end of the run giving the total count of
140 Behaviour options for
144 .BR \-i ", " \-\-info
145 Print explanatory information about discovered policy violations in
146 addition to the lintian error tags. To print a long tag description
147 without running lintian, see
148 .BR lintian\-info (1).
151 .BR \-I ", " \-\-display\-info
152 Display informational ("I:") tags as well. They are normally suppressed.
155 .BR \-E ", " \-\-display\-experimental
156 Display experimental ("X:") tags as well. They are normally suppressed.
159 .BR \-l " n, " \-\-unpack\-level " n"
162 See the UNPACK LEVELS section, below.
165 .BR \-o ", " \-\-no\-override
166 Don't use the overrides file.
169 .BR \-\-show\-overrides
170 Output tags that have been overriden.
173 .BR \-\-color " (never|always|auto|html)"
174 Whether to colorize tags in lintian output based on their severity. The
175 default is "never", which never uses color. "always" will always use
176 color, "auto" will use color only if the output is going to a terminal,
177 and "html" will use HTML <span> tags with a color style attribute (instead
178 of ANSI color escape sequences).
181 .BR \-U " info1,info2,..., " \-\-unpack\-info " info1,info2,..."
182 Collect information info1, info2, etc. even if these are not
183 required by the checks.
186 .BR \-m ", " \-\-md5sums ", " \-\-checksums
187 Check checksums when processing a .changes file. Normally, Lintian only
188 checks the checksums for .dsc files when processing a .changes file.
194 warning when it is run with superuser privileges.
197 .BR \-\-fail\-on\-warnings
200 exits with 0 status if only warnings were found. If this flag is given,
201 exit with a status of 1 if either warnings or errors are found.
205 By default, temporary labs will be removed after lintian is finished.
206 Specifying this options will leave the lab behind, which might be
207 useful for debugging purposes. You can find out where the temporary
208 lab is located by running lintian with the
211 .B \-\-unpack\-level=2
212 unless another unpack level is specified directly.
216 Configuration options:
219 .BR \-\-cfg " configfile"
220 Read the configuration from
222 rather than the default locations. This option overrides the
224 environment variable.
227 .BR \-\-lab " labdir"
230 as the permanent laboratory. This is where Lintian keeps information about
231 the packages it checks. This option overrides the
233 environment variable and the configuration file entry of the same
237 .BR \-\-archivedir " archivedir"
238 Location of Debian archive to scan for packages. (See the FILES section
239 for complete information on how the path is constructed.) Use this if you
240 want Lintian to check the whole Debian archive instead of just single
241 packages. This option overrides the
242 .B LINTIAN_ARCHIVEDIR
243 environment variable and the configuration file entry of the same
247 .BR \-\-dist " distdir"
248 Scan for packages in the
250 directory. (See the FILES section for complete information on how the
251 path is constructed.) Use this if you want Lintian to check the whole
252 Debian archive instead of just single packages. This option overrides the
254 environment variable and the configuration file entry of the same
258 .BR \-\-section " release"
259 When scanning for packages in the distdir, select only packages from
262 (e.g. main). This option overrides the
264 environment variable and the configuration file entry of the same name.
268 When scanning for packages in the distdir, select only packages for
271 This option overrides the
273 environment variable and the configuration file entry of the same name.
276 .BR \-\-root " rootdir"
279 support files (such as check scripts and collection scripts) in
283 environment variable. The default location is
284 .IR /usr/share/lintian .
288 Package selection options:
292 Check all packages in the distribution. (This requires that the
293 LINTIAN_DIST variable is defined in the configuration file.)
296 .BR \-b ", " \-\-binary
297 The following packages listed on the command line are binary packages.
300 .BR \-s ", " \-\-source
301 The following packages listed on the command line are source packages.
305 The following packages listed on the command line are udeb packages.
308 .BR \-p ", " \-\-packages\-file " X"
309 Process all packages which are listed in file
311 Each package has to be listed in a single line using the following format:
313 .B type package version file
317 is either `b' or `s' (binary or source package),
321 is the package's version, and
323 is the package file name (absolute path specification).
328 The package does not exist in the \fIlaboratory\fR at all.
332 A directory for this package exists in the \fIlaboratory\fR
333 and basic information is extracted. This does not take
336 For binary and udeb packages,
343 file are unpacked, and symbolic links are made to the
345 file and to the lintian directory for the source package.
347 For source packages, the
351 directories are unpacked, and symbolic links are made to the
352 source package files.
356 The actual package contents are unpacked as well.
359 Lintian will unpack packages as far as is necessary to do its checks,
360 but it will leave the package in whatever unpack level was specified
363 The default unpack level can be overwritten by setting the
364 .B LINTIAN_UNPACK_LEVEL
365 variable in the configuration file.
370 Search for bugs in binaries and object files.
373 .B changelog\-file (chg)
374 Check changelog files in a binary package.
380 control file of a binary package is correct.
383 .B control\-file (dctl)
384 This script checks debian/control files in source packages.
387 .B control\-files (ctl)
388 Check for unknown control files in the binary package.
391 .B copyright\-file (cpy)
392 Check if a binary package conforms to policy with respect to
393 the copyright file. Each binary package must either have a
394 .RI /usr/share/doc/ package /copyright
395 file or must have a symlink
396 .RI /usr/share/doc/ package \-> foo ,
399 comes from the same source package, and this package declares a
400 "Depends" relation on
405 Looks for cruft in source packages, like files of version control
406 systems and temporary files from the build process.
409 .B deb\-format (dfmt)
410 Checks if a binary package was build with a broken version of tar so
411 that dpkg can't handle it correctly.
415 Looks for common mistakes in packages using debconf, like missing
416 dependencies or errors in the template file.
419 .B debian\-readme (drm)
420 Check if the README.Debian file is merely the debmake template.
424 Looks for common mistakes in source packages using debhelper.
430 control field of a binary package conforms to the rules in the
431 Policy Manual (section 3.4).
435 Checks if all files in
437 that are shipped with the package are marked as conffiles as
442 Check control fields of a binary or source package.
446 Check if a binary package conforms to policy with respect to
447 types, permissions and ownerships of files and directories.
450 .B huge\-usr\-share (hus)
451 Checks whether an architecture-dependent package does
452 have a significantly big \fB/usr/share\fR. Big amounts of
453 architecture independent data in architecture dependent
454 packages waste space on the mirrors.
458 Check if a binary package conforms to policy with respect
463 Check if a binary package conforms to policy with respect
464 to scripts in \fB/etc/init.d\fR.
468 Check if a binary package conforms to policy with respect
475 control file of a binary package exists, check if it is valid.
479 Check if a binary package conforms to policy with respect
487 .B menu\-format (mnf)
488 Check the syntax of menu files installed by the package.
491 .B patch\-systems (pat)
492 Check source package use of patch systems.
496 Check perl scripts installed by the package for the usage of perl
497 modules, and check that the package declares the appropriate
502 Looks for common mistakes in packages using po\-debconf.
506 Looks for common problems in the debian/rules file in source packages.
510 Check the the \fB#!\fR lines of scripts in a binary package.
513 .B shared\-libs (shl)
514 Check if a binary package conforms to policy with respect to
515 shared libraries and the
521 Check a binary package's "Description:" field and copyright file
522 for common spelling errors.
525 .B standards\-version (std)
526 Check if a source package contains a valid
527 .B Standards\-Version
533 .B version\-substvars (v\-s)
534 Check use of version substvars in a source package, particularly whether
535 the relationships between packages allow safe binary NMUs.
538 .B watch\-file (watch)
539 Check \fIdebian/watch\fP files in source packages.
545 Copy the changelog file of a package into the lintian directory.
549 Copy the copyright file of a package into the lintian directory.
553 Collects files shipped in the source of the package.
557 Copy the README.Debian file of a package into the lintian directory.
561 Collect the output of the
563 utility for the Debian diff in a source package.
568 .B /usr/share/doc\-base
569 into the lintian directory (below \fBdoc\-base\fR).
573 Collect the output of the
575 utility for each file in a binary package.
581 scripts into the lintian directory (below \fBinit.d\fR).
585 Collect the md5sums of all files in a binary package.
589 Copy the contents of a binary package's
590 .I usr/share/doc/menu
593 directory in the lab.
597 Collect the output of the
599 utility for each file in a binary package.
603 Copy the override file of a package into the lintian directory
607 Collect information about scripts in binary package.
610 .B source-control-file
611 Collects information about binary packages from debian/control
615 Lintian looks for its configuration file in the following locations:
617 The directory given with the \-\-cfg option
621 .I $LINTIAN_ROOT/lintianrc
627 Lintian uses the following directories:
630 If no lab location is specified via the LINTIAN_LAB environment variable,
631 configuration, or the
633 command-line option, lintian defaults to creating a temporary lab
636 To change the directory used, set the TMPDIR environment variable to a
639 .I /usr/share/lintian/checks
640 Scripts that check aspects of a package.
642 .I /usr/share/lintian/collection
643 Scripts that collect information about a package and store it for
644 use by the check scripts.
646 .I /usr/share/lintian/lib
647 Utility scripts used by the other lintian scripts.
649 .I /usr/share/lintian/unpack
650 Scripts that manage the \fIlaboratory\fR.
654 .I /usr/share/lintian
655 directory can be overridden with the
657 environment variable or the
662 When looking for packages in a Debian archive, lintian constructs the path
663 to the archive from the
670 .IR archivedir /dists/ distdir / release / arch
672 Lintian always expects the "/dists/" path component in paths to Debian
678 No policy violations (errors) detected. (There might have been warnings, though.)
681 Policy violations detected.
684 Lintian run-time error. An error message is sent to stderr.
689 .B "$ lintian foo.deb"
690 Check binary package foo given by foo.deb.
692 .B "$ lintian foo.dsc"
693 Check source package foo given by foo.dsc.
696 Search for package foo in the Debian archive and check it. (Depending
697 on what is found, this command will check either the source or binary
698 package foo, or both.)
700 .B "$ lintian --archivedir /var/packages --dist custom --section main"
701 Check all packages found in the Debian archive at
702 .IR /var/packages/dists/custom/main .
704 .B "$ lintian \-i foo.changes"
705 Check the changes file and, if listed, the source and binary package
706 of the upload. The output will contain detailed information about the
709 .B "$ lintian \-c \-\-binary foo"
710 Search for binary package foo in the Debian archive and check it.
712 .B "$ lintian \-C cpy \-\-source foo"
713 Run the copyright checks on source package foo.
715 .B "$ lintian \-u foo"
716 Unpack package foo in the Lintian laboratory up to level 1. (If it's
717 already unpacked at level 1 or 2, nothing is done.)
719 .B "$ lintian \-l1 \-r foo"
720 Search for package foo in the Debian archive and, if found, reduce the
721 package disk usage in the laboratory to level 1.
723 .B "$ lintian \-r foo"
724 Remove package foo from the Lintian laboratory.
727 Lintian does not handle packages with different binary and source
728 version numbers correctly.
730 Lintian does not have any locking mechanisms yet. (Running several
731 checks simultaneously is likely to fail.)
733 If you discover any other bugs in Lintian, please contact the authors.
736 .BR lintian\-info (1),
737 .B Lintian User's Manual
738 (file:/usr/share/doc/lintian/lintian.html/index.html)
743 .BR dpkg-buildpackage (1)
746 Richard Braakman <dark@xs4all.nl>
748 Christian Schwarz <schwarz@monet.m.isar.de>
750 Please use the email address <lintian\-maint@debian.org> for Lintian related