Open-source Languages & Tools for z/OS

 View Only

 git version 2.14.4_zos_b09 z/OS symlink problem

Neil Shah's profile image
Neil Shah posted 07-16-2021 11:16
Hello,

I am posting this on behalf of one of our users, git doesn't seem to work when specifying an absolute path that is a symlink, i.e /tmp:

git clone git@github.ibm.com:zostools/tnz /tmp/xxxxxx-tnz
fatal: More than 32 nested symlinks on path '/tmp/xxxxxx-tnz'
 
but when specifying the relative path it works:
git clone git@github.ibm.com:zostools/tnz xxxxxx-tnz
Cloning into 'xxxxxx-tnz'...
remote: Enumerating objects: 1189, done.
remote: Total 1189 (delta 0), reused 0 (delta 0), pack-reused 1189
Receiving objects: 100% (1189/1189), 1.31 MiB | 14.28 MiB/s, done.
Resolving deltas: 100% (848/848), done.

I believe this to be because of the z/OS-unique symbolic links involved:
XXXXXX@AQMVSOE /tmp>ls -ld /tmp /\$SYSNAME
lrwxrwxrwx 1 BPXROOT DEFLT1 9 May 18 2012 /$SYSNAME -> $SYSNAME/
lrwxrwxrwx 1 BPXROOT DEPTD60 12 May 18 2012 /tmp -> $SYSNAME/tmp

On a system without this fake /$SYSNAME defined, I get this error instead of the one above:
-bash-4.3# git clone git@github.ibm.com:zostools/tnz /tmp/xxxxxx-tnz
fatal: Invalid path '/$SYSNAME': EDC5129I No such file or directory.

Thanks.

Neil
Vladimir Ein's profile image
ROCKETEER Vladimir Ein
Hello Neil,

Thanks for reporting the issue - this looks like a general problem with z/OS-specific symlinks. We've added it to our backlog.

Regards,
Vladimir