Bug#631011: lintian: add embedded-libcharls
* Niels Thykier <niels@thykier.net>, 2011-06-19, 20:27:
it would be nice to add a embedded-libcharls check. Currently there
are at least two packages shipping CharLS as convinient library:
I assume you mean embedded-library libcharls (we replaced embedded-$lib
with embedded-library in 2.5.0~rc1).
Anyhow, we do this based on one (or more) discriminating string(s) in
the library. Unfortunately I checked libcharls1 (1.0-1) and I cannot
really find anything but symbol names. For convenience I have attached
Lintian's string file for libcharls1 (extracted from the lab).
Yeah, if we want to detect software linking statically to libchars, this
is rather hopeless.
$ dpkg -L libdcmtk2 | grep charls
/usr/lib/libcharls.so.2.0.0
and
$ dpkg -L libgdcm2.0 | grep charls
/usr/lib/libgdcmcharls.so.2.0.17
But for the these cases of dynamic libraries like these, we could just
look at exported symbols. With the attached patch I get this:
$ lintian -T embedded-library libdcmtk2_3.6.0-6_i386.deb libgdcm2.0_2.0.17-3_i386.deb | grep charls
E: libdcmtk2: embedded-library usr/lib/libcharls.so.2.0.0: libcharls
E: libgdcm2.0: embedded-library usr/lib/libgdcmcharls.so.2.0.17: libcharls
That said, the patch is quite ugly and I'm not sure if it's a good idea
to apply it.
--
Jakub Wilk
diff --git a/checks/binaries b/checks/binaries
--- a/checks/binaries
+++ b/checks/binaries
@@ -163,6 +163,9 @@
tag 'binary-compiled-with-profiling-enabled', $file;
}
}
+ if ($foo eq '.text' and $sym =~ /^_ZN15JLSOutputStreamC1/ and $proc->pkg_src ne 'charls') {
+ tag 'embedded-library', "$file: libcharls";
+ }
}
foreach (@{$objdump->{NOTES}}) {
if ($_ eq 'File format not recognized') {
Reply to: