disabling or modifying sandbox for skylark rules

647 views
Skip to first unread message

ms...@dropbox.com

unread,
Nov 10, 2015, 2:19:30 AM11/10/15
to bazel-discuss
Replacing /usr/bin/python with a custom version is not an option most systems, thus /usr/local/bin/python is a necessity for supporting custom python interpreters.

What is the escape hatch to make this work again?

I filed a bug as in looking through the mailing list and bug tracker I didn't find the solution.

https://github.com/bazelbuild/bazel/issues/576

Thanks,
-Mike

Ming Zhao

unread,
Nov 10, 2015, 2:26:25 AM11/10/15
to ms...@dropbox.com, bazel-discuss
Hi Mike,

Good to see you again, :)
Have you tried "bazel build --spawn_strategy=standalone
--genrule_strategy=standalone"
I think the two options should disable sandbox completely for the build process.

You can put them into tools/bazel.rc
build --spawn_strategy=standalone --genrule_strategy=standalone
> --
> You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/be8d5b8e-d01e-44dc-b6d7-09e3d91c3d48%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Mike Solomon

unread,
Nov 10, 2015, 2:33:24 AM11/10/15
to Ming Zhao, bazel-discuss
Thanks for the tip, that indeed works around the problem nicely. Good
to "see" you too.

Austin Schuh

unread,
Nov 10, 2015, 2:36:39 AM11/10/15
to Mike Solomon, Ming Zhao, bazel-discuss
Consider also making a new_local_repository for /usr/local/bin and adding a fileset with python in it.  That will let you depend on python, and bazel will then add python back into your sandbox.

Austin

Reply all
Reply to author
Forward
0 new messages