[lug] rpm spec: ldconfig-symlink

David L. Anselmi anselmi at anselmi.us
Sun Jul 17 09:44:27 MDT 2005


D. Stimits wrote:
> Hugh Brown wrote:
> 
>> I've seen a number of packages set the post install "shell" to be
>> ldconfig for coping with libraries.
>>
>> %post -p /sbin/ldconfig 
>> %postun -p /sbin/ldconfig  is probably useful too.
> 
> Hmm...so possibly ldconfig can create sym links for me some way?

Did you try it:

/lib$ ll libwrap.so.0*
lrwxrwxrwx  1 root root    16 2005-07-14 19:40 libwrap.so.0 -> 
libwrap.so.0.7.6
-rw-r--r--  1 root root 28880 2005-03-11 17:39 libwrap.so.0.7.6
/lib$ sudo rm libwrap.so.0
/lib$ ll libwrap.so.0*
-rw-r--r--  1 root root 28880 2005-03-11 17:39 libwrap.so.0.7.6
/lib$ sudo ldconfig
/lib$ ll libwrap.so.0*
lrwxrwxrwx  1 root root    16 2005-07-17 09:39 libwrap.so.0 -> 
libwrap.so.0.7.6
-rw-r--r--  1 root root 28880 2005-03-11 17:39 libwrap.so.0.7.6

So I would say the correct way to install a library on Linux is to 
install the actual object file (only) and run ldconfig.  You have to run 
ldconfig anyway so the loader will be able to find the new libraries.

My ldconfig doesn't seem to make as many links as you expect but I 
wouldn't worry about it.

Dave



More information about the LUG mailing list