2 Author: Christian Schwarz <schwarz@debian.org>
6 Needs-Info: objdump-info, file-info
7 Info: This script checks binaries and object files for bugs.
9 Tag: arch-independent-package-contains-binary-or-object
11 Info: The package contains a binary or object file but is tagged
14 If this package contains binaries or objects for cross-compiling or
15 binary blobs for other purposes independent of the host architecture
16 (such as BIOS updates or firmware), please add a Lintian override.
18 Tag: unstripped-binary-or-object
20 Ref: policy 10.1, policy 10.2
21 Info: The package installs an unstripped binary or object file.
23 Please note, that shared libraries have to be stripped with the
24 <tt>--strip-unneeded</tt> option.
26 Tag: library-in-debug-or-profile-should-not-be-stripped
28 Info: Libraries in <tt>.../lib/debug</tt> or in
29 <tt>.../lib/profile</tt> usually should not be stripped.
31 Tag: statically-linked-binary
33 Info: The package installs a statically linked binary or object file.
35 Usually this is a bug. Otherwise, please install an override if your package
36 is an exception. Note that binaries named *-static and *.static are already
37 excluded, just as any binaries in packages named *-static.
39 Tag: library-not-linked-against-libc
41 Info: The package installs a library which is not dynamically linked
44 Tag: program-not-linked-against-libc
46 Info: The package installs a binary which is not dynamically linked
49 Tag: binary-or-shlib-defines-rpath
51 Ref: http://wiki.debian.org/RpathIssue
52 Info: The binary or shared library sets RPATH. This overrides the normal
53 library search path, possibly interfering with local policy and causing
54 problems for multilib, among other issues.
56 The only time a binary or shared library in a Debian package should set
57 RPATH is if it is linked to private shared libraries in the same package.
58 In that case, place those private shared libraries in
59 <tt>/usr/lib/<i>package</i></tt>. Libraries used by binaries in other
60 packages should be placed in <tt>/lib</tt> or <tt>/usr/lib</tt> as
61 appropriate, with a proper SONAME, in which case RPATH is unncessary.
63 To fix this problem, look for link lines like:
64 gcc test.o -o test -Wl,--rpath,/usr/local/lib
66 gcc test.o -o test -R/usr/local/lib
67 and remove the <tt>-Wl,--rpath</tt> or <tt>-R</tt> argument. You can also
68 use the chrpath utility to remove the RPATH.
70 Tag: binary-has-unneeded-section
72 Info: The binary or shared library is stripped, but still contains a
73 section that is not useful. You should call strip with
74 <tt>--remove-section=.comment --remove-section=.note</tt> to remove the
75 <tt>.note</tt> and <tt>.comment</tt> sections.
77 <tt>dh_strip</tt> will do this automatically for you, but
78 <tt>install -s</tt> not because it calls strip without any arguments.
80 Tag: missing-depends-line
82 Info: The package contains an ELF binary with dynamic dependencies,
83 but does not have a Depends line in its control file. This usually
84 means that a call to <tt>dpkg-shlibdeps</tt> is missing from the
85 package's <tt>debian/rules</tt> file.
87 Tag: shared-lib-without-dependency-information
89 Info: The listed shared library doesn't include information about which
90 other libraries the library was linked against. (When running `<tt>ldd
91 foo.so</tt>' ldd should report about these other libraries. In your
92 case, ldd just reports `statically linked'.)
94 To fix this, you should explicitly specify the libraries which are
95 used (e.g., `-lc') when building the shared library with `ld'.
97 If you have questions about this, please contact &debdev;.
99 Tag: arch-dependent-file-in-usr-share
102 Info: This package installs an ELF binary in the <tt>/usr/share</tt>
103 hierarchy, which is reserved for architecture-independent files.
108 Info: This package installs an ELF binary in <tt>/etc</tt>.
109 The Filesystem Hierarchy Standard forbids this.
111 Tag: binary-compiled-with-profiling-enabled
113 Info: While profiling is useful for testing and debugging purposes, enabling
114 it causes a program to leave gmon.out files whenever a user runs it.
116 Tag: binary-file-compressed-with-upx
118 Info: Debian does not allow binaries to be compressed by UPX.
120 Tag: package-name-doesnt-match-sonames
122 Info: The package name of a library package should usually reflect
123 the soname of the included library. The package name can determined
124 from the library file name with the following code snippet:
126 $ objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | sed -e's/\([0-9]\)\.so\./\1-/; s/\.so\.//'
127 Ref: Library Packaging guide 5
129 Tag: binary-with-bad-dynamic-table
131 Info: This appears to be an ELF file but objdump -T cannot parse it.
132 If it is external debugging symbols for another file, it should be
133 installed under /usr/lib/debug.
135 Tag: apparently-corrupted-elf-binary
137 Info: This appears to be an ELF file but objdump -T doesn't recognize it
138 as valid. This may be a mistake or a corrupted file, you may need to
139 install binutils-multiarch on the system running lintian so that
140 non-native binaries are handled correctly, or it may be a
141 misidentification of a file as ELF that actually isn't.
143 Tag: missing-dependency-on-libc
146 Info: The listed file appears to be linked against the C library, but the
147 package doesn't depend on the C library package. Normally this indicates
148 that ${shlibs:Depends} was omitted from the Depends line for this package
149 in <tt>debian/control</tt>.
151 All shared libraries and compiled binaries must be run through
152 dpkg-shlibdeps to find out any libraries they are linked against (often
153 via the dh_shlibdeps debhelper command). The package containing these
154 files must then depend on ${shlibs:Depends} in <tt>debian/control</tt> to
155 get the proper package dependencies for those libraries.
157 Tag: missing-dependency-on-perlapi
159 Ref: Perl policy 4.4.2
160 Info: This package includes a *.so file in <tt>/usr/lib/perl5</tt>,
161 normally indicating that it includes a binary Perl module. Binary Perl
162 modules must depend on perlapi-$Config{version} (from the Config module).
163 If the package is using debhelper, this problem is usually due to a
164 missing dh_perl call in <tt>debian/rules</tt> or a missing
165 ${perl:Depends} substitution variable in the Depends line in
166 <tt>debian/control</tt>.
168 Tag: debug-file-should-use-detached-symbols
170 Info: This file is in a location generally used for detached debugging
171 symbols, but it appears to contain a complete copy of the executable or
172 library instead of only the debugging symbols. Files in subdirectories
173 of <tt>/usr/lib/debug</tt> mirroring the main file system should contain
174 only debugging information generated by <tt>objcopy
175 --only-keep-debug</tt>. Binaries or shared objects built with extra
176 debugging should be installed directly in <tt>/usr/lib/debug</tt> or in
177 subdirectories corresponding to the package, not in the directories that
178 mirror the main file system.
180 If you are using dh_strip with the --dbg-package flag, don't also install
181 the library in <tt>/usr/lib/debug</tt>. dh_strip does all the work for