[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#525779: [checks/shared-libs] warn about private libraries/plugins in /usr/lib



On Sunday 26 April 2009 22:16:51 Russ Allbery wrote:
> Raphael Geissert <atomo64@gmail.com> writes:
> > Given the current pollution of /usr/lib of private libs/plugins it
> > would be great if lintian warned about those.
> >
> > Probably something like the following (without the false positives and
> > based on objdump's output):
> >
> > for f in /usr/lib/*.so.* ; do
> >    nm -D "$f" | egrep -q '^[a-f0-9]+ [^U] [^_]' || echo "$f is private"
> > done
>
> Could you explain a little more about what that search does?  I think
> it's trying to warn about any library that contains no public symbols
> that don't begin with an underscore, but I'd expect most plugins and
> libraries to satisfy that test anyway.
>

It was basically that; requiring [^_] because some libs incorrectly export 
symbols that should not be exported (i.e. private). The assumption is that if 
no public symbol is exported then it is a plugin.

> For example, I ran that check on everything in /usr/lib/sasl2, and none
> of those were considered private even though they're all private plugins.

Sure, but that search is what I quickly came up with. I'd love to hear other 
ideas.

On my machine it matches /usr/lib/libkaffeine*.so, which should be in some 
place like /usr/lib/kaffeine/

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net



Reply to: