[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#519941: Remove Policy permission for packages to modify ld.so.conf



Christian Holm Christensen <cholm@nbi.dk> writes:

> This could be very bad for the root-system package set.   ROOT has
> libraries named like libMatrix, libPostscript, libPhysics, libMath, and
> so on - i.e., very general names.   For that reason I moved all the
> packages into the subdirectory /usr/lib/root to not cause possible
> conflicts.   To make this work seamlessly for both the root-system
> binaries and user code linked against the libraries, I dump a file
> in /etc/ld.so.conf.d/.  
>
> For the root-system binaries, there is of course the option to link with
> RPATH set.   However, I believe that the Policy actually forbids this.  
>
> That leaves maintainers no choice but to put libraries in a directory in
> the general search path - i.e., /usr/lib.

Which is what you already did by adding the directory to ld.so.conf, no?

> Furthermore, it will be up to the maintainers to make sure that he/she
> figures out if other packages use the same library names and make then
> `Conflict' against those packages.  This could turn out to be quite
> some work.

Except that moving them to a different directory doesn't really avoid
this if you have a fully conflicting library with the same version.  If
you installed both root-system and another library with the same name at
the same time now, you'd get one or the other depending on the
ld.so.conf order, leading to unpredictable results, segfaults, and so
forth.  dpkg refusing to install both at the same time is actually
cleaner, I think.

It also shouldn't be that much work to use apt-file to watch for
conflicting packages.  You should be able to set up a script that uses
apt-file and runs once a month or so to look for new conflicts.

> This is, of course, a good point, and the only proper solution to this
> is of course to make sure that every single library out there has a
> globally unique name (or some other kind of Magic identifier).   
>
> However, in the face of `difficult' packages like ROOT or legacy stuff
> it might be good to allow for using specific sub-directories.   Given
> that it is only a few packages that does this, it may not be so bad
> after all.   Also, since ld.so looks for the so-name which _must_
> (according to Policy) contain an interface number it seems unlikely (but
> not impossible) that two libraries with the same basename but in two
> different directories, has the same so-name. 

The same thing applies to libraries installed in the same directory,
such as both installed in /usr/lib, although the dev packages would
have to conflict.  Heimdal and libkrb5-3 both install a /usr/lib/libkrb5
shared library, for instance, but with different SONAMEs, so just the
development packages have to conflict.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: