Fix finding home directory on debian
Container support is being incorrectly identified on debain as it appears singularity doesn't expand $HOME
correctly.
SLC6:
$ docker run -it --rm --privileged -v /cvmfs:/cvmfs:ro,cached -v $PWD:/repo -w /repo gitlab-registry.cern.ch/lhcb-docker/python-singularity:slc6-singularity bash
[root@718af618fe80 repo]# singularity exec --bind /cvmfs --home $HOME:/home /cvmfs/cernvm-prod.cern.ch/cvm4 true
WARNING: container does not have /.singularity.d/actions/exec, calling true directly
[root@718af618fe80 repo]# singularity exec --bind /cvmfs --home '$HOME:/home' /cvmfs/cernvm-prod.cern.ch/cvm4 true
WARNING: container does not have /.singularity.d/actions/exec, calling true directly
Debian:
$ singularity exec --bind /cvmfs --home $HOME:/home /cvmfs/cernvm-prod.cern.ch/cvm4 true
Singularity: action-suid (U=0,P=6)> USER=root, IMAGE='cvm4', COMMAND='exec'
Singularity: action-suid (U=0,P=6)> Container does not have an exec helper script, calling 'true' directly
WARNING: Container does not have an exec helper script, calling 'true' directly
root@09e5d293ab9e:/repo# singularity exec --bind /cvmfs --home '$HOME:/home' /cvmfs/cernvm-prod.cern.ch/cvm4 true
Singularity: action-suid (U=0,P=12)> Home directory is not owned by calling user: $HOME
ERROR : Home directory is not owned by calling user: $HOME
Singularity: action-suid (U=0,P=12)> Retval = 255
ABORT : Retval = 255
Edited by Chris Burr