Added some code to peer into a data structure in Maemian/Schedule.pm. Also added the
[maemian] / nokia-lintian / checks / shared-libs.desc
1 Check-Script: shared-libs
2 Author: Christian Schwarz <schwarz@debian.org>
3 Abbrev: shl
4 Type: binary, udeb
5 Unpack-Level: 1
6 Needs-Info: file-info, objdump-info
7 Info: This script checks if a binary package conforms to shared library policy.
8
9 Tag: shlib-with-executable-bit
10 Type: error
11 Info: Shared libraries should be mode 0644.
12 Ref: policy 8.1
13
14 Tag: shlib-with-bad-permissions
15 Type: warning
16 Info: Shared libraries should be mode 0644.
17 Ref: policy 8.1
18
19 Tag: shlib-with-non-pic-code
20 Type: error
21 Ref: policy 10.2
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. 
25  .
26  Another common mistake that causes this problem is linking with 
27  <tt>gcc -Wl,-shared</tt> instead of <tt>gcc -shared</tt>.
28  .
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.
32
33 Tag: ldconfig-symlink-missing-for-shlib
34 Type: error
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.
40 Ref: policy 8.1
41
42 Tag: ldconfig-symlink-before-shlib-in-deb
43 Type: error
44 Info: In the package contents list, the shared library has to come before
45  any symbolic links referencing the shared library.
46 Ref: policy 8.1
47
48 Tag: dev-pkg-without-shlib-symlink
49 Type: warning
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.
54 Ref: policy 8.4
55
56 Tag: non-dev-pkg-with-shlib-symlink
57 Type: warning
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.
62  .
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
65  library package.
66  .
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.
70 Ref: policy 8.4
71
72 Tag: preinst-calls-ldconfig
73 Type: warning
74 Info: The preinst script calls ldconfig.  Calls to ldconfig should only be
75  in postinst and postrm scripts.
76 Ref: policy 8.1.1
77
78 Tag: prerm-calls-ldconfig
79 Type: warning
80 Info: The prerm script calls ldconfig.  Calls to ldconfig should only
81  be in postinst and postrm scripts.
82 Ref: policy 8.1.1
83
84 Tag: postrm-unsafe-ldconfig
85 Type: warning
86 Info: The postrm script calls ldconfig unsafely.  The postrm
87  must only call ldconfig when given the argument "remove".
88 Ref: policy 8.1.1
89
90 Tag: no-shlibs-control-file
91 Type: error
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
94  error.
95 Ref: policy 8.6
96
97 Tag: pkg-has-shlibs-control-file-but-no-actual-shared-libs
98 Type: error
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
102  shlibs file.
103  .
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.
107
108 Tag: duplicate-entry-in-shlibs-control-file
109 Type: error
110 Info: The shlibs control file contains a duplicate entry.
111
112 Tag: shlib-missing-in-control-file
113 Type: error
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.
116 Ref: policy 8.6
117
118 Tag: unused-shlib-entry-in-control-file
119 Type: warning
120 Info: The shlibs control file contains an entry for a shared library that
121  is not installed by this package.
122 Ref: policy 8.6
123
124 Tag: shlibs-declares-dependency-on-other-package
125 Type: warning
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).
128  .
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
132  one of its Provides.
133  .
134  In unusual circumstances where it's necessary to declare more complex
135  dependencies in the shlibs control file, please add a lintian override
136  for this warning.
137 Ref: policy 8.6
138
139 Tag: ldconfig-symlink-referencing-wrong-file
140 Type: error
141 Info: The symbolic link references the wrong file. (It should reference
142  the shared library.)
143 Ref: policy 8.1
144
145 Tag: ldconfig-symlink-is-not-a-symlink
146 Type: error
147 Info: The package installs a file with the name, ldconfig would use for
148  the symbolic link to reference the shared library.
149 Ref: policy 8.1
150
151 Tag: postinst-has-useless-call-to-ldconfig
152 Type: warning
153 Info: The postinst script calls ldconfig even though no shared libraries are
154  installed in a directory controlled by the dynamic library loader.
155 Ref: policy 8.1.1
156
157 Tag: udeb-postinst-must-not-call-ldconfig
158 Type: error
159 Info: The postinst script calls ldconfig, which is an error in udebs.
160  ldconfig is not available and not needed in debian-installer
161
162 Tag: postrm-has-useless-call-to-ldconfig
163 Type: warning
164 Info: The postrm script calls ldconfig even though no shared libraries are
165  installed in a directory controlled by the dynamic library loader.
166 Ref: policy 8.1.1
167
168 Tag: postinst-must-call-ldconfig
169 Type: error
170 Info: The package installs shared libraries in a directory controlled by
171  the dynamic library loader. Therefore, the package must call `ldconfig' in
172  its postinst script.
173 Ref: policy 8.1.1
174
175 Tag: postrm-should-call-ldconfig
176 Type: warning
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.
180 Ref: policy 8.1.1
181
182 Tag: sharedobject-in-library-directory-missing-soname
183 Type: error
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.
187  .
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.
191
192 Tag: shlib-without-PT_GNU_STACK-section
193 Type: error
194 Info: The listed shared libraries lacks a PT_GNU_STACK section. This forces
195  the dynamic linker to make the stack executable.
196  .
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.
199
200 Tag: shlib-with-executable-stack
201 Type: warning
202 Info: The listed shared libraries declares the stack as executable.
203  .
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
208  section.
209
210 Tag: symbols-file-contains-current-version-with-debian-revision
211 Type: error
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  &lt;&lt; 1.0-1 while 1.0-1~bpo &gt;= 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).
218  .
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/&lt;package&gt;.symbols</tt> file by adding
223  the new symbols with the corresponding upstream version.
224
225 Tag: symbols-file-contains-debian-revision
226 Type: warning
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  &lt;&lt; 1.0-1 while 1.0-1~bpo &gt;= 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).
233
234 Tag: syntax-error-in-symbols-file
235 Type: error
236 Info: The symbols file contains an entry that does not follow the syntax
237  rules for symbols files.
238  .
239  This may be due to the entry appearing out of sequence.
240 Ref: deb-symbols(5)
241
242 Tag: duplicate-entry-in-symbols-control-file
243 Type: error
244 Info: The symbols control file contains a duplicate entry.
245
246 Tag: no-symbols-control-file
247 Type: info
248 Info: Although the package includes a shared library, the package does not
249  have a symbols control file.
250
251 Tag: pkg-has-symbols-control-file-but-no-shared-libs
252 Type: error
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
256  symbols file.
257  .
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.
261
262 Tag: shlib-missing-in-symbols-control-file
263 Type: warning
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.
267
268 Tag: unused-shlib-entry-in-symbols-control-file
269 Type: warning
270 Info: The symbols control file contains an entry for a shared library that
271  is not installed by this package.
272
273 Tag: symbols-declares-dependency-on-other-package
274 Type: warning
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).
277  .
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
281  one of its Provides.
282  .
283  In unusual circumstances where it's necessary to declare more complex
284  dependencies in the symbols control file, please add a lintian override
285  for this warning.
286 Ref: policy 8.6
287
288 Tag: invalid-template-id-in-symbols-file
289 Type: error
290 Info: The symbol definition refers to an alternative dependency template
291  which is not defined for the library containing the symbol.
292  .
293  The first alternative dependency template for a library the id number
294  of 1, with the ids of subsequent alternative templates increasing in
295  sequence.
296
297 Tag: unknown-meta-field-in-symbols-file
298 Type: error
299 Info: The symbols control file contains an unknown meta-information field.
300  .
301  A list of currently supported fields may be found in deb-control(5).
302
303 Tag: symbols-declared-but-not-shlib
304 Type: error
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.