[lug] rpm spec: ldconfig-symlink

D. Stimits stimits at comcast.net
Sun Jul 17 15:19:14 MDT 2005


Chan Kar Heng wrote:
> 
> ahh.. i think it was ldconfig that refused to do up the remaining 
> symlinks for me if my versioning had 3 numbers & above... :)

This is actually a reply to this and the email one above in the thread...

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.

ldconfig -l does indeed do fewer sym links, and without the -l, it does 
not make any sym links. 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>

With the soname set to libMyLib.so.0 (or to ANY other name, for that 
matter), there is NO way to qualm this error listing. At this point it 
is looking like there is some magic spec file directive/macro which is 
used to list sym links to associate with a file or library. If the sym 
link is created in any other way, rpmlint calls it an error. Does anyone 
know what directive to use in a spec file to associate the sym link 
libMyLib.so.0 to libMyLib.so.0.0.0? How do I get rpmlint to stop 
complaining about a missing sym link that is there?

D. Stimits, stimits AT comcast DOT net



More information about the LUG mailing list