From 602bd471969509232c0e10b22d1f1ef467765f1f Mon Sep 17 00:00:00 2001 From: Duncaen Date: Wed, 2 Feb 2022 16:22:24 +0100 Subject: [PATCH] chromium: update to 98.0.4758.80. --- .../files/musl-patches/resolver.patch | 4 +- .../patches/chromium-system-nodejs.patch | 18 ++--- ...ngrade-duplicate-peer-error-to-dvlog.patch | 33 +++++++++ .../fix-bits-stdint-intn-include.patch | 11 --- .../fix-build-break-with-system-libdrm.patch | 62 ++++++++++++++++ ...ne_MM_Var-in-CFX_Font-AdjustMMParams.patch | 72 +++++++++++++++++++ .../patches/xxx-ppc64le-support.patch | 31 -------- srcpkgs/chromium/template | 4 +- 8 files changed, 180 insertions(+), 55 deletions(-) create mode 100644 srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch delete mode 100644 srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch create mode 100644 srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch create mode 100644 srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch diff --git a/srcpkgs/chromium/files/musl-patches/resolver.patch b/srcpkgs/chromium/files/musl-patches/resolver.patch index 3c2563b7824f..9de49bf328fb 100644 --- a/srcpkgs/chromium/files/musl-patches/resolver.patch +++ b/srcpkgs/chromium/files/musl-patches/resolver.patch @@ -30,8 +30,8 @@ base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::WILL_BLOCK); --#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \ -- !defined(OS_ANDROID) && !defined(OS_FUCHSIA) +-#if defined(OS_POSIX) && \ +- !(defined(OS_APPLE) || defined(OS_OPENBSD) || defined(OS_ANDROID)) +#if defined(__GLIBC__) DnsReloaderMaybeReload(); #endif diff --git a/srcpkgs/chromium/patches/chromium-system-nodejs.patch b/srcpkgs/chromium/patches/chromium-system-nodejs.patch index eff56ba7602f..83e8b93b9fcf 100644 --- a/srcpkgs/chromium/patches/chromium-system-nodejs.patch +++ b/srcpkgs/chromium/patches/chromium-system-nodejs.patch @@ -1,20 +1,20 @@ ---- a/third_party/node/node.py 2021-05-20 04:17:54.000000000 +0200 -+++ b/third_party/node/node.py 2021-05-20 04:17:54.000000000 +0200 -@@ -17,11 +17,12 @@ - if platform.system() == 'Darwin' and platform.machine() == 'arm64': - return os.path.join(os_path.join(os_path.dirname(__file__), 'mac', - 'node-darwin-arm64', 'bin', 'node')) +--- a/third_party/node/node.py ++++ b/third_party/node/node.py +@@ -13,11 +13,12 @@ + def GetBinaryPath(): + darwin_name = ('node-darwin-arm64' if platform.machine() == 'arm64' else + 'node-darwin-x64') - return os_path.join(os_path.dirname(__file__), *{ -- 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'), +- 'Darwin': ('mac', darwin_name, 'bin', 'node'), - 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), - 'Windows': ('win', 'node.exe'), - }[platform.system()]) -+ return "/usr/bin/node" + #return os_path.join(os_path.dirname(__file__), *{ -+ # 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'), ++ # 'Darwin': ('mac', darwin_name, 'bin', 'node'), + # 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), + # 'Windows': ('win', 'node.exe'), + #}[platform.system()]) ++ return "/usr/bin/node" def RunNode(cmd_parts, stdout=None): diff --git a/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch b/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch new file mode 100644 index 000000000000..e07127a473d0 --- /dev/null +++ b/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch @@ -0,0 +1,33 @@ +From 00604ca8ed6d669fb6cb3ae8bacd6028d5ef10ac Mon Sep 17 00:00:00 2001 +From: Stephen Roettger +Date: Thu, 20 Jan 2022 10:04:04 +0000 +Subject: [PATCH] Downgrade duplicate peer error to dvlog +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Downgrading since this case can happen in non-error situations. There can be +duplicate introductions in flight in which case we simply drop the second one. + +Change-Id: I2c51b177913ccd9634e9bb6343d468101d9735ed +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3398794 +Reviewed-by: Ken Rockot +Commit-Queue: Stephen Röttger +Cr-Commit-Position: refs/heads/main@{#961389} +--- + mojo/core/node_controller.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mojo/core/node_controller.cc b/mojo/core/node_controller.cc +index 7cde7719687..81712676733 100644 +--- a/mojo/core/node_controller.cc ++++ b/mojo/core/node_controller.cc +@@ -594,7 +594,7 @@ void NodeController::AddPeer(const ports::NodeName& name, + } + + if (dropped_peers_.Contains(name) && !allow_name_reuse) { +- LOG(ERROR) << "Trying to re-add dropped peer " << name; ++ DVLOG(1) << "Trying to re-add dropped peer " << name; + return; + } + diff --git a/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch b/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch deleted file mode 100644 index 978cd6a493d6..000000000000 --- a/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ui/ozone/platform/wayland/host/wayland_window.cc.orig -+++ b/ui/ozone/platform/wayland/host/wayland_window.cc -@@ -4,7 +4,7 @@ - - #include "ui/ozone/platform/wayland/host/wayland_window.h" - --#include -+#include - #include - #include - #include diff --git a/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch b/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch new file mode 100644 index 000000000000..fe8eee6d1e94 --- /dev/null +++ b/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch @@ -0,0 +1,62 @@ +From 5b287e0be8d8d8475ec6ef81b16eaa61e19db078 Mon Sep 17 00:00:00 2001 +From: "Steinar H. Gunderson" +Date: Tue, 25 Jan 2022 19:14:53 +0000 +Subject: [PATCH] Fix build break with system libdrm. + +This patch is submitted on behalf of Andres Salomon + (on Cc). Also adding him to src/AUTHORS +per policy, as he has signed the CLA. + +Original patch: +https://salsa.debian.org/dilinger/chromium/-/commit/2333c2fb985ac1ef3d7331776a7833d965c63302 + +Change-Id: I18bd60e2e80f2b9181e74ee7972c3f457ab33b10 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3401704 +Reviewed-by: Andres Calderon Jaramillo +Commit-Queue: Steinar H Gunderson +Auto-Submit: Steinar H Gunderson +Cr-Commit-Position: refs/heads/main@{#963119} +--- + AUTHORS | 1 + + media/gpu/chromeos/BUILD.gn | 1 + + media/gpu/chromeos/video_decoder_pipeline.cc | 2 +- + 3 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/AUTHORS b/AUTHORS +index 0eba3de5065..50edd3f6b38 100644 +--- a/AUTHORS ++++ b/AUTHORS +@@ -93,6 +93,7 @@ Andreas Papacharalampous + Andrei Borza + Andrei Parvu + Andrei Parvu ++Andres Salomon + Andreu Botella + Andrew Boyarshin + Andrew Brampton +diff --git a/media/gpu/chromeos/BUILD.gn b/media/gpu/chromeos/BUILD.gn +index 7cb4c3ea39a..6fe21c15ecc 100644 +--- a/media/gpu/chromeos/BUILD.gn ++++ b/media/gpu/chromeos/BUILD.gn +@@ -25,6 +25,7 @@ source_set("chromeos") { + + deps = [ + "//base", ++ "//build/config/linux/libdrm", + "//media", + "//media/gpu:buildflags", + "//media/gpu:command_buffer_helper", +diff --git a/media/gpu/chromeos/video_decoder_pipeline.cc b/media/gpu/chromeos/video_decoder_pipeline.cc +index d2f154ea0d8..416b9434a8d 100644 +--- a/media/gpu/chromeos/video_decoder_pipeline.cc ++++ b/media/gpu/chromeos/video_decoder_pipeline.cc +@@ -28,8 +28,8 @@ + #include "third_party/abseil-cpp/absl/types/optional.h" + + #if BUILDFLAG(USE_VAAPI) ++#include + #include "media/gpu/vaapi/vaapi_video_decoder.h" +-#include "third_party/libdrm/src/include/drm/drm_fourcc.h" + #elif BUILDFLAG(USE_V4L2_CODEC) + #include "media/gpu/v4l2/v4l2_video_decoder.h" + #else diff --git a/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch b/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch new file mode 100644 index 000000000000..9e3b07920f17 --- /dev/null +++ b/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch @@ -0,0 +1,72 @@ +From cb0aad687f34629a42053d600cf2947282cea2c0 Mon Sep 17 00:00:00 2001 +From: Lei Zhang +Date: Mon, 31 Jan 2022 22:42:35 +0000 +Subject: [PATCH] Use FT_Done_MM_Var() in CFX_Font::AdjustMMParams() when + possible. + +When FreeType has FT_Done_MM_Var(), use that to free memory in +CFX_Font::AdjustMMParams() to avoid mismatched alloc/free functions. + +Bug: pdfium:1400 +Change-Id: I044540893103921fc64cdd53fcd628cfebf2c9db +Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90130 +Reviewed-by: Nigi +Commit-Queue: Lei Zhang + +(cherry picked from commit ffeb67faf715475f6e463d65c368f556780adf19) +--- + core/fxge/cfx_font.cpp | 28 ++++++++++++++++++++++++++-- + 1 file changed, 26 insertions(+), 2 deletions(-) + +diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp +index 7a4e8eb24..0ef421fe7 100644 +--- a/third_party/pdfium/core/fxge/cfx_font.cpp ++++ b/third_party/pdfium/core/fxge/cfx_font.cpp +@@ -43,6 +43,30 @@ struct OUTLINE_PARAMS { + float m_CoordUnit; + }; + ++// TODO(crbug.com/pdfium/1400): When FT_Done_MM_Var() is more likely to be ++// available to all users in the future, remove FreeMMVar() and use ++// FT_Done_MM_Var() directly. ++// ++// Use weak symbols to check if FT_Done_MM_Var() is available at runtime. ++#if !defined(OS_WIN) ++extern "C" __attribute__((weak)) decltype(FT_Done_MM_Var) FT_Done_MM_Var; ++#endif ++ ++void FreeMMVar(FXFT_FaceRec* rec, FXFT_MM_VarPtr variation_desc) { ++#if defined(OS_WIN) ++ // Assume `use_system_freetype` GN var is never set on Windows. ++ constexpr bool has_ft_done_mm_var_func = true; ++#else ++ static const bool has_ft_done_mm_var_func = !!FT_Done_MM_Var; ++#endif ++ if (has_ft_done_mm_var_func) { ++ FT_Done_MM_Var(CFX_GEModule::Get()->GetFontMgr()->GetFTLibrary(), ++ variation_desc); ++ } else { ++ FXFT_Free(rec, variation_desc); ++ } ++} ++ + #ifdef PDF_ENABLE_XFA + unsigned long FTStreamRead(FXFT_StreamRec* stream, + unsigned long offset, +@@ -640,14 +664,14 @@ void CFX_Font::AdjustMMParams(int glyph_index, + int max_width = FXFT_Get_Glyph_HoriAdvance(m_Face->GetRec()) * 1000 / + FXFT_Get_Face_UnitsPerEM(m_Face->GetRec()); + if (max_width == min_width) { +- FXFT_Free(m_Face->GetRec(), pMasters); ++ FreeMMVar(m_Face->GetRec(), pMasters); + return; + } + int param = min_param + (max_param - min_param) * (dest_width - min_width) / + (max_width - min_width); + coords[1] = param; + } +- FXFT_Free(m_Face->GetRec(), pMasters); ++ FreeMMVar(m_Face->GetRec(), pMasters); + FT_Set_MM_Design_Coordinates(m_Face->GetRec(), 2, coords); + } + diff --git a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch index 2f66a144e269..e0ceb4c40842 100644 --- a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch +++ b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch @@ -1007,19 +1007,6 @@ index 2b78a0cc3..0a70f5ea5 100644 + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_ -diff --git a/sandbox/linux/system_headers/linux_ucontext.h b/sandbox/linux/system_headers/linux_ucontext.h -index 22ce78027..a69b024c2 100644 ---- a/sandbox/linux/system_headers/linux_ucontext.h -+++ b/sandbox/linux/system_headers/linux_ucontext.h -@@ -11,6 +11,8 @@ - #include "sandbox/linux/system_headers/arm_linux_ucontext.h" - #elif defined(__i386__) - #include "sandbox/linux/system_headers/i386_linux_ucontext.h" -+#elif defined(__powerpc64__) -+#include "sandbox/linux/system_headers/ppc64_linux_ucontext.h" - #else - #error "No support for your architecture in PNaCl header" - #endif diff --git a/sandbox/linux/system_headers/ppc64_linux_syscalls.h b/sandbox/linux/system_headers/ppc64_linux_syscalls.h new file mode 100644 index 000000000..ccacffe22 @@ -1038,24 +1025,6 @@ index 000000000..ccacffe22 +//TODO: is it necessary to redefine syscall numbers for PPC64? + +#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_ -diff --git a/sandbox/linux/system_headers/ppc64_linux_ucontext.h b/sandbox/linux/system_headers/ppc64_linux_ucontext.h -new file mode 100644 -index 000000000..07728e087 ---- /dev/null -+++ b/sandbox/linux/system_headers/ppc64_linux_ucontext.h -@@ -0,0 +1,12 @@ -+// Copyright 2014 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_ -+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_ -+ -+#include -+ -+//TODO: is it necessary to redefine ucontext on PPC64? -+ -+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_ diff --git a/sandbox/policy/linux/bpf_renderer_policy_linux.cc b/sandbox/policy/linux/bpf_renderer_policy_linux.cc index 2588fc792..d455c4601 100644 --- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index 453aabb5b08a..7b3031bf840f 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -1,7 +1,7 @@ # Template file for 'chromium' pkgname=chromium # See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version -version=97.0.4692.99 +version=98.0.4758.80 revision=1 archs="i686* x86_64* aarch64* armv7l* ppc64le*" short_desc="Google's attempt at creating a safer, faster, and more stable browser" @@ -9,7 +9,7 @@ maintainer="Duncaen " license="BSD-3-Clause" homepage="https://www.chromium.org/" distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz" -checksum=c91bae205705b367f2cfc1f72ce1ee99b2ceb5edfc584e15c60a6ab5ff01ecba +checksum=c87266e20f860a32c48affc70a769368d1b876dbad768e3aa93ee3c335944171 lib32disabled=yes