From f2296e4fcaef7fdced40ebf3ca736d5dc58c66cd Mon Sep 17 00:00:00 2001 From: thomasanderson Date: Fri, 24 Mar 2017 14:16:03 -0700 Subject: [PATCH] Revert of "Update linux sysroot from Wheezy to Jessie" (patchset #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} --- build/config/sysroot.gni | 18 ++++-- .../linux/sysroot_scripts/install-sysroot.py | 58 +++++++++++-------- .../linux/debian/expected_deps_ia32_jessie | 17 +++--- .../linux/debian/expected_deps_x64_jessie | 2 +- chrome/installer/linux/rpm/expected_deps_i386 | 6 +- .../installer/linux/rpm/expected_deps_x86_64 | 5 +- tools/checklicenses/checklicenses.py | 4 -- tools/copyright_scanner/copyright_scanner.py | 5 +- tools/mb/mb_config.pyl | 2 +- ui/ozone/platform/drm/gpu/drm_device.cc | 12 ++++ 10 files changed, 72 insertions(+), 57 deletions(-) diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni index 5ea877752a790f..2bcd6caae1e9a4 100644 --- a/build/config/sysroot.gni +++ b/build/config/sysroot.gni @@ -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 != "") { @@ -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 { diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py index c8e88ee0a8ab2b..d79c12bbbbcef4 100755 --- a/build/linux/sysroot_scripts/install-sysroot.py +++ b/build/linux/sysroot_scripts/install-sysroot.py @@ -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 @@ -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__) @@ -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 @@ -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. diff --git a/chrome/installer/linux/debian/expected_deps_ia32_jessie b/chrome/installer/linux/debian/expected_deps_ia32_jessie index 8b472b1c8853ad..600a2ea8e5a149 100644 --- a/chrome/installer/linux/debian/expected_deps_ia32_jessie +++ b/chrome/installer/linux/debian/expected_deps_ia32_jessie @@ -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) diff --git a/chrome/installer/linux/debian/expected_deps_x64_jessie b/chrome/installer/linux/debian/expected_deps_x64_jessie index f9ec3e32cb8a6e..3f76b8ac70850d 100644 --- a/chrome/installer/linux/debian/expected_deps_x64_jessie +++ b/chrome/installer/linux/debian/expected_deps_x64_jessie @@ -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) diff --git a/chrome/installer/linux/rpm/expected_deps_i386 b/chrome/installer/linux/rpm/expected_deps_i386 index 1d5f54d7b181d0..308cd60227bfd0 100644 --- a/chrome/installer/linux/rpm/expected_deps_i386 +++ b/chrome/installer/linux/rpm/expected_deps_i386 @@ -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 @@ -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) @@ -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 @@ -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 diff --git a/chrome/installer/linux/rpm/expected_deps_x86_64 b/chrome/installer/linux/rpm/expected_deps_x86_64 index da09bcc6683400..ddaf4159bdb99e 100644 --- a/chrome/installer/linux/rpm/expected_deps_x86_64 +++ b/chrome/installer/linux/rpm/expected_deps_x86_64 @@ -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) @@ -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) diff --git a/tools/checklicenses/checklicenses.py b/tools/checklicenses/checklicenses.py index 0e28311eba9dce..3d27b0f2a06b19 100755 --- a/tools/checklicenses/checklicenses.py +++ b/tools/checklicenses/checklicenses.py @@ -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', diff --git a/tools/copyright_scanner/copyright_scanner.py b/tools/copyright_scanner/copyright_scanner.py index c6118aa846ce2a..6e99354feed166 100644 --- a/tools/copyright_scanner/copyright_scanner.py +++ b/tools/copyright_scanner/copyright_scanner.py @@ -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. diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 9960d45eb7e5e5..bcc80bf45efa83 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl @@ -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': { diff --git a/ui/ozone/platform/drm/gpu/drm_device.cc b/ui/ozone/platform/drm/gpu/drm_device.cc index 81098fa72cb158..f2e2d724584cb4 100644 --- a/ui/ozone/platform/drm/gpu/drm_device.cc +++ b/ui/ozone/platform/drm/gpu/drm_device.cc @@ -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); }