[lug] rpm spec: ldconfig-symlink

David L. Anselmi anselmi at anselmi.us
Sun Jul 17 17:16:20 MDT 2005


D. Stimits wrote:
[...]
> ldconfig does have an option to create sym links. It appears it sym 
> links the physical/real file name to the soname. I can't find how this 
> differs from ln -s, except that (a) it might be safer than loading ln in 
> a script, and (b) it automatically chooses the soname.

I didn't use any options.  It made symlinks.  Another difference from ln 
-s is that ldconfig updates the library cache the loader uses.

> ldconfig -l does indeed do fewer sym links, and without the -l, it does 
> not make any sym links.

That wasn't my experience, I didn't use -l.

> If rpmlint would accept the sym links, I would 
> be ok with this, but it doesn't. I have a properly built and linked 
> dynamic library (even the rpmlint documentation seems to think I used 
> the right options), but regardless of how I do it, rpmlint claims:
> <quote>
>  > rpmlint -i libMyLib-0.0.0-1.i386.rpm
> E: libMyLib no-ldconfig-symlink /usr/lib/libMyLib.so.0.0.0
> The package should not only include the shared library itself, but
> also the symbolic link which ldconfig would produce. (This is
> necessary, so that the link gets removed by dpkg automatically when
> the package gets removed.)  If the symlink is in the package, check
> that the SONAME of the library matches the info in the shlibs
> file.
> </quote>

Do you run rpmlint on the SRPM or the RPM?  Interesting that it tells 
you that dpkg removes links.

By any chance have you looked at anyone else's SRPMs?  I looked at this one:

ftp://rpmfind.net/linux/fedora/core/4/SRPMS/tcp_wrappers-7.6-39.src.rpm

and it only seems to use ldconfig for links.  I'm not that smart about 
how libwrap.so.0.7.6 gets built though.  What does rpmlint say on this 
package?

HTH,
Dave



More information about the LUG mailing list