[Rear-users] Problems with multiple libraries ...

Schlomo Schapiro schlomo at schapiro.org
Mon Apr 20 10:09:53 CEST 2009

Hi Peter,

that is a much better explanation, let me ask you a few questions:

How would the example of same-named but different libraries work on the
source system? If such libraries are installed in different directories
that are part of the library loader path (/etc/ld.so.conf) then AFAIK
the loader will in any case only take the first and ignore the second. I
can imagine that it works if some software brings private libraries and
sets LD_LIBRARY_PATH, thus forcing the loader to consider the private
libraries first. But in that case ReaR would not pick up these libraries
in any case because ReaR can find only those libraries that ldd gives us
which are only those libraries that are mentioned in ld.so.conf.

I already encountered such software (e.g. Galaxy) and the solution was
to copy all the software with the private libraries through COPY_AS_IS
which does not resolve any libraries.

To better understand your actual problem, could you please tell us more
about it with specific examples where you had this problem? With your
modification I would expect ReaR to fail on that system in any case.


PS: What I am trying to say is that I am not yet convinced that we are
solving the right problem with this patch.

Peter Eckhardt wrote:
> Hello,
> it took a bit to answer. Somehow holidays were more important than rear :-)
> ReaR has a generic problem if a libary with the same name exists in  
> two different directories. A situation which appears quite regulary if  
> an admin creates compatibility links or two packages bring the same  
> library but decide to have them in different directories.
> If such a situation arises it makes the creation of the ReaR ISO fail  
> (without error message) in the LibCopyTo function. Problem is the cp  
> command which can't (and shouldn't) overwrite an existing file.
> Overwriting may lead to the problem that in case two libaries with the  
> same name but different version or different functionality exists only  
> the last one copied will survive. In case of overwriting (i.e the cp  
> command line gets fixed) the cp command will succeed, the creation of  
> the ReaR iso too, but the restore form the iso may fail later due to  
> missing symbols in the library. So i personally prefer an abort of the  
> cp than just a silent overwrite.
> Thats the reason why i added the cmp command in the proposed fix. It  
> will only copy if the target does not exist or if target and source  
> aren't identical (then the cp will fail).
> test -r "$k" || Error .....
> if ! cmp "$TARGET/${basename $k}" "$k"
> then
>     cp -v -a ......
> else
>     Error "[LibCopyTo] Library $k exists more than one. Contents  
> differs. Aborted"
> fi
> test ! -L ......
> Brgds
> Peter

More information about the rear-users mailing list