Bug#525779: [checks/shared-libs] warn about private libraries/plugins in /usr/lib
Raphael Geissert <atomo64+debian@gmail.com> writes:
> Sure, that's ok. I forgot about mangled symbols, nm should be called
> with -DC, not just -D.
Oh, I didn't know about that option.
> So far I've came up with:
>
> for f in /usr/lib/*so.*; do
> nm -DC "$f" | grep -q " virtual thunk" && echo "$f is private"
> done
>
> Which seems to give good results. It is based on the assumption that
> plugins use/implement virtual functions, although it only works with
> C++ libs.
>
> What do you think? good enough to add it as an
> experimental/wishlist/possible tag?
I'm really unsure that you're going to be able to find a characteristic
of plugins that doesn't fit libraries. Why wouldn't C++ libraries also
implement virtual functions?
That check turns up:
/usr/lib/libsaml.so.2 is private
/usr/lib/libsaml.so.2.0.0 is private
/usr/lib/libsaml.so.3 is private
/usr/lib/libsaml.so.3.0.0 is private
/usr/lib/libshibsp-lite.so.2 is private
/usr/lib/libshibsp-lite.so.2.0.0 is private
/usr/lib/libshibsp.so.2 is private
/usr/lib/libshibsp.so.2.0.0 is private
/usr/lib/libsmbios.so.2 is private
/usr/lib/libsmbios.so.2.0.0 is private
/usr/lib/libspgrove.so.1 is private
/usr/lib/libspgrove.so.1.0.3 is private
/usr/lib/libstdc++.so.6 is private
/usr/lib/libstdc++.so.6.0.10 is private
/usr/lib/libstlport_gcc.so.4.6 is private
/usr/lib/libxmltooling-lite.so.1 is private
/usr/lib/libxmltooling-lite.so.1.0.0 is private
/usr/lib/libxmltooling-lite.so.2 is private
/usr/lib/libxmltooling-lite.so.2.0.0 is private
/usr/lib/libxmltooling.so.1 is private
/usr/lib/libxmltooling.so.1.0.0 is private
/usr/lib/libxmltooling.so.2 is private
/usr/lib/libxmltooling.so.2.0.0 is private
on my system. libstdc++ is obviously not a plugin, and neither are the
libxmltooling, libsaml, or libshibsp libraries. They're all regular
shared C++ libraries.
http://lintian.debian.org/tags/shlib-without-versioned-soname.html
already gets a ton of plugins that shouldn't be in /usr/lib. (Did we
ever talk here about what to do about all those libkdeinit4_* libraries?)
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: