From 5b95dc1987d4fe896870f8148c1a65f73ef28f92 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Mon, 1 May 2017 17:57:07 +0200 Subject: [PATCH] chromium: update to 58.0.3029.81. --- .../default-pthread-stacksize.patch | 28 +++++------ .../chromium/patches/fix-gn_bootstrap.patch | 10 ++++ srcpkgs/chromium/patches/no-execinfo.patch | 47 ++++++++----------- srcpkgs/chromium/template | 11 +++-- 4 files changed, 51 insertions(+), 45 deletions(-) create mode 100644 srcpkgs/chromium/patches/fix-gn_bootstrap.patch diff --git a/srcpkgs/chromium/files/musl-patches/default-pthread-stacksize.patch b/srcpkgs/chromium/files/musl-patches/default-pthread-stacksize.patch index a46878ea523..75b50479e55 100644 --- a/srcpkgs/chromium/files/musl-patches/default-pthread-stacksize.patch +++ b/srcpkgs/chromium/files/musl-patches/default-pthread-stacksize.patch @@ -4,26 +4,26 @@ - return 0; + // use 8mb like glibc to avoid running out of space + return (1 << 23); ---- chrome/browser/chrome_browser_main_posix.cc.orig -+++ chrome/browser/chrome_browser_main_posix.cc -@@ -276,12 +276,20 @@ - g_shutdown_pipe_read_fd = pipefd[0]; - g_shutdown_pipe_write_fd = pipefd[1]; +--- chrome/app/shutdown_signal_handlers_posix.cc.orig ++++ chrome/app/shutdown_signal_handlers_posix.cc +@@ -184,12 +184,20 @@ + g_shutdown_pipe_read_fd = pipefd[0]; + g_shutdown_pipe_write_fd = pipefd[1]; #if !defined(ADDRESS_SANITIZER) && !defined(KEEP_SHADOW_STACKS) +# if defined(__GLIBC__) - const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2; + const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2; +# else -+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k ++ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k +# endif #else - // ASan instrumentation and -finstrument-functions (used for keeping the - // shadow stacks) bloat the stack frames, so we need to increase the stack - // size to avoid hitting the guard page. + // ASan instrumentation and -finstrument-functions (used for keeping the + // shadow stacks) bloat the stack frames, so we need to increase the stack + // size to avoid hitting the guard page. +# if defined(__GLIBC__) - const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4; + const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4; +# else -+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k ++ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k +# endif #endif - // TODO(viettrungluu,willchan): crbug.com/29675 - This currently leaks, so - // if you change this, you'll probably need to change the suppression. + ShutdownDetector* detector = new ShutdownDetector( + g_shutdown_pipe_read_fd, shutdown_callback, task_runner); diff --git a/srcpkgs/chromium/patches/fix-gn_bootstrap.patch b/srcpkgs/chromium/patches/fix-gn_bootstrap.patch new file mode 100644 index 00000000000..aa697295c8d --- /dev/null +++ b/srcpkgs/chromium/patches/fix-gn_bootstrap.patch @@ -0,0 +1,10 @@ +--- tools/gn/bootstrap/bootstrap.py.orig ++++ tools/gn/bootstrap/bootstrap.py +@@ -383,6 +383,7 @@ + 'base/base_switches.cc', + 'base/build_time.cc', + 'base/callback_internal.cc', ++ 'base/callback_helpers.cc', + 'base/command_line.cc', + 'base/debug/activity_tracker.cc', + 'base/debug/alias.cc', diff --git a/srcpkgs/chromium/patches/no-execinfo.patch b/srcpkgs/chromium/patches/no-execinfo.patch index 23adf39236e..e3899052dda 100644 --- a/srcpkgs/chromium/patches/no-execinfo.patch +++ b/srcpkgs/chromium/patches/no-execinfo.patch @@ -1,7 +1,7 @@ ---- base/debug/stack_trace_posix.cc.orig 2016-05-08 07:59:51.749087517 +0200 -+++ base/debug/stack_trace_posix.cc 2016-05-08 08:01:24.988950619 +0200 -@@ -24,7 +24,7 @@ - #if defined(__GLIBCXX__) +--- base/debug/stack_trace_posix.cc.orig ++++ base/debug/stack_trace_posix.cc +@@ -26,7 +26,7 @@ + #if !defined(USE_SYMBOLIZE) #include #endif -#if !defined(__UCLIBC__) @@ -9,25 +9,25 @@ #include #endif -@@ -75,7 +75,7 @@ void DemangleSymbols(std::string* text) +@@ -80,7 +80,7 @@ // Note: code in this function is NOT async-signal safe (std::string uses // malloc internally). --#if defined(__GLIBCXX__) && !defined(__UCLIBC__) -+#if defined(__GLIBCXX__) && defined(__GLIBC__) +-#if !defined(__UCLIBC__) ++#if defined(__GLIBC__) std::string::size_type search_from = 0; while (search_from < text->size()) { -@@ -112,7 +112,7 @@ void DemangleSymbols(std::string* text) +@@ -116,7 +116,7 @@ + search_from = mangled_start + 2; } } - --#endif // defined(__GLIBCXX__) && !defined(__UCLIBC__) -+#endif // defined(__GLIBCXX__) && defined(__GLIBC__) +-#endif // !defined(__UCLIBC__) ++#endif // defined(__GLIBC__) } #endif // !defined(USE_SYMBOLIZE) -@@ -124,7 +124,7 @@ class BacktraceOutputHandler { +@@ -128,7 +128,7 @@ virtual ~BacktraceOutputHandler() {} }; @@ -36,7 +36,7 @@ void OutputPointer(void* pointer, BacktraceOutputHandler* handler) { // This should be more than enough to store a 64-bit number in hex: // 16 hex digits + 1 for null-terminator. -@@ -201,7 +201,7 @@ void ProcessBacktrace(void *const *trace +@@ -205,7 +205,7 @@ } #endif // defined(USE_SYMBOLIZE) } @@ -45,16 +45,16 @@ void PrintToStderr(const char* output) { // NOTE: This code MUST be async-signal safe (it's used by in-process -@@ -716,7 +716,7 @@ StackTrace::StackTrace() { - // NOTE: This code MUST be async-signal safe (it's used by in-process - // stack dumping signal handler). NO malloc or stdio is allowed here. +@@ -722,7 +722,7 @@ + // NOTE: This code MUST be async-signal safe (it's used by in-process + // stack dumping signal handler). NO malloc or stdio is allowed here. -#if !defined(__UCLIBC__) +#if defined(__GLIBC__) + count = std::min(arraysize(trace_), count); + // Though the backtrace API man page does not list any possible negative - // return values, we take no chance. - count_ = base::saturated_cast(backtrace(trace_, arraysize(trace_))); -@@ -729,13 +729,13 @@ void StackTrace::Print() const { +@@ -737,13 +737,13 @@ // NOTE: This code MUST be async-signal safe (it's used by in-process // stack dumping signal handler). NO malloc or stdio is allowed here. @@ -81,15 +81,6 @@ #include #include #include -@@ -164,7 +164,7 @@ - } - - void WTFGetBacktrace(void** stack, int* size) { --#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__)) -+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__)) - *size = backtrace(stack, *size); - #elif OS(WIN) - // The CaptureStackBackTrace function is available in XP, but it is not @@ -215,7 +215,7 @@ }; diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index 82b91ed0c81..7a46b3f241a 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -1,14 +1,14 @@ # Template file for 'chromium' pkgname=chromium # See http://www.chromium.org/developers/calendar for the latest version -version=57.0.2987.133 +version=58.0.3029.81 revision=1 short_desc="Google's attempt at creating a safer, faster, and more stable browser" maintainer="Juan RP " homepage="http://www.chromium.org/" license="BSD" distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz" -checksum=70011770a7e522c92826a3af48d3fd28a46bf8042897d072d20c748cbf828cf7 +checksum=5ab61b7025a5143fa1b21713479b316ec7a98e262e79e84f9c9a9656179217cb only_for_archs="i686 x86_64 x86_64-musl" lib32disabled=yes @@ -18,7 +18,7 @@ nopie=yes # contains tools that are not PIE, enables PIE itself build_options="nacl" desc_option_nacl="Enable NaCL support" -hostmakedepends="yasm python pkg-config perl gperf bison ninja hwids +hostmakedepends="yasm python pkg-config perl gperf bison ninja nodejs hwids libatomic-devel libevent-devel libglib-devel" makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel @@ -52,6 +52,11 @@ post_extract() { # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68853#c2 sed -i '/config("compiler")/ a cflags_cc = [ "-fno-delete-null-pointer-checks" ]' \ build/config/linux/BUILD.gn + + # use system nodejs + mkdir -p third_party/node/linux/node-linux-x64/bin + ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/node + } do_configure() { local system="" bootstrap_conf="" conf=""