invitation to the Singularity slack + Question about relative soft link using $SINGULARITY_ROOTFS in the setup part of the Singularity recipe file

20 views
Skip to first unread message

Robert Po

unread,
Apr 24, 2021, 12:13:40 PM4/24/21
to singularity
I added the following question on Github but it seems here is a better way to ask it. Also I don't have permissions to add the Slack group so I would ask here. But first of all, is it possible to share an invitation to the Singularity slack group?

The question: 

### Version of Singularity:

What version of Singularity are you using? Run:

```
$ singularity version
3.7.1-1
```
### Question

I'm trying to create soft link in the `%setup` section of the Singularity recipe file. If the link is relative, it does not work. For example:
```
ln -s ${SINGULARITY_ROOTFS}../python2/2.7.5a ${SINGULARITY_ROOTFS}/usr/pkgs/python/2.7.5
```
It creates:
```
lrwxrwxrwx 1 root root 49 Apr 24 06:33 /tmp/build-temp-976030219/rootfs/usr/pkgs/python/2.7.5 -> /tmp/build-temp-976030219/rootfs../python2/2.7.5a
```
The `/tmp/build-temp-976030219/rootfs../python2/2.7.5a` is of course invalid path. I don't want to start getting the realpath because I could get other links on the way. How to make it work with **relative paths**? Am I not using the `${SINGULARITY_ROOTFS}` properly? 

Reply all
Reply to author
Forward
0 new messages