 Chromium Code Reviews
 Chromium Code Reviews Issue 2361223002:
  Update linux sysroot images from debian/wheezy to debian/jessie  (Closed)
    
  
    Issue 2361223002:
  Update linux sysroot images from debian/wheezy to debian/jessie  (Closed) 
  | Index: build/linux/sysroot_scripts/install-sysroot.py | 
| diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py | 
| index d79c12bbbbcef46057e6be67da92b5654d528709..b29e5af7494b2338ceb1a5324f073f20da38d733 100755 | 
| --- a/build/linux/sysroot_scripts/install-sysroot.py | 
| +++ b/build/linux/sysroot_scripts/install-sysroot.py | 
| @@ -6,16 +6,18 @@ | 
| """Install Debian sysroots for building chromium. | 
| """ | 
| -# The sysroot is needed to ensure that binaries will run on Debian Wheezy, | 
| -# the oldest supported linux distribution. For ARM64 linux, we have Debian | 
| -# Jessie sysroot as Jessie is the first version with ARM64 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 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 or Debian Wheezy/Jessie but for consistency we currently use a | 
| -# pre-built root image. The image will normally need to be rebuilt every time | 
| -# chrome's build dependencies are changed. | 
| +# state of the Debian archived but for consistency we currently use a | 
| 
Dirk Pranke
2017/03/07 00:21:04
Nit: "archived"?
 
Sam Clegg
2017/03/07 14:48:52
Done.
 | 
| +# 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 fixed from | 
| 
Dirk Pranke
2017/03/07 00:21:04
Nit: s/fixed/fixes
 
Sam Clegg
2017/03/07 14:48:52
Done.
 | 
| +# Debian. | 
| import hashlib | 
| import json | 
| @@ -150,6 +152,9 @@ def main(args): | 
| ' 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 | 
| @@ -161,24 +166,28 @@ def main(args): | 
| return 0 | 
| InstallDefaultSysroots(host_arch) | 
| else: | 
| - if not options.arch: | 
| + if options.arch: | 
| + InstallDefaultSysrootForArch(options.arch) | 
| + elif options.all: | 
| + for arch in VALID_ARCHS: | 
| + InstallDefaultSysrootForArch(arch) | 
| + else: | 
| 
Dirk Pranke
2017/03/07 00:21:04
Nit: you can actually change line 168 to an elif a
 
Sam Clegg
2017/03/07 14:48:52
Done.
 | 
| print 'You much specify either --arch or --running-as-hook' | 
| return 1 | 
| - InstallDefaultSysrootForArch(options.arch) | 
| return 0 | 
| def InstallDefaultSysrootForArch(target_arch): | 
| if target_arch == 'amd64': | 
| - InstallSysroot('Wheezy', 'amd64') | 
| + InstallSysroot('Jessie', 'amd64') | 
| elif target_arch == 'arm': | 
| - InstallSysroot('Wheezy', 'arm') | 
| + InstallSysroot('Jessie', 'arm') | 
| elif target_arch == 'arm64': | 
| InstallSysroot('Jessie', 'arm64') | 
| elif target_arch == 'i386': | 
| - InstallSysroot('Wheezy', 'i386') | 
| + InstallSysroot('Jessie', 'i386') | 
| elif target_arch == 'mips': | 
| - InstallSysroot('Wheezy', 'mips') | 
| + InstallSysroot('Jessie', 'mips') | 
| else: | 
| raise Error('Unknown architecture: %s' % target_arch) |