[arch-commits] Commit in electron13/trunk (4 files)

Nicola Squartini tensor5 at gemini.archlinux.org
Sun Feb 20 12:45:25 UTC 2022


    Date: Sunday, February 20, 2022 @ 12:45:24
  Author: tensor5
Revision: 1135268

upgpkg: electron13 13.6.9-1

Added:
  electron13/trunk/breakpad-fix-for-non-constant-SIGSTKSZ.patch
  electron13/trunk/sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
  electron13/trunk/std-max-fix.patch
Modified:
  electron13/trunk/PKGBUILD

------------------------------------------------------------+
 PKGBUILD                                                   |   20 +++--
 breakpad-fix-for-non-constant-SIGSTKSZ.patch               |   35 +++++++++
 sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch |   39 +++++++++++
 std-max-fix.patch                                          |   11 +++
 4 files changed, 97 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-02-20 12:42:17 UTC (rev 1135267)
+++ PKGBUILD	2022-02-20 12:45:24 UTC (rev 1135268)
@@ -1,11 +1,11 @@
 # Maintainer: Nicola Squartini <tensor5 at gmail.com>
 
 pkgname=electron13
-pkgver=13.6.8
-_commit=fc41c71ce0f2f156c15237bd0c792f4e0a847ff7
+pkgver=13.6.9
+_commit=5c5b2835b64e6a2b86b8467288908467e8228890
 _chromiumver=91.0.4472.164
 _gcc_patchset=5
-pkgrel=3
+pkgrel=1
 pkgdesc='Build cross platform desktop apps with web technologies'
 arch=('x86_64')
 url='https://electronjs.org/'
@@ -29,9 +29,12 @@
         'default_app-icon.patch'
         'use-system-libraries-in-node.patch'
         'add-clang-nomerge-attribute-to-CheckError.patch'
+        'breakpad-fix-for-non-constant-SIGSTKSZ.patch'
         'chromium-freetype-2.11.patch'
         'chromium-glibc-2.33.patch'
         'chromium-harfbuzz-3.0.0.patch'
+        'sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch'
+        'std-max-fix.patch'
         'skia-harfbuzz-3.0.0.patch'
         'unbundle-fix-visibility-of-build-config-freetype.patch'
         'gn-visibility-gmock.patch'
@@ -49,9 +52,12 @@
             'dd2d248831dd4944d385ebf008426e66efe61d6fdf66f8932c963a12167947b4'
             '7cb11fb44aaf4d15f36caca3c0d1b082a723c30d43cd44db147248db5683a2a9'
             '50133dd196d288ad538bb536aa51dccd6cb4aacfd9a60160f77e8fb16034b460'
+            'b4d28867c1fabde6c50a2cfa3f784730446c4d86e5191e0f0000fbf7b0f91ecf'            
             '940346d3599d09366068d88b65dfcbcab187ceb5d14dc7c7f9b6ae5e6f25ec7d'
             '2fccecdcd4509d4c36af873988ca9dbcba7fdb95122894a9fdf502c33a1d7a4b'
             '7ce947944a139e66774dfc7249bf7c3069f07f83a0f1b2c1a1b14287a7e15928'
+            'f910be9370c880de6e1d61cc30383c069e421d7acf406166e4fbfad324fc7d61'
+            'c315dd56b354cf5ad3458e1edf397cc7b492fefe82138135a881206a82b9d9dc'            
             'c9ed1dbadaf4be6097e25bc5577b91751799befc2d0376b143e1bd10def5754e'
             'd0b17162211dd49e3a58c16d1697e7d8c322dcfd3b7890f0c2f920b711f52293'
             'b9934e01d8f39beafc8b63784fb86e6befe25ca83e9c43224c8374e5a025d8ef'
@@ -149,12 +155,8 @@
   # Fixes for building with libstdc++ instead of libc++
   patch -Np1 -i ../patches/chromium-90-ruy-include.patch
 
+  patch -Np1 -d third_party/breakpad/breakpad < ../breakpad-fix-for-non-constant-SIGSTKSZ.patch
   patch -Np1 -i ../ffmpeg5.patch
-  # Patches to build with ffmpeg 4.4; remove when ffmpeg 5.0 moves to stable
-  if ! pkg-config --atleast-version 59 libavformat; then
-    patch -Rp1 -i ../ffmpeg5.patch
-  fi
-
   patch -Rp1 -i ../add-clang-nomerge-attribute-to-CheckError.patch
   patch -Np1 -i ../chromium-freetype-2.11.patch
   patch -Np1 -i ../chromium-glibc-2.33.patch
@@ -164,7 +166,9 @@
   patch -Np1 -i ../gn-visibility-gmock.patch
   patch -Np1 -i ../gn-visibility-mojo.patch
   patch -Np1 -i ../gn-visibility-webrtc.patch
