Merge pull request #14964 from electron/chromium-upgrade/68

feat: upgrade to Chromium 68.0.3440.128 and Node 10.11.0
This commit is contained in:
Samuel Attard 2018-10-04 12:04:53 +10:00 committed by GitHub
commit 03e6113ef7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
155 changed files with 9131 additions and 8352 deletions

View file

@ -1,152 +0,0 @@
#!/usr/bin/env python
# Copyright (c) 2013 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.
"""Install Debian sysroots for building chromium.
"""
# The sysroot is needed to ensure that binaries that get built will run on
# the oldest stable version of Debian that we currently support.
# This script can be run manually but is more often run as part of gclient
# hooks. When run from hooks this script is a no-op on non-linux platforms.
# The sysroot image could be constructed from scratch based on the current state
# of the Debian archive but for consistency we use a pre-built root image (we
# don't want upstream changes to Debian to effect the chromium build until we
# choose to pull them in). The images will normally need to be rebuilt every
# time chrome's build dependencies are changed but should also be updated
# periodically to include upstream security fixes from Debian.
import hashlib
import json
import platform
import optparse
import os
import re
import shutil
import subprocess
import sys
import urllib2
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
URL_PREFIX = 'http://s3.amazonaws.com'
URL_PATH = 'gh-contractor-zcbenz/toolchain'
VALID_ARCHS = ('arm', 'arm64', 'i386', 'amd64')
class Error(Exception):
pass
def GetSha1(filename):
sha1 = hashlib.sha1()
with open(filename, 'rb') as f:
while True:
# Read in 1mb chunks, so it doesn't all have to be loaded into memory.
chunk = f.read(1024*1024)
if not chunk:
break
sha1.update(chunk)
return sha1.hexdigest()
def main(args):
parser = optparse.OptionParser('usage: %prog [OPTIONS]', description=__doc__)
parser.add_option('--running-as-hook', action='store_true',
default=False, help='Used when running from gclient hooks.'
' Installs default sysroot images.')
parser.add_option('--arch', type='choice', choices=VALID_ARCHS,
help='Sysroot architecture: %s' % ', '.join(VALID_ARCHS))
parser.add_option('--all', action='store_true',
help='Install all sysroot images (useful when updating the'
' images)')
options, _ = parser.parse_args(args)
if options.running_as_hook and not sys.platform.startswith('linux'):
return 0
if options.running_as_hook:
return 0
elif options.arch:
InstallDefaultSysrootForArch(options.arch)
elif options.all:
for arch in VALID_ARCHS:
InstallDefaultSysrootForArch(arch)
else:
print 'You much specify either --arch, --all or --running-as-hook'
return 1
return 0
def InstallDefaultSysrootForArch(target_arch):
if target_arch not in VALID_ARCHS:
raise Error('Unknown architecture: %s' % target_arch)
InstallSysroot('Stretch', target_arch)
def InstallSysroot(target_platform, target_arch):
# The sysroot directory should match the one specified in
# build/config/sysroot.gni.
# TODO(thestig) Consider putting this elsewhere to avoid having to recreate
# it on every build.
linux_dir = os.path.dirname(SCRIPT_DIR)
sysroots_file = os.path.join(SCRIPT_DIR, 'sysroots.json')
sysroots = json.load(open(sysroots_file))
sysroot_key = '%s_%s' % (target_platform.lower(), target_arch)
if sysroot_key not in sysroots:
raise Error('No sysroot for: %s %s' % (target_platform, target_arch))
sysroot_dict = sysroots[sysroot_key]
revision = sysroot_dict['Revision']
tarball_filename = sysroot_dict['Tarball']
tarball_sha1sum = sysroot_dict['Sha1Sum']
sysroot = os.path.join(linux_dir, 'vendor', sysroot_dict['SysrootDir'])
url = '%s/%s/%s/%s' % (URL_PREFIX, URL_PATH, revision, tarball_filename)
stamp = os.path.join(sysroot, '.stamp')
if os.path.exists(stamp):
with open(stamp) as s:
if s.read() == url:
return
print 'Installing Debian %s %s root image: %s' % \
(target_platform, target_arch, sysroot)
if os.path.isdir(sysroot):
shutil.rmtree(sysroot)
os.mkdir(sysroot)
tarball = os.path.join(sysroot, tarball_filename)
print 'Downloading %s' % url
sys.stdout.flush()
sys.stderr.flush()
for _ in range(3):
try:
response = urllib2.urlopen(url)
with open(tarball, "wb") as f:
f.write(response.read())
break
except Exception:
pass
else:
raise Error('Failed to download %s' % url)
sha1sum = GetSha1(tarball)
if sha1sum != tarball_sha1sum:
raise Error('Tarball sha1sum is wrong.'
'Expected %s, actual: %s' % (tarball_sha1sum, sha1sum))
subprocess.check_call(['tar', 'xf', tarball, '-C', sysroot])
os.remove(tarball)
with open(stamp, 'w') as s:
s.write(url)
if __name__ == '__main__':
try:
sys.exit(main(sys.argv[1:]))
except Error as e:
sys.stderr.write(str(e) + '\n')
sys.exit(1)

