bazelbuild / bazelbuild/bazel

--sandbox_add_mount_pair ignored on OSX

Open
#4,150 14 comments 0 reactions 0 assignees View on GitHub
not stale P2 team-Local-Exec type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

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](https://github.com/bazelbuild/bazel/commit/18e6b410a7f4e24b67740978d101cd665edea6cc).

### If possible, provide a minimal example to reproduce the problem:

[DarwinSandboxedSpawnRunner](https://github.com/bazelbuild/bazel/blob/04f2b03d351d3de16601dff2290f40643f2cb16e/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java) is missing `sandboxAdditionalMounts`, but [LinuxSandboxedSpawnRunner](https://github.com/bazelbuild/bazel/blob/04f2b03d351d3de16601dff2290f40643f2cb16e/src/main/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedSpawnRunner.java) has them.

### Environment info
* Operating System:

macOS Sierra 10.12.6

* Bazel version (output of `bazel info release`):

release 0.7.0-homebrew

Contributor guide

Open the contributing guide

Research direction

Read DarwinSandboxedSpawnRunner.java and compare its handling with LinuxSandboxedSpawnRunner.java, focusing on the missing sandboxAdditionalMounts support. Run a macOS reproduction using --sandbox_add_mount_pair and verify that the requested directories are mounted into the sandbox filesystem, matching the stated Linux behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, macos
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.