mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/qt5-webengine to 5.15.3-2
This commit is contained in:
parent
fa67c36106
commit
6d1446fd81
2 changed files with 166 additions and 12 deletions
|
@ -9,35 +9,42 @@ buildarch=12
|
|||
highmem=1
|
||||
|
||||
pkgname=qt5-webengine
|
||||
_qtver=5.15.2
|
||||
_qtver=5.15.3
|
||||
pkgver=${_qtver/-/}
|
||||
pkgrel=5
|
||||
pkgrel=2
|
||||
_commit=a059e7404a6db799f4da0ad696e65ae9c854b4b0
|
||||
# Upstream won't tag releases, because potatoes https://lists.qt-project.org/pipermail/interest/2021-March/036386.html
|
||||
arch=('x86_64')
|
||||
url='https://www.qt.io'
|
||||
license=('LGPL3' 'LGPL2.1' 'BSD')
|
||||
pkgdesc='Provides support for web applications using the Chromium browser project'
|
||||
depends=('qt5-webchannel' 'qt5-location' 'libxcomposite' 'libxrandr' 'pciutils' 'libxss'
|
||||
'libevent' 'snappy' 'nss' 'libxslt' 'minizip' 'ffmpeg' 're2' 'libvpx' 'krb5' 'ttf-font')
|
||||
makedepends=('python2' 'gperf' 'jsoncpp' 'ninja' 'qt5-tools' 'poppler' 'libpipewire02' 'nodejs' 'libxtst')
|
||||
'libevent' 'snappy' 'nss' 'libxslt' 'minizip' 'ffmpeg' 're2' 'libvpx' 'libxtst' 'ttf-font')
|
||||
makedepends=('git' 'python2' 'python' 'gperf' 'jsoncpp' 'ninja' 'qt5-tools' 'poppler' 'libpipewire02' 'nodejs')
|
||||
optdepends=('libpipewire02: WebRTC desktop sharing under Wayland')
|
||||
groups=('qt' 'qt5')
|
||||
_pkgfqn="${pkgname/5-/}-everywhere-src-${_qtver}"
|
||||
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
|
||||
qt5-webengine-icu-68.patch::"https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=9236b21c"
|
||||
_pkgfqn=qtwebengine
|
||||
source=(git+https://code.qt.io/qt/qtwebengine.git#commit=$_commit
|
||||
git+https://code.qt.io/qt/qtwebengine-chromium.git
|
||||
qt5-webengine-glibc-2.33.patch
|
||||
0001-ARM-toolchain-fixes.patch
|
||||
0002-Fix-ARM-skia-ICE.patch)
|
||||
sha256sums=('c8afca0e43d84f7bd595436fbe4d13a5bbdb81ec5104d605085d07545b6f91e0'
|
||||
'e3364f29db7a1630e9959123b34e6bcd25ba66cd1714638b8b9b6fd6fd527539'
|
||||
sha256sums=('SKIP'
|
||||
'SKIP'
|
||||
'2294e5390c869963fc58f7bf1ee0a254a3f7fce3ed00c04e34a5f03e2b31b624'
|
||||
'6cd3f4877e239c83df5ede59c74db2b2e84b4adce66ef83d30b3b4a3f04677e8'
|
||||
'f389de929c6d27217a1c7e3e7118b06e4d15e17123c96ace2c7a791ecad6bcc7')
|
||||
|
||||
prepare() {
|
||||
mkdir -p build
|
||||
|
||||
# Disable jumbo build https://bugreports.qt.io/browse/QTBUG-88657
|
||||
sed -i 's|use_jumbo_build=true|use_jumbo_build=false|' -i ${_pkgfqn}/src/buildtools/config/common.pri
|
||||
cd ${_pkgfqn}
|
||||
git submodule init
|
||||
git submodule set-url src/3rdparty "$srcdir"/qtwebengine-chromium
|
||||
git submodule set-branch --branch 87-based src/3rdparty
|
||||
git submodule update
|
||||
|
||||
patch -d $_pkgfqn/src/3rdparty/ -p1 -i "$srcdir"/qt5-webengine-icu-68.patch # Fix build with ICU 68
|
||||
patch -p1 -i "$srcdir"/qt5-webengine-glibc-2.33.patch # Fix text rendering when building with glibc 2.33
|
||||
|
||||
cd "$srcdir/$_pkgfqn/src/3rdparty"
|
||||
patch -p1 -i ${srcdir}/0001-ARM-toolchain-fixes.patch
|
||||
|
@ -66,4 +73,7 @@ package() {
|
|||
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
|
||||
|
||||
install -Dm644 "$srcdir"/${_pkgfqn}/src/3rdparty/chromium/LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE.chromium
|
||||
|
||||
# Fix cmake dependency versions
|
||||
sed -e "s|$pkgver\ |5.15.2 |" -i "$pkgdir"/usr/lib/cmake/*/*Config.cmake
|
||||
}
|
||||
|
|
144
extra/qt5-webengine/qt5-webengine-glibc-2.33.patch
Normal file
144
extra/qt5-webengine/qt5-webengine-glibc-2.33.patch
Normal file
|
@ -0,0 +1,144 @@
|
|||
# Patch made by Kevin Kofler <Kevin@tigcc.ticalc.org>
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1904652
|
||||
|
||||
diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-11-07 02:22:36.000000000 +0100
|
||||
+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-01-20 02:14:53.066223906 +0100
|
||||
@@ -257,6 +257,18 @@
|
||||
return RestrictKillTarget(current_pid, sysno);
|
||||
}
|
||||
|
||||
+#if defined(__NR_newfstatat)
|
||||
+ if (sysno == __NR_newfstatat) {
|
||||
+ return RewriteFstatatSIGSYS();
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+#if defined(__NR_fstatat64)
|
||||
+ if (sysno == __NR_fstatat64) {
|
||||
+ return RewriteFstatatSIGSYS();
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (SyscallSets::IsFileSystem(sysno) ||
|
||||
SyscallSets::IsCurrentDirectory(sysno)) {
|
||||
return Error(fs_denied_errno);
|
||||
diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
||||
--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2020-11-07 02:22:36.000000000 +0100
|
||||
+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2021-01-22 19:02:55.651668257 +0100
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
|
||||
|
||||
+#include <errno.h>
|
||||
+#include <fcntl.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
@@ -355,6 +357,35 @@
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
+intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args,
|
||||
+ void* aux) {
|
||||
+ switch (args.nr) {
|
||||
+#if defined(__NR_newfstatat)
|
||||
+ case __NR_newfstatat:
|
||||
+#endif
|
||||
+#if defined(__NR_fstatat64)
|
||||
+ case __NR_fstatat64:
|
||||
+#endif
|
||||
+#if defined(__NR_newfstatat) || defined(__NR_fstatat64)
|
||||
+ if (*reinterpret_cast<const char *>(args.args[1]) == '\0'
|
||||
+ && args.args[3] == static_cast<uint64_t>(AT_EMPTY_PATH)) {
|
||||
+ return sandbox::sys_fstat64(static_cast<int>(args.args[0]),
|
||||
+ reinterpret_cast<struct stat64 *>(args.args[2]));
|
||||
+ } else {
|
||||
+ errno = EACCES;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ break;
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
+ CrashSIGSYS_Handler(args, aux);
|
||||
+
|
||||
+ // Should never be reached.
|
||||
+ RAW_CHECK(false);
|
||||
+ return -ENOSYS;
|
||||
+}
|
||||
+
|
||||
bpf_dsl::ResultExpr CrashSIGSYS() {
|
||||
return bpf_dsl::Trap(CrashSIGSYS_Handler, NULL);
|
||||
}
|
||||
@@ -387,6 +418,10 @@
|
||||
return bpf_dsl::Trap(SIGSYSSchedHandler, NULL);
|
||||
}
|
||||
|
||||
+bpf_dsl::ResultExpr RewriteFstatatSIGSYS() {
|
||||
+ return bpf_dsl::Trap(SIGSYSFstatatHandler, NULL);
|
||||
+}
|
||||
+
|
||||
void AllocateCrashKeys() {
|
||||
#if !defined(OS_NACL_NONSFI)
|
||||
if (seccomp_crash_key)
|
||||
diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h
|
||||
--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2020-11-07 02:22:36.000000000 +0100
|
||||
+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2021-01-20 02:11:04.583714199 +0100
|
||||
@@ -62,6 +62,10 @@
|
||||
// sched_setparam(), sched_setscheduler()
|
||||
SANDBOX_EXPORT intptr_t SIGSYSSchedHandler(const arch_seccomp_data& args,
|
||||
void* aux);
|
||||
+// If the fstatat syscall is actually a disguised fstat, calls the regular fstat
|
||||
+// syscall, otherwise, crashes in the same way as CrashSIGSYS_Handler.
|
||||
+SANDBOX_EXPORT intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args,
|
||||
+ void* aux);
|
||||
|
||||
// Variants of the above functions for use with bpf_dsl.
|
||||
SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYS();
|
||||
@@ -72,6 +76,7 @@
|
||||
SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSFutex();
|
||||
SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSPtrace();
|
||||
SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteSchedSIGSYS();
|
||||
+SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteFstatatSIGSYS();
|
||||
|
||||
// Allocates a crash key so that Seccomp information can be recorded.
|
||||
void AllocateCrashKeys();
|
||||
diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc
|
||||
--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc 2020-11-07 02:22:36.000000000 +0100
|
||||
+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc 2021-01-20 02:41:12.033133269 +0100
|
||||
@@ -261,4 +261,13 @@
|
||||
|
||||
#endif // defined(MEMORY_SANITIZER)
|
||||
|
||||
+SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf)
|
||||
+{
|
||||
+#if defined(__NR_fstat64)
|
||||
+ return syscall(__NR_fstat64, fd, buf);
|
||||
+#else
|
||||
+ return syscall(__NR_fstat, fd, buf);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
} // namespace sandbox
|
||||
diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h
|
||||
--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h 2020-11-07 02:22:36.000000000 +0100
|
||||
+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h 2021-01-20 02:40:26.499827829 +0100
|
||||
@@ -17,6 +17,7 @@
|
||||
struct rlimit64;
|
||||
struct cap_hdr;
|
||||
struct cap_data;
|
||||
+struct stat64;
|
||||
|
||||
namespace sandbox {
|
||||
|
||||
@@ -84,6 +85,9 @@
|
||||
const struct sigaction* act,
|
||||
struct sigaction* oldact);
|
||||
|
||||
+// Recent glibc rewrites fstat to fstatat.
|
||||
+SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf);
|
||||
+
|
||||
} // namespace sandbox
|
||||
|
||||
#endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_
|
Loading…
Reference in a new issue