View file

@ -1,38 +1,38 @@
{
"stretch_amd64": {
"Revision": "02772eaba5440a79c6bd2d9cb7e42fa836950366",
"Sha1Sum": "69457fddca3500e2dde124f77f8382b0a18d765e",
"SysrootDir": "debian_stretch_amd64-sysroot",
"Tarball": "debian_stretch_amd64_sysroot.tgz"
"sid_amd64": {
"Revision": "41f20393f5f541a1db4a50c80c04a3d3103146f1",
"Sha1Sum": "c1b6fec7d9d6c9427705f646838907cf0a8d249e",
"SysrootDir": "debian_sid_amd64-sysroot",
"Tarball": "debian_sid_amd64_sysroot.tar.xz"
},
"stretch_arm": {
"Revision": "02772eaba5440a79c6bd2d9cb7e42fa836950366",
"Sha1Sum": "3e880f69177992ce02b05deeac619f7591b30287",
"SysrootDir": "debian_stretch_arm-sysroot",
"Tarball": "debian_stretch_arm_sysroot.tgz"
"sid_arm": {
"Revision": "41f20393f5f541a1db4a50c80c04a3d3103146f1",
"Sha1Sum": "78ad77925f1cd9f0cce1c90a1d59d67464b94045",
"SysrootDir": "debian_sid_arm-sysroot",
"Tarball": "debian_sid_arm_sysroot.tar.xz"
},
"stretch_arm64": {
"Revision": "02772eaba5440a79c6bd2d9cb7e42fa836950366",
"Sha1Sum": "8fd58c7d4b38fa3c6785573c6310cf6ca6c88312",
"SysrootDir": "debian_stretch_arm64-sysroot",
"Tarball": "debian_stretch_arm64_sysroot.tgz"
"sid_arm64": {
"Revision": "41f20393f5f541a1db4a50c80c04a3d3103146f1",
"Sha1Sum": "f27a76f4c9bf62c34d1c912f3f4288adb7ab1804",
"SysrootDir": "debian_sid_arm64-sysroot",
"Tarball": "debian_sid_arm64_sysroot.tar.xz"
},
"stretch_i386": {
"Revision": "02772eaba5440a79c6bd2d9cb7e42fa836950366",
"Sha1Sum": "1bd14db5eb0466064659126d398b38220013fb38",
"SysrootDir": "debian_stretch_i386-sysroot",
"Tarball": "debian_stretch_i386_sysroot.tgz"
"sid_i386": {
"Revision": "41f20393f5f541a1db4a50c80c04a3d3103146f1",
"Sha1Sum": "c116b2b74830935c410d7381edd3145b7a85ab2e",
"SysrootDir": "debian_sid_i386-sysroot",
"Tarball": "debian_sid_i386_sysroot.tar.xz"
},
"stretch_mips": {
"Revision": "02772eaba5440a79c6bd2d9cb7e42fa836950366",
"Sha1Sum": "285751660ffab14e6d052c8ddb5c90752a51704d",
"SysrootDir": "debian_stretch_mips-sysroot",
"Tarball": "debian_stretch_mips_sysroot.tgz"
"sid_mips": {
"Revision": "41f20393f5f541a1db4a50c80c04a3d3103146f1",
"Sha1Sum": "b3d038f3714a377ea8f1c79306d0d91e50e4fcd1",
"SysrootDir": "debian_sid_mips-sysroot",
"Tarball": "debian_sid_mips_sysroot.tar.xz"
},
"stretch_mips64el": {
"Revision": "02772eaba5440a79c6bd2d9cb7e42fa836950366",
"Sha1Sum": "23f51f29bc35a550092dde41dc823780fdb50f9e",
"SysrootDir": "debian_stretch_mips64el-sysroot",
"Tarball": "debian_stretch_mips64el_sysroot.tgz"
"sid_mips64el": {
"Revision": "41f20393f5f541a1db4a50c80c04a3d3103146f1",
"Sha1Sum": "eb03d57fa21281903367efa0fe87954cd79ec173",
"SysrootDir": "debian_sid_mips64el-sysroot",
"Tarball": "debian_sid_mips64el_sysroot.tar.xz"
}
}

View file

@ -41,7 +41,10 @@ def main():
try:
test_path = os.path.join(SOURCE_ROOT, 'spec', 'fixtures',
'no-proprietary-codecs.js')
subprocess.check_call([electron, test_path] + sys.argv[1:])
env = dict(os.environ)
env['ELECTRON_ENABLE_STACK_DUMPING'] = 'true'
env['ELECTRON_ENABLE_LOGGING'] = 'true'
subprocess.check_call([electron, test_path] + sys.argv[1:], env=env)
except subprocess.CalledProcessError as e:
returncode = e.returncode
except KeyboardInterrupt: