Merge branch 'chromium_upstream'
diff --git a/.gn b/.gn
index d3f9ffe..e6a0b5b 100644
--- a/.gn
+++ b/.gn
@@ -2,6 +2,8 @@
# tree and to set startup options. For documentation on the values set in this
# file, run "gn help dotfile" at the command line.
+root = "//sandbox:"
+
# The location of the build configuration file.
buildconfig = "//build/config/BUILDCONFIG.gn"
diff --git a/DEPS b/DEPS
new file mode 100644
index 0000000..f228452
--- /dev/null
+++ b/DEPS
@@ -0,0 +1,141 @@
+# This file is used to manage the dependencies of the Chromium src repo. It is
+# used by gclient to determine what version of each dependency to check out, and
+# where.
+#
+# For more information, please refer to the official documentation:
+# https://sites.google.com/a/chromium.org/dev/developers/how-tos/get-the-code
+#
+# When adding a new dependency, please update the top-level .gitignore file
+# to list the dependency's destination directory.
+#
+# -----------------------------------------------------------------------------
+# Rolling deps
+# -----------------------------------------------------------------------------
+# All repositories in this file are git-based, using Chromium git mirrors where
+# necessary (e.g., a git mirror is used when the source project is SVN-based).
+# To update the revision that Chromium pulls for a given dependency:
+#
+# # Create and switch to a new branch
+# git new-branch depsroll
+# # Run roll-dep (provided by depot_tools) giving the dep's path and the
+# # desired SVN revision number (e.g., third_party/foo/bar and a revision such
+# # number from Subversion)
+# roll-dep third_party/foo/bar REVISION_NUMBER
+# # You should now have a modified DEPS file; commit and upload as normal
+# git commit -a
+# git cl upload
+
+
+vars = {
+ # Use this googlecode_url variable only if there is an internal mirror for it.
+ # If you do not know, use the full path while defining your new deps entry.
+ 'googlecode_url': 'http://%s.googlecode.com/svn',
+ 'sourceforge_url': 'http://svn.code.sf.net/p/%(repo)s/code',
+ 'llvm_url': 'http://src.chromium.org/llvm-project',
+ 'llvm_git': 'https://llvm.googlesource.com',
+ 'webkit_trunk': 'http://src.chromium.org/blink/trunk',
+ 'webkit_revision': 'ff93a8671a046304f8dfeeed6f7a366432d30f8b', # from svn revision 195201
+ 'chromium_git': 'https://chromium.googlesource.com',
+ 'chromiumos_git': 'https://chromium.googlesource.com/chromiumos',
+ 'pdfium_git': 'https://pdfium.googlesource.com',
+ 'skia_git': 'https://skia.googlesource.com',
+ 'boringssl_git': 'https://boringssl.googlesource.com',
+ 'libvpx_revision': 'e9830e14ed6d3422c803bf45e0f6ffec341d8666',
+ 'sfntly_revision': '1bdaae8fc788a5ac8936d68bf24f37d977a13dac',
+ 'skia_revision': '8e5c177c8589e00f630ac6fae763c65cb9cae896',
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling Skia
+ # and V8 without interference from each other.
+ 'v8_branch': 'trunk',
+ 'v8_revision': '2e4c5505e85d94b520e853dda3f0cc3f2769e5f0',
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling WebRTC
+ # and V8 without interference from each other.
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling swarming_client
+ # and whatever else without interference from each other.
+ 'swarming_revision': 'f222001cc23c7cdb574bf4cfb447f65c94bc6da3',
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling ANGLE
+ # and whatever else without interference from each other.
+ 'angle_revision': 'b11e2483742db884bd0af41f78f528240577356b',
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling build tools
+ # and whatever else without interference from each other.
+ 'buildtools_revision': 'b0ede9c89f9d5fbe5387d961ad4c0ec665b6c821',
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling PDFium
+ # and whatever else without interference from each other.
+ 'pdfium_revision': 'ad2a822ce5c320c61510ffdc309f766ab1056ef5',
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling openmax_dl
+ # and whatever else without interference from each other.
+ 'openmax_dl_revision': '0b238cb62c32b6f45680cf577eddb1b051ae0219',
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling BoringSSL
+ # and whatever else without interference from each other.
+ 'boringssl_revision': '68de407b5fc746c0fa82706dd897288d01c32930',
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling nss
+ # and whatever else without interference from each other.
+ 'nss_revision': '95068068df410e398ac221a9195c999b22bd63e9', # from svn revision 294785
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling google-toolbox-for-mac
+ # and whatever else without interference from each other.
+ 'google_toolbox_for_mac_revision': 'ce47a231ea0b238fbe95538e86cc61d74c234be6', # from svn revision 705
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling lighttpd
+ # and whatever else without interference from each other.
+ 'lighttpd_revision': '9dfa55d15937a688a92cbf2b7a8621b0927d06eb',
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling lss
+ # and whatever else without interference from each other.
+ 'lss_revision': '6f97298fe3794e92c8c896a6bc06e0b36e4c3de3',
+ # Three lines of non-changing comments so that
+ # the commit queue can handle CLs rolling NaCl
+ # and whatever else without interference from each other.
+ 'nacl_revision': 'c3aa3421888b5e69932e2389658969ac181b83f7',
+}
+
+# Only these hosts are allowed for dependencies in this DEPS file.
+# If you need to add a new host, contact chrome infrastracture team.
+allowed_hosts = [
+ 'chromium.googlesource.com',
+ 'boringssl.googlesource.com',
+ 'pdfium.googlesource.com',
+ 'android.googlesource.com',
+]
+
+deps = {
+ 'src/testing/gtest':
+ Var('chromium_git') + '/external/googletest.git' + '@' + 'be1868139ffe0ccd0e8e3b37292b84c821d9c8ad', # from svn revision 704
+}
+
+deps_os = {
+ 'unix': {
+ # Linux, really.
+ 'src/third_party/lss':
+ Var('chromium_git') + '/external/linux-syscall-support/lss.git' + '@' + Var('lss_revision'),
+ },
+}
+
+hooks = [
+ {
+ # Pull clang if needed or requested via GYP_DEFINES.
+ # Note: On Win, this should run after win_toolchain, as it may use it.
+ 'name': 'clang',
+ 'pattern': '.',
+ 'action': ['python', 'src/tools/clang/scripts/update.py', '--if-needed'],
+ },
+ {
+ 'name': 'gn_linux64',
+ 'pattern': '.',
+ 'action': [ 'download_from_google_storage',
+ '--no_resume',
+ '--platform=linux*',
+ '--no_auth',
+ '--bucket', 'chromium-gn',
+ '-s', 'src/buildtools/linux64/gn.sha1',
+ ],
+ },
+]
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..04bcaf3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,35 @@
+### Bauxite: a Linux sandbox toolkit
+
+Bauxite is an extraction of the Chromium sandbox into its own separate
+repository. The effort currently focuses on making the [Linux
+version](https://code.google.com/p/chromium/wiki/LinuxSandboxing) available.
+
+This early preview contains a lot of dependencies, most notably, Chromium's
+base/. We expect to reduce dependencies to a minimum in the future.
+
+Get the source:
+
+ * Install Chromium's
+ [depot_tools](https://www.chromium.org/developers/how-tos/install-depot-tools)
+ in your ```$PATH```
+ * Get the source:
+
+```
+gclient config --unmanaged --name=src <bauxite_repository_url>
+gclient sync
+```
+
+gclient is used to synchronize the two subrepositories, third_party/lss and
+testing/gtest and also to run "hooks" that will automatically download the
+required "gn" (generate Ninja) and Clang binaries.
+
+Build:
+
+ * Generate the Ninja files (from the src directory):
+```
+gn gen out/Debug
+```
+ * Build sandbox_linux_unittests (from the src directory):
+```
+ninja -C out/Debug sandbox_linux_unittests
+```
diff --git a/base/BUILD.gn b/base/BUILD.gn
index e5f3c19..cda723c 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1050,6 +1050,7 @@
deps = [
":base",
"//base/third_party/dynamic_annotations",
+ #"//third_party/icu",
]
if (!is_debug) {
@@ -1075,7 +1076,7 @@
"//base/test:test_support",
"//base/test:test_support_perf",
"//testing/gtest",
- "//testing/perf",
+ #"//testing/perf",
]
if (is_android) {
@@ -1104,7 +1105,7 @@
deps = [
":base",
"//build/config/sanitizers:deps",
- "//third_party/icu:icuuc",
+ #"//third_party/icu:icuuc",
]
}
@@ -1509,7 +1510,7 @@
"//base/trace_event:trace_event_unittests",
"//testing/gmock",
"//testing/gtest",
- "//third_party/icu",
+ #"//third_party/icu",
]
data = [
diff --git a/base/test/BUILD.gn b/base/test/BUILD.gn
index 4c9b784..0be5483 100644
--- a/base/test/BUILD.gn
+++ b/base/test/BUILD.gn
@@ -150,8 +150,8 @@
"//base/third_party/dynamic_annotations",
"//testing/gmock",
"//testing/gtest",
- "//third_party/icu:icuuc",
- "//third_party/libxml",
+ #"//third_party/icu:icuuc",
+ #"//third_party/libxml",
]
if (!is_posix) {
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn
index 5163425..6f98d05 100644
--- a/sandbox/linux/BUILD.gn
+++ b/sandbox/linux/BUILD.gn
@@ -16,7 +16,7 @@
compile_credentials = is_linux
# On Android, use plain GTest.
- use_base_test_suite = is_linux
+ use_base_test_suite = false
}
if (is_nacl_nonsfi) {
@@ -117,6 +117,9 @@
if (is_linux) {
# Don't use this on Android.
libs = [ "rt" ]
+ defines = [ "SANDBOX_TEST_STANDALONE" ]
+ } else {
+ defines = [ "SANDBOX_TEST_STANDALONE" ]
}
if (compile_suid_client) {
diff --git a/tools/bauxite/chromium_to_bauxite.sh b/tools/bauxite/chromium_to_bauxite.sh
new file mode 100644
index 0000000..e0a993a
--- /dev/null
+++ b/tools/bauxite/chromium_to_bauxite.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This is a helper to "merge" the required chromium file to Bauxite's
+# "upstream_chromium" branch.
+# Before using, make sure that the SRC directory is clean (for instance, run
+# 'git clean -f -d') in order to not sync any binary files or other artefacts.
+#
+# Once this is done, dependencies in Bauxite's "DEPS" file may need to be
+# manually updated.
+
+set -e
+
+# Chromium src directory. Can be retrieved with
+# "fetch --nohooks --no-history chromium"
+SRC="chromium/src"
+
+DEST="bauxite/src"
+
+# Note: directories must end with '/'
+for i in "AUTHORS" "LICENSE" ".gn" "base/" \
+"build/" "buildtools/linux64/" "sandbox/" \
+"testing/multiprocess_func_list.cc" "testing/multiprocess_func_list.h" \
+"testing/test.gni" "third_party/libevent/" \
+"third_party/modp_b64/" "tools/clang/scripts/"
+do
+ rsync -a --delete "$SRC/$i" "$DEST/$i"
+done