From 97fbd523b01992bb3ebd29814978feda81bbd492 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Wed, 13 Nov 2019 00:30:54 +0100 Subject: [PATCH] qt5-webengine: fix issue #2368 for 5.13 --- .../qt5/patches/0008-musl-no-mallinfo.patch | 11 ++++++++- .../patches/0100-sandbox-sched_getparam.patch | 24 +++++++++++++++++++ srcpkgs/qt5/template | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/qt5/patches/0100-sandbox-sched_getparam.patch diff --git a/srcpkgs/qt5/patches/0008-musl-no-mallinfo.patch b/srcpkgs/qt5/patches/0008-musl-no-mallinfo.patch index 7b30717136a..c332b92b69d 100644 --- a/srcpkgs/qt5/patches/0008-musl-no-mallinfo.patch +++ b/srcpkgs/qt5/patches/0008-musl-no-mallinfo.patch @@ -20,7 +20,7 @@ MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc"); --- qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2017-11-28 14:06:53.000000000 +0100 +++ qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2018-01-27 20:48:11.571040348 +0100 -@@ -94,7 +94,7 @@ +@@ -100,14 +100,14 @@ malloc_statistics_t stats = {0}; malloc_zone_statistics(nullptr, &stats); return stats.size_in_use; @@ -29,3 +29,12 @@ struct mallinfo minfo = mallinfo(); #if defined(USE_TCMALLOC) return minfo.uordblks; + #else + return minfo.hblkhd + minfo.arena; + #endif +-#elif defined(OS_FUCHSIA) ++#else //if defined(OS_FUCHSIA) // also musl doesn't do this. + // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. + return 0; + #endif + diff --git a/srcpkgs/qt5/patches/0100-sandbox-sched_getparam.patch b/srcpkgs/qt5/patches/0100-sandbox-sched_getparam.patch new file mode 100644 index 00000000000..15c33a57f03 --- /dev/null +++ b/srcpkgs/qt5/patches/0100-sandbox-sched_getparam.patch @@ -0,0 +1,24 @@ +Allow SYS_sched_getparam and SYS_sched_getscheduler +musl uses them for pthread_getschedparam() + +source: https://git.alpinelinux.org/aports/commit/community/chromium?id=54af9f8ac24f52d382c5758e2445bf0206eff40e + +--- qtwebengine/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc 2019-11-12 20:48:20.013724661 +0100 ++++ qtwebengine/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc.patched 2019-11-12 20:58:57.330695676 +0100 +@@ -93,10 +93,16 @@ + case __NR_sysinfo: + case __NR_times: + case __NR_uname: ++#if !defined(__GLIBC__) ++ case __NR_sched_getparam: ++ case __NR_sched_getscheduler: ++#endif + return Allow(); + case __NR_sched_getaffinity: ++#if defined(__GLIBC__) + case __NR_sched_getparam: + case __NR_sched_getscheduler: ++#endif + case __NR_sched_setscheduler: + return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno); + case __NR_prlimit64: diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index 8c62762e47a..02779a02751 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -1,7 +1,7 @@ # Template file for 'qt5' pkgname=qt5 version=5.13.2 -revision=1 +revision=2 wrksrc="qt-everywhere-src-${version}" build_style=gnu-configure hostmakedepends="cmake clang flex git glib-devel gperf ninja pkg-config