1 Check-Script: shared-libs
2 Author: Christian Schwarz <schwarz@debian.org>
6 Needs-Info: file-info, objdump-info
7 Info: This script checks if a binary package conforms to shared library policy.
9 Tag: shlib-with-executable-bit
11 Info: Shared libraries should be mode 0644.
14 Tag: shlib-with-bad-permissions
16 Info: Shared libraries should be mode 0644.
19 Tag: shlib-with-non-pic-code
22 Info: The listed shared libraries contain object code that was compiled
23 without -fPIC. All object code in shared libraries should be recompiled
24 separately from the static libraries with the -fPIC option.
26 Another common mistake that causes this problem is linking with
27 <tt>gcc -Wl,-shared</tt> instead of <tt>gcc -shared</tt>.
29 In some cases, exceptions to this rule are warranted. If this is such a
30 case, follow the procedure outlined in Policy and then please document
31 the exception by adding a lintian override to this package.
33 Tag: ldconfig-symlink-missing-for-shlib
35 Info: The package should not only include the shared library itself, but also
36 the symbolic link which ldconfig would produce. (This is necessary, so
37 that the link gets removed by dpkg automatically when the package
38 gets removed.) If the symlink is in the package, check that the SONAME of the
39 library matches the info in the shlibs file.
42 Tag: ldconfig-symlink-before-shlib-in-deb
44 Info: In the package contents list, the shared library has to come before
45 any symbolic links referencing the shared library.
48 Tag: dev-pkg-without-shlib-symlink
50 Info: A `-dev' package is supposed to install a `libsomething.so' symbolic
51 link referencing the corresponding shared library. Notice how the link name
52 doesn't include the version number -- this is because such a link is used
53 by the linker when other programs are built against this shared library.
56 Tag: non-dev-pkg-with-shlib-symlink
58 Info: Although this package is not a `-dev' package, it installs a
59 `libsomething.so' symbolic link referencing the corresponding shared
60 library. When the link doesn't include the version number, it is used by
61 the linker when other programs are built against this shared library.
63 Shared libraries are supposed to place such symbolic links in their
64 respective `-dev' packages, so it is a bug to include it with the main
67 However, if this is a small package which includes the runtime and the
68 development libraries, this is not a bug. In the latter case, please
69 override this warning.
72 Tag: preinst-calls-ldconfig
74 Info: The preinst script calls ldconfig. Calls to ldconfig should only be
75 in postinst and postrm scripts.
78 Tag: prerm-calls-ldconfig
80 Info: The prerm script calls ldconfig. Calls to ldconfig should only
81 be in postinst and postrm scripts.
84 Tag: postrm-unsafe-ldconfig
86 Info: The postrm script calls ldconfig unsafely. The postrm
87 must only call ldconfig when given the argument "remove".
90 Tag: no-shlibs-control-file
92 Info: Although the package includes a shared library, the package does not
93 have a shlibs control file. If this is intentional, please override this
97 Tag: pkg-has-shlibs-control-file-but-no-actual-shared-libs
99 Info: Although the package does not include any shared libraries, it does
100 have a shlibs control file. If you did include a shared library, check that
101 the SONAME of the library is set and that it matches the contents of the
104 SONAMEs are set with something like <tt>gcc -Wl,-soname,libfoo.so.0</tt>,
105 where 0 is the major version of the library. If your package uses libtool,
106 then libtool invoked with the right options should be doing this.
108 Tag: duplicate-entry-in-shlibs-control-file
110 Info: The shlibs control file contains a duplicate entry.
112 Tag: shlib-missing-in-control-file
114 Info: The package contains a shared library that is not listed in the
115 shlibs control file. If this is intentional, please override this error.
118 Tag: unused-shlib-entry-in-control-file
120 Info: The shlibs control file contains an entry for a shared library that
121 is not installed by this package.
124 Tag: shlibs-declares-dependency-on-other-package
126 Info: This package declares in its shlibs control file a dependency on
127 some other package (and not one listed in the Provides of this package).
129 Packages should normally only list in their shlibs control file the
130 shared libraries included in that package, and therefore the dependencies
131 listed there should normally be satisfied by either the package itself or
134 In unusual circumstances where it's necessary to declare more complex
135 dependencies in the shlibs control file, please add a lintian override
139 Tag: ldconfig-symlink-referencing-wrong-file
141 Info: The symbolic link references the wrong file. (It should reference
145 Tag: ldconfig-symlink-is-not-a-symlink
147 Info: The package installs a file with the name, ldconfig would use for
148 the symbolic link to reference the shared library.
151 Tag: postinst-has-useless-call-to-ldconfig
153 Info: The postinst script calls ldconfig even though no shared libraries are
154 installed in a directory controlled by the dynamic library loader.
157 Tag: udeb-postinst-must-not-call-ldconfig
159 Info: The postinst script calls ldconfig, which is an error in udebs.
160 ldconfig is not available and not needed in debian-installer
162 Tag: postrm-has-useless-call-to-ldconfig
164 Info: The postrm script calls ldconfig even though no shared libraries are
165 installed in a directory controlled by the dynamic library loader.
168 Tag: postinst-must-call-ldconfig
170 Info: The package installs shared libraries in a directory controlled by
171 the dynamic library loader. Therefore, the package must call `ldconfig' in
175 Tag: postrm-should-call-ldconfig
177 Info: The package installs shared libraries in a directory controlled by
178 the dynamic library loader. Therefore, the package should call `ldconfig'
179 in its postrm script.
182 Tag: sharedobject-in-library-directory-missing-soname
184 Info: A shared object was identified in a library directory (i.e. a
185 directory in the standard linker path) which doesn't have a SONAME.
186 This is usually an error.
188 SONAMEs are set with something like <tt>gcc -Wl,-soname,libfoo.so.0</tt>,
189 where 0 is the major version of the library. If your package uses libtool,
190 then libtool invoked with the right options should be doing this.
192 Tag: shlib-without-PT_GNU_STACK-section
194 Info: The listed shared libraries lacks a PT_GNU_STACK section. This forces
195 the dynamic linker to make the stack executable.
197 The shared lib is linked either with a non-GNU linker or a linker which is
198 older than two years. This problem can be fixed with a rebuild.
200 Tag: shlib-with-executable-stack
202 Info: The listed shared libraries declares the stack as executable.
204 Executable stack is usualy an error as it is only needed if the code
205 contains GCC trampolines or similar constructs which uses code on the
206 stack. One possible source for false positives are object files built
207 from assembler files which don't define a proper .note.GNU-stack
210 Tag: symbols-file-contains-current-version-with-debian-revision
212 Info: Debian revisions should be stripped from versions in symbols files.
213 Not doing so leads to dependencies unsatisfiable by backports (1.0-1~bpo
214 << 1.0-1 while 1.0-1~bpo >= 1.0). If the debian revision can't
215 be stripped because the symbol really appearead between two specific
216 Debian revisions, you should postfix the version with a single "~"
217 (example: 1.0-3~ if the symbol appeared in 1.0-3).
219 This problem normally means that the symbols were added automatically by
220 dpkg-gensymbols. dpkg-gensymbols uses the full version number for the
221 dependency associated to any new symbol that it detects. The maintainer
222 must update the <tt>debian/<package>.symbols</tt> file by adding
223 the new symbols with the corresponding upstream version.
225 Tag: symbols-file-contains-debian-revision
227 Info: Debian revisions should be stripped from versions in symbols files.
228 Not doing so leads to dependencies unsatisfiable by backports (1.0-1~bpo
229 << 1.0-1 while 1.0-1~bpo >= 1.0). If the debian revision can't
230 be stripped because the symbol really appearead between two specific
231 Debian revisions, you should postfix the version with a single "~"
232 (example: 1.0-3~ if the symbol appeared in 1.0-3).
234 Tag: syntax-error-in-symbols-file
236 Info: The symbols file contains an entry that does not follow the syntax
237 rules for symbols files.
239 This may be due to the entry appearing out of sequence.
242 Tag: duplicate-entry-in-symbols-control-file
244 Info: The symbols control file contains a duplicate entry.
246 Tag: no-symbols-control-file
248 Info: Although the package includes a shared library, the package does not
249 have a symbols control file.
251 Tag: pkg-has-symbols-control-file-but-no-shared-libs
253 Info: Although the package does not include any shared libraries, it does
254 have a symbols control file. If you did include a shared library, check that
255 the SONAME of the library is set and that it matches the contents of the
258 SONAMEs are set with something like <tt>gcc -Wl,-soname,libfoo.so.0</tt>,
259 where 0 is the major version of the library. If your package uses libtool,
260 then libtool invoked with the right options should be doing this.
262 Tag: shlib-missing-in-symbols-control-file
264 Info: The package contains a shared library that is not listed in the
265 symbols control file. This may not be a problem if, for example,
266 the library is a C++ library.
268 Tag: unused-shlib-entry-in-symbols-control-file
270 Info: The symbols control file contains an entry for a shared library that
271 is not installed by this package.
273 Tag: symbols-declares-dependency-on-other-package
275 Info: This package declares in its symbols control file a dependency on
276 some other package (and not one listed in the Provides of this package).
278 Packages should normally only list in their symbols control file the
279 shared libraries included in that package, and therefore the dependencies
280 listed there should normally be satisfied by either the package itself or
283 In unusual circumstances where it's necessary to declare more complex
284 dependencies in the symbols control file, please add a lintian override
288 Tag: invalid-template-id-in-symbols-file
290 Info: The symbol definition refers to an alternative dependency template
291 which is not defined for the library containing the symbol.
293 The first alternative dependency template for a library the id number
294 of 1, with the ids of subsequent alternative templates increasing in
297 Tag: unknown-meta-field-in-symbols-file
299 Info: The symbols control file contains an unknown meta-information field.
301 A list of currently supported fields may be found in deb-control(5).
303 Tag: symbols-declared-but-not-shlib
305 Info: The symbols control file contains dependency and symbol information
306 for a shared library which is not listed in the shlibs control file.