[arch-commits] Commit in chromium/trunk (5 files)

Evangelos Foutras foutrelis at archlinux.org
Tue Mar 2 20:55:47 UTC 2021


    Date: Tuesday, March 2, 2021 @ 20:55:46
  Author: foutrelis
Revision: 409075

upgpkg: chromium 89.0.4389.72-1: new upstream release

- build without OAuth2 credentials
- switch to PipeWire 0.3

Added:
  chromium/trunk/add-ctime-for-std-time.patch
  chromium/trunk/add-dependency-on-opus-in-webcodecs.patch
  chromium/trunk/use-oauth2-client-switches-as-default.patch
Modified:
  chromium/trunk/PKGBUILD
Deleted:
  chromium/trunk/subpixel-anti-aliasing-in-FreeType-2.8.1.patch

------------------------------------------------+
 PKGBUILD                                       |   55 ++++++------
 add-ctime-for-std-time.patch                   |   27 ++++++
 add-dependency-on-opus-in-webcodecs.patch      |   43 +++++++++
 subpixel-anti-aliasing-in-FreeType-2.8.1.patch |  100 -----------------------
 use-oauth2-client-switches-as-default.patch    |   17 +++
 5 files changed, 117 insertions(+), 125 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-03-02 20:12:47 UTC (rev 409074)
+++ PKGBUILD	2021-03-02 20:55:46 UTC (rev 409075)
@@ -4,22 +4,20 @@
 # Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
 
 pkgname=chromium
-pkgver=88.0.4324.182
+pkgver=89.0.4389.72
 pkgrel=1
 _launcher_ver=7
-_gcc_patchset=3
+_gcc_patchset=6
 pkgdesc="A web browser built for speed, simplicity, and security"
 arch=('x86_64')
 url="https://www.chromium.org/Home"
 license=('BSD')
 depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
-         'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils'
+         'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva'
          'desktop-file-utils' 'hicolor-icon-theme')
-makedepends=('python' 'python2' 'gperf' 'mesa' 'ninja' 'nodejs' 'git' 'libva'
-             'libpipewire02' 'clang' 'lld' 'gn' 'java-runtime-headless'
-             'python2-setuptools')
-optdepends=('libpipewire02: WebRTC desktop sharing under Wayland'
-            'libva: hardware-accelerated video decode [experimental]'
+makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
+             'java-runtime-headless' 'python2' 'python2-setuptools')
+optdepends=('pipewire: WebRTC desktop sharing under Wayland'
             'kdialog: needed for file dialogs in KDE'
             'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
             'kwallet: for storing passwords in KWallet on KDE desktops')
@@ -26,13 +24,17 @@
 source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
         https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz
         https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz
+        add-dependency-on-opus-in-webcodecs.patch
+        add-ctime-for-std-time.patch
         chromium-glibc-2.33.patch
-        subpixel-anti-aliasing-in-FreeType-2.8.1.patch)
-sha256sums=('30411fc3ec2d33df4c5cad41f21affa3823c80f7dbd394f6d68f9a1e81015b81'
+        use-oauth2-client-switches-as-default.patch)
+sha256sums=('946a0b65aad10e0f77a539103892099b7238310c733f25b41d58b76f6ac0bc4f'
             '86859c11cfc8ba106a3826479c0bc759324a62150b271dd35d1a0f96e890f52f'
-            'e5a60a4c9d0544d3321cc241b4c7bd4adb0a885f090c6c6c21581eac8e3b4ba9'
+            '359d2847e775d8cf6f4e0b12c94c8f2718f0fd562427859c596ce1c3711dbd8e'
+            'b86b11de8db438c47f0a84c7956740f648d21035f4ee46bfbd50c3348d369121'
+            '102e0c976c0d7fd1fbe2f2978ec621499a97b62457b3fde4daf84f026d1a53a7'
             '2fccecdcd4509d4c36af873988ca9dbcba7fdb95122894a9fdf502c33a1d7a4b'
-            '1e2913e21c491d546e05f9b4edf5a6c7a22d89ed0b36ef692ca6272bcd5faec6')
+            'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711')
 
 # Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
 # Keys are the names in the above script; values are the dependencies in Arch
@@ -63,9 +65,10 @@
 # Google API keys (see https://www.chromium.org/developers/how-tos/api-keys)
 # Note: These are for Arch Linux use ONLY. For your own distribution, please
 # get your own set of keys.
+#
+# Starting with Chromium 89 (2021-03-02) the OAuth2 credentials have been left
+# out: https://archlinux.org/news/chromium-losing-sync-support-in-early-march/
 _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
