Hi,

> Sure, I'll try it later..  Thank you for the feedback!
Sorry for the delay. These GCD are going too fast for me.

I have some questions that could be useful for when you retry. The GCD
mentions that:
> To find its search path configuration files when an executable is
> running,
> we can first find the location of the executable.  Conveniently, Linux
> provides a pseudo-file `/proc/self/exe` for this exact purpose, which
> works well for ELF executables.   But for an interpreter script,
> `/proc/self/exe` would return the file name of its interpreter
> instead of the script, so we patch interpreters to set 2 environment
> variables:
> 
>   - `GUIX_INTERPRETER_FILE`: absolute file name of the interpreter
>   - `GUIX_MAIN_SCRIPT_FILE`: absolute file name of the script

Did you look if binfmt had any effects on all that? What happens if you
run some ARM binaries with QEMU on x86, would it break all that?

Also, for next time, it might be useful to look if there are
alternatives that enable not to patch interpreters and their costs.

For instance Android has a tool named path_interposer whose goal is to
somehow sandbox builds to make sure host tools are not used unless
their path are in the allowed list. I don't remember how it does the
sandboxing though but if I recall well it really worked for the use
case (the host tools are not in the same location than the Android
source code).

And in general, it would be good to understand if it's possible to
have something as generic as possible and the costs as well (we might
not want to pay huge performance penalty for them).

Denis.

Attachment: pgpPUahL0zqu0.pgp
Description: OpenPGP digital signature

Reply via email to