On Mon, Sep 17, 2018 at 12:33:08AM +0200, Aurelien Jarno wrote:
>On 2018-09-16 02:38, Alexander Huynh wrote:
>> Hello all,
>> 
>> I have a branch on Salsa [0] that would provide ordering for the two files I
>> currently see placed in /etc/ld.so.conf.d/:
>> 
>>   * libc.conf
>>   * $(uname -m)-linux-gnu.conf
>> 
>> I've also done a sweep of the rest of the repo, adding ordering to other 
>> files
>> that could appear in /etc/ld.so.conf.d/.
>
>This only changes the name of the files, which is the trivial part. As
>those are conf files, the problem is to handle them during the package
>upgrade, probably using dpkg-maintscript-helper. During the whole
>upgrade process, the biarch compat files (old or new version) should never
>have bigger priority than the corresponding native one, as it might
>render the libc unusable for some weird multiarch + multilib
>configurations.

Ugh, yes. Especially considering that there might be all kinds of
user-supplied config in here in arbitrarily-named files. :-/

On my Stretch amd64/i386 system I currently have:

c30-smcintyre:/etc/ld.so.conf.d$ ls -l
total 24
-rw-r--r-- 1 root root  38 Oct  5  2014 fakeroot-x86_64-linux-gnu.conf
-rw-r--r-- 1 root root 108 Jun 15  2017 i386-linux-gnu.conf
-rw-r--r-- 1 root root  44 Nov 29  2013 libc.conf
-rw-r--r-- 1 root root  68 Dec 22  2013 x86_64-linux-gnu.conf
-rw-r--r-- 1 root root  56 Jul  8  2014 zz_i386-biarch-compat.conf
-rw-r--r-- 1 root root  58 Apr 15  2015 zz_x32-biarch-compat.conf

which means that (for example) i386 system-provided libraries will be
searched ahead of anything in /usr/local/lib, listed in
libc.conf. It's even worse on Arm systems where "aarch64-*" or "arm-*"
will all sort before "libc".

Should we at least simply rename libc.conf to 00libc.conf to make this
bit work? Adding a simple rename for that would seem to be the right
answer as a start?

-- 
Steve McIntyre, Cambridge, UK.                                st...@einval.com
Who needs computer imagery when you've got Brian Blessed?

Reply via email to