Hey,
This looks basically ok to me. More below:
thx for this fast reply! Sorry I'm a little bit busy the last days...
Btw. would it be possible to ship a new release the next days? So I can push this new version to Debian trixie? As the soft freeze is happening at 15. April.
But the torsocks script loads the libtorsocks by full path, so torsocks wget will fail, as it loads the amd64 variant only. ldconfig has this nice feature to find the correct library, if you only add the name and that the library is in default search dir or you add a conf file in / etc/ld.so.conf.d/.
Maybe we could be a *little* more explicit and use a full path incorporating `${LIB}`? From ld.so(8): [...]
I see your point, but unfortunately it is not only lib64 vs. lib directory, as Debian uses the different arch trippets for their lib paths. As you also want different arm archs e.g. /usr/lib/x86_64-linux-gnu/ and /usr/lib/i386-linux-gnu/
for the complete list see https://wiki.debian.org/Multiarch/Tuples
This might head off some other weird corner cases (like some other `libtorsocks` ending up earlier in the library search path) and maybe give a stronger hint about what's going wrong in the error message you note below where the right library can't be found.
I see your point you are thinking at a warning like: You enabled those archs but missing libtorsoks for following archs: X, Y, Z
I don't know if that is easy possible but I'll ask for help on Debian side.
This is an unfortunate failure mode, but yeah at least not worse than the current state.
I was thinking about whether the torsocks script could try harder to detect this case, e.g. by itself checking what arch binary is being run and whether the corresponding library exists, but this would add a fair bit of complexity and would still miss cases where the target binary spawns more processes, possibly of different archs (e.g. `torsocks bash -c "wget ..."`)
Yes it would be nice, if torsocks could detect the arch correctly, but I also thought at these complications about subprocesses.
Regards,
hefee