From 9c5ef235679641d8de90796ae07d37153a0a28a2 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Wed, 28 May 2025 18:04:49 +0200 Subject: [PATCH] chromium: update to 137.0.7151.103. --- srcpkgs/chromium/patches/llvm19.patch | 11 ++++ .../patches/musl-no-sandbox-settls.patch | 15 ++++++ .../musl-tid-caching.patch | 12 +++-- .../pdfium-fix-build-with-system-libpng.patch | 50 +++++++++++++++++++ srcpkgs/chromium/template | 4 +- 5 files changed, 86 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/chromium/patches/musl-no-sandbox-settls.patch rename srcpkgs/chromium/{files/musl-patches => patches}/musl-tid-caching.patch (94%) create mode 100644 srcpkgs/chromium/patches/pdfium-fix-build-with-system-libpng.patch diff --git a/srcpkgs/chromium/patches/llvm19.patch b/srcpkgs/chromium/patches/llvm19.patch index 5f15ee50d6a..6c132771972 100644 --- a/srcpkgs/chromium/patches/llvm19.patch +++ b/srcpkgs/chromium/patches/llvm19.patch @@ -9,3 +9,14 @@ from_build_root = rebase_path(clang_warning_suppression_file, root_build_dir) inputs = [ clang_warning_suppression_file ] +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -627,7 +627,7 @@ + # TODO(crbug.com/413427035): Remove once + # https://github.com/llvm/llvm-project/pull/136867/ is landed. + if (!is_win && !llvm_android_mainline && +- default_toolchain != "//build/toolchain/cros:target") { ++ default_toolchain != "//build/toolchain/cros:target" && clang_version != "19") { + cflags += [ "-fextend-variable-liveness=none" ] + } + } diff --git a/srcpkgs/chromium/patches/musl-no-sandbox-settls.patch b/srcpkgs/chromium/patches/musl-no-sandbox-settls.patch new file mode 100644 index 00000000000..5d24cbac259 --- /dev/null +++ b/srcpkgs/chromium/patches/musl-no-sandbox-settls.patch @@ -0,0 +1,15 @@ +Source: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/chromium/no-sandbox-settls.patch +this optimisation of CLONE_SETTLS is not valid used like this, and future musl +clone(3) will EINVAL on this use +-- +--- a/sandbox/linux/services/credentials.cc ++++ b/sandbox/linux/services/credentials.cc +@@ -89,7 +89,7 @@ + + int clone_flags = CLONE_FS | LINUX_SIGCHLD; + void* tls = nullptr; +-#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \ ++#if defined(__GLIBC__) && (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \ + !defined(MEMORY_SANITIZER) + // Use CLONE_VM | CLONE_VFORK as an optimization to avoid copying page tables. + // Since clone writes to the new child's TLS before returning, we must set a diff --git a/srcpkgs/chromium/files/musl-patches/musl-tid-caching.patch b/srcpkgs/chromium/patches/musl-tid-caching.patch similarity index 94% rename from srcpkgs/chromium/files/musl-patches/musl-tid-caching.patch rename to srcpkgs/chromium/patches/musl-tid-caching.patch index 52bbe775ad2..296c47530d6 100644 --- a/srcpkgs/chromium/files/musl-patches/musl-tid-caching.patch +++ b/srcpkgs/chromium/patches/musl-tid-caching.patch @@ -5,11 +5,12 @@ see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579 -- --- a/sandbox/linux/services/namespace_sandbox.cc +++ b/sandbox/linux/services/namespace_sandbox.cc -@@ -209,6 +209,70 @@ +@@ -209,6 +209,72 @@ return base::LaunchProcess(argv, launch_options_copy); } -+#if defined(__aarch64__) || defined(__arm__) || defined(__powerpc__) ++#if !defined(LIBC_GLIBC) ++#if defined(__aarch64__) +#define TLS_ABOVE_TP +#endif + @@ -72,15 +73,18 @@ see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579 + pid_t* cached_tid_location = &reinterpret_cast(pthread_self())->tid; + *cached_tid_location = real_tid; +} ++#endif + // static pid_t NamespaceSandbox::ForkInNewPidNamespace(bool drop_capabilities_in_child) { const pid_t pid = -@@ -226,6 +290,7 @@ +@@ -226,6 +292,8 @@ #if defined(LIBC_GLIBC) MaybeUpdateGlibcTidCache(); - #endif +-#endif ++#else + MaybeUpdateMuslTidCache(); ++#endif return 0; } diff --git a/srcpkgs/chromium/patches/pdfium-fix-build-with-system-libpng.patch b/srcpkgs/chromium/patches/pdfium-fix-build-with-system-libpng.patch new file mode 100644 index 00000000000..e24114f2161 --- /dev/null +++ b/srcpkgs/chromium/patches/pdfium-fix-build-with-system-libpng.patch @@ -0,0 +1,50 @@ +From 83f11d630aa1cb6d5ceb292364412f7b0585a201 Mon Sep 17 00:00:00 2001 +From: Matt Jolly +Date: Mon, 19 May 2025 11:21:10 -0700 +Subject: [PATCH] Fix build with system libpng + +`cbc692a42241970e1da492d5b14326e81ecb1061` refactored +`fxcodec::CFX_DIBAttribute` and changed the names of its members. + +Unfortunately this change appears to have been typo'd in the +'system libpng' build path, which is not checked by CI, resulting +in downstream build failures in Chromium. + +Signed-off-by: Matt Jolly +Change-Id: Id4c2c24f76cb709a0bc78badcaf63eb9c5868fe3 +Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/132130 +Reviewed-by: Lei Zhang +Commit-Queue: Tom Sepez +Reviewed-by: Tom Sepez +--- + AUTHORS | 1 + + core/fxcodec/png/png_decoder.cpp | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/AUTHORS b/AUTHORS +index 3cd57a711..567f8f5c9 100644 +--- a/third_party/pdfium/AUTHORS ++++ b/third_party/pdfium/AUTHORS +@@ -32,6 +32,7 @@ Justin Pierce + Ke Liu + Luật Nguyễn + Manuel Geißer ++Matt Jolly + Michael Doppler + Miklos Vajna + Minh Trần +diff --git a/core/fxcodec/png/png_decoder.cpp b/core/fxcodec/png/png_decoder.cpp +index 278e381ea..7b6edcd04 100644 +--- a/third_party/pdfium/core/fxcodec/png/png_decoder.cpp ++++ b/third_party/pdfium/core/fxcodec/png/png_decoder.cpp +@@ -52,8 +52,8 @@ void _png_load_bmp_attribute(png_structp png_ptr, + CFX_DIBAttribute* pAttribute) { + if (pAttribute) { + #if defined(PNG_pHYs_SUPPORTED) +- pAttribute->xdpi_ = png_get_x_pixels_per_meter(png_ptr, info_ptr); +- pAttribute->ydpi_ = png_get_y_pixels_per_meter(png_ptr, info_ptr); ++ pAttribute->x_dpi_ = png_get_x_pixels_per_meter(png_ptr, info_ptr); ++ pAttribute->y_dpi_ = png_get_y_pixels_per_meter(png_ptr, info_ptr); + png_uint_32 res_x, res_y; + int unit_type; + png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, &unit_type); diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index 5a353b9e220..ce631cc1c4d 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=136.0.7103.59 +version=137.0.7151.103 revision=1 archs="i686* x86_64* aarch64* armv7l*" _llvmver=19 @@ -31,7 +31,7 @@ license="BSD-3-Clause" homepage="https://www.chromium.org/" distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${version}.tar.xz" #distfiles="https://chromium-tarballs.distfiles.gentoo.org/chromium-${version}.tar.xz" -checksum=3ce1ef863767b3a72058a0f0ceb150cc7b8a9ba8bc24e19c98d25f8b395a8cfe +checksum=31083a39c661942a3617e272787a3927f9b7eeaf2a4e2de1ac3affc8a7f05ef3 lib32disabled=yes