From 42b84057a4cd608974348ee2066ff08b681c139c Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Thu, 4 Jan 2018 12:39:00 -0600 Subject: [PATCH] qt5.6: backport seccomp patch to fix errors w/new glibc + epoll_pwait Based on: https://chromium.googlesource.com/chromium/src/+/4e8083b4ab953ba298aedfc4e79d464be15e4012 Fixes mendeley bug mentioned in #33396, which links to related issues in other distributions and upstream Qt. --- .../libraries/qt-5/5.6/default.nix | 4 ++-- .../qt-5/5.6/qtwebengine-seccomp.patch | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/libraries/qt-5/5.6/qtwebengine-seccomp.patch diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix index 7930bd909aa5..9ad5af8eecd2 100644 --- a/pkgs/development/libraries/qt-5/5.6/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/default.nix @@ -51,8 +51,8 @@ let qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; qttools = [ ./qttools.patch ]; - qtwebengine = - optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch; + qtwebengine = [ ./qtwebengine-seccomp.patch ] + ++ optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch; qtwebkit = [ ./qtwebkit.patch ]; }; diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebengine-seccomp.patch b/pkgs/development/libraries/qt-5/5.6/qtwebengine-seccomp.patch new file mode 100644 index 000000000000..bf6af8059823 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtwebengine-seccomp.patch @@ -0,0 +1,24 @@ +Backported to Qt 5.6 for epoll_pwait fix on newer glibc +Part of upstream Chromium's 4e8083b4ab953ba298aedfc4e79d464be15e4012 +Review URL: https://codereview.chromium.org/1613883002 +--- +diff --git a/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +index 10278dc5fc9b..b30b3e6acef6 100644 +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -414,6 +414,7 @@ bool SyscallSets::IsAllowedEpoll(int sysno) { + case __NR_epoll_create: + case __NR_epoll_wait: + #endif ++ case __NR_epoll_pwait: + case __NR_epoll_create1: + case __NR_epoll_ctl: + return true; +@@ -421,7 +422,6 @@ bool SyscallSets::IsAllowedEpoll(int sysno) { + #if defined(__x86_64__) + case __NR_epoll_ctl_old: + #endif +- case __NR_epoll_pwait: + #if defined(__x86_64__) + case __NR_epoll_wait_old: + #endif