Virtual_rules: use copy instead of symlink when copying signatures#4233
Conversation
466cefe to
abf8a74
Compare
|
IIUC, Dune is trying to create a symlink from its build directory pointing to |
No, dune is trying to create a symlink from and I got: Changing the permissions on I didn't go that much deep in the code of dune, and my explanation should be narrowed IMHO to find, maybe, a better solution. |
07dcf71 to
abf8a74
Compare
|
To sum-up:
Using a copy here is indeed a quick fix, but I wonder if this problem can't arrive in other cases. |
I was wondering this as well. I feel like we should simply never try to chmod symlinks. Looking at the code, we already try to avoid chmod-ing files that are not regular files, however we use |
I confirm this works. Do you prefer this fix? |
abf8a74 to
80ea2f7
Compare
|
Yes, that's a more general fix. Plus using symlinks here is more efficient. |
Perfect, i updated the branch. |
|
Looks good, thanks! |
Use stat instead of lstat in refresh_and_chmod Fix ocaml#4195 Signed-off-by: Danny Willems <be.danny.willems@gmail.com>
8115280 to
cbc5dbe
Compare
|
Thanks for accepting this PR @jeremiedimino. Do you have any plan for a new release of dune in the public opam repository with this fix? It is blocking for some MR in Tezos. |
|
Rudi answered this by adding the 2.8.3 milestone. So it's going to be part of the next bugfix release. |
By using stat instead of lstat in refresh_and_chmod Fix #4195 Signed-off-by: Danny Willems <be.danny.willems@gmail.com>
Fix #4195
In sandbox, symlink requires rw permissions on the directory of the sources to create a symlink. Copy does not require.
To test, you can build this branch, and try to install
bls12-381-unixorbls12-381-js.In addition to the comments in #4195, this issue has not been detected by the CI of bls12-381 (installing via opam is verified here: https://gitlab.com/dannywillems/ocaml-bls12-381/-/blob/master/.gitlab-ci.yml#L136) or by the CI of the public opam-repository (see ocaml/opam-repository#18112) because I think sandbox is not used.