Skip to content

Commit

Permalink
Revert of "Update linux sysroot from Wheezy to Jessie" (patchset chro…
Browse files Browse the repository at this point in the history
…mium#1 id:1 of https://codereview.chromium.org/2772503005/ )

Reason for revert:
expected_deps_x64_jessie changes are causing a failure on the official builder

https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.chrome%2FGoogle_Chrome_Linux_x64%2F16997%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout

Original issue's description:
> Reland of "Update linux sysroot from Wheezy to Jessie"
>
> The last version of this change was:
> https://codereview.chromium.org/2748183005
>
> Which was reverted in:
> https://codereview.chromium.org/2776503002
>
> I've updated the expected package deps again, this
> time being sure to use is_chrome_branded=true when
> testing (which oddly seems to effect the deps).
>
> TBR=thestig (since this is effectively a reland)
> BUG=701894
>
> Review-Url: https://codereview.chromium.org/2772503005
> Cr-Commit-Position: refs/heads/master@{#459492}
> Committed: https://chromium.googlesource.com/chromium/src/+/7f43e46a7830cb92c08b8245f7f48f0d3a2fab47

TBR=thakis@chromium.org,dpranke@chromium.org,thestig@chromium.org,sbc@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=701894

Review-Url: https://codereview.chromium.org/2772113002
Cr-Commit-Position: refs/heads/master@{#459553}
  • Loading branch information
tanderson-google authored and Commit bot committed Mar 24, 2017
1 parent 9b6d55f commit f2296e4
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 57 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
17 changes: 8 additions & 9 deletions chrome/installer/linux/debian/expected_deps_ia32_jessie
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
gconf-service
libasound2 (>= 1.0.16)
libatk1.0-0 (>= 1.12.4)
libc6 (>= 2.3.6-6~)
libc6 (>= 2.9)
libc6 (>= 2.11)
libcairo2 (>= 1.2.4)
libcups2 (>= 1.4.0)
libdbus-1-3 (>= 1.2.14)
libexpat1 (>= 2.0.1)
libfontconfig1 (>= 2.11)
libfreetype6 (>= 2.4.2)
libfontconfig1 (>= 2.9.0)
libfreetype6 (>= 2.3.9)
libgcc1 (>= 1:4.1.1)
libgconf-2-4 (>= 3.2.5)
libgconf-2-4 (>= 2.31.1)
libgdk-pixbuf2.0-0 (>= 2.22.0)
libglib2.0-0 (>= 2.31.8)
libglib2.0-0 (>= 2.26.0)
libgtk2.0-0 (>= 2.24.0)
libnspr4 (>= 2:4.9-2~)
libnss3 (>= 2:3.13.4-2~)
libnspr4 (>= 2:4.9-2~) | libnspr4-0d (>= 1.8.0.10)
libnss3 (>= 2:3.13.4-2~) | libnss3-1d (>= 3.12.4)
libpango-1.0-0 (>= 1.14.0)
libpangocairo-1.0-0 (>= 1.14.0)
libstdc++6 (>= 4.8.1)
libstdc++6 (>= 4.6)
libx11-6 (>= 2:1.4.99.1)
libx11-xcb1
libxcb1 (>= 1.6)
Expand Down
2 changes: 1 addition & 1 deletion chrome/installer/linux/debian/expected_deps_x64_jessie
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ libatk1.0-0 (>= 1.12.4)
libc6 (>= 2.15)
libcairo2 (>= 1.6.0)
libcups2 (>= 1.4.0)
libdbus-1-3 (>= 1.2.14)
libdbus-1-3 (>= 1.1.4)
libexpat1 (>= 2.0.1)
libfontconfig1 (>= 2.11)
libfreetype6 (>= 2.3.9)
Expand Down
6 changes: 2 additions & 4 deletions chrome/installer/linux/rpm/expected_deps_i386
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ld-linux.so.2
ld-linux.so.2(GLIBC_2.0)
ld-linux.so.2(GLIBC_2.1)
libX11-xcb.so.1
libX11.so.6
Expand All @@ -19,6 +18,7 @@ libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.11)
libc.so.6(GLIBC_2.2)
libc.so.6(GLIBC_2.2.3)
libc.so.6(GLIBC_2.3)
Expand All @@ -27,7 +27,6 @@ libc.so.6(GLIBC_2.3.4)
libc.so.6(GLIBC_2.4)
libc.so.6(GLIBC_2.6)
libc.so.6(GLIBC_2.7)
libc.so.6(GLIBC_2.9)
libcairo.so.2
libcups.so.2
libdbus-1.so.3
Expand Down Expand Up @@ -68,10 +67,9 @@ librt.so.1(GLIBC_2.2)
libsmime3.so
libstdc++.so.6
libstdc++.so.6(GLIBCXX_3.4)
libstdc++.so.6(GLIBCXX_3.4.10)
libstdc++.so.6(GLIBCXX_3.4.11)
libstdc++.so.6(GLIBCXX_3.4.14)
libstdc++.so.6(GLIBCXX_3.4.15)
libstdc++.so.6(GLIBCXX_3.4.18)
libstdc++.so.6(GLIBCXX_3.4.19)
libstdc++.so.6(GLIBCXX_3.4.9)
libxcb.so.1
5 changes: 1 addition & 4 deletions chrome/installer/linux/rpm/expected_deps_x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ libasound.so.2()(64bit)
libatk-1.0.so.0()(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.11)(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.15)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.2)(64bit)
Expand Down Expand Up @@ -61,10 +59,9 @@ librt.so.1(GLIBC_2.2.5)(64bit)
libsmime3.so()(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.10)(64bit)
libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
libstdc++.so.6(GLIBCXX_3.4.14)(64bit)
libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
libstdc++.so.6(GLIBCXX_3.4.18)(64bit)
libstdc++.so.6(GLIBCXX_3.4.19)(64bit)
libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
libxcb.so.1()(64bit)
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
5 changes: 2 additions & 3 deletions tools/copyright_scanner/copyright_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,13 @@ def FindFiles(input_api, root_dir, start_paths_list, excluded_dirs_list):
path_join('build', 'goma', 'client'),
# Ignore sysroots.
path_join('build', 'linux', 'debian_jessie_arm64-sysroot'),
path_join('build', 'linux', 'debian_jessie_arm-sysroot'),
path_join('build', 'linux', 'debian_jessie_mips-sysroot'),
path_join('build', 'linux', 'debian_jessie_i386-sysroot'),
path_join('build', 'linux', 'debian_wheezy_amd64-sysroot'),
path_join('build', 'linux', 'debian_wheezy_arm-sysroot'),
path_join('build', 'linux', 'debian_wheezy_mips-sysroot'),
path_join('build', 'linux', 'debian_wheezy_i386-sysroot'),
path_join('build', 'linux', 'ubuntu_precise_amd64-sysroot'),
# Old location (TODO(sbc): Remove this once it no longer exists on any bots)
path_join('chrome', 'installer', 'linux', 'debian_wheezy_arm-sysroot'),
# Data is not part of open source chromium, but are included on some bots.
path_join('data'),
# This is not part of open source chromium, but are included on some bots.
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 @@ -1834,7 +1834,7 @@
'ozone_platform="x11" '
'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
12 changes: 12 additions & 0 deletions ui/ozone/platform/drm/gpu/drm_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,18 @@ bool DrmDevice::CommitProperties(drmModeAtomicReq* properties,
bool DrmDevice::SetCapability(uint64_t capability, uint64_t value) {
DCHECK(file_.IsValid());

#ifndef DRM_IOCTL_SET_CLIENT_CAP
// drmSetClientCap was introduced in a later version of libdrm than the wheezy
// sysroot supplies.
// TODO(thomasanderson): Remove this when support for the wheezy sysroot is
// dropped in favor of jessie.
#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW(0x0d, struct drm_set_client_cap)
struct drm_set_client_cap {
__u64 capability;
__u64 value;
};
#endif

struct drm_set_client_cap cap = {capability, value};
return !drmIoctl(file_.GetPlatformFile(), DRM_IOCTL_SET_CLIENT_CAP, &cap);
}
Expand Down

0 comments on commit f2296e4

Please sign in to comment.