-_google_default_client_id=413772536636.apps.googleusercontent.com
-_google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4
 
 prepare() {
   cd "$srcdir/$pkgname-$pkgver"
@@ -80,17 +83,20 @@
     third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \
     third_party/libxml/chromium/*.cc
 
+  # Use the --oauth2-client-id= and --oauth2-client-secret= switches for
+  # setting GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET at
+  # runtime -- this allows signing into Chromium without baked-in values
+  patch -Np1 -i ../use-oauth2-client-switches-as-default.patch
+
   # https://crbug.com/1164975
   patch -Np1 -i ../chromium-glibc-2.33.patch
 
   # Upstream fixes
-  patch -Np1 -d third_party/skia <../subpixel-anti-aliasing-in-FreeType-2.8.1.patch
+  patch -Np1 -i ../add-dependency-on-opus-in-webcodecs.patch
+  patch -Np1 -i ../add-ctime-for-std-time.patch
 
   # Fixes for building with libstdc++ instead of libc++
-  patch -Np1 -i ../patches/chromium-87-openscreen-include.patch
-  patch -Np1 -i ../patches/chromium-88-CompositorFrameReporter-dcheck.patch
-  patch -Np1 -i ../patches/chromium-88-ideographicSpaceCharacter.patch
-  patch -Np1 -i ../patches/chromium-88-AXTreeFormatter-include.patch
+  patch -Np1 -i ../patches/chromium-89-quiche-dcheck.patch
 
   # Force script incompatible with Python 3 to use /usr/bin/python2
   sed -i '1s|python$|&2|' third_party/dom_distiller_js/protoc_plugins/*.py
@@ -111,7 +117,7 @@
       -delete
   done
 
-  python2 build/linux/unbundle/replace_gn_files.py \
+  ./build/linux/unbundle/replace_gn_files.py \
     --system-libraries "${!_system_libs[@]}"
 }
 
@@ -135,11 +141,13 @@
     'host_toolchain="//build/toolchain/linux/unbundle:default"'
     'clang_use_chrome_plugins=false'
     'is_official_build=true' # implies is_cfi=true on x86_64
+    'chrome_pgo_phase=0' # unsupported instrumentation profile format version
     'treat_warnings_as_errors=false'
     'fieldtrial_testing_like_official_build=true'
     'ffmpeg_branding="Chrome"'
     'proprietary_codecs=true'
     'rtc_use_pipewire=true'
+    'rtc_pipewire_version="0.3"' # will be the default in Chromium 90
     'link_pulseaudio=true'
     'use_gnome_keyring=false'
     'use_sysroot=false'
@@ -146,11 +154,8 @@
     'use_custom_libcxx=false'
     'enable_hangout_services_extension=true'
     'enable_widevine=true'
-    'use_vaapi=true'
     'enable_nacl=false'
-    "google_api_key=\"${_google_api_key}\""
-    "google_default_client_id=\"${_google_default_client_id}\""
-    "google_default_client_secret=\"${_google_default_client_secret}\""
+    "google_api_key=\"$_google_api_key\""
   )
 
   if [[ -n ${_system_libs[icu]+set} ]]; then
@@ -170,7 +175,7 @@
   CFLAGS+='   -Wno-unknown-warning-option'
   CXXFLAGS+=' -Wno-unknown-warning-option'
 
-  gn gen out/Release --args="${_flags[*]}" --script-executable=python2
+  gn gen out/Release --args="${_flags[*]}"
   ninja -C out/Release chrome chrome_sandbox chromedriver
 }
 

Added: add-ctime-for-std-time.patch
===================================================================
--- add-ctime-for-std-time.patch	                        (rev 0)
+++ add-ctime-for-std-time.patch	2021-03-02 20:55:46 UTC (rev 409075)
@@ -0,0 +1,27 @@
+From c06ddc4935bf1394812c011ce5d93898ccc8a53a Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Tue, 9 Feb 2021 19:22:57 +0000
+Subject: [PATCH] IWYU: add ctime for std::time
+
+Bug: None
+Change-Id: I8bdae43209984242b9f5e538d74ece4409b65e3c
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2679610
+Reviewed-by: Katie Dektar <katie at chromium.org>
+Commit-Queue: Katie Dektar <katie at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#852287}
+---
+ ui/accessibility/ax_tree_serializer.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ui/accessibility/ax_tree_serializer.h b/ui/accessibility/ax_tree_serializer.h
+index ddbbdcdc25c53..1790e3b791967 100644
+--- a/ui/accessibility/ax_tree_serializer.h
++++ b/ui/accessibility/ax_tree_serializer.h
+@@ -8,6 +8,7 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ 
++#include <ctime>
+ #include <ostream>
+ #include <unordered_map>
+ #include <unordered_set>

Added: add-dependency-on-opus-in-webcodecs.patch
===================================================================
--- add-dependency-on-opus-in-webcodecs.patch	                        (rev 0)
+++ add-dependency-on-opus-in-webcodecs.patch	2021-03-02 20:55:46 UTC (rev 409075)
@@ -0,0 +1,43 @@
+From b5b80df7dafba8cafa4c6c0ba2153dfda467dfc9 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Wed, 27 Jan 2021 20:31:51 +0000
+Subject: [PATCH] add dependency on opus in webcodecs
+
+webcodecs uses opus, but dependency is missing. With unbundled
+opus library build fails, because include path is incomplete.
+
+Bug: 1169758
+Change-Id: I01369364327461196a81002479636cf45017669a
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2644623
+Reviewed-by: Dale Curtis <dalecurtis at chromium.org>
+Commit-Queue: Dale Curtis <dalecurtis at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#847754}
+---
+ third_party/blink/renderer/modules/webcodecs/BUILD.gn | 1 +
+ third_party/blink/renderer/modules/webcodecs/DEPS     | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/third_party/blink/renderer/modules/webcodecs/BUILD.gn b/third_party/blink/renderer/modules/webcodecs/BUILD.gn
+index fdf4ca0fafc72..01a7bf809ffca 100644
+--- a/third_party/blink/renderer/modules/webcodecs/BUILD.gn
++++ b/third_party/blink/renderer/modules/webcodecs/BUILD.gn
+@@ -65,6 +65,7 @@ blink_modules_sources("webcodecs") {
+     "//media/mojo/clients",
+     "//media/mojo/mojom",
+     "//third_party/libyuv:libyuv",
++    "//third_party/opus",
+   ]
+   if (media_use_openh264) {
+     deps += [ "//third_party/openh264:encoder" ]
+diff --git a/third_party/blink/renderer/modules/webcodecs/DEPS b/third_party/blink/renderer/modules/webcodecs/DEPS
+index b8dd596da8caf..ea1919d12205a 100644
+--- a/third_party/blink/renderer/modules/webcodecs/DEPS
++++ b/third_party/blink/renderer/modules/webcodecs/DEPS
+@@ -19,6 +19,7 @@ include_rules = [
+ 
+     "+third_party/libyuv",
+     "+third_party/openh264",
++    "+third_party/opus",
+ 
+     "+ui/gfx/color_space.h",
+     "+ui/gfx/geometry/rect.h",

Deleted: subpixel-anti-aliasing-in-FreeType-2.8.1.patch
===================================================================
--- subpixel-anti-aliasing-in-FreeType-2.8.1.patch	2021-03-02 20:12:47 UTC (rev 409074)
+++ subpixel-anti-aliasing-in-FreeType-2.8.1.patch	2021-03-02 20:55:46 UTC (rev 409075)
@@ -1,100 +0,0 @@
-From f25787b72c20e97cdeb74e037dc1ff56a88b45c6 Mon Sep 17 00:00:00 2001
-From: Ben Wagner <bungeman at google.com>
-Date: Tue, 1 Dec 2020 20:22:00 -0500
-Subject: [PATCH] Subpixel anti-aliasing in FreeType 2.8.1+
-
-FreeType 2.8.1 and later always provide some form of subpixel
-anti-aliasing.
-
-Bug: skia:10950,skia:6663
-Change-Id: I666cc942e73b73073cdabf900c25faa10d9aaf0f
-Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339861
-Reviewed-by: Herb Derby <herb at google.com>
-Commit-Queue: Ben Wagner <bungeman at google.com>
----
- src/ports/SkFontHost_FreeType.cpp | 33 ++++++++++++++++++++-----------
- 1 file changed, 22 insertions(+), 11 deletions(-)
-
-diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
-index 990eff4f5e..c0aeb792da 100644
---- a/src/ports/SkFontHost_FreeType.cpp
-+++ b/src/ports/SkFontHost_FreeType.cpp
-@@ -32,6 +32,7 @@
- #include "src/utils/SkMatrix22.h"
- 
- #include <memory>
-+#include <tuple>
- 
- #include <ft2build.h>
- #include FT_ADVANCES_H
-@@ -147,13 +148,16 @@ public:
-         // *reinterpret_cast<void**>(&procPtr) = dlsym(self, "proc");
-         // because clang has not implemented DR573. See http://clang.llvm.org/cxx_dr_status.html .
- 
--        FT_Int major, minor, patch;
--        FT_Library_Version(fLibrary, &major, &minor, &patch);
-+        using Version = std::tuple<FT_Int, FT_Int, FT_Int>;
-+        Version version;
-+        FT_Library_Version(fLibrary, &std::get<0>(version),
-+                                     &std::get<1>(version),
-+                                     &std::get<2>(version));
- 
- #if SK_FREETYPE_MINIMUM_RUNTIME_VERSION >= 0x02070100
-         fGetVarDesignCoordinates = FT_Get_Var_Design_Coordinates;
- #elif SK_FREETYPE_MINIMUM_RUNTIME_VERSION & SK_FREETYPE_DLOPEN
--        if (major > 2 || ((major == 2 && minor > 7) || (major == 2 && minor == 7 && patch >= 0))) {
-+        if (Version(2,7,0) <= version) {
-             //The FreeType library is already loaded, so symbols are available in process.
-             void* self = dlopen(nullptr, RTLD_LAZY);
-             if (self) {
-@@ -166,7 +170,7 @@ public:
- #if SK_FREETYPE_MINIMUM_RUNTIME_VERSION >= 0x02070200
-         FT_Set_Default_Properties(fLibrary);
- #elif SK_FREETYPE_MINIMUM_RUNTIME_VERSION & SK_FREETYPE_DLOPEN
--        if (major > 2 || ((major == 2 && minor > 7) || (major == 2 && minor == 7 && patch >= 1))) {
-+        if (Version(2,7,1) <= version) {
-             //The FreeType library is already loaded, so symbols are available in process.
-             void* self = dlopen(nullptr, RTLD_LAZY);
-             if (self) {
-@@ -185,7 +189,7 @@ public:
- #if SK_FREETYPE_MINIMUM_RUNTIME_VERSION >= 0x02080000
-         fLightHintingIsYOnly = true;
- #else
--        if (major > 2 || ((major == 2 && minor > 8) || (major == 2 && minor == 8 && patch >= 0))) {
-+        if (Version(2,8,0) <= version) {
-             fLightHintingIsYOnly = true;
-         }
- #endif
-@@ -194,7 +198,7 @@ public:
- #if SK_FREETYPE_MINIMUM_RUNTIME_VERSION >= 0x02080100
-         fGetVarAxisFlags = FT_Get_Var_Axis_Flags;
- #elif SK_FREETYPE_MINIMUM_RUNTIME_VERSION & SK_FREETYPE_DLOPEN
--        if (major > 2 || ((major == 2 && minor > 7) || (major == 2 && minor == 7 && patch >= 0))) {
-+        if (Version(2,7,0) <= version) {
-             //The FreeType library is already loaded, so symbols are available in process.
-             void* self = dlopen(nullptr, RTLD_LAZY);
-             if (self) {
-@@ -204,11 +208,18 @@ public:
-         }
- #endif
- 
--        // Setup LCD filtering. This reduces color fringes for LCD smoothed glyphs.
--        // The default has changed over time, so this doesn't mean the same thing to all users.
--        if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) {
--            fIsLCDSupported = true;
--            fLCDExtra = 2; //Using a filter adds one full pixel to each side.
-+        fIsLCDSupported =
-+            // Subpixel anti-aliasing may be unfiltered until the LCD filter is set.
-+            // Newer versions may still need this, so this test with side effects must come first.
-+            // The default has changed over time, so this doesn't mean the same thing to all users.
-+            (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) ||
-+
-+            // In 2.8.1 and later FreeType always provides some form of subpixel anti-aliasing.
-+            ((SK_FREETYPE_MINIMUM_RUNTIME_VERSION) >= 0x02080100) ||
-+            (Version(2,8,1) <= version);
-+
-+        if (fIsLCDSupported) {
-+            fLCDExtra = 2; // Using a filter may require up to one full pixel to each side.
-         }
-     }
-     ~FreeTypeLibrary() {

Added: use-oauth2-client-switches-as-default.patch
===================================================================
--- use-oauth2-client-switches-as-default.patch	                        (rev 0)
+++ use-oauth2-client-switches-as-default.patch	2021-03-02 20:55:46 UTC (rev 409075)
@@ -0,0 +1,17 @@
+diff -upr chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc chromium-89.0.4389.58/google_apis/google_api_keys.cc
+--- chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc	2021-02-24 22:37:18.494007649 +0000
++++ chromium-89.0.4389.58/google_apis/google_api_keys.cc	2021-02-24 22:35:00.865777600 +0000
+@@ -154,11 +154,11 @@ class APIKeyCache {
+ 
+     std::string default_client_id = CalculateKeyValue(
+         GOOGLE_DEFAULT_CLIENT_ID,
+-        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr,
++        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID,
+         std::string(), environment.get(), command_line, gaia_config);
+     std::string default_client_secret = CalculateKeyValue(
+         GOOGLE_DEFAULT_CLIENT_SECRET,
+-        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
++        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret,
+         std::string(), environment.get(), command_line, gaia_config);
+ 
+     // We currently only allow overriding the baked-in values for the



More information about the arch-commits mailing list