Merge pull request #158036 from primeos/chromium-backport

[21.11] Prepare for backporting Chromium M98
This commit is contained in:
Michael Weiss
2022-02-04 22:08:26 +01:00
committed by GitHub
5 changed files with 68 additions and 29 deletions

View File

@@ -161,6 +161,21 @@ let
./patches/no-build-timestamps.patch
# For bundling Widevine (DRM), might be replaceable via bundle_widevine_cdm=true in gnFlags:
./patches/widevine-79.patch
] ++ lib.optionals (versionRange "97" "98") [
# A critical Ozone/Wayland fix:
# (Note: The patch for surface_augmenter.cc doesn't apply on M97 so we extract that part.)
(fetchpatch {
# [linux/wayland] Fixed terminate caused by binding to wrong version.
url = "https://github.com/chromium/chromium/commit/dd4c3ddadbb9869f59cee201a38e9ca3b9154f4d.patch";
excludes = [ "ui/ozone/platform/wayland/host/surface_augmenter.cc" ];
sha256 = "sha256-lp4kxPNAkafdE9NfD3ittTCpomRpX9Hqhtt9GFf4Ntw=";
})
./patches/m97-ozone-wayland-fix-surface_augmenter.patch
(githubPatch {
# [linux/wayland] Fixed terminate caused by binding to wrong version. (fixup)
commit = "a84b79daa8897b822336b8f348ef4daaae07af37";
sha256 = "sha256-2x6/rGGzTC6lKLMkVyD9RNCTsMVrtRQyr/NjSpaj2is=";
})
];
postPatch = ''
@@ -266,7 +281,7 @@ let
google_api_key = "AIzaSyDGi15Zwl11UNe6Y-5XW_upsfyw31qwZPI";
# Optional features:
use_gio = gnomeSupport;
use_gio = gnomeSupport || chromiumVersionAtLeast "99";
use_gnome_keyring = gnomeKeyringSupport;
use_cups = cupsSupport;

View File

@@ -39,7 +39,7 @@ for entry in feed.entries:
print('chromium: TODO -> ' + version + '\n')
print(url)
if fixes := re.search(r'This update includes .+ security fixes\.', content).group(0):
zero_days = re.search(r'Google is aware( of reports)? that .+ in the wild\.', content)
zero_days = re.search(r'Google is aware( of reports)? th(e|at) .+ in the wild\.', content)
if zero_days:
fixes += " " + zero_days.group(0)
print('\n' + '\n'.join(textwrap.wrap(fixes, width=72)))

View File

