6a84e3ea3812a8b565af184e13bc93a15a19b003
[maemian] / nokia-lintian / checks / binaries.desc
1 Check-Script: binaries
2 Author: Christian Schwarz <schwarz@debian.org>
3 Abbrev: bin
4 Type: binary, udeb
5 Unpack-Level: 1
6 Needs-Info: objdump-info, file-info
7 Info: This script checks binaries and object files for bugs.
8
9 Tag: arch-independent-package-contains-binary-or-object
10 Type: error
11 Info: The package contains a binary or object file but is tagged
12  Architecture: all.
13  .
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.
17
18 Tag: unstripped-binary-or-object
19 Type: error
20 Ref: policy 10.1, policy 10.2
21 Info: The package installs an unstripped binary or object file.
22  .
23  Please note, that shared libraries have to be stripped with the
24  <tt>--strip-unneeded</tt> option.
25
26 Tag: library-in-debug-or-profile-should-not-be-stripped
27 Type: error
28 Info: Libraries in <tt>.../lib/debug</tt> or in
29  <tt>.../lib/profile</tt> usually should not be stripped.
30
31 Tag: statically-linked-binary
32 Type: error
33 Info: The package installs a statically linked binary or object file.
34  .
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.
38
39 Tag: library-not-linked-against-libc
40 Type: warning
41 Info: The package installs a library which is not dynamically linked
42  against libc.
43
44 Tag: program-not-linked-against-libc
45 Type: warning
46 Info: The package installs a binary which is not dynamically linked
47  against libc.
48
49 Tag: binary-or-shlib-defines-rpath
50 Type: warning
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.
55  .
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.
62  .
63  To fix this problem, look for link lines like:
64      gcc test.o -o test -Wl,--rpath,/usr/local/lib
65  or
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.
69
70 Tag: binary-has-unneeded-section
71 Type: info
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.
76  .
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.
79
80 Tag: missing-depends-line
81 Type: warning
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.
86
87 Tag: shared-lib-without-dependency-information
88 Type: warning
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'.)
93  .
94  To fix this, you should explicitly specify the libraries which are
95  used (e.g., `-lc') when building the shared library with `ld'.
96  .
97  If you have questions about this, please contact &debdev;.
98
99 Tag: arch-dependent-file-in-usr-share
100 Type: error
101 Ref: fhs 4.11
102 Info: This package installs an ELF binary in the <tt>/usr/share</tt>
103  hierarchy, which is reserved for architecture-independent files.
104
105 Tag: binary-in-etc
106 Type: error
107 Ref: fhs 3.7
108 Info: This package installs an ELF binary in <tt>/etc</tt>.
109  The Filesystem Hierarchy Standard forbids this.
110
111 Tag: binary-compiled-with-profiling-enabled
112 Type: warning
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.
115
116 Tag: binary-file-compressed-with-upx
117 Type: error
118 Info: Debian does not allow binaries to be compressed by UPX.
119
120 Tag: package-name-doesnt-match-sonames
121 Type: warning
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:
125  .
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
128
129 Tag: binary-with-bad-dynamic-table
130 Type: error
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.
134
135 Tag: apparently-corrupted-elf-binary
136 Type: warning
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.
142
143 Tag: missing-dependency-on-libc
144 Type: error
145 Ref: policy 8.6
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>.
150  .
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.
156
157 Tag: missing-dependency-on-perlapi
158 Type: error
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>.
167
168 Tag: debug-file-should-use-detached-symbols
169 Type: warning
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.
179  .
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
182  you.