Commit b5986687 authored by John Budorick's avatar John Budorick Committed by Commit Bot

[android] Move CIPD dependencies into DEPS.

Bug: 755920
Change-Id: I00b0b7c195c94f2c8e967d4c85c8155073b9256e
Reviewed-on: https://chromium-review.googlesource.com/879177Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarNicolas Dossou-Gbété <dgn@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537492}
parent 04771ef7
......@@ -171,6 +171,17 @@ deps = {
'src/buildtools':
Var('chromium_git') + '/chromium/buildtools.git' + '@' + Var('buildtools_revision'),
'src/chrome/android/profiles': {
'packages': [
{
'package': 'chromium/afdo/profiles/android',
'version': 'version:3309',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/chrome/installer/mac/third_party/xz/xz': {
'url': Var('chromium_git') + '/chromium/deps/xz.git' + '@' + 'eecaf55632ca72e90eb2641376bce7cdbc7284f7',
'condition': 'checkout_mac',
......@@ -261,6 +272,17 @@ deps = {
'src/third_party/SPIRV-Tools/src':
Var('chromium_git') + '/external/github.com/KhronosGroup/SPIRV-Tools.git' + '@' + '9166854ac93ef81b026e943ccd230fed6c8b8d3c',
'src/third_party/accessibility_test_framework': {
'packages': [
{
'package': 'chromium/third_party/accessibility-test-framework',
'version': 'version:2.1-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_protobuf/src': {
'url': Var('chromium_git') + '/external/android_protobuf.git' + '@' + '7fca48d8ce97f7ba3ab8eea5c472f1ad3711762f',
'condition': 'checkout_android',
......@@ -271,6 +293,28 @@ deps = {
'condition': 'checkout_android',
},
'src/third_party/android_support_test_runner': {
'packages': [
{
'package': 'chromium/third_party/android_support_test_runner',
'version': 'version:0.5-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_system_sdk': {
'packages': [
{
'package': 'chromium/third_party/android_system_sdk',
'version': 'version:27-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_tools': {
'url': Var('chromium_git') + '/android_tools.git' + '@' + '9a70d48fcdd68cd0e7e968f342bd767ee6323bd1',
'condition': 'checkout_android',
......@@ -284,11 +328,33 @@ deps = {
'condition': 'checkout_android',
},
'src/third_party/apk-patch-size-estimator': {
'packages': [
{
'package': 'chromium/third_party/apk-patch-size-estimator',
'version': 'version:0.2-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/auto/src': {
'url': Var('chromium_git') + '/external/github.com/google/auto.git' + '@' + '8a81a858ae7b78a1aef71ac3905fade0bbd64e82',
'condition': 'checkout_android',
},
'src/third_party/bazel': {
'packages': [
{
'package': 'chromium/third_party/bazel',
'version': 'version:0.10.0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/bidichecker':
Var('chromium_git') + '/external/bidichecker/lib.git' + '@' + '97f2aa645b74c28c57eca56992235c79850fa9e0',
......@@ -300,9 +366,31 @@ deps = {
'src/third_party/boringssl/src':
Var('boringssl_git') + '/boringssl.git' + '@' + Var('boringssl_revision'),
'src/third_party/bouncycastle': {
'packages': [
{
'package': 'chromium/third_party/bouncycastle',
'version': 'version:1.46-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/breakpad/breakpad':
Var('chromium_git') + '/breakpad/breakpad.git' + '@' + 'ac4a549e29fbc8fe58212380e41fa24f36e6c3ec',
'src/third_party/byte_buddy': {
'packages': [
{
'package': 'chromium/third_party/byte_buddy',
'version': 'version:1.4.17-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/catapult':
Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
......@@ -354,6 +442,17 @@ deps = {
'condition': 'checkout_android',
},
'src/third_party/espresso': {
'packages': [
{
'package': 'chromium/third_party/espresso',
'version': 'version:2.2.1-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/ffmpeg':
Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + '9ed334093692f2dc77c4ad8186ddadde584e1e20',
......@@ -400,17 +499,83 @@ deps = {
'condition': 'checkout_win',
},
'src/third_party/gson': {
'packages': [
{
'package': 'chromium/third_party/gson',
'version': 'version:2.8.0-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/guava': {
'packages': [
{
'package': 'chromium/third_party/guava',
'version': 'version:23.0-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/gvr-android-sdk/src': {
'url': Var('chromium_git') + '/external/github.com/googlevr/gvr-android-sdk.git' + '@' + '6aef4ab34276aac81ee38f1cb1d034de7fc4a4eb',
'condition': 'checkout_android',
},
'src/third_party/hamcrest': {
'packages': [
{
'package': 'chromium/third_party/hamcrest',
'version': 'version:1.3-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/hunspell_dictionaries':
Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + 'a9bac57ce6c9d390a52ebaad3259f5fdb871210e',
'src/third_party/icu':
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'd888fd2a1be890f4d35e43f68d6d79f42519a357',
'src/third_party/icu4j': {
'packages': [
{
'package': 'chromium/third_party/icu4j',
'version': 'version:53.1-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/intellij': {
'packages': [
{
'package': 'chromium/third_party/intellij',
'version': 'version:12.0-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/javax_inject': {
'packages': [
{
'package': 'chromium/third_party/javax_inject',
'version': 'version:1-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/jsoncpp/source':
Var('chromium_git') + '/external/github.com/open-source-parsers/jsoncpp.git' + '@' + 'f572e8e42e22cfcf5ab0aea26574f408943edfa4', # from svn 248
......@@ -545,12 +710,34 @@ deps = {
'condition': 'checkout_android',
},
'src/third_party/objenesis': {
'packages': [
{
'package': 'chromium/third_party/objenesis',
'version': 'version:2.4-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/openh264/src':
Var('chromium_git') + '/external/github.com/cisco/openh264' + '@' + '2e96d62426547ac4fb5cbcd122e5f6eb68d66ee6',
'src/third_party/openmax_dl':
Var('webrtc_git') + '/deps/third_party/openmax.git' + '@' + Var('openmax_dl_revision'),
'src/third_party/ow2_asm': {
'packages': [
{
'package': 'chromium/third_party/ow2_asm',
'version': 'version:5.0.1-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/pdfium':
Var('pdfium_git') + '/pdfium.git' + '@' + Var('pdfium_revision'),
......@@ -588,6 +775,17 @@ deps = {
'condition': 'checkout_android',
},
'src/third_party/robolectric': {
'packages': [
{
'package': 'chromium/third_party/robolectric',
'version': 'version:3.5.1',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/robolectric/robolectric': {
'url': Var('chromium_git') + '/external/robolectric.git' + '@' + '7e067f1112e1502caa742f7be72d37b5678d3403',
'condition': 'checkout_android',
......@@ -608,6 +806,17 @@ deps = {
'src/third_party/snappy/src':
Var('chromium_git') + '/external/github.com/google/snappy.git' + '@' + 'b02bfa754ebf27921d8da3bd2517eab445b84ff9',
'src/third_party/sqlite4java': {
'packages': [
{
'package': 'chromium/third_party/sqlite4java',
'version': 'version:0.282-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/swiftshader':
Var('swiftshader_git') + '/SwiftShader.git' + '@' + Var('swiftshader_revision'),
......@@ -654,6 +863,17 @@ deps = {
'condition': 'checkout_linux',
},
'src/third_party/xstream': {
'packages': [
{
'package': 'chromium/third_party/xstream',
'version': 'version:1.4.8-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/yasm/source/patched-yasm':
Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git' + '@' + 'b98114e18d8b9b84586b10d24353ab8616d4c5fc',
......@@ -1250,15 +1470,6 @@ hooks = [
],
},
{
'name': 'Android CIPD Ensure',
'pattern': '.',
'condition': 'checkout_android',
'action': ['src/build/cipd/cipd_wrapper.py',
'--chromium-root', 'src',
'--ensure-file', 'src/build/cipd/android/android.ensure',
],
},
{
'name': 'Fetch Android AFDO profile',
'pattern': '.',
......
# Copyright 2017 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.
# Dependencies for Android target OS.
# -crX indicates the chromium-specific revision of a package at a given version.
@Subdir third_party/accessibility_test_framework
chromium/third_party/accessibility-test-framework version:2.1-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/android_support_test_runner
chromium/third_party/android_support_test_runner version:0.5-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/android_system_sdk
chromium/third_party/android_system_sdk version:27-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/apk-patch-size-estimator
chromium/third_party/apk-patch-size-estimator version:0.2-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/bazel
chromium/third_party/bazel version:0.10.0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/bouncycastle
chromium/third_party/bouncycastle version:1.46-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/byte_buddy
chromium/third_party/byte_buddy version:1.4.17-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/espresso
chromium/third_party/espresso version:2.2.1-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/gson
chromium/third_party/gson version:2.8.0-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/guava
chromium/third_party/guava version:23.0-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/hamcrest
chromium/third_party/hamcrest version:1.3-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/icu4j
chromium/third_party/icu4j version:53.1-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/intellij
chromium/third_party/intellij version:12.0-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/javax_inject
chromium/third_party/javax_inject version:1-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/objenesis
chromium/third_party/objenesis version:2.4-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/ow2_asm
chromium/third_party/ow2_asm version:5.0.1-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/robolectric
chromium/third_party/robolectric version:3.5.1
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/sqlite4java
chromium/third_party/sqlite4java version:0.282-cr0
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
@Subdir third_party/xstream
chromium/third_party/xstream version:1.4.8-cr0
# Copyright 2018 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.
# Chromium-specific dependencies for Android target OS.
# -crX indicates the chromium-specific revision of a package at a given version.
@Subdir chrome/android/profiles
chromium/afdo/profiles/android version:3309
# Three unchanging lines
# avoid the horror that is
# endless merge conflicts
# CIPD for chromium dependencies
This document outlines how to use [CIPD][1] for managing binary dependencies in
chromium.
[TOC]
## Adding a new CIPD dependency
### 1. Set up a new directory for your dependency
You'll first want somewhere in the repository in which your dependency will
live. For third-party dependencies, this should typically be a subdirectory
of `//third_party`. You'll need to add the same set of things to that
directory that you'd add for a non-CIPD dependency -- OWNERS, README.chromium,
etc.
For example, if you want to add a package named `sample_cipd_dep`, you might
create the following:
```
third_party/
sample_cipd_dep/
LICENSE
OWNERS
README.chromium
```
For more on third-party dependencies, see [here][2].
### 2. Acquire whatever you want to package
Build it, download it, whatever. Once you've done that, lay it out
in your local checkout the way you want it to be laid out in a typical
checkout.
Staying with the example from above, if you want to add a package named
`sample_cipd_dep` that consists of two JARs, `foo.jar` and `bar.jar`, you might
lay them out like so:
```
third_party/
sample_cipd_dep/
...
lib/
bar.jar
foo.jar
```
### 3. Create a cipd.yaml file
CIPD knows how to create your package based on a .yaml file you provide to it.
The .yaml file should take the following form:
```
# Comments are allowed.
# The package name is required. Third-party chromium dependencies should
# unsurprisingly all be prefixed with chromium/third_party/.
package: chromium/third_party/sample_cipd_dep
# The description is optional and is solely for the reader's benefit. It
# isn't used in creating the CIPD package.
description: A sample CIPD dependency.
# The root is optional and, if unspecified, defaults to ".". It specifies the
# root directory of the files and directories specified below in "data".
#
# You won't typically need to specify this explicitly.
root: "."
# The install mode is optional. If provided, it specifies how CIPD should
# install a package: "copy", which will copy the contents of the package
# to the installation directory; and "symlink", which will create symlinks
# to the contents of the package in the CIPD root inside the installation
# directory.
#
# You won't typically need to specify this explicitly.
install_mode: "symlink"
# The data is required and described what should be included in the CIPD
# package.
data:
# Data can include directories, files, or a version file.
- dir: "directory_name"
# Directories can include an optional "exclude" list of regexes.
# Files or directories within the given directory that match any of
# the provided regexes will not be included in the CIPD package.
exclude:
- .*\.pyc
- exclude_me
- keep_this/but_not_this
- file: keep_this_file.bin
# If included, CIPD will dump package version information to this path
# at package installation.
- version_file: CIPD_VERSION.json
```
For example, for `sample_cipd_dep`, we might write the following .yaml file:
```
package: chromium/third_party/sample_cipd_dep
description: A sample CIPD dependency.
data:
- file: bar.jar
- file: foo.jar
```
For more information about the package definition spec, see [the code][3].
> **Note:** Committing the .yaml file to the repository isn't required,
> but it is recommended. Doing so has benefits for visibility and ease of
> future updates.
### 4. Create your CIPD package
To actually create your package, you'll need:
- the cipd.yaml file (described above)
- a package version. For third-party packages, this should typically include
the version of the third-party package itself. If you want to support future
modifications within a given version of a third-party package (e.g., if you
want to make chromium-specific changes), it's best to include a suffix with
a numerical component.
- [permission](#permissions-in-cipd).
Once you have those, you can create your package like so:
```
# Assuming that the third-party dependency in question is at version 1.2.3
# and this is the first chromium revision of that version.
$ cipd create --pkg-def cipd.yaml -tag version:1.2.3-cr0
```
### 5. Add your CIPD package to DEPS
You can add your package to DEPS by adding an entry of the following form to
the `deps` dict:
```
deps = {
# ...
# This is the installation directory.
'src/third_party/sample_cipd_dep': {
# In this example, we're only installing one package in this location,
# but installing multiple package in a location is supported.
'packages': [
{
'package': 'chromium/third_party/sample_cipd_dep',
'version': 'version:1.2.3-cr0',
},
],
# As with git-based DEPS entries, 'condition' is optional.
'condition': 'checkout_android',
'dep_type': 'cipd',
},
# ...
}
```
This will result in CIPD package `chromium/third_party/sample_cipd_dep` at
`version:1.2.3-cr0` being installed in `src/third_party/sample_cipd_dep`
(relative to the gclient root directory).
## Updating a CIPD dependency
To modify a CIPD dependency, follow steps 2, 3, and 4 above, then modify the
version listed in DEPS.
## Miscellaneous
### Permissions in CIPD
You can check a package's ACLs with `cipd acl-list`:
```
$ cipd acl-list chromium/third_party/sample_cipd_dep
...
```
Permissions in CIPD are handled hierarchically. You can check entries higher
in the package hierarcy with `cipd acl-list`, too:
```
$ cipd acl-list chromium
...
```
By default, [cria/project-chromium-cipd-owners][4] own all CIPD packages
under `chromium/`. If you're adding a package, talk to one of them.
## Troubleshooting
- **A file maintained by CIPD is missing, and gclient sync doesn't recreate it.**
CIPD currently caches installation state. Modifying packages managed by CIPD
will invalidate this cache in a way that CIPD doesn't detect - i.e., CIPD will
assume that anything it installed is still installed, even if you deleted it.
To clear the cache and force a full reinstallation, delete your
`$SRC_ROOT/.cipd` directory.
Note that there is a [bug](crbug.com/794764) on file to add a mode to CIPD
that is not so trusting of its own cache.
[1]: https://chromium.googlesource.com/infra/luci/luci-go/+/master/cipd/
[2]: /docs/adding_to_third_party.md
[3]: https://chromium.googlesource.com/infra/luci/luci-go/+/master/cipd/client/cipd/local/pkgdef.go
[4]: https://chrome-infra-auth.appspot.com/auth/groups/project-chromium-cipd-owners
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment