Peter Pentchev wrote: > So, the thing is, now it's in an arch:all package; it examines the program > that the user asked it to run, then chooses the /usr/lib/*/dante-client/libdsocksd.so > file for the correct architecture (thus the multiarch-find-lib tool), puts it > into LD_PRELOAD, then runs the program that the user asked it to run. > The thing is, now you can have several dante-client-lib (arch-specific) packages > containing the various /usr/lib/*/dante-client/libdsocksd.so helpers, and > one socksify to bind them, thus allowing you to run e.g. both amd64 and i386 > binaries through SOCKS proxies. This was impossible until now, and I have > a couple of bug reports in the BTS to prove it :) There's a much easier way to do this, btw.: if a library is directly in /usr/lib/$triplet, then setting LD_PRELOAD=library.so.X will work without you having to find the proper multi-arch related library. See how e.g. my own gtk3-nocsd package does it: library goes to /usr/lib/$triplet, and wrapper just sets LD_PRELOAD=libgtk3-nocsd.so.0. ld.so does the rest automatically (assuming the M-A: same package is installed for the architecture required). Also, if a program called in such a way forks and executes another program, if that other program is on a different architecture, ld.so will automatically do the right thing. Example: you call a script, which uses an amd64 interpreter, but the script itself doesn't do any network calls but rather calls an i386 binary to actually connect to the network. And if I read your multiarch-find-lib right, it doesn't appear to even handle shebang-interpreters at the moment? (Btw. I find it way easier to just set a SONAME for the preloaded library and add a symbols file, plus also follow Debian package naming conventions based on the soname, than to either ignore the lintian warnings about missing SONAME or override them, which will become necessary if the preloadable library resides directly in the canonical /usr/lib/$triplet path directly.) Just my 2c. Regards, Christian
Attachment:
signature.asc
Description: OpenPGP digital signature