Closed StefanKarpinski closed 3 years ago
IMO, Tar.jl
should just use the permissions within the tarball.
Ok—that's what it actually does, so this would just be a documentation fix.
Looking at the extract code again, I realize that the docs were correct before: we only respect the user executable bit on files, which is how git behaves. I should revert the doc change that "fixed" this.
It seems that on MacOS, Tar.jl does not use the same permissions as within the tarball in some cases.
See the discussion in https://github.com/JuliaPackaging/Yggdrasil/pull/2231 and https://github.com/JuliaPackaging/Yggdrasil/issues/1969. I run into this issue with Qt_jll
, but only on macOS.
This was fixed already — it was because Sys.isexecutable
is not reliable on macOS. So we only use it on Windows and use filemode
everywhere else; or, since https://github.com/JuliaIO/Tar.jl/commit/0ba9683b202f09fe13b18368d6f6f20eca500c92 we actually just unconditionally call chmod
to set the permissions to what we want.
Accurate now (and changed)
The section https://github.com/JuliaIO/Tar.jl#permissions is wrong for extraction: contrary to what is claimed, extraction of a tarball tries to apply the exact mode recorded in the tarball to the extracted file. Need to decide wether to fix the docs or the implementation. cc @staticfloat since we have encountered cases where extracting read-only files causes issues, but also there may be cases where artifacts depend on some files being read-only.