anarchyos icon indicating copy to clipboard operation
anarchyos copied to clipboard

sandboxed command and module loading

Open ghost opened this issue 12 years ago • 6 comments

We need something like nvm/nave for EVERY command and library. Some prior art: http://modules.sourceforge.net/

With the modules package you do module load NAME@VERSION and it creates a subshell with the module or library NAME at the requested VERSION and the LD_LIBRARY_PATH and PATH are updated to point to the vendored lib/ and bin/ directories for NAME.

ghost avatar Oct 04 '13 22:10 ghost

what could we use besides subshells?

juliangruber avatar Oct 04 '13 23:10 juliangruber

@juliangruber Symlinks in the PATH?

AndersDJohnson avatar Oct 04 '13 23:10 AndersDJohnson

we need something like

$ sub --LD=MODULE_LIBRARY_PATH --PATH=MODULE_PATH

that

  • finds out what shell you're running
  • spawns a new version of that
  • sets the env vars

juliangruber avatar Oct 04 '13 23:10 juliangruber

@adjohnson916 ammending PATH is dealing with a global, while with subshells you're modifying a copy of a global, which is way less prone to errors or side effects.

juliangruber avatar Oct 05 '13 06:10 juliangruber

Symlinks in PATH have the advantage of allowing for default version. I think that should allow for both - people expect a sane default version in global scope after installing a package (otherwise adoption might be a problem).

mmalecki avatar Oct 06 '13 13:10 mmalecki

if you kept a database (or something) of what versions you want, you could resolve generate a correct PATH that represented the dependency tree you needed.

dominictarr avatar Oct 10 '13 18:10 dominictarr