Skip to content

Commit

Permalink
Revert of Update linux sysroot images from debian/wheezy to debian/je…
Browse files Browse the repository at this point in the history
…ssie (patchset chromium#1 id:1 of https://codereview.chromium.org/2755483002/ )

Reason for revert:
Broken the official rpm builders (https://bugs.chromium.org/p/chromium/issues/detail?id=701585) and also causes an apparent regressing in the number of static initializes.

Original issue's description:
> Reland of Update linux sysroot images from debian/wheezy to debian/jessie (patchset chromium#1 id:1 of https://codereview.chromium.org/2743253004/ )
>
> Reason for revert:
> Linux bot has now been upgraded
>
> Original issue's description:
> > Revert of Update linux sysroot images from debian/wheezy to debian/jessie (patchset chromium#8 id:140001 of https://codereview.chromium.org/2361223002/ )
> >
> > Reason for revert:
> > Broke the linux builder which it seems is still on Precise.
> >
> > Original issue's description:
> > > Update linux sysroot images from debian/wheezy to debian/jessie
> > >
> > > BUG=564904
> > >
> > > Review-Url: https://codereview.chromium.org/2361223002
> > > Cr-Commit-Position: refs/heads/master@{#456441}
> > > Committed: https://chromium.googlesource.com/chromium/src/+/8d4f1d731faf1e9564985cbec05e840e9207bef9
> >
> > TBR=phajdan.jr@chromium.org,thestig@chromium.org,thomasanderson@google.com,dpranke@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=564904
> >
> > Review-Url: https://codereview.chromium.org/2743253004
> > Cr-Commit-Position: refs/heads/master@{#456449}
> > Committed: https://chromium.googlesource.com/chromium/src/+/189891d210bb98c91e155d4794dffa03d95f1e15
>
> TBR=phajdan.jr@chromium.org,thestig@chromium.org,thomasanderson@google.com,dpranke@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=564904
>
> Review-Url: https://codereview.chromium.org/2755483002
> Cr-Commit-Position: refs/heads/master@{#456758}
> Committed: https://chromium.googlesource.com/chromium/src/+/79d4fc169a9af62228134cf4c60714dbbe4659dd

TBR=phajdan.jr@chromium.org,thestig@chromium.org,thomasanderson@google.com,dpranke@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=564904

Review-Url: https://codereview.chromium.org/2754443003
Cr-Commit-Position: refs/heads/master@{#456900}
  • Loading branch information
sbc100 authored and Commit bot committed Mar 14, 2017
1 parent 9683d88 commit d93f0e0
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 36 deletions.
18 changes: 12 additions & 6 deletions build/config/sysroot.gni
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ declare_args() {
target_sysroot_dir = ""

use_sysroot = true

# TODO(tonikitoo): Remove this arg when wheezy is finally dropped and we
# can just use debian/jessie everywhere by default. crbug.com/564904.
use_jessie_sysroot = false
}

if (is_linux && target_sysroot_dir != "") {
Expand Down Expand Up @@ -53,18 +57,20 @@ if (is_linux && target_sysroot_dir != "") {
# functionality where possible) needs to run on the buliders, which are
# running precise. The precise build has a different set of dependencies
# from the wheezy build, so we cannot use the wheezy sysroot.
# TODO(sbc): This condition can perhaps be eliminated now that we are
# using jessie rather than wheezy.
sysroot = "//build/linux/ubuntu_precise_amd64-sysroot"
} else {
if (current_cpu == "x64") {
sysroot = "//build/linux/debian_jessie_amd64-sysroot"
sysroot = "//build/linux/debian_wheezy_amd64-sysroot"

if (use_jessie_sysroot) {
sysroot = "//build/linux/debian_jessie_amd64-sysroot"
}
} else if (current_cpu == "x86") {
sysroot = "//build/linux/debian_jessie_i386-sysroot"
sysroot = "//build/linux/debian_wheezy_i386-sysroot"
} else if (current_cpu == "mipsel") {
sysroot = "//build/linux/debian_jessie_mips-sysroot"
sysroot = "//build/linux/debian_wheezy_mips-sysroot"
} else if (current_cpu == "arm") {
sysroot = "//build/linux/debian_jessie_arm-sysroot"
sysroot = "//build/linux/debian_wheezy_arm-sysroot"
} else if (current_cpu == "arm64") {
sysroot = "//build/linux/debian_jessie_arm64-sysroot"
} else {
Expand Down
58 changes: 33 additions & 25 deletions build/linux/sysroot_scripts/install-sysroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
"""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.
# 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 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.

import hashlib
import json
Expand Down Expand Up @@ -135,6 +134,14 @@ def InstallDefaultSysroots(host_arch):
if target_arch and target_arch not in (host_arch, 'i386'):
InstallDefaultSysrootForArch(target_arch)

# Desktop Linux ozone builds require libxkbcommon* which is not
# available in Wheezy.
# TODO(thomasanderson): Remove this once the Jessie sysroot is used
# by default.
gyp_defines = gyp_chromium.GetGypVars(gyp_chromium.GetSupplementalFiles())
if gyp_defines.get('use_ozone') == '1':
InstallSysroot('Jessie', 'amd64')


def main(args):
parser = optparse.OptionParser('usage: %prog [OPTIONS]', description=__doc__)
Expand All @@ -143,9 +150,6 @@ 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
Expand All @@ -156,23 +160,27 @@ def main(args):
if host_arch in ['ppc','s390']:
return 0
InstallDefaultSysroots(host_arch)
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
if not options.arch:
print 'You much specify either --arch or --running-as-hook'
return 1
InstallDefaultSysrootForArch(options.arch)

return 0


def InstallDefaultSysrootForArch(target_arch):
if target_arch not in VALID_ARCHS:
if target_arch == 'amd64':
InstallSysroot('Wheezy', 'amd64')
elif target_arch == 'arm':
InstallSysroot('Wheezy', 'arm')
elif target_arch == 'arm64':
InstallSysroot('Jessie', 'arm64')
elif target_arch == 'i386':
InstallSysroot('Wheezy', 'i386')
elif target_arch == 'mips':
InstallSysroot('Wheezy', 'mips')
else:
raise Error('Unknown architecture: %s' % target_arch)
InstallSysroot('Jessie', target_arch)


def InstallSysroot(target_platform, target_arch):
# The sysroot directory should match the one specified in build/common.gypi.
Expand Down
4 changes: 0 additions & 4 deletions tools/checklicenses/checklicenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,6 @@ def PrintUsage():

# Don't check sysroot directories
'build/linux/debian_jessie_arm64-sysroot',
'build/linux/debian_jessie_amd64-sysroot',
'build/linux/debian_jessie_arm-sysroot',
'build/linux/debian_jessie_i386-sysroot',
'build/linux/debian_jessie_mips-sysroot',
'build/linux/debian_wheezy_amd64-sysroot',
'build/linux/debian_wheezy_arm-sysroot',
'build/linux/debian_wheezy_i386-sysroot',
Expand Down
2 changes: 1 addition & 1 deletion tools/mb/mb_config.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@
'gn_args': ('ozone_auto_platforms=false ozone_platform_wayland=true '
'ozone_platform_x11=true ozone_platform_gbm=true '
'enable_package_mash_services=true use_ash=false '
'use_xkbcommon=true'),
'use_jessie_sysroot=true use_xkbcommon=true'),
},

'pdf_xfa': {
Expand Down

0 comments on commit d93f0e0

Please sign in to comment.