| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
--
MOS_MIGRATED_REVID=130761732
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=130745524
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This has the following improvements upon the older one:
- Uses PID namespaces, PR_SET_PDEATHSIG and a number of other tricks for
further process isolation and 100% reliable killing of child processes.
- Uses clone() instead of unshare() to work around a Linux kernel bug that
made creating a sandbox unreliable.
- Instead of mounting a hardcoded list of paths + whatever you add with
--sandbox_add_path, this sandbox instead mounts all of /, except for what
you make inaccessible via --sandbox_block_path. This should solve the
majority of "Sandboxing breaks my build, because my compiler is installed
in /opt or /usr/local" issues that users have seen.
- Instead of doing magic with bind mounts, we create a separate execroot for
each process containing symlinks to the input files. This is simpler and
gives more predictable performance.
- Actually makes everything except the working directory read-only
(fixes #1364). This means that a running process can no longer accidentally
modify your source code (yay!).
- Prevents a number of additional "attacks" or leaks, like accidentally
inheriting file handles from the parent.
- Simpler command-line interface.
- We can provide the same semantics in a Mac OS X sandbox, which will come in
a separate code review from yueg@.
It has the following caveats / known issues:
- The "fallback to /bin/bash on error" feature is gone, but now that the
sandbox mounts everything by default, the main use-case for this is no
longer needed.
The following improvements are planned:
- Use a FUSE filesystem if possible for the new execroot, instead of creating
symlinks.
- Mount a base image instead of "/".
FAQ:
Q: Why is mounting all of "/" okay, doesn't this make the whole sandbox
useless?
A: This is still a reasonable behavior, because the sandbox never tried to
isolate your build from the operating system it runs in. Instead it is
supposed to protect your data from a test running "rm -rf $HOME" and to
make it difficult / impossible for actions to use input files that are not
declared dependencies. For even more isolation the sandbox will support
mounting a base image as its root in a future version (similar to Docker
images).
Q: Let's say my process-specific execroot contains a symlink to an input file
"good.h", can't the process just resolve the symlink, strip off the file
name and then look around in the workspace?
A: Yes. Unfortunately we could not find any way on Linux to make a file appear
in a different directory with *all* of the semantics we would like. The
options investigated were:
1) Copying input files, which is much too slow.
2) Hard linking input files, which is fast, but doesn't work cross-
filesystems and it's also not possible to make them read-only.
3) Bind mounts, which don't scale once you're up in the thousands of input
files (across all actions) - it seems like the kernel has some
non-linear performance behavior when the mount table grows too much,
resulting in the mount syscall taking more time the more mounts you
have.
4) FUSE filesystem, good in theory, but wasn't ready for the first
iteration.
RELNOTES: New sandboxing implementation for Linux in which all actions run in a separate execroot that contains input files as symlinks back to the originals in the workspace. The running action now has read-write access to its execroot and /tmp only and can no longer write in arbitrary other places in the file system.
--
Change-Id: Ic91386fc92f8eef727ed6d22e6bd0f357d145063
Reviewed-on: https://bazel-review.googlesource.com/#/c/4053
MOS_MIGRATED_REVID=130638204
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the tmpdir wasn't below the execroot, Bazel would crash and print a stack
trace.
Also, the test was incorrect because the EOF wasn't quoted, so it was actually
just executing "echo TEST_TMPDIR=/path/to/tmpdir" which (surprise surprise)
matched TEST_TMPDIR=/path/to/tmpdir.
Finally, the test was _also_ incorrect because it was using the cached test
result for the second case, since changing the tmpdir doesn't invalidate the
test result. So it not only was comparing a constant string to a constant
string, but it wasn't even re-evaluating the constant string.
--
MOS_MIGRATED_REVID=130637221
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Please don't merge before I8b8c3596fd2a4c125071406eefd407ca402099dd. The
test will fail then.
I've seen two issues with this functionality breaking: #481 and #1637.
Seems like it's time to add a test which catches the issue on the
Debian/Ubuntu machines people commonly test on. The test fails on my
Debian system before I8b8c3596fd2a4c125071406eefd407ca402099dd, and
passes with that change applied.
--
Change-Id: Ib785c874cdb9192920f9935b696bfd6c9c0e5f4f
Reviewed-on: https://bazel-review.git.corp.google.com/#/c/5451/
MOS_MIGRATED_REVID=130635565
|
|
|
|
|
|
|
| |
touch the output of libtool to avoid hitting a bug in ld.
--
MOS_MIGRATED_REVID=130093791
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=129997924
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a linker flag to set the internal DT_SONAME. This fixes #1578 for
SDK 24 and removes the warnings for previous SDKs. There is no need to
set the linker flag for android_librarys that depend on native code,
because the linker flag will be set by the android_binarys that depend
on that android_library.
Testing is done via `readelf` executable that is shipped with the NDK.
--
Change-Id: I16fdfe6522c8694ce51554289122bf035a61d9ec
Reviewed-on: https://bazel-review.googlesource.com/#/c/4302/
MOS_MIGRATED_REVID=129920256
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, in python executable zip file, the default workspace
name "__main__" conflicts with __main__.py file.
This change fixes it.
Also refactored the bazel_windows_example_test
--
Change-Id: I8b9d64d72335148dba41032ce93643d34670a771
Reviewed-on: https://bazel-review.googlesource.com/#/c/5351
MOS_MIGRATED_REVID=129879570
|
|
|
|
|
|
|
|
| |
Closes #1496.
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/1496
MOS_MIGRATED_REVID=129846158
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In stub_template.txt, we now unzip the python zip file to a temp
directory if needed.
This will get rid of bash in python executable file completely.
Users can run the binary directly or using python <zip>, like:
./bazel-bin/examples/py_native/bin
or python ./bazel-bin/examples/py_native/bin
On Windows, we can use the second way to run python binary from native
Windows command line (cmd.exe).
--
Change-Id: I73fdd88f05f8f343dd19b2f3686ae031dfb476ba
Reviewed-on: https://bazel-review.googlesource.com/#/c/5310
MOS_MIGRATED_REVID=129767890
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Break test //src/test/shell/bazel:linux_sandbox_test
*** Original change description ***
Prefer IP agnostic terms in favor of those only for ipv4.
--
MOS_MIGRATED_REVID=129616589
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=129438985
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...to in particular never own a lock while waiting for the
update thread to finish. This avoids a deadlock when the update
thread tries to enter the synchronized part of doRefresh while
the thread trying to stop the update thread holds the lock.
Also renable experimental_ui_test now that the race condition leading
to the deadlock is fixed. The absence of flakiness has been verified
by running the test locally 100 times. Fixes #1560.
--
Change-Id: I5d85b347e6cb7a1da8d5a724d6f9cd7461e33e5b
Reviewed-on: https://bazel-review.googlesource.com/#/c/4225
MOS_MIGRATED_REVID=129079398
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
This change causes android_integration_test failing on Mac.
*** Original change description ***
Sets SONAME on shared objects in Android binaries.
Adds a linker flag to set the internal DT_SONAME. This fixes #1578 for
SDK 24 and removes the warnings for previous SDKs. There is no need to
set the linker flag for android_librarys that depend on native code,
because the linker flag will be set by the android_binarys that depend
on that android_library.
--
MOS_MIGRATED_REVID=129074607
|
|
|
|
|
|
|
|
|
| |
inside a sandboxed Bazel on OS X
--
Change-Id: I751b77c9a8dd7afc992dba0218f990118f06f98d
Reviewed-on: https://bazel-review.googlesource.com/#/c/4201/3
MOS_MIGRATED_REVID=128976206
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=128838998
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a linker flag to set the internal DT_SONAME. This fixes #1578 for
SDK 24 and removes the warnings for previous SDKs. There is no need to
set the linker flag for android_librarys that depend on native code,
because the linker flag will be set by the android_binarys that depend
on that android_library.
--
Change-Id: If6422f2c2677ec974a3682e3038d7fe159ed4978
Reviewed-on: https://bazel-review.googlesource.com/#/c/4210/
MOS_MIGRATED_REVID=128833820
|
|
|
|
|
|
|
| |
This test should not be run with the JDK 7 since JavaBuilder for it does not support worker strategy.
--
MOS_MIGRATED_REVID=128820130
|
|
|
|
|
|
|
| |
...and do it correctly this time, so not loading_phase_tests.
--
MOS_MIGRATED_REVID=128808204
|
|
|
|
|
|
|
| |
RELNOTES: Persistent workers are now used by default for Java compilation in Bazel, which should speed up your Java builds by ~4x. You can switch back to the old behavior via --strategy=Javac=standalone. Check out http://www.bazel.io/blog/2015/12/10/java-workers.html for more details.
--
MOS_MIGRATED_REVID=128801059
|
|
|
|
|
|
|
|
| |
This reverts commit e65876a28965c72f7a48a16be3390ba7c5c97a6f.
This commit have not gone through the proper workflow.
Fixes #1582.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ios_sdk_version and xcode_version for our CI macs)
*** Original change description ***
Remove apple_binary's implicit output _lipo.a.
This also removes the restriction that apple_binary targets must have at least one src file specified.
--
MOS_MIGRATED_REVID=128721251
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Broke //src/test/shell/bazel:bazel_apple_test
Fixes #1579
*** Original change description ***
Remove apple_binary's implicit output _lipo.a.
This also removes the restriction that apple_binary targets must have at least one src file specified.
--
MOS_MIGRATED_REVID=128698089
|
|
|
|
|
|
|
|
|
| |
This test has some occasional timeout flakes.
See http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=latest,PLATFORM_NAME=darwin-x86_64/148/console
--
MOS_MIGRATED_REVID=128684898
|
|
|
|
|
|
|
| |
This also removes the restriction that apple_binary targets must have at least one src file specified.
--
MOS_MIGRATED_REVID=128633173
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Part of 3 proposed new actions:
- parsing action
- merging action
- validating action
Dependencies (directData and transitiveData)
expect the symbol files. If the merge action
produces the symbol files, then each merge
action depends on each other. Instead, produce
it in an action with just source resources as
prereqs to allow more parallelism.
Technically, we don't need a manifest as part
of the parameters. I debated about whether
to introduce a basic version of
UnvalidatedAndroidData or not.
--
MOS_MIGRATED_REVID=128599714
|
|
|
|
|
|
|
| |
Fixes #1570.
--
MOS_MIGRATED_REVID=128585415
|
|
|
|
|
|
|
| |
inheriting a copy of the server's environment.
--
MOS_MIGRATED_REVID=128584538
|
|
|
|
|
|
|
|
|
|
| |
Adds a linker flag to set the internal DT_SONAME. This fixes #1578 for
SDK 24 and removes the warnings for previous SDKs. There is no need to
set the linker flag for android_librarys that depend on native code,
because the linker flag will be set by the android_binarys that depend
on that android_library.
Change-Id: I0d4fd78ffaf03c19ae3712bdeb28a52722a22f6f
|
|
|
|
|
|
|
|
| |
This test is timeout flaky (#1560) and the flake seems like genuine. While
waiting for a proper fix, deactivate this test on ci.bazel.io.
--
MOS_MIGRATED_REVID=128571273
|
|
|
|
|
|
|
|
|
| |
Fixes #1561.
--
Change-Id: I0527edaca9d429157e0db45e4406288ade12e369
Reviewed-on: https://bazel-review.googlesource.com/#/c/4157
MOS_MIGRATED_REVID=128351878
|
|
|
|
|
|
|
|
|
|
|
| |
It was timeout flaky on ci.bazel.io
Fixes #1559.
--
Change-Id: Ie116fd70cf167ac152782f766b9ae541cc041ab4
Reviewed-on: https://bazel-review.googlesource.com/#/c/4156
MOS_MIGRATED_REVID=128347912
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The execution root currently uses the basename of the workspace directory for
the workspace name, not the name in the WORKSPACE file. (For example, if our
sources were in /path/to/foo and our WORKSPACE file had workspace(name = "bar"),
our execution root would look like execroot/foo.)
This creates a symlink bar -> foo, so that accessing ../repo_name actually works
for the main repository.
RELNOTES[INC]: The main repository's execution root is under the main
repository's workspace name, not the source directory's basename. This shouldn't
have any effect on most builds, but it's possible it could break someone doing
weird things with paths in actions.
--
MOS_MIGRATED_REVID=128175455
|
|
|
|
|
|
|
| |
reference by future repository rules. Removes the xcode-locator binary file under tools/objc. Originally, the precompiled binary was going to be referenced, but it's easier to build from source in the repository rule.
--
MOS_MIGRATED_REVID=128063694
|
|
|
|
|
|
|
|
|
|
| |
of `tools/android`
`SDK Readme.txt` is not necessarily present in an SDK installation.
--
Change-Id: I98569b7e480e3fa47b9458a0bc950d87712f89cc
MOS_MIGRATED_REVID=127999306
|
|
|
|
|
|
|
| |
Fixes #1537.
--
MOS_MIGRATED_REVID=127945452
|
|
|
|
|
|
|
|
|
| |
I reused some functions defined in test-setup.sh and some test cases in bazel_example_test.sh
--
Change-Id: Ic9a20a819bfcc52f2ff72db74d017e6cdc062fc3
Reviewed-on: https://bazel-review.googlesource.com/#/c/4090
MOS_MIGRATED_REVID=127926337
|
|
|
|
|
|
|
|
|
|
|
| |
ExecutionInfo contains the tag "support-workers" set to "1" and fallback to non-worker execution if it is not present.
This will eventually allow us to safely automatically decide whether to use workers to execute an action or not.
RELNOTES[INC]: If you maintain a rule that uses persistent workers, you'll have to specify execution_requirements={"supports-workers": 1} in the ctx.action that intends to run a tool with workers. The WorkerSpawnStrategy will alert you with a warning message if you forget to make this change and fallback to non-worker based execution.
--
MOS_MIGRATED_REVID=127822788
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=127538990
|
|
|
|
|
|
|
| |
--
Change-Id: Ib480661ebbc522007edd77b374d6720d216b4508
Reviewed-on: https://bazel-review.googlesource.com/#/c/4050
MOS_MIGRATED_REVID=127534581
|
|
|
|
|
|
|
|
|
|
|
| |
related to tests.
This allows for better caching and also makes it easy to run tests in a different directory than the global execroot.
The paths are rewritten to absolute paths in test-setup.sh, because Test Encyclopedia says that we pass absolute paths to tests in these variables.
--
MOS_MIGRATED_REVID=127432675
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TMPDIR is not just an arbitrary environment variable that we expect to be passed
to tests; it is the place where we temporary files may be stored. This semantic
rule also applies to bazel itself. So TMPDIR has to point to a directory where
we can write to. Unfortunately, the only way we have to find out a directory to
write to is TMPDIR itself. So, create a fresh directory there and pass that
directory on as new value for TMPDIR to see if it is passed through to the
action.
Also, fix up the resetting of TMPDIR: do not assume unset is the same
as set to the empty string.
--
Change-Id: I378ae9196c33d988686e8a2a6d3c142238fe8aab
Reviewed-on: https://bazel-review.googlesource.com/#/c/4030
MOS_MIGRATED_REVID=127196634
|
|
|
|
|
|
|
| |
* Debug and fastbuild compilation modes now pass -enable-testing flag enabling internal symbol imports in test code.
--
MOS_MIGRATED_REVID=126925229
|
|
|
|
|
|
|
| |
* This seems to fix an issue with Clang loading the same header twice when it's discovering module maps implicitly. Also makes the command line cleaner.
--
MOS_MIGRATED_REVID=126922449
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the rclass_generator.sh, and fill in the
boiler-plate for mock tools, etc. Mostly cargo-
culting references to resources_processor.sh.
Rename earlier pieces to use RClassGenerator
prefix instead of AndroidResourceCompilation.
--
MOS_MIGRATED_REVID=126831848
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Apparently we now try to open output files for the process twice: once when we are constructing the output streams, and the second time when we tell the process to redirect its outputs. This causes the outputs to be empty on Windows
*** Original change description ***
Do redirection of stdout / stderr in Java instead of reimplementing it in every process wrapper again.
--
MOS_MIGRATED_REVID=126801016
|
|
|
|
|
|
|
| |
It seems like the Bazel server dies (or isn't reused) between the first and the second "bazel build" in test_input_digests.
--
MOS_MIGRATED_REVID=126511647
|
|
|
|
|
|
|
|
|
|
|
| |
missing file to it.
We need to activate this check on presubmits
--
Change-Id: Ia95e92d3816ce92bb69bc0e2cf56e9c60b68d970
Reviewed-on: https://bazel-review.googlesource.com/#/c/3949/
MOS_MIGRATED_REVID=126404792
|
|
|
|
|
|
|
| |
This way it won't print if the repo maintainer doesn't set the repo name.
--
MOS_MIGRATED_REVID=126300205
|