@@ -0,0 +1,31 @@
diff --git a/ui/ozone/platform/wayland/host/surface_augmenter.cc b/ui/ozone/platform/wayland/host/surface_augmenter.cc
index d971d15e71426..6e5408398bcea 100644
--- a/ui/ozone/platform/wayland/host/surface_augmenter.cc
+++ b/ui/ozone/platform/wayland/host/surface_augmenter.cc
@@ -13,7 +13,8 @@
namespace ui {
namespace {
-constexpr uint32_t kMaxSurfaceAugmenterVersion = 1;
+constexpr uint32_t kMinVersion = 1;
+constexpr uint32_t kMaxVersion = 1;
}
// static
@@ -27,11 +28,13 @@ void SurfaceAugmenter::Instantiate(WaylandConnection* connection,
uint32_t version) {
DCHECK_EQ(interface, kInterfaceName);
- if (connection->surface_augmenter_)
+ if (connection->surface_augmenter_ ||
+ !wl::CanBind(interface, version, kMinVersion, kMaxVersion)) {
return;
+ }
- auto augmenter = wl::Bind<surface_augmenter>(
- registry, name, std::min(version, kMaxSurfaceAugmenterVersion));
+ auto augmenter = wl::Bind<surface_augmenter>(registry, name,
+ std::min(version, kMaxVersion));
if (!augmenter) {
LOG(ERROR) << "Failed to bind surface_augmenter";
return;

View File

@@ -19,22 +19,9 @@
}
},
"beta": {
"version": "97.0.4692.71",
"sha256": "0z7ximvm4a78kxyp4j0i2jzklxazpw6jcqi9jkaf8bvq9ga8kqca",
"sha256bin64": "18wr4pgzfcvvdpvvxhpd4as2qnyggq9f8z90ikdz8yj8i71l5wnc",
"deps": {
"gn": {
"version": "2021-11-03",
"url": "https://gn.googlesource.com/gn",
"rev": "90294ccdcf9334ed25a76ac9b67689468e506342",
"sha256": "0n0jml8s00ayy186jzrf207hbz70pxiq426znxwxd4gjcp60scsa"
}
}
},
"dev": {
"version": "98.0.4758.9",
"sha256": "1sq6v2hdhpk12w37sz7jf5vwkn72ydcqzcxysf7hs2flcfgscydj",
"sha256bin64": "1jfj08jpxji2q890zbvpvmgf5bjqgvigkr1hg8ch8vaaybs5wr04",
"version": "98.0.4758.80",
"sha256": "0wa1jhsw7qrym4x8wxmdvdvbilb8jdv0mizzib2342l61zi6cwn8",
"sha256bin64": "12a69cbv2sbrly6g477ln4pssh8n1rdg6mr6cc17iy2jhfihry0q",
"deps": {
"gn": {
"version": "2021-12-07",
@@ -44,6 +31,19 @@
}
}
},
"dev": {
"version": "99.0.4844.16",
"sha256": "0xig6l1yx9glgb1a53idncnqc1imjvbszi5mrp39yvijarmx8s1f",
"sha256bin64": "18p2hqykizijb9w96dm8yxwgvpjx37vabyw6n9wc59l6wyhbjkkw",
"deps": {
"gn": {
"version": "2022-01-10",
"url": "https://gn.googlesource.com/gn",
"rev": "80a40b07305373617eba2d5878d353532af77da3",
"sha256": "1103lf38h7412949j6nrk48m2vv2rrxacn42sjg33lg88nyv7skv"
}
}
},
"ungoogled-chromium": {
"version": "97.0.4692.99",
"sha256": "1fpc07zvashaqqalwn7wxnswxclrxvhjrxy1rzr6gcq5awhaw6y9",

View File

@@ -5,7 +5,7 @@
, libXcursor, libXext, libXfixes, libXrender, libXScrnSaver, libXcomposite, libxcb
, alsa-lib, libXdamage, libXtst, libXrandr, libxshmfence, expat, cups
, dbus, gtk3, gdk-pixbuf, gcc-unwrapped, at-spi2-atk, at-spi2-core
, libkrb5, libdrm, mesa
, libkrb5, libdrm, libglvnd, mesa
, libxkbcommon, pipewire, wayland # ozone/wayland
# Command line programs
@@ -44,7 +44,7 @@
, libvaSupport ? true, libva
# For Vulkan support (--enable-features=Vulkan)
, vulkanSupport ? true, vulkan-loader
, addOpenGLRunpath
}:
with lib;
@@ -66,11 +66,10 @@ let
liberation_ttf curl util-linux xdg-utils wget
flac harfbuzz icu libpng opusWithCustomModes snappy speechd
bzip2 libcap at-spi2-atk at-spi2-core
libkrb5 libdrm mesa coreutils
libkrb5 libdrm libglvnd mesa coreutils
libxkbcommon pipewire wayland
] ++ optional pulseSupport libpulseaudio
++ optional libvaSupport libva
++ optional vulkanSupport vulkan-loader
++ [ gtk3 ];
suffix = if channel != "stable" then "-" + channel else "";
@@ -119,12 +118,6 @@ in stdenv.mkDerivation {
cp -a opt/* $out/share
cp -a usr/share/* $out/share
# To fix --use-gl=egl:
test -e $out/share/google/$appname/libEGL.so
ln -s libEGL.so $out/share/google/$appname/libEGL.so.1
test -e $out/share/google/$appname/libGLESv2.so
ln -s libGLESv2.so $out/share/google/$appname/libGLESv2.so.2
substituteInPlace $out/share/applications/google-$appname.desktop \
--replace /usr/bin/google-chrome-$dist $exe
substituteInPlace $out/share/gnome-control-center/default-apps/google-$appname.xml \
@@ -149,7 +142,7 @@ in stdenv.mkDerivation {
makeWrapper "$out/share/google/$appname/google-$appname" "$exe" \
--prefix LD_LIBRARY_PATH : "$rpath" \
--prefix PATH : "$binpath" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH:${addOpenGLRunpath.driverLink}/share" \
--add-flags ${escapeShellArg commandLineArgs}
for elf in $out/share/google/$appname/{chrome,chrome-sandbox,${crashpadHandlerBinary},nacl_helper}; do