eth-cscs / stackinator

https://eth-cscs.github.io/stackinator/
BSD 3-Clause "New" or "Revised" License
19 stars 15 forks source link

Don't allow build paths in `~` #126

Closed bcumming closed 1 year ago

bcumming commented 1 year ago

The build tool rebinds ~ as a tmpfs in order to hide any user-specific Spack configuration that would be present in ~/.spack.

This causes the build step to fail if the build is being performed in a sub-directory of $HOME.

The solution is to check the path X provided in -b X, check that it is not a child of ~.

msimberg commented 1 year ago

Would a simpler solution be to instead do something like export SPACK_USER_CONFIG_PATH=$(mktemp -d) (and maybe SPACK_USER_CACHE_PATH)? This way you wouldn't have any restrictions on where the build can happen.