angle/scripts/roll_chromium_deps.py

777 строки
28 KiB
Python
Исходник Обычный вид История

Roll Chromium DEPS manually. Includes a fix for the removed Gold service account mixin. Also upgrades roll_chromium_deps to Python 3. Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/021b19e04d..47f630a2c5 * buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/01efcb5d51..738dc100c6 * buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git/+log/b323ac8f4c..1e0047c09e * testing: https://chromium.googlesource.com/chromium/src/testing/+log/2062399745..e5e34cbf4b * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/47dfacfcce..ad002f6051 * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/86630a4fe3..00852ba1c5 * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6fbe58035d * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/f72361d313..d6a3040bfd * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/4e87a80d55..901a5d97c2 * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/ad74e59c0f..0a9dd7740c * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/aa8103bd9b..25c9dfaa86 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/6d4e79909d..715f5e95c1 No update to Clang. Bug: angleproject:5707 Change-Id: I781dc018443fab6bbde1351c6c0ab426338be4d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469215 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-02-16 19:38:31 +03:00
#!/usr/bin/env python3
# Copyright 2019 The ANGLE project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
# This is a modified copy of the script in
# https://webrtc.googlesource.com/src/+/main/tools_webrtc/autoroller/roll_deps.py
# customized for ANGLE.
"""Script to automatically roll Chromium dependencies in the ANGLE DEPS file."""
import argparse
import base64
import collections
import logging
import os
import platform
import re
import subprocess
import sys
Roll Chromium DEPS manually. Includes a fix for the removed Gold service account mixin. Also upgrades roll_chromium_deps to Python 3. Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/021b19e04d..47f630a2c5 * buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/01efcb5d51..738dc100c6 * buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git/+log/b323ac8f4c..1e0047c09e * testing: https://chromium.googlesource.com/chromium/src/testing/+log/2062399745..e5e34cbf4b * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/47dfacfcce..ad002f6051 * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/86630a4fe3..00852ba1c5 * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6fbe58035d * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/f72361d313..d6a3040bfd * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/4e87a80d55..901a5d97c2 * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/ad74e59c0f..0a9dd7740c * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/aa8103bd9b..25c9dfaa86 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/6d4e79909d..715f5e95c1 No update to Clang. Bug: angleproject:5707 Change-Id: I781dc018443fab6bbde1351c6c0ab426338be4d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469215 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-02-16 19:38:31 +03:00
import urllib.request
def FindSrcDirPath():
"""Returns the abs path to the root dir of the project."""
# Special cased for ANGLE.
return os.path.dirname(os.path.abspath(os.path.join(__file__, '..')))
ANGLE_CHROMIUM_DEPS = [
'build',
'buildtools',
'buildtools/clang_format/script',
'buildtools/linux64',
'buildtools/mac',
'buildtools/third_party/libc++/trunk',
'buildtools/third_party/libc++abi/trunk',
'buildtools/third_party/libunwind/trunk',
'buildtools/win',
'testing',
'third_party/abseil-cpp',
'third_party/android_build_tools',
'third_party/android_build_tools/aapt2',
'third_party/android_build_tools/art',
'third_party/android_build_tools/bundletool',
Roll Chromium from 8bf3474ad33a to b1ab0fbd602a (1173 revisions) Moves third_party/android_lint to third_party/android_build_tools/lint Essentialy squashing in these Chromium CLs: https://chromium-review.googlesource.com/c/chromium/src/+/3735152 https://chromium-review.googlesource.com/c/chromium/src/+/3707459 https://chromium-review.googlesource.com/c/chromium/src/+/3738921 https://chromium.googlesource.com/chromium/src.git/+log/8bf3474ad33a..b1ab0fbd602a If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/chromium-angle-autoroll Please CC ianelliott@google.com,ynovikov@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Chromium: https://bugs.chromium.org/p/chromium/issues/entry To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/5b369fe7f5..473484fe92 * buildtools/clang_format/script: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format.git/+log/e435ad79c1..8b525d2747 * buildtools/linux64: git_revision:29accf5ac2eadfc53e687081583b7bc1592a8839..git_revision:ecaaf4b9e58a312a1610a37999eeccf58f73e264 * buildtools/mac: git_revision:29accf5ac2eadfc53e687081583b7bc1592a8839..git_revision:ecaaf4b9e58a312a1610a37999eeccf58f73e264 * buildtools/win: git_revision:29accf5ac2eadfc53e687081583b7bc1592a8839..git_revision:ecaaf4b9e58a312a1610a37999eeccf58f73e264 * testing: https://chromium.googlesource.com/chromium/src/testing/+log/7663e0cfff..b97d5810aa * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/62a4d6866a..9cf14c268d * third_party/android_build_tools: https://chromium.googlesource.com/chromium/src/third_party/android_build_tools/+log/29766b5d64..c3471b21c1 * third_party/android_build_tools/bundletool: AqsPZpWJh-ZyGraHKlbH8XgjRnmyDmolX4HhwPEo9XUC..qLkNwA6wjoqznVqaa151GelgGBP4X495n0z-jluACPcC * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..0f40847086 * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/a83ac9395c..9af90cb59e * third_party/fuchsia-sdk/sdk: version:8.20220627.3.1..version:8.20220701.2.1 * third_party/protobuf: https://chromium.googlesource.com/chromium/src/third_party/protobuf/+log/35de724cf2..ee5f422273 * tools/luci-go: git_revision:5d9b6ecf87cdfb928e1112d2838d26bc7ede2b48..git_revision:be5d9aacf8987c0826223264f0427cd0b530b6a4 * tools/luci-go: git_revision:5d9b6ecf87cdfb928e1112d2838d26bc7ede2b48..git_revision:be5d9aacf8987c0826223264f0427cd0b530b6a4 * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/e7effce34f..4db7e4a8a7 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/7c096990d7..d43fc430b2 * tools/skia_goldctl/linux: LOLBT9fx6Zp6tPJMXhgMoDZcTPCk-VSNk5gHIOchhIMC..ae24MBF5YbEEwpnfCm1dgu86m0StdnqA5BuDV09VyR4C * tools/skia_goldctl/mac_amd64: u6SVSv19aduMZOLqGYkCHbjhnJWwm0WimUYQs4q9mDgC..k-LraF0EyymBQiGapRFxHW3QchEFhcw8Uz1C9EaQES8C * tools/skia_goldctl/mac_arm64: 1aHoSQfZbmKtsxSSw_7SIfNuMapnLQb_uHdo237FM88C..UU5Fs5VQoMBiiUttczNdC1YbiiL2dTmU0j55Lg-J-r0C * tools/skia_goldctl/win: 0JoR2aK22wezglgiEZQathxIbpRDITqBt6h9rwFMU7QC..n3jvsDMl43swXVzULALv9Wh0kHahqZ4VSy7_i3wO1LgC No update to Clang. Bug: chromium:1273512, chromium:1326906 Tbr: ianelliott@google.com,ynovikov@google.com Change-Id: If3202d42fec891ad1620fbd5dd8519686415c5e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3741205 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
2022-07-01 21:07:12 +03:00
'third_party/android_build_tools/lint',
Roll chromium_revision b1ab0fbd60..532c25a8e2 (1020158:1020841) Manually added third_party/android_build_tools/manifest_merger DEP Change log: https://chromium.googlesource.com/chromium/src/+log/b1ab0fbd60..532c25a8e2 Full diff: https://chromium.googlesource.com/chromium/src/+/b1ab0fbd60..532c25a8e2 Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/473484fe92..46a98712b8 * buildtools/linux64: git_revision:ecaaf4b9e58a312a1610a37999eeccf58f73e264..git_revision:03ce92df5f9875bd9929b564be4b612713569aa9 * buildtools/mac: git_revision:ecaaf4b9e58a312a1610a37999eeccf58f73e264..git_revision:03ce92df5f9875bd9929b564be4b612713569aa9 * buildtools/win: git_revision:ecaaf4b9e58a312a1610a37999eeccf58f73e264..git_revision:03ce92df5f9875bd9929b564be4b612713569aa9 * testing: https://chromium.googlesource.com/chromium/src/testing/+log/b97d5810aa..34674445e6 * third_party/android_build_tools/lint: f5g1G8eyExIUPHk4lH3xx_xV4pza9WSBaITgmLPgF2cC..OkpY7I7TtDs4jihQ9SmckN-GEVBpZ2y9xr4M7TimTqoC * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6f2de7bf2d * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/9af90cb59e..78c53d11a0 * third_party/r8: iMLEt10uXASDfG2AlATR1fO8xYhBoF24nQvDDXLY6Q8C..YYmB-DSqgEMUFtrSQw6plpnZygVruQmxrc3Qqeac8ZEC * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/4db7e4a8a7..f8fe4d9502 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/d43fc430b2..e764c64cc4 DEPS diff: https://chromium.googlesource.com/chromium/src/+/b1ab0fbd60..532c25a8e2/DEPS No update to Clang. Bug: chromium:1341026, chromium:1326906 Change-Id: I6f53a4df5ccab4ad162ceb51280b174de6b18bf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3745583 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-07-05 16:38:00 +03:00
'third_party/android_build_tools/manifest_merger',
'third_party/android_deps',
'third_party/android_ndk',
'third_party/android_platform',
'third_party/android_sdk',
'third_party/android_sdk/androidx_browser/src',
'third_party/android_sdk/public',
'third_party/android_system_sdk',
'third_party/bazel',
'third_party/catapult',
'third_party/colorama/src',
'third_party/depot_tools',
'third_party/fuchsia-sdk/sdk',
'third_party/ijar',
'third_party/jdk',
'third_party/jdk/extras',
'third_party/jinja2',
'third_party/libjpeg_turbo',
'third_party/markupsafe',
Roll chromium_revision fa9d5805c4..b0410bba02 (750702:763000) Includes a change from yasm to nasm. Change log: https://chromium.googlesource.com/chromium/src/+log/fa9d5805c4..b0410bba02 Full diff: https://chromium.googlesource.com/chromium/src/+/fa9d5805c4..b0410bba02 Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/a1cbf6469a..45ab3c89af * buildtools: https://chromium.googlesource.com/chromium/src/buildtools.git/+log/4164a30562..204a35a2a6 * testing: https://chromium.googlesource.com/chromium/src/testing/+log/3e21eec53c..3993ef1f52 * third_party/googletest: https://chromium.googlesource.com/chromium/src/third_party/googletest/+log/c96dc32110..217407c478 * third_party/jsoncpp: https://chromium.googlesource.com/chromium/src/third_party/jsoncpp/+log/493c9385c9..ec647b85b6 * third_party/libjpeg_turbo: https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git/+log/ce0e57e8e6..7e3ad79800 * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/156be8c52f..ae385786ed * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/d60a6a8084..04b99e7bf9 * tools/md_browser: https://chromium.googlesource.com/chromium/src/tools/md_browser/+log/0bfd826f85..aae45d8d82 DEPS diff: https://chromium.googlesource.com/chromium/src/+/fa9d5805c4..b0410bba02/DEPS Clang version changed 9284abd0040afecfd619dbcf1b244a8b533291c9:4e0d9925d6a3561449bdd8def27fd3f3f1b3fb9f Details: https://chromium.googlesource.com/chromium/src/+/fa9d5805c4..b0410bba02/tools/clang/scripts/update.py Tbr: jmadill@chromium.org Bug: chromium:1070043 Change-Id: I8f2cd61950b1a94b946eace49a7f1da3447522ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2168533 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-04-27 23:57:46 +03:00
'third_party/nasm',
'third_party/proguard',
'third_party/protobuf',
'third_party/Python-Markdown',
'third_party/qemu-linux-x64',
'third_party/qemu-mac-x64',
'third_party/r8',
Roll Chromium from c709ec453fcb to 1c4ee1412503 (1424 revisions) Manually adds third_party/r8/d8 to DEPS, which was added to Chromium in https://chromium-review.googlesource.com/c/chromium/src/+/3866124 https://chromium.googlesource.com/chromium/src.git/+log/c709ec453fcb..1c4ee1412503 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/chromium-angle-autoroll Please CC ianelliott@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Chromium: https://bugs.chromium.org/p/chromium/issues/entry To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/0d770d1984..d24e195aa5 * buildtools: https://chromium.googlesource.com/chromium/src/buildtools.git/+log/c24a0d5e7d..46ab4c32d4 * buildtools/third_party/libc++/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git/+log/42e738f0a1..85a3363f04 * buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/48afced8aa..6285577a9d * testing: https://chromium.googlesource.com/chromium/src/testing/+log/822fdb25cd..bca7d3ac0f * third_party/android_build_tools/bundletool: qLkNwA6wjoqznVqaa151GelgGBP4X495n0z-jluACPcC..qqdjz9M6hbP7D7jMsRGwpvibSWdEJn1Tnm-R3B6M6bEC * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..7ee071132a * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/5084800dc3..a089281a82 * third_party/fuchsia-sdk/sdk: version:9.20220831.2.1..version:9.20220902.1.1 * third_party/libjpeg_turbo: https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git/+log/22f1a22c99..ed683925e4 * third_party/r8: k-rsF0crG3zBArTjEZbYn9ZKk1MGSMeSKp_ruAONHXAC..szXK3tCGU7smsNs4r2mGqxme7d9KWLaOk0_ghbCJxUQC * third_party/turbine: cMFT-KTiKSkVefC3nASLc0KQv9JrVmwmFUgJlo6jOosC.._zI2v-efso2ahj6YJvK1yggLriSL7lcoASikyKPiOVAC * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/926ac230d7..9f4113d3ba * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/b72e51a76b..0a2285903b * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/41295bf592..4d65e13c37 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/d548865dd0..693dfd83f8 Clang version changed llvmorg-16-init-3221-gce6989fd:llvmorg-16-init-3375-gfed71b04 Details: https://chromium.googlesource.com/chromium/src/tools/clang/+/b72e51a76ba2050274beafde8d3b3fd8143e7e5a..0a2285903bf27182c56d8a1cc8b0e0d8a1ce8c31/scripts/update.py Bug: angleproject:7620, angleproject:7632 Change-Id: I32c25c4b3e4f340d2df712cdc7509e1429aab4de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3875395 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
2022-09-06 12:59:13 +03:00
'third_party/r8/d8',
'third_party/requests/src',
'third_party/six',
'third_party/turbine',
'third_party/zlib',
'tools/android/errorprone_plugin',
'tools/clang',
'tools/clang/dsymutil',
'tools/luci-go',
'tools/mb',
'tools/md_browser',
'tools/memory',
'tools/perf',
'tools/protoc_wrapper',
'tools/python',
'tools/skia_goldctl/linux',
'tools/skia_goldctl/mac_amd64',
'tools/skia_goldctl/mac_arm64',
'tools/skia_goldctl/win',
'tools/valgrind',
]
ANGLE_URL = 'https://chromium.googlesource.com/angle/angle'
CHROMIUM_SRC_URL = 'https://chromium.googlesource.com/chromium/src'
CHROMIUM_COMMIT_TEMPLATE = CHROMIUM_SRC_URL + '/+/%s'
CHROMIUM_LOG_TEMPLATE = CHROMIUM_SRC_URL + '/+log/%s'
CHROMIUM_FILE_TEMPLATE = CHROMIUM_SRC_URL + '/+/%s/%s'
COMMIT_POSITION_RE = re.compile('^Cr-Commit-Position: .*#([0-9]+).*$')
CLANG_REVISION_RE = re.compile(r'^CLANG_REVISION = \'([-0-9a-z]+)\'')
ROLL_BRANCH_NAME = 'roll_chromium_revision'
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
CHECKOUT_SRC_DIR = FindSrcDirPath()
CHECKOUT_ROOT_DIR = CHECKOUT_SRC_DIR
# Copied from tools/android/roll/android_deps/.../BuildConfigGenerator.groovy.
ANDROID_DEPS_START = r'=== ANDROID_DEPS Generated Code Start ==='
ANDROID_DEPS_END = r'=== ANDROID_DEPS Generated Code End ==='
# Location of automically gathered android deps.
ANDROID_DEPS_PATH = 'src/third_party/android_deps/'
NOTIFY_EMAIL = 'angle-wrangler@grotations.appspotmail.com'
CLANG_TOOLS_URL = 'https://chromium.googlesource.com/chromium/src/tools/clang'
CLANG_FILE_TEMPLATE = CLANG_TOOLS_URL + '/+/%s/%s'
CLANG_TOOLS_PATH = 'tools/clang'
CLANG_UPDATE_SCRIPT_URL_PATH = 'scripts/update.py'
CLANG_UPDATE_SCRIPT_LOCAL_PATH = os.path.join(CHECKOUT_SRC_DIR, 'tools', 'clang', 'scripts',
'update.py')
DepsEntry = collections.namedtuple('DepsEntry', 'path url revision')
ChangedDep = collections.namedtuple('ChangedDep', 'path url current_rev new_rev')
ClangChange = collections.namedtuple('ClangChange', 'mirror_change clang_change')
CipdDepsEntry = collections.namedtuple('CipdDepsEntry', 'path packages')
ChangedCipdPackage = collections.namedtuple('ChangedCipdPackage',
'path package current_version new_version')
ChromiumRevisionUpdate = collections.namedtuple('ChromiumRevisionUpdate', ('current_chromium_rev '
'new_chromium_rev '))
def AddDepotToolsToPath():
sys.path.append(os.path.join(CHECKOUT_SRC_DIR, 'build'))
import find_depot_tools
find_depot_tools.add_depot_tools_to_path()
class RollError(Exception):
pass
Roll chromium_revision b0410bba02..fb6cbaf6e5 (763000:790363) Also updates a Vulkan back-end file to not return error. Change log: https://chromium.googlesource.com/chromium/src/+log/b0410bba02..fb6cbaf6e5 Full diff: https://chromium.googlesource.com/chromium/src/+/b0410bba02..fb6cbaf6e5 Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/45ab3c89af..1ee11394cf * buildtools: https://chromium.googlesource.com/chromium/src/buildtools.git/+log/204a35a2a6..9e121212d4 * testing: https://chromium.googlesource.com/chromium/src/testing/+log/3993ef1f52..f126fc6578 * third_party/Python-Markdown: https://chromium.googlesource.com/chromium/src/third_party/Python-Markdown/+log/36657c103c..9c8566e047 * third_party/googletest: https://chromium.googlesource.com/chromium/src/third_party/googletest/+log/217407c478..defbf92951 * third_party/jsoncpp: https://chromium.googlesource.com/chromium/src/third_party/jsoncpp/+log/{chromium_..ec647b85b6 * third_party/nasm: https://chromium.googlesource.com/chromium/deps/nasm.git/+log/4fa54ca5f7..19f3fad68d * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/ae385786ed..89bddfee9c * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/04b99e7bf9..6412135b39 * tools/md_browser: https://chromium.googlesource.com/chromium/src/tools/md_browser/+log/aae45d8d82..be8cf5a17d DEPS diff: https://chromium.googlesource.com/chromium/src/+/b0410bba02..fb6cbaf6e5/DEPS Clang version changed 4e0d9925d6a3561449bdd8def27fd3f3f1b3fb9f:04b9a46c842f793a2baedcad64de35fcbd3e93b7 Details: https://chromium.googlesource.com/chromium/src/+/b0410bba02..fb6cbaf6e5/tools/clang/scripts/update.py Bug: angleproject:4867 Change-Id: I184945ad4d1fc39f4ad9b37cbf411b2c2b74a3ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2309223 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-07-21 17:08:03 +03:00
def StrExpansion():
return lambda str_value: str_value
def VarLookup(local_scope):
return lambda var_name: local_scope['vars'][var_name]
def ParseDepsDict(deps_content):
local_scope = {}
global_scope = {
Roll chromium_revision b0410bba02..fb6cbaf6e5 (763000:790363) Also updates a Vulkan back-end file to not return error. Change log: https://chromium.googlesource.com/chromium/src/+log/b0410bba02..fb6cbaf6e5 Full diff: https://chromium.googlesource.com/chromium/src/+/b0410bba02..fb6cbaf6e5 Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/45ab3c89af..1ee11394cf * buildtools: https://chromium.googlesource.com/chromium/src/buildtools.git/+log/204a35a2a6..9e121212d4 * testing: https://chromium.googlesource.com/chromium/src/testing/+log/3993ef1f52..f126fc6578 * third_party/Python-Markdown: https://chromium.googlesource.com/chromium/src/third_party/Python-Markdown/+log/36657c103c..9c8566e047 * third_party/googletest: https://chromium.googlesource.com/chromium/src/third_party/googletest/+log/217407c478..defbf92951 * third_party/jsoncpp: https://chromium.googlesource.com/chromium/src/third_party/jsoncpp/+log/{chromium_..ec647b85b6 * third_party/nasm: https://chromium.googlesource.com/chromium/deps/nasm.git/+log/4fa54ca5f7..19f3fad68d * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/ae385786ed..89bddfee9c * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/04b99e7bf9..6412135b39 * tools/md_browser: https://chromium.googlesource.com/chromium/src/tools/md_browser/+log/aae45d8d82..be8cf5a17d DEPS diff: https://chromium.googlesource.com/chromium/src/+/b0410bba02..fb6cbaf6e5/DEPS Clang version changed 4e0d9925d6a3561449bdd8def27fd3f3f1b3fb9f:04b9a46c842f793a2baedcad64de35fcbd3e93b7 Details: https://chromium.googlesource.com/chromium/src/+/b0410bba02..fb6cbaf6e5/tools/clang/scripts/update.py Bug: angleproject:4867 Change-Id: I184945ad4d1fc39f4ad9b37cbf411b2c2b74a3ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2309223 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-07-21 17:08:03 +03:00
'Str': StrExpansion(),
'Var': VarLookup(local_scope),
'deps_os': {},
}
exec (deps_content, global_scope, local_scope)
return local_scope
def ParseLocalDepsFile(filename):
with open(filename, 'rb') as f:
deps_content = f.read()
return ParseDepsDict(deps_content)
def ParseCommitPosition(commit_message):
for line in reversed(commit_message.splitlines()):
m = COMMIT_POSITION_RE.match(line.strip())
if m:
return int(m.group(1))
logging.error('Failed to parse commit position id from:\n%s\n', commit_message)
sys.exit(-1)
def _RunCommand(command, working_dir=None, ignore_exit_code=False, extra_env=None,
input_data=None):
"""Runs a command and returns the output from that command.
If the command fails (exit code != 0), the function will exit the process.
Returns:
A tuple containing the stdout and stderr outputs as strings.
"""
working_dir = working_dir or CHECKOUT_SRC_DIR
logging.debug('CMD: %s CWD: %s', ' '.join(command), working_dir)
env = os.environ.copy()
if extra_env:
assert all(isinstance(value, str) for value in extra_env.values())
logging.debug('extra env: %s', extra_env)
env.update(extra_env)
p = subprocess.Popen(
command,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=env,
cwd=working_dir,
universal_newlines=True)
std_output, err_output = p.communicate(input_data)
p.stdout.close()
p.stderr.close()
if not ignore_exit_code and p.returncode != 0:
logging.error('Command failed: %s\n'
'stdout:\n%s\n'
'stderr:\n%s\n', ' '.join(command), std_output, err_output)
sys.exit(p.returncode)
return std_output, err_output
def _GetBranches():
"""Returns a tuple of active,branches.
The 'active' is the name of the currently active branch and 'branches' is a
list of all branches.
"""
lines = _RunCommand(['git', 'branch'])[0].split('\n')
branches = []
active = ''
for line in lines:
if '*' in line:
# The assumption is that the first char will always be the '*'.
active = line[1:].strip()
branches.append(active)
else:
branch = line.strip()
if branch:
branches.append(branch)
return active, branches
def _ReadGitilesContent(url):
# Download and decode BASE64 content until
# https://code.google.com/p/gitiles/issues/detail?id=7 is fixed.
logging.debug('Reading gitiles URL %s' % url)
base64_content = ReadUrlContent(url + '?format=TEXT')
Roll Chromium DEPS manually. Includes a fix for the removed Gold service account mixin. Also upgrades roll_chromium_deps to Python 3. Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/021b19e04d..47f630a2c5 * buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/01efcb5d51..738dc100c6 * buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git/+log/b323ac8f4c..1e0047c09e * testing: https://chromium.googlesource.com/chromium/src/testing/+log/2062399745..e5e34cbf4b * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/47dfacfcce..ad002f6051 * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/86630a4fe3..00852ba1c5 * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6fbe58035d * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/f72361d313..d6a3040bfd * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/4e87a80d55..901a5d97c2 * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/ad74e59c0f..0a9dd7740c * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/aa8103bd9b..25c9dfaa86 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/6d4e79909d..715f5e95c1 No update to Clang. Bug: angleproject:5707 Change-Id: I781dc018443fab6bbde1351c6c0ab426338be4d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469215 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-02-16 19:38:31 +03:00
return base64.b64decode(base64_content[0]).decode('utf-8')
def ReadRemoteCrFile(path_below_src, revision):
"""Reads a remote Chromium file of a specific revision. Returns a string."""
return _ReadGitilesContent(CHROMIUM_FILE_TEMPLATE % (revision, path_below_src))
def ReadRemoteCrCommit(revision):
"""Reads a remote Chromium commit message. Returns a string."""
return _ReadGitilesContent(CHROMIUM_COMMIT_TEMPLATE % revision)
def ReadRemoteClangFile(path_below_src, revision):
"""Reads a remote Clang file of a specific revision. Returns a string."""
return _ReadGitilesContent(CLANG_FILE_TEMPLATE % (revision, path_below_src))
def ReadUrlContent(url):
"""Connect to a remote host and read the contents. Returns a list of lines."""
Roll Chromium DEPS manually. Includes a fix for the removed Gold service account mixin. Also upgrades roll_chromium_deps to Python 3. Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/021b19e04d..47f630a2c5 * buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/01efcb5d51..738dc100c6 * buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git/+log/b323ac8f4c..1e0047c09e * testing: https://chromium.googlesource.com/chromium/src/testing/+log/2062399745..e5e34cbf4b * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/47dfacfcce..ad002f6051 * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/86630a4fe3..00852ba1c5 * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6fbe58035d * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/f72361d313..d6a3040bfd * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/4e87a80d55..901a5d97c2 * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/ad74e59c0f..0a9dd7740c * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/aa8103bd9b..25c9dfaa86 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/6d4e79909d..715f5e95c1 No update to Clang. Bug: angleproject:5707 Change-Id: I781dc018443fab6bbde1351c6c0ab426338be4d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469215 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-02-16 19:38:31 +03:00
conn = urllib.request.urlopen(url)
try:
return conn.readlines()
except IOError as e:
logging.exception('Error connecting to %s. Error: %s', url, e)
raise
finally:
conn.close()
def GetMatchingDepsEntries(depsentry_dict, dir_path):
"""Gets all deps entries matching the provided path.
This list may contain more than one DepsEntry object.
Example: dir_path='src/testing' would give results containing both
'src/testing/gtest' and 'src/testing/gmock' deps entries for Chromium's DEPS.
Example 2: dir_path='src/build' should return 'src/build' but not
'src/buildtools'.
Returns:
A list of DepsEntry objects.
"""
result = []
Roll Chromium DEPS manually. Includes a fix for the removed Gold service account mixin. Also upgrades roll_chromium_deps to Python 3. Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/021b19e04d..47f630a2c5 * buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/01efcb5d51..738dc100c6 * buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git/+log/b323ac8f4c..1e0047c09e * testing: https://chromium.googlesource.com/chromium/src/testing/+log/2062399745..e5e34cbf4b * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/47dfacfcce..ad002f6051 * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/86630a4fe3..00852ba1c5 * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6fbe58035d * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/f72361d313..d6a3040bfd * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/4e87a80d55..901a5d97c2 * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/ad74e59c0f..0a9dd7740c * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/aa8103bd9b..25c9dfaa86 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/6d4e79909d..715f5e95c1 No update to Clang. Bug: angleproject:5707 Change-Id: I781dc018443fab6bbde1351c6c0ab426338be4d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469215 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-02-16 19:38:31 +03:00
for path, depsentry in depsentry_dict.items():
if path == dir_path:
result.append(depsentry)
else:
parts = path.split('/')
if all(part == parts[i] for i, part in enumerate(dir_path.split('/'))):
result.append(depsentry)
return result
def BuildDepsentryDict(deps_dict):
"""Builds a dict of paths to DepsEntry objects from a raw parsed deps dict."""
result = {}
def AddDepsEntries(deps_subdict):
Roll Chromium DEPS manually. Includes a fix for the removed Gold service account mixin. Also upgrades roll_chromium_deps to Python 3. Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/021b19e04d..47f630a2c5 * buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/01efcb5d51..738dc100c6 * buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git/+log/b323ac8f4c..1e0047c09e * testing: https://chromium.googlesource.com/chromium/src/testing/+log/2062399745..e5e34cbf4b * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/47dfacfcce..ad002f6051 * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/86630a4fe3..00852ba1c5 * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6fbe58035d * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/f72361d313..d6a3040bfd * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/4e87a80d55..901a5d97c2 * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/ad74e59c0f..0a9dd7740c * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/aa8103bd9b..25c9dfaa86 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/6d4e79909d..715f5e95c1 No update to Clang. Bug: angleproject:5707 Change-Id: I781dc018443fab6bbde1351c6c0ab426338be4d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469215 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-02-16 19:38:31 +03:00
for path, dep in deps_subdict.items():
if path in result:
continue
if not isinstance(dep, dict):
dep = {'url': dep}
if dep.get('dep_type') == 'cipd':
result[path] = CipdDepsEntry(path, dep['packages'])
else:
if '@' not in dep['url']:
continue
url, revision = dep['url'].split('@')
result[path] = DepsEntry(path, url, revision)
AddDepsEntries(deps_dict['deps'])
for deps_os in ['win', 'mac', 'unix', 'android', 'ios', 'unix']:
AddDepsEntries(deps_dict.get('deps_os', {}).get(deps_os, {}))
return result
def _FindChangedCipdPackages(path, old_pkgs, new_pkgs):
pkgs_equal = ({p['package'] for p in old_pkgs} == {p['package'] for p in new_pkgs})
Roll Chromium DEPS manually. Because the packages list changed, the roll_chromium_deps script was failing. Manually roll and update the failure assertion to make the required action clear. Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/488aac0b88..2ef6eae721 * testing: https://chromium.googlesource.com/chromium/src/testing/+log/8c3404999d..b8e44ff539 * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/9211d9e376..368be24f93 * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/0ab40df9d1..12d2cf1a46 * third_party/android_sdk: https://chromium.googlesource.com/chromium/src/third_party/android_sdk/+log/76bd51b56b..ff9352c23f * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..10f6e4b89b * third_party/r8: Nu_mvQJe34CotIXadFlA3w732CJ9EvQGuVs4udcZedAC..gXyBDv_fM87KnLcxvF5AGV5lwnm-JXIALYH8zrzdoaMC * tools/luci-go: git_revision:9ee8b1d719c0d3c268e0e19282351ca78024af2d..git_revision:81e548572494391fa74559e816562d60c767bc69 * tools/luci-go: git_revision:9ee8b1d719c0d3c268e0e19282351ca78024af2d..git_revision:81e548572494391fa74559e816562d60c767bc69 * tools/luci-go: git_revision:9ee8b1d719c0d3c268e0e19282351ca78024af2d..git_revision:81e548572494391fa74559e816562d60c767bc69 * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/2db94c0aa3..609c3a5216 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/4682254401..7668723204 * tools/skia_goldctl/linux: 4iy6PO3bO0fujafbQ4I4eWhD8ErkBKf5xAnGzPrziIUC..kaeAzSau0swqM5_PxvyRfHSMDvXSjyDsqgPiP5rpoYEC * tools/skia_goldctl/mac: _9rtsnZzHBJ4851DtK33jnz7UzMZ77SqJ9sYpciBwiMC..sZ1aXBq0Ae2kaeyAtTGpMuEEGdcqMzga658pAaCAl0IC * tools/skia_goldctl/win: NsVk6Er035r7JVK4foqbqAksO65XEzgIT9Bjwf0Q1q0C..67QQ3-xX3VTYrb9YrwUR0VedVqNq7sebZZeHS823QdcC No update to Clang. Bug: angleproject:6211 Change-Id: I152572fd15066a100cb5f379f7adbd967dc6eac8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3048852 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-07-23 15:57:19 +03:00
assert pkgs_equal, ('Old: %s\n New: %s.\nYou need to do a manual roll '
'and remove/add entries in DEPS so the old and new '
'list match.' % (old_pkgs, new_pkgs))
for old_pkg in old_pkgs:
for new_pkg in new_pkgs:
old_version = old_pkg['version']
new_version = new_pkg['version']
if (old_pkg['package'] == new_pkg['package'] and old_version != new_version):
logging.debug('Roll dependency %s to %s', path, new_version)
yield ChangedCipdPackage(path, old_pkg['package'], old_version, new_version)
def _FindNewDeps(old, new):
""" Gather dependencies only in |new| and return corresponding paths. """
old_entries = set(BuildDepsentryDict(old))
new_entries = set(BuildDepsentryDict(new))
return [path for path in new_entries - old_entries if path in ANGLE_CHROMIUM_DEPS]
def CalculateChangedDeps(angle_deps, new_cr_deps):
"""
Calculate changed deps entries based on entries defined in the ANGLE DEPS
file:
- If a shared dependency with the Chromium DEPS file: roll it to the same
revision as Chromium (i.e. entry in the new_cr_deps dict)
- If it's a Chromium sub-directory, roll it to the HEAD revision (notice
this means it may be ahead of the chromium_revision, but generally these
should be close).
- If it's another DEPS entry (not shared with Chromium), roll it to HEAD
unless it's configured to be skipped.
Returns:
A list of ChangedDep objects representing the changed deps.
"""
def ChromeURL(angle_deps_entry):
# Perform variable substitutions.
# This is a hack to get around the unsupported way this script parses DEPS.
# A better fix would be to use the gclient APIs to query and update DEPS.
# However this is complicated by how this script downloads DEPS remotely.
return angle_deps_entry.url.replace('{chromium_git}', 'https://chromium.googlesource.com')
result = []
angle_entries = BuildDepsentryDict(angle_deps)
new_cr_entries = BuildDepsentryDict(new_cr_deps)
Roll Chromium DEPS manually. Includes a fix for the removed Gold service account mixin. Also upgrades roll_chromium_deps to Python 3. Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/021b19e04d..47f630a2c5 * buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/01efcb5d51..738dc100c6 * buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git/+log/b323ac8f4c..1e0047c09e * testing: https://chromium.googlesource.com/chromium/src/testing/+log/2062399745..e5e34cbf4b * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/47dfacfcce..ad002f6051 * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/86630a4fe3..00852ba1c5 * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6fbe58035d * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/f72361d313..d6a3040bfd * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/4e87a80d55..901a5d97c2 * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/ad74e59c0f..0a9dd7740c * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/aa8103bd9b..25c9dfaa86 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/6d4e79909d..715f5e95c1 No update to Clang. Bug: angleproject:5707 Change-Id: I781dc018443fab6bbde1351c6c0ab426338be4d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469215 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-02-16 19:38:31 +03:00
for path, angle_deps_entry in angle_entries.items():
if path not in ANGLE_CHROMIUM_DEPS:
continue
# All ANGLE Chromium dependencies are located in src/.
chrome_path = 'src/%s' % path
cr_deps_entry = new_cr_entries.get(chrome_path)
if cr_deps_entry:
assert type(cr_deps_entry) is type(angle_deps_entry)
if isinstance(cr_deps_entry, CipdDepsEntry):
result.extend(
_FindChangedCipdPackages(path, angle_deps_entry.packages,
cr_deps_entry.packages))
continue
# Use the revision from Chromium's DEPS file.
new_rev = cr_deps_entry.revision
assert ChromeURL(angle_deps_entry) == cr_deps_entry.url, (
'ANGLE DEPS entry %s has a different URL (%s) than Chromium (%s).' %
(path, ChromeURL(angle_deps_entry), cr_deps_entry.url))
else:
if isinstance(angle_deps_entry, DepsEntry):
# Use the HEAD of the deps repo.
stdout, _ = _RunCommand(['git', 'ls-remote', ChromeURL(angle_deps_entry), 'HEAD'])
new_rev = stdout.strip().split('\t')[0]
else:
# The dependency has been removed from chromium.
# This is handled by FindRemovedDeps.
continue
# Check if an update is necessary.
if angle_deps_entry.revision != new_rev:
logging.debug('Roll dependency %s to %s', path, new_rev)
result.append(
ChangedDep(path, ChromeURL(angle_deps_entry), angle_deps_entry.revision, new_rev))
return sorted(result)
def CalculateChangedClang(changed_deps, autoroll):
mirror_change = [change for change in changed_deps if change.path == CLANG_TOOLS_PATH]
if not mirror_change:
return None
mirror_change = mirror_change[0]
def GetClangRev(lines):
for line in lines:
match = CLANG_REVISION_RE.match(line)
if match:
return match.group(1)
raise RollError('Could not parse Clang revision!')
old_clang_update_py = ReadRemoteClangFile(CLANG_UPDATE_SCRIPT_URL_PATH,
mirror_change.current_rev).splitlines()
old_clang_rev = GetClangRev(old_clang_update_py)
logging.debug('Found old clang rev: %s' % old_clang_rev)
new_clang_update_py = ReadRemoteClangFile(CLANG_UPDATE_SCRIPT_URL_PATH,
mirror_change.new_rev).splitlines()
new_clang_rev = GetClangRev(new_clang_update_py)
logging.debug('Found new clang rev: %s' % new_clang_rev)
clang_change = ChangedDep(CLANG_UPDATE_SCRIPT_LOCAL_PATH, None, old_clang_rev, new_clang_rev)
return ClangChange(mirror_change, clang_change)
def GenerateCommitMessage(
rev_update,
current_commit_pos,
new_commit_pos,
changed_deps_list,
autoroll,
clang_change,
):
current_cr_rev = rev_update.current_chromium_rev[0:10]
new_cr_rev = rev_update.new_chromium_rev[0:10]
rev_interval = '%s..%s' % (current_cr_rev, new_cr_rev)
git_number_interval = '%s:%s' % (current_commit_pos, new_commit_pos)
commit_msg = []
# Autoroll already adds chromium_revision changes to commit message
if not autoroll:
commit_msg.extend([
'Roll chromium_revision %s (%s)\n' % (rev_interval, git_number_interval),
'Change log: %s' % (CHROMIUM_LOG_TEMPLATE % rev_interval),
'Full diff: %s\n' % (CHROMIUM_COMMIT_TEMPLATE % rev_interval)
])
def Section(adjective, deps):
noun = 'dependency' if len(deps) == 1 else 'dependencies'
commit_msg.append('%s %s' % (adjective, noun))
tbr_authors = ''
if changed_deps_list:
Section('Changed', changed_deps_list)
for c in changed_deps_list:
if isinstance(c, ChangedCipdPackage):
commit_msg.append('* %s: %s..%s' % (c.path, c.current_version, c.new_version))
else:
commit_msg.append('* %s: %s/+log/%s..%s' %
(c.path, c.url, c.current_rev[0:10], c.new_rev[0:10]))
if changed_deps_list:
# rev_interval is empty for autoroll, since we are starting from a state
# in which chromium_revision is already modified in DEPS
if not autoroll:
change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, 'DEPS')
commit_msg.append('DEPS diff: %s\n' % change_url)
else:
commit_msg.append('No dependencies changed.')
c = clang_change
if (c and (c.clang_change.current_rev != c.clang_change.new_rev)):
commit_msg.append('Clang version changed %s:%s' %
(c.clang_change.current_rev, c.clang_change.new_rev))
rev_clang = rev_interval = '%s..%s' % (c.mirror_change.current_rev,
c.mirror_change.new_rev)
change_url = CLANG_FILE_TEMPLATE % (rev_clang, CLANG_UPDATE_SCRIPT_URL_PATH)
commit_msg.append('Details: %s\n' % change_url)
else:
commit_msg.append('No update to Clang.\n')
# Autoroll takes care of BUG and TBR in commit message
if not autoroll:
# TBR needs to be non-empty for Gerrit to process it.
git_author = _RunCommand(['git', 'config', 'user.email'],
working_dir=CHECKOUT_SRC_DIR)[0].splitlines()[0]
tbr_authors = git_author + ',' + tbr_authors
commit_msg.append('TBR=%s' % tbr_authors)
commit_msg.append('BUG=None')
return '\n'.join(commit_msg)
def UpdateDepsFile(deps_filename, rev_update, changed_deps, new_cr_content, autoroll):
"""Update the DEPS file with the new revision."""
with open(deps_filename, 'rb') as deps_file:
Roll Chromium DEPS manually. Includes a fix for the removed Gold service account mixin. Also upgrades roll_chromium_deps to Python 3. Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/021b19e04d..47f630a2c5 * buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/01efcb5d51..738dc100c6 * buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git/+log/b323ac8f4c..1e0047c09e * testing: https://chromium.googlesource.com/chromium/src/testing/+log/2062399745..e5e34cbf4b * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/47dfacfcce..ad002f6051 * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/86630a4fe3..00852ba1c5 * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6fbe58035d * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/f72361d313..d6a3040bfd * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/4e87a80d55..901a5d97c2 * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/ad74e59c0f..0a9dd7740c * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/aa8103bd9b..25c9dfaa86 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/6d4e79909d..715f5e95c1 No update to Clang. Bug: angleproject:5707 Change-Id: I781dc018443fab6bbde1351c6c0ab426338be4d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469215 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-02-16 19:38:31 +03:00
deps_content = deps_file.read().decode('utf-8')
# Autoroll takes care of updating 'chromium_revision', thus we don't need to.
if not autoroll:
# Update the chromium_revision variable.
deps_content = deps_content.replace(rev_update.current_chromium_rev,
rev_update.new_chromium_rev)
# Add and remove dependencies. For now: only generated android deps.
# Since gclient cannot add or remove deps, we rely on the fact that
# these android deps are located in one place to copy/paste.
deps_re = re.compile(ANDROID_DEPS_START + '.*' + ANDROID_DEPS_END, re.DOTALL)
new_deps = deps_re.search(new_cr_content)
old_deps = deps_re.search(deps_content)
if not new_deps or not old_deps:
faulty = 'Chromium' if not new_deps else 'ANGLE'
raise RollError('Was expecting to find "%s" and "%s"\n'
'in %s DEPS' % (ANDROID_DEPS_START, ANDROID_DEPS_END, faulty))
replacement = new_deps.group(0).replace('src/third_party/android_deps',
'third_party/android_deps')
replacement = replacement.replace('checkout_android',
'checkout_android and not build_with_chromium')
deps_content = deps_re.sub(replacement, deps_content)
with open(deps_filename, 'wb') as deps_file:
Roll Chromium DEPS manually. Includes a fix for the removed Gold service account mixin. Also upgrades roll_chromium_deps to Python 3. Changed dependencies * build: https://chromium.googlesource.com/chromium/src/build.git/+log/021b19e04d..47f630a2c5 * buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/01efcb5d51..738dc100c6 * buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git/+log/b323ac8f4c..1e0047c09e * testing: https://chromium.googlesource.com/chromium/src/testing/+log/2062399745..e5e34cbf4b * third_party/abseil-cpp: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp/+log/47dfacfcce..ad002f6051 * third_party/android_deps: https://chromium.googlesource.com/chromium/src/third_party/android_deps/+log/86630a4fe3..00852ba1c5 * third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6fbe58035d * third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/f72361d313..d6a3040bfd * third_party/zlib: https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/4e87a80d55..901a5d97c2 * tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang.git/+log/ad74e59c0f..0a9dd7740c * tools/mb: https://chromium.googlesource.com/chromium/src/tools/mb/+log/aa8103bd9b..25c9dfaa86 * tools/perf: https://chromium.googlesource.com/chromium/src/tools/perf/+log/6d4e79909d..715f5e95c1 No update to Clang. Bug: angleproject:5707 Change-Id: I781dc018443fab6bbde1351c6c0ab426338be4d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469215 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-02-16 19:38:31 +03:00
deps_file.write(deps_content.encode('utf-8'))
# Update each individual DEPS entry.
for dep in changed_deps:
# We don't sync deps on autoroller, so ignore missing local deps
if not autoroll:
local_dep_dir = os.path.join(CHECKOUT_ROOT_DIR, dep.path)
if not os.path.isdir(local_dep_dir):
raise RollError('Cannot find local directory %s. Either run\n'
'gclient sync --deps=all\n'
'or make sure the .gclient file for your solution contains all '
'platforms in the target_os list, i.e.\n'
'target_os = ["android", "unix", "mac", "ios", "win"];\n'
'Then run "gclient sync" again.' % local_dep_dir)
if isinstance(dep, ChangedCipdPackage):
package = dep.package.format() # Eliminate double curly brackets
update = '%s:%s@%s' % (dep.path, package, dep.new_version)
else:
update = '%s@%s' % (dep.path, dep.new_rev)
gclient_cmd = 'gclient'
if platform.system() == 'Windows':
gclient_cmd += '.bat'
_RunCommand([gclient_cmd, 'setdep', '--revision', update], working_dir=CHECKOUT_SRC_DIR)
def _IsTreeClean():
stdout, _ = _RunCommand(['git', 'status', '--porcelain'])
if len(stdout) == 0:
return True
logging.error('Dirty/unversioned files:\n%s', stdout)
return False
def _EnsureUpdatedMainBranch(dry_run):
current_branch = _RunCommand(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0]
if current_branch != 'main':
logging.error('Please checkout the main branch and re-run this script.')
if not dry_run:
sys.exit(-1)
logging.info('Updating main branch...')
_RunCommand(['git', 'pull'])
def _CreateRollBranch(dry_run):
logging.info('Creating roll branch: %s', ROLL_BRANCH_NAME)
if not dry_run:
_RunCommand(['git', 'checkout', '-b', ROLL_BRANCH_NAME])
def _RemovePreviousRollBranch(dry_run):
active_branch, branches = _GetBranches()
if active_branch == ROLL_BRANCH_NAME:
active_branch = 'main'
if ROLL_BRANCH_NAME in branches:
logging.info('Removing previous roll branch (%s)', ROLL_BRANCH_NAME)
if not dry_run:
_RunCommand(['git', 'checkout', active_branch])
_RunCommand(['git', 'branch', '-D', ROLL_BRANCH_NAME])
def _LocalCommit(commit_msg, dry_run):
logging.info('Committing changes locally.')
if not dry_run:
_RunCommand(['git', 'add', '--update', '.'])
_RunCommand(['git', 'commit', '-m', commit_msg])
def _LocalCommitAmend(commit_msg, dry_run):
logging.info('Amending changes to local commit.')
if not dry_run:
old_commit_msg = _RunCommand(['git', 'log', '-1', '--pretty=%B'])[0].strip()
logging.debug('Existing commit message:\n%s\n', old_commit_msg)
bug_index = old_commit_msg.rfind('Bug:')
if bug_index == -1:
logging.error('"Bug:" not found in commit message.')
if not dry_run:
sys.exit(-1)
new_commit_msg = old_commit_msg[:bug_index] + commit_msg + '\n' + old_commit_msg[bug_index:]
_RunCommand(['git', 'commit', '-a', '--amend', '-m', new_commit_msg])
def ChooseCQMode(skip_cq, cq_over, current_commit_pos, new_commit_pos):
if skip_cq:
return 0
if (new_commit_pos - current_commit_pos) < cq_over:
return 1
return 2
def _UploadCL(commit_queue_mode):
"""Upload the committed changes as a changelist to Gerrit.
commit_queue_mode:
- 2: Submit to commit queue.
- 1: Run trybots but do not submit to CQ.
- 0: Skip CQ, upload only.
"""
cmd = ['git', 'cl', 'upload', '--force', '--bypass-hooks', '--send-mail']
cmd.extend(['--cc', NOTIFY_EMAIL])
if commit_queue_mode >= 2:
logging.info('Sending the CL to the CQ...')
cmd.extend(['--use-commit-queue'])
elif commit_queue_mode >= 1:
logging.info('Starting CQ dry run...')
cmd.extend(['--cq-dry-run'])
extra_env = {
'EDITOR': 'true',
'SKIP_GCE_AUTH_FOR_GIT': '1',
}
stdout, stderr = _RunCommand(cmd, extra_env=extra_env)
logging.debug('Output from "git cl upload":\nstdout:\n%s\n\nstderr:\n%s', stdout, stderr)
def GetRollRevisionRanges(opts, angle_deps):
current_cr_rev = angle_deps['vars']['chromium_revision']
new_cr_rev = opts.revision
if not new_cr_rev:
stdout, _ = _RunCommand(['git', 'ls-remote', CHROMIUM_SRC_URL, 'HEAD'])
head_rev = stdout.strip().split('\t')[0]
logging.info('No revision specified. Using HEAD: %s', head_rev)
new_cr_rev = head_rev
return ChromiumRevisionUpdate(current_cr_rev, new_cr_rev)
def main():
p = argparse.ArgumentParser()
p.add_argument(
'--clean',
action='store_true',
default=False,
help='Removes any previous local roll branch.')
p.add_argument(
'-r',
'--revision',
help=('Chromium Git revision to roll to. Defaults to the '
'Chromium HEAD revision if omitted.'))
p.add_argument(
'--dry-run',
action='store_true',
default=False,
help=('Calculate changes and modify DEPS, but don\'t create '
'any local branch, commit, upload CL or send any '
'tryjobs.'))
p.add_argument(
'-i',
'--ignore-unclean-workdir',
action='store_true',
default=False,
help=('Ignore if the current branch is not main or if there '
'are uncommitted changes (default: %(default)s).'))
grp = p.add_mutually_exclusive_group()
grp.add_argument(
'--skip-cq',
action='store_true',
default=False,
help='Skip sending the CL to the CQ (default: %(default)s)')
grp.add_argument(
'--cq-over',
type=int,
default=1,
help=('Commit queue dry run if the revision difference '
'is below this number (default: %(default)s)'))
grp.add_argument(
'--autoroll',
action='store_true',
default=False,
help='Autoroller mode - amend existing commit, '
'do not create nor upload a CL (default: %(default)s)')
p.add_argument(
'-v',
'--verbose',
action='store_true',
default=False,
help='Be extra verbose in printing of log messages.')
opts = p.parse_args()
if opts.verbose:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)
# We don't have locally sync'ed deps on autoroller,
# so trust it to have depot_tools in path
if not opts.autoroll:
AddDepotToolsToPath()
if not opts.ignore_unclean_workdir and not _IsTreeClean():
logging.error('Please clean your local checkout first.')
return 1
if opts.clean:
_RemovePreviousRollBranch(opts.dry_run)
if not opts.ignore_unclean_workdir:
_EnsureUpdatedMainBranch(opts.dry_run)
deps_filename = os.path.join(CHECKOUT_SRC_DIR, 'DEPS')
angle_deps = ParseLocalDepsFile(deps_filename)
rev_update = GetRollRevisionRanges(opts, angle_deps)
current_commit_pos = ParseCommitPosition(ReadRemoteCrCommit(rev_update.current_chromium_rev))
new_commit_pos = ParseCommitPosition(ReadRemoteCrCommit(rev_update.new_chromium_rev))
new_cr_content = ReadRemoteCrFile('DEPS', rev_update.new_chromium_rev)
new_cr_deps = ParseDepsDict(new_cr_content)
changed_deps = CalculateChangedDeps(angle_deps, new_cr_deps)
clang_change = CalculateChangedClang(changed_deps, opts.autoroll)
commit_msg = GenerateCommitMessage(rev_update, current_commit_pos, new_commit_pos,
changed_deps, opts.autoroll, clang_change)
logging.debug('Commit message:\n%s', commit_msg)
# We are updating a commit that autoroll has created, using existing branch
if not opts.autoroll:
_CreateRollBranch(opts.dry_run)
if not opts.dry_run:
UpdateDepsFile(deps_filename, rev_update, changed_deps, new_cr_content, opts.autoroll)
if opts.autoroll:
_LocalCommitAmend(commit_msg, opts.dry_run)
else:
if _IsTreeClean():
logging.info("No DEPS changes detected, skipping CL creation.")
else:
_LocalCommit(commit_msg, opts.dry_run)
commit_queue_mode = ChooseCQMode(opts.skip_cq, opts.cq_over, current_commit_pos,
new_commit_pos)
logging.info('Uploading CL...')
if not opts.dry_run:
_UploadCL(commit_queue_mode)
return 0
if __name__ == '__main__':
sys.exit(main())