-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--sandbox_add_mount_pair ignored on OSX #4150
Comments
//cc @xingao267 @philwo |
I would likewise be very interested in this feature. It would allow using rules_nixpkgs without requiring any globally installed tool (which can only be installed locally if extra directories are mapped into the sandbox). |
Moving to the local exec team and back into the untriaged pool. |
Bind mounts don't exist on macOS (unless you use FUSE, which we don't rely on by default at this point), so I think the only way we could offer this right now is by replicating the tree into the sandbox using symlinks. Would that be sufficient? Are you still interested in this feature? |
If the flag exists on macOS, and it does, then we should make it work. Given what I said in the last reply, we cannot make it work as "mounts" (unless we use sandboxfs), but the symlinking approach may be a good compromise. |
@jmmv Thanks! I'm not actively using macOS, but we most of our Bazel users are. Combined with platform specific bazelrc this would be a nice way to make our builds more hermetic. |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 3 years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
This feature request seems to be still valid. I don't exactly know how sandbox-exec works, but it seems to be possible to add more here bazel/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java Lines 254 to 258 in 04f2b03
|
Yes, I think this FR still makes sense, although we might not be able to prioritize it. cc @oquenchil |
I tried something in #20336 . Not sure whether it is a sane approach. Can someone help me understand whether it is a good way to go forward? Thanks. |
Can I get some help on this? I'm a first-time contributor and I literally don't know whether I'm doing something totally wrong 😄. Thanks. @tjgq or @oquenchil maybe? |
Trying this again. Can some one help review the PR? Thanks. |
Commented on the PR. |
Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.
Description of the problem / feature request / question:
I would like to use
--sandbox_add_mount_pair
to mount specific directories into the sandbox filesystem on both OSX and Linux, but this support was only added on Linux.If possible, provide a minimal example to reproduce the problem:
DarwinSandboxedSpawnRunner is missing
sandboxAdditionalMounts
, but LinuxSandboxedSpawnRunner has them.Environment info
macOS Sierra 10.12.6
bazel info release
):release 0.7.0-homebrew
The text was updated successfully, but these errors were encountered: