Re: authbind (LD_PRELOAD) and multiarch
On Mon, 12 Dec 2011, Ian Jackson wrote:
> * I will need to arrange for the same LD_PRELOAD setting to load the
> correct libauthbind for each arch. So I guess I do
> LD_PRELOAD=libauthbind.so.1 rather than supplying an absolute path,
> and trust ld.so to get the right one out of /usr/lib/<triplet>.
> Is that right ?
I don't know, ld.so(8) does not document this. (But it doesn't look wrong
> * AFAICT there is no way on a multiarch system to say in my
> dependencies "I need this package on all architectures supported on
> this system". I went and looked at testing's fakeroot but I'm not
> sure I should be using what it does as an example. How should an
> LD_PRELOAD hack approach this problem ?
What does fakeroot do? My first idea would be to fail early and provide a
useful error message.
Find out the arch of the executable, verify if the corresponding preload
library is available. If it's not, then fail and instruct the user to
install the missing library.
But this means that you have done (part of) the work that you were
intending to offload to ld.so.
> To best avoid transitional problems I guess piece 2 should go into
> "authbind" (Multi-arch: same; Depends: authbind-support) and pieces 1
> and 3 would in "authbind-support" (Multi-arch: foreign; no
> dependency). But I'm not sure.
Raphaël Hertzog ◈ Debian Developer
Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/