easybuild-easyblocks
easybuild-easyblocks copied to clipboard
Generic Tarball EasyBlock: Infinite loop until you run out of file quota if the tar file in some cases where the tar file contains a symbolic link to a directory earlier in the hierarchy
I am not sure if I am using the Tarball EasyBlock in the wrong way or if something was overlooked:
To reproduce:
- I used EasyBuild 4.3.2
- Ran on CentOS 8.3.2011 using the system python3 (version 3.6.8)
- Tried to install Spack 0.16.0 by modifying the EasyConfig supplied for Spack 0.12.1: Change the version in the EasyConfig to 0.16.0 and update the checksum to 064b2532c70916c7684d4c7c973416ac32dd2ea15f5c392654c75258bfc8c6c2
- The install step gets in an infinite loop copying Spack into itself over and over again until one runs out of file quota or crashes the file system in another way.
- Cause of the problem: In Spack 0.16.0, the directory lib/spack/docs contains a symbolic link _spack_root that simply links to ../../.. (so the spack root directory). Instead of simply copying the symbolic link as a symbolic link, I guess it expands it and start copying all of Spack again in that directory, and continues to do so recursively.
I wonder if this might be related to issue #492 with the MakeCp EasyBlock.
I realise that kind of links may not be such a good idea in a tar file, but they do happen...
I do have a workaround for Spack by using extract_cmd to extract the tar file straight into the install directory and then skip the usual install step so it is a problem that can be worked around.
@klust Ugh, this is an annoying issue... I'm not sure we can entirely prevent this from happening though.
You can work around it by adding keepsymlinks = True in the easyconfig file (default is False).
Perhaps we should consider changing that default... Please open an issue for that in the framework repo, we can consider it for the next major EasyBuild release (5.0).