[Fedora-packaging] Unused direct shared library dependencies and rpmlint

Ville Skyttä ville.skytta at iki.fi
Sat Jan 27 08:47:49 UTC 2007


Hi,

Inspired by
http://www.redhat.com/archives/fedora-maintainers/2006-June/msg00176.html,
I've had a patch for rpmlint in my local tree for a while which checks for
unused direct shared library dependencies in shared libs.

I'm wondering whether this check is a good idea; I'm not an expert in this
area and the check does produce quite a bit of output on some packages. 
Comments very much welcome.  At the moment I'm leaning towards including
this in the next rpmlint release anyway.

For the adventurous, grab the latest rpmlint from svn (see
http://rpmlint.zarb.org/cgi-bin/trac.cgi/browser/trunk/README.devel) and apply
the attached patch to BinariesCheck.py.

Example output:

$ rpmlint krb5-libs | grep shlib
W: krb5-libs unused-direct-shlib-dependency /usr/lib/libkrb5support.so.0.1 /lib/libresolv.so.2
W: krb5-libs unused-direct-shlib-dependency /usr/lib/libk5crypto.so.3.0 /lib/libresolv.so.2
W: krb5-libs unused-direct-shlib-dependency /usr/lib/libkdb5.so.4.0 /lib/libdl.so.2
W: krb5-libs unused-direct-shlib-dependency /usr/lib/libkdb5.so.4.0 /lib/libresolv.so.2
W: krb5-libs unused-direct-shlib-dependency /usr/lib/libgssrpc.so.4.0 /usr/lib/libkrb5.so.3
W: krb5-libs unused-direct-shlib-dependency /usr/lib/libgssrpc.so.4.0 /usr/lib/libk5crypto.so.3
W: krb5-libs unused-direct-shlib-dependency /usr/lib/libgssrpc.so.4.0 /lib/libcom_err.so.2
W: krb5-libs unused-direct-shlib-dependency /usr/lib/libgssapi_krb5.so.2.2 /lib/libdl.so.2
W: krb5-libs unused-direct-shlib-dependency /usr/lib/libgssapi_krb5.so.2.2 /lib/libresolv.so.2
W: krb5-libs unused-direct-shlib-dependency /usr/lib/libdes425.so.3.0 /lib/libcom_err.so.2

$ rpmlint -I unused-direct-shlib-dependency
unused-direct-shlib-dependency :
The binary contains unused direct shared library dependencies.  This may
indicate gratuitously bloated linkage; check that the binary has been linked
with the intended shared libraries only.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpmlint-unused-direct-deps.patch
Type: text/x-diff
Size: 4400 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20070127/b50f1fff/attachment.bin>


More information about the Fedora-packaging mailing list