+  patch -Np1 -i ../sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
   patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch
+  patch -Np1 -i ../std-max-fix.patch
   patch -Np1 -i ../unbundle-use-char16_t-as-UCHAR_TYPE.patch
   patch -Np1 -i ../use-system-libraries-in-node.patch
   patch -Np1 -i ../default_app-icon.patch  # Icon from .desktop file

Added: breakpad-fix-for-non-constant-SIGSTKSZ.patch
===================================================================
--- breakpad-fix-for-non-constant-SIGSTKSZ.patch	                        (rev 0)
+++ breakpad-fix-for-non-constant-SIGSTKSZ.patch	2022-02-20 12:45:24 UTC (rev 1135268)
@@ -0,0 +1,35 @@
+From 605c51ed96ad44b34c457bbca320e74e194c317e Mon Sep 17 00:00:00 2001
+From: David Faure <david.faure at kdab.com>
+Date: Wed, 15 Dec 2021 22:26:40 +0100
+Subject: [PATCH] Fix for non-constant SIGSTKSZ
+
+On glibc > 2.33, `SIGSTKSZ` might not be constant (in which case
+it expands to a call to `sysconf` which returns a `long int`); see
+https://sourceware.org/pipermail/libc-alpha/2020-October/118513.html
+
+Pass unsigned explicitly to std::max, to avoid relying on template
+argument deduction. This works both with the old-style constant
+`SIGSTKSZ` and the new configurable one.
+
+Initially based on https://chromium-review.googlesource.com/c/2776379
+
+Change-Id: I9fc95337f973e871b84735ce822b5e11ba73ea8c
+Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3340721
+Reviewed-by: Mark Mentovai <mark at chromium.org>
+---
+ src/client/linux/handler/exception_handler.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
+index ca353c40..499be0a9 100644
+--- a/src/client/linux/handler/exception_handler.cc
++++ b/src/client/linux/handler/exception_handler.cc
+@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() {
+   // SIGSTKSZ may be too small to prevent the signal handlers from overrunning
+   // the alternative stack. Ensure that the size of the alternative stack is
+   // large enough.
+-  static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
++  const unsigned kSigStackSize = std::max<unsigned>(16384, SIGSTKSZ);
+ 
+   // Only set an alternative stack if there isn't already one, or if the current
+   // one is too small.

Added: sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
===================================================================
--- sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch	                        (rev 0)
+++ sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch	2022-02-20 12:45:24 UTC (rev 1135268)
@@ -0,0 +1,39 @@
+From 28ac6a15411d01301e171b8a8b0019abd57589b9 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Mon, 7 Feb 2022 20:09:57 +0000
+Subject: [PATCH] sandbox: build if glibc 2.34+ dynamic stack size is enabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Compilation of sandbox fails when using dynamic stack size in glibc
+2.34 or newer. This is because the value is not a literal anymore but
+obtained through sysconf.
+
+To avoid this, use memset to put zeros in the buffer.
+
+Change-Id: Ia479e0f799b77a10a00197aaaa0500e62546f458
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3436947
+Reviewed-by: Jorge Lucangeli Obes <jorgelo at chromium.org>
+Commit-Queue: José Dapena Paz <jdapena at igalia.com>
+Cr-Commit-Position: refs/heads/main@{#967943}
+---
+ sandbox/linux/services/credentials.cc | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
+index ca6b5954798..c933eafd163 100644
+--- a/sandbox/linux/services/credentials.cc
++++ b/sandbox/linux/services/credentials.cc
+@@ -100,7 +100,10 @@ bool ChrootToSafeEmptyDir() {
+   // TODO(crbug.com/1247458) Broken in MSan builds after LLVM f1bb30a4956f.
+   clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
+ 
+-  char tls_buf[PTHREAD_STACK_MIN] = {0};
++  // PTHREAD_STACK_MIN can be dynamic in glibc2.34+, so it is not possible to
++  // zeroify tls_buf assigning { 0 }
++  char tls_buf[PTHREAD_STACK_MIN];
++  memset(tls_buf, 0, PTHREAD_STACK_MIN);
+   tls = tls_buf;
+ #endif
+ 

Added: std-max-fix.patch
===================================================================
--- std-max-fix.patch	                        (rev 0)
+++ std-max-fix.patch	2022-02-20 12:45:24 UTC (rev 1135268)
@@ -0,0 +1,11 @@
+--- a/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc
++++ b/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc
+@@ -136,7 +136,7 @@
+ #else
+   const size_t page_mask = sysconf(_SC_PAGESIZE) - 1;
+ #endif
+-  size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
++  size_t stack_size = (std::max<unsigned>(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
+ #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \
+     defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER)
+   // Account for sanitizer instrumentation requiring additional stack space.



More information about the arch-commits mailing list