Merge pull request #75516 from ivan/chromium-79.0.3945.79

chromium: 78.0.3904.108 -> 79.0.3945.79
This commit is contained in:
Graham Christensen 2019-12-15 14:48:34 -05:00 committed by GitHub
commit aa4a1b01d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 78 additions and 72 deletions

View File

@ -23,7 +23,6 @@
, libva ? null # useVaapi , libva ? null # useVaapi
# package customization # package customization
, enableNaCl ? false
, useVaapi ? false , useVaapi ? false
, gnomeSupport ? false, gnome ? null , gnomeSupport ? false, gnome ? null
, gnomeKeyringSupport ? false, libgnome-keyring3 ? null , gnomeKeyringSupport ? false, libgnome-keyring3 ? null
@ -136,10 +135,8 @@ let
./patches/nix_plugin_paths_68.patch ./patches/nix_plugin_paths_68.patch
./patches/remove-webp-include-69.patch ./patches/remove-webp-include-69.patch
./patches/no-build-timestamps.patch ./patches/no-build-timestamps.patch
] ++ optionals (channel == "stable") [
./patches/widevine.patch
] ++ optionals (channel == "beta" || channel == "dev") [
./patches/widevine-79.patch ./patches/widevine-79.patch
./patches/dont-use-ANGLE-by-default.patch
# Unfortunately, chromium regularly breaks on major updates and # Unfortunately, chromium regularly breaks on major updates and
# then needs various patches backported in order to be compiled with GCC. # then needs various patches backported in order to be compiled with GCC.
# Good sources for such patches and other hints: # Good sources for such patches and other hints:
@ -230,7 +227,12 @@ let
use_sysroot = false; use_sysroot = false;
use_gnome_keyring = gnomeKeyringSupport; use_gnome_keyring = gnomeKeyringSupport;
use_gio = gnomeSupport; use_gio = gnomeSupport;
enable_nacl = enableNaCl; # ninja: error: '../../native_client/toolchain/linux_x86/pnacl_newlib/bin/x86_64-nacl-objcopy',
# needed by 'nacl_irt_x86_64.nexe', missing and no known rule to make it
enable_nacl = false;
# Enabling the Widevine component here doesn't affect whether we can
# redistribute the chromium package; the Widevine component is either
# added later in the wrapped -wv build or downloaded from Google.
enable_widevine = true; enable_widevine = true;
use_cups = cupsSupport; use_cups = cupsSupport;

View File

@ -1,4 +1,4 @@
{ newScope, config, stdenv, llvmPackages_8 { newScope, config, stdenv, llvmPackages_9
, makeWrapper, ed , makeWrapper, ed
, glib, gtk3, gnome3, gsettings-desktop-schemas , glib, gtk3, gnome3, gsettings-desktop-schemas
, libva ? null , libva ? null
@ -7,7 +7,6 @@
# package customization # package customization
, channel ? "stable" , channel ? "stable"
, enableNaCl ? false
, gnomeSupport ? false, gnome ? null , gnomeSupport ? false, gnome ? null
, gnomeKeyringSupport ? false , gnomeKeyringSupport ? false
, proprietaryCodecs ? true , proprietaryCodecs ? true
@ -20,8 +19,8 @@
}: }:
let let
stdenv = llvmPackages_8.stdenv; stdenv = llvmPackages_9.stdenv;
llvmPackages = llvmPackages_8; llvmPackages = llvmPackages_9;
callPackage = newScope chromium; callPackage = newScope chromium;
@ -31,9 +30,7 @@ let
upstream-info = (callPackage ./update.nix {}).getChannel channel; upstream-info = (callPackage ./update.nix {}).getChannel channel;
mkChromiumDerivation = callPackage ./common.nix { mkChromiumDerivation = callPackage ./common.nix {
inherit enableNaCl gnomeSupport gnome inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useVaapi;
gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport
useVaapi;
}; };
browser = callPackage ./browser.nix { inherit channel enableWideVine; }; browser = callPackage ./browser.nix { inherit channel enableWideVine; };
@ -44,8 +41,8 @@ let
}; };
mkrpath = p: "${lib.makeSearchPathOutput "lib" "lib64" p}:${lib.makeLibraryPath p}"; mkrpath = p: "${lib.makeSearchPathOutput "lib" "lib64" p}:${lib.makeLibraryPath p}";
widevine = let upstream-info = chromium.upstream-info; in stdenv.mkDerivation { widevineCdm = let upstream-info = chromium.upstream-info; in stdenv.mkDerivation {
name = "chromium-binary-plugin-widevine"; name = "chrome-widevine-cdm";
# The .deb file for Google Chrome # The .deb file for Google Chrome
src = upstream-info.binary; src = upstream-info.binary;
@ -55,21 +52,25 @@ let
phases = [ "unpackPhase" "patchPhase" "installPhase" "checkPhase" ]; phases = [ "unpackPhase" "patchPhase" "installPhase" "checkPhase" ];
unpackCmd = let unpackCmd = let
soPath = widevineCdmPath =
if upstream-info.channel == "stable" then if upstream-info.channel == "stable" then
"./opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so" "./opt/google/chrome/WidevineCdm"
else if upstream-info.channel == "beta" then else if upstream-info.channel == "beta" then
"./opt/google/chrome-beta/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so" "./opt/google/chrome-beta/WidevineCdm"
else if upstream-info.channel == "dev" then else if upstream-info.channel == "dev" then
"./opt/google/chrome-unstable/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so" "./opt/google/chrome-unstable/WidevineCdm"
else else
throw "Unknown chromium channel."; throw "Unknown chromium channel.";
in '' in ''
mkdir -p plugins # Extract just WidevineCdm from upstream's .deb file
# Extract just libwidevinecdm.so from upstream's .deb file ar p "$src" data.tar.xz | tar xJ "${widevineCdmPath}"
ar p "$src" data.tar.xz | tar xJ -C plugins ${soPath}
mv plugins/${soPath} plugins/ # Move things around so that we don't have to reference a particular
rm -rf plugins/opt # chrome-* directory later.
mv "${widevineCdmPath}" ./
# unpackCmd wants a single output directory; let it take WidevineCdm/
rm -rf opt
''; '';
doCheck = true; doCheck = true;
@ -80,12 +81,12 @@ let
PATCH_RPATH = mkrpath [ gcc.cc glib nspr nss ]; PATCH_RPATH = mkrpath [ gcc.cc glib nspr nss ];
patchPhase = '' patchPhase = ''
patchelf --set-rpath "$PATCH_RPATH" libwidevinecdm.so patchelf --set-rpath "$PATCH_RPATH" _platform_specific/linux_x64/libwidevinecdm.so
''; '';
installPhase = '' installPhase = ''
install -vD libwidevinecdm.so \ mkdir -p $out/WidevineCdm
"$out/lib/libwidevinecdm.so" cp -a * $out/WidevineCdm/
''; '';
meta = { meta = {
@ -102,15 +103,14 @@ let
# We want users to be able to enableWideVine without rebuilding all of # We want users to be able to enableWideVine without rebuilding all of
# chromium, so we have a separate derivation here that copies chromium # chromium, so we have a separate derivation here that copies chromium
# and adds the unfree libwidevinecdm.so. # and adds the unfree WidevineCdm.
chromiumWV = let browser = chromium.browser; in if enableWideVine then chromiumWV = let browser = chromium.browser; in if enableWideVine then
runCommand (browser.name + "-wv") { version = browser.version; } runCommand (browser.name + "-wv") { version = browser.version; }
'' ''
mkdir -p $out mkdir -p $out
cp -a ${browser}/* $out/ cp -a ${browser}/* $out/
chmod u+w $out/libexec/chromium chmod u+w $out/libexec/chromium
mkdir -p $out/libexec/chromium/WidevineCdm/_platform_specific/linux_x64 cp -a ${widevineCdm}/WidevineCdm $out/libexec/chromium/
cp ${widevine}/lib/libwidevinecdm.so $out/libexec/chromium/WidevineCdm/_platform_specific/linux_x64/
'' ''
else browser; else browser;
in stdenv.mkDerivation { in stdenv.mkDerivation {

View File

@ -0,0 +1,26 @@
A field trial currently enables the passthrough command decoder, which causes
gl_factory.cc to try kGLImplementationEGLANGLE first, which causes Chromium to fail
to load libGLESv2.so on NixOS. It somehow does not try kGLImplementationDesktopGL,
and so there is no GL support at all.
Revert to using the validating command decoder, which prevents gl_factory.cc
from touching allowed_impls, allowing it to successfully use kGLImplementationDesktopGL.
diff --git a/ui/gl/gl_utils.cc b/ui/gl/gl_utils.cc
index 697cbed5fe2d..8419bdb21a2f 100644
--- a/ui/gl/gl_utils.cc
+++ b/ui/gl/gl_utils.cc
@@ -71,9 +71,10 @@ bool UsePassthroughCommandDecoder(const base::CommandLine* command_line) {
} else if (switch_value == kCmdDecoderValidatingName) {
return false;
} else {
- // Unrecognized or missing switch, use the default.
- return base::FeatureList::IsEnabled(
- features::kDefaultPassthroughCommandDecoder);
+ // Ignore the field trial that enables it; disable it until
+ // gl_factory.cc kGLImplementationEGLANGLE issues are sorted
+ // out on NixOS.
+ return false;
}
}
}

View File

@ -1,11 +1,13 @@
diff --git a/third_party/widevine/cdm/widevine_cdm_version.h b/third_party/widevine/cdm/widevine_cdm_version.h diff --git a/third_party/widevine/cdm/BUILD.gn b/third_party/widevine/cdm/BUILD.gn
index dd6efed02646..4d8b2b7d85f7 100644 index ed0e2f5208b..5b431a030d5 100644
--- a/third_party/widevine/cdm/widevine_cdm_version.h --- a/third_party/widevine/cdm/BUILD.gn
+++ b/third_party/widevine/cdm/widevine_cdm_version.h +++ b/third_party/widevine/cdm/BUILD.gn
@@ -11,5 +11,6 @@ @@ -14,7 +14,7 @@ buildflag_header("buildflags") {
// If the Widevine CDM is available define the following:
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
+#define WIDEVINE_CDM_VERSION_STRING "undefined"
#endif // WIDEVINE_CDM_VERSION_H_ flags = [
"ENABLE_WIDEVINE=$enable_widevine",
- "BUNDLE_WIDEVINE_CDM=$bundle_widevine_cdm",
+ "BUNDLE_WIDEVINE_CDM=true",
"ENABLE_WIDEVINE_CDM_COMPONENT=$enable_widevine_cdm_component",
]
}

View File

@ -1,24 +0,0 @@
Description: enable widevine and set its version string to "undefined"
Author: Michael Gilbert <mgilbert@debian.org>
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
--- a/third_party/widevine/cdm/widevine_cdm_version.h
+++ b/third_party/widevine/cdm/widevine_cdm_version.h
@@ -11,5 +11,6 @@
// If the Widevine CDM is available define the following:
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
+#define WIDEVINE_CDM_VERSION_STRING "undefined"
#endif // WIDEVINE_CDM_VERSION_H_
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -99,7 +99,7 @@
// Registers Widevine CDM if Widevine is enabled, the Widevine CDM is
// bundled and not a component. When the Widevine CDM is a component, it is
// registered in widevine_cdm_component_installer.cc.
-#if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
+#if !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
#define REGISTER_BUNDLED_WIDEVINE_CDM
#include "third_party/widevine/cdm/widevine_cdm_common.h" // nogncheck
// TODO(crbug.com/663554): Needed for WIDEVINE_CDM_VERSION_STRING. Support

View File

@ -1,18 +1,18 @@
# This file is autogenerated from update.sh in the same directory. # This file is autogenerated from update.sh in the same directory.
{ {
beta = { beta = {
sha256 = "0sm6x4z6i6p292l98k0h0v69f29hgfd9l46jg8xbh2jzg9f5fp78"; sha256 = "1wxw4l4hhk91x7drcamaxvh03ckxwv5567ccmpk743vb74nkd9z1";
sha256bin64 = "1yvy0d2h09cf1w42c93kpw66a2v9yn079zs6qjiqzs07yzxvxjdm"; sha256bin64 = "1fzgdfph2jj3rac868y3r0mlgqj740bivrgh1nq51v3ni507366n";
version = "79.0.3945.36"; version = "79.0.3945.79";
}; };
dev = { dev = {
sha256 = "0zf434ijk6zw37fricnkb1968nhmb7zlfivf59nx9yh7irbwb4hm"; sha256 = "18ijz7ailnmmz6b9n1jkdj0v8wiqdr845xzi0f7n5xcp4wf7xafk";
sha256bin64 = "1fphf8pwbbirs9fiislg3vav8c4a393lz487sa7f90mzsx84ffiz"; sha256bin64 = "19irp7x44h49cs1wvwv34jl0inwxk0g6vb44p4ab1jmfmdznv9lx";
version = "80.0.3964.0"; version = "80.0.3983.2";
}; };
stable = { stable = {
sha256 = "03jvfz68nvmmrplygf96sh0l347p4h03c8vpw8yrglh6ycwkiigr"; sha256 = "1wxw4l4hhk91x7drcamaxvh03ckxwv5567ccmpk743vb74nkd9z1";
sha256bin64 = "1knsrdh4vj1zl3v1frzrvzg0pwb64zhq2il7pwskrfcbmsj3gkh6"; sha256bin64 = "0dygich61ldy20bqcc84c396vkarmjp1syhyslzkg9kwn9xzr7gb";
version = "78.0.3904.108"; version = "79.0.3945.79";
}; };
} }