OSError: [Errno 95] Operation not supported: 'lib' -> when installing on Network Drive and Linux
Describe the bug here.
Environment
- OS - Linux 20.04
- Rez version 3.2.1
To Reproduce
- Run the install.py script on a Network Drive mounted using CIFS on a Linux Machine
Expected behavior I am trying to setup an installation of Rez in a Network Drive location.
The Network Drive location contains
- Windows
- Linux
sub-directories.
In the Windows directory, I've installed Rez from source, using Python3.10.8 and Windows 10. The virtualenv is created correctly and rez is installed.
When on Linux, the installation fails probably because the NDrive does not support symlinks. virtualenv has an option to copy instead of using symlinks, I'd expect this to be available for use through Rez.
Actual behavior
The installation fails on virtualenv creation when on Linux and using a Network Drive.
OSError: [Errno 95] Operation not supported: 'lib' -> '/
Regression If applicable, state the last known rez version where the bug did not occur (delete this section if N/A).
Interesting finding. Thanks for reporting it!
worth noting, when mounting SMB shares on linux, you can use the cifs mount flag, mfsymlinks, this allows linux clients to create symlinks on the target network filesystem
This can be also helpful when you release linux compiled pkgs to SMB shares, where .so libs may be symlinked to versioned libs
https://manpages.debian.org/stretch/cifs-utils/mount.cifs.8.en.html#:~:text=VFS%20kernel%20module.-,mfsymlinks,-Enable%20support%20for
Since v3.1.1 you can switch to use plugins:package_repository:filesystem:file_lock_type = symlink. Or for older versions, use mkdir for the locking method via
# rezconfig.py
plugins = {
"package_repository": {
"filesystem": {
# The mechanism used to create the lockfile. If set to 'default', this will
# use hardlinks (link) if the 'os.link' method is present, otherwise mkdir is used.
# Valid options are 'default', 'mkdir', 'link', or 'symlink'
"file_lock_type": "symlink",
},
}
}
See #1708