@Dell:
If you carry libz.so.1, adding a search path under /etc/ld.so.conf.d is 
not the right way to do that. This story is almost as old a SYSV Unix (20+ 
years).

If compiling object files and linking a binary, the right way to do this 
would be -=NOT=- to use /etc/ld.so.conf.d/dsulib (get rid of it) and use 
something like this in your SPEC file:

export LDFLAGS="-Wl,-R/usr/%{_lib}/dsulib/%{_lib},--enable-new-dtags 
-Wl,-L/usr/%{_lib}/dsulib/%{_lib} -Wl,-L/usr/%{_lib}"

I used that on my RHEL snort rpms to avoid replacing the search path for 
system-wide libs and still be able to provide a more recent libpcap1.

Please research this a little more when shipping production code.
Look for rpath in 'man 1 ld'.

For others, here's my workaround (here on RHEL6):
# rm -fv /etc/ld.so.conf.d/dsulib.conf

# ldconfig

# chrpath /usr/sbin/dsu
/usr/sbin/dsu: no rpath or runpath tag found.

# patchelf --set-rpath /usr/lib64/dsulib /usr/sbin/dsu

# chrpath /usr/sbin/dsu
/usr/sbin/dsu: RUNPATH=/usr/lib64/dsulib

# ldd /usr/sbin/dsu|grep dsu
         libdcmkit.so => /usr/lib64/dsulib/libdcmkit.so (0x00000034c3e00000)
         libdsmxml.so => /usr/lib64/dsulib/libdsmxml.so (0x00000034c2e00000)
         libdsmbase.so => /usr/lib64/dsulib/libdsmbase.so (0x00000034c4600000)
         libdsmcabinet.so => /usr/lib64/dsulib/libdsmcabinet.so 
(0x00000034c2a00000)
         libxerces-c-3.1.so => /usr/lib64/dsulib/libxerces-c-3.1.so 
(0x00000034c3200000)

# ldd /usr/bin/xsltproc|grep libz
         libz.so.1 => /lib64/libz.so.1 (0x0000003a69600000)

chrpath: From RHEL6
patchelf: from OpenSUSE rpms, rebuilt on rhel6.

Voila, no more crap.

My 2c,

Vincent S. Cojot

On Mon, 3 Apr 2017, [email protected] wrote:

> Hi,
>
> You are right. Previous version of DSU (1.3.1 or below) does not use libz.
> Now, in the latest version of DSU (1.4.0), we do use libz for extraction of 
> .gz file formats. Hence we carry libz.so.1 along with DSU RPM in lib64/dsu 
> folder.
>
>
> Regards,
> Sashi
>
> Message: 1
> Date: Fri, 31 Mar 2017 13:04:18 -0500
> From: jsl6uy js16uy <[email protected]>
> Subject: [Linux-PowerEdge] dell-system-update package 1.4.0-17.02.00
>       installs a new version of libz.so?
> To: "<[email protected]>" <[email protected]>
> Message-ID:
>       <caagd8_r6onmp5oea4b1kefwrahs-zy6ypor_r+0ndi+w5ta...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> A colleague noticed after we had issues with a standard deployment we provide 
> to customers that libz.so was updated. Moreover ldconfig was updated so the 
> system uses the new libz. Again this broke a normal milk run install we do.
>
> Is there any reasoning for this?
>
> Details:
> The dell-system-update package 1.4.0-17.02.00 install a new version of 
> libz.so and update the ld config for the entire system to use it? This breaks 
> some programs which also use this shared library. It looks like previous 
> versions of dell-system-update did this with the xerces library, which did 
> not affect my systems, but still seems like bad practice to me.
>
> # ldd $(which xsltproc)|grep libz
>        libz.so.1 => /lib64/libz.so.1 (0x0000003036600000)
>
> # yum install dell-system-update
> Resolving Dependencies
> --> Running transaction check
> ---> Package dell-system-update.x86_64 0:1.4.0-17.02.00 will be
> ---> installed
> --> Finished Dependency Resolution
> ......
> Installed:
>  dell-system-update.x86_64 0:1.4.0-17.02.00
>
> # ldd $(which xsltproc)|grep libz
>        libz.so.1 => /usr/lib64/dsulib/libz.so.1 (0x00007f2403afe000)
>
> # cat /etc/ld.so.conf.d/dsulib.conf
> /usr/lib64/dsulib
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> http://lists.us.dell.com/pipermail/linux-poweredge/attachments/20170331/bfd3a71a/attachment-0001.html
>
> ------------------------------
>
> _______________________________________________
> Linux-PowerEdge mailing list
> [email protected]
> https://lists.us.dell.com/mailman/listinfo/linux-poweredge
>
> End of Linux-PowerEdge Digest, Vol 155, Issue 1
> ***********************************************
>
> _______________________________________________
> Linux-PowerEdge mailing list
> [email protected]
> https://lists.us.dell.com/mailman/listinfo/linux-poweredge
>

_______________________________________________
Linux-PowerEdge mailing list
[email protected]
https://lists.us.dell.com/mailman/listinfo/linux-poweredge

Reply via email to