Sync from SUSE:ALP:Source:Standard:1.0 libqt5-qtwebengine revision 34237511a72d17650c4f90320fe6182d

This commit is contained in:
Adrian Schröter 2023-12-19 15:03:23 +01:00
commit 09daceda1e
18 changed files with 6782 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,27 @@
From 68799a1e0815b20ca59ce354a55280399257a201 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Fri, 25 Mar 2022 15:29:28 +0100
Subject: [PATCH] skia: Some includes to fix build with GCC 12
Those includes got introduced upstream for other reasons and fixed building
with GCC 12 as a side effect.
---
src/3rdparty/chromium/third_party/skia/include/core/SkColor.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h b/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h
index 36527e38e53..f77c24ade82 100644
--- a/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h
+++ b/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h
@@ -12,6 +12,8 @@
#include "include/core/SkScalar.h"
#include "include/core/SkTypes.h"
+#include <array>
+
/** \file SkColor.h
Types, consts, functions, and macros for colors.
--
2.34.1

28
_constraints Normal file
View File

@ -0,0 +1,28 @@
<constraints>
<hardware>
<disk>
<size unit="G">12</size>
</disk>
<memory>
<size unit="G">14</size>
</memory>
<physicalmemory>
<size unit="G">12</size>
</physicalmemory>
<processors>4</processors>
</hardware>
<overwrite>
<conditions>
<arch>armv6l</arch>
<arch>armv7l</arch>
</conditions>
<hardware>
<memory>
<size unit="G">9</size>
</memory>
<physicalmemory>
<size unit="G">8</size>
</physicalmemory>
</hardware>
</overwrite>
</constraints>

22
_service Normal file
View File

@ -0,0 +1,22 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="changesgenerate">enable</param>
<param name="version">5.15.16</param>
<param name="url">git://code.qt.io/qt/qtwebengine.git</param>
<param name="scm">git</param>
<param name="filename">qtwebengine-everywhere-src</param>
<param name="revision">v5.15.16-lts</param>
</service>
<service name="tar_scm" mode="disabled">
<param name="changesgenerate">disable</param>
<param name="url">https://chromium.googlesource.com/catapult</param>
<param name="revision">main</param>
<param name="scm">git</param>
<param name="filename">catapult</param>
<param name="versionformat">git</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://code.qt.io/qt/qtwebengine.git</param>
<param name="changesrevision">224806a7022eed6d5c75b486bec8715a618cb314</param></service></servicedata>

View File

@ -0,0 +1,13 @@
Index: qtwebengine-everywhere-src-5.11.0-alpha/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h
===================================================================
--- qtwebengine-everywhere-src-5.11.0-alpha.orig/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h
+++ qtwebengine-everywhere-src-5.11.0-alpha/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h
@@ -566,7 +566,7 @@
#define CONFIG_NEON_CLOBBER_TEST 0
#define CONFIG_OSSFUZZ 0
#define CONFIG_PIC 1
-#define CONFIG_THUMB 1
+#define CONFIG_THUMB 0
#define CONFIG_VALGRIND_BACKTRACE 0
#define CONFIG_XMM_CLOBBER_TEST 0
#define CONFIG_BSFS 1

BIN
catapult-git.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,94 @@
From: Antonio Larrosa <alarrosa@suse.com>
Subject: Disable GPU when using nouveau or running on wayland
References: boo#1005323, boo#1060990
Qt WebEngine uses multi-threaded OpenGL, which nouveau does not support.
It also crashes when running on wayland, the cause is not yet known.
Work around these issues by not doing GPU-accelerated rendering in such
cases.
Index: qtwebengine-everywhere-src-5.15.1/src/core/web_engine_context.cpp
===================================================================
--- qtwebengine-everywhere-src-5.15.1.orig/src/core/web_engine_context.cpp
+++ qtwebengine-everywhere-src-5.15.1/src/core/web_engine_context.cpp
@@ -127,6 +127,7 @@
#include <QOffscreenSurface>
#if QT_CONFIG(opengl)
# include <QOpenGLContext>
+# include <QOpenGLFunctions>
#endif
#include <QQuickWindow>
#include <QStringList>
@@ -186,6 +187,39 @@ void dummyGetPluginCallback(const std::v
}
#endif
+#ifndef QT_NO_OPENGL
+QString openGLVendor()
+{
+ QString vendor;
+
+ QOpenGLContext *oldContext = QOpenGLContext::currentContext();
+ QSurface *oldSurface = 0;
+ if (oldContext)
+ oldSurface = oldContext->surface();
+
+ QScopedPointer<QOffscreenSurface> surface( new QOffscreenSurface );
+ surface->create();
+ QOpenGLContext context;
+ if (!context.create()) {
+ qDebug() << "Error creating openGL context";
+ }
+ else if (!context.makeCurrent(surface.data())) {
+ qDebug() << "Error making openGL context current context";
+ } else {
+ const GLubyte *p;
+ QOpenGLFunctions *f = context.functions();
+ if ((p = f->glGetString(GL_VENDOR)))
+ vendor = QString::fromLatin1(reinterpret_cast<const char *>(p));
+ }
+
+ context.doneCurrent();
+ if (oldContext && oldSurface)
+ oldContext->makeCurrent(oldSurface);
+
+ return vendor;
+}
+#endif
+
} // namespace
namespace QtWebEngineCore {
@@ -697,10 +731,31 @@ WebEngineContext::WebEngineContext()
const char *glType = 0;
#if QT_CONFIG(opengl)
+ bool disableGpu = qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_GPU");
+
+ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND") && qApp->platformName().startsWith("wayland", Qt::CaseInsensitive))
+ {
+ qWarning() << "Running on wayland. Qt WebEngine will disable usage of the GPU.\n"
+ "Note: you can set the QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND\n"
+ "environment variable before running this application, but this is \n"
+ "not recommended since this usually causes applications to crash.";
+ disableGpu = true;
+ }
+
+ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND") && openGLVendor() == QStringLiteral("nouveau"))
+ {
+ qWarning() << "Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU.\n"
+ "Note: you can set the QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND\n"
+ "environment variable before running this application, but this is \n"
+ "not recommended since this usually causes applications to crash as\n"
+ "Nouveau openGL drivers don't support multithreaded rendering";
+ disableGpu = true;
+ }
+
const bool tryGL = (usingDefaultSGBackend() && !usingSoftwareDynamicGL() &&
QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL))
|| enableGLSoftwareRendering;
- if (tryGL) {
+ if (tryGL && !disableGpu) {
if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) {
// If the native handle is QEGLNativeContext try to use GL ES/2.
// If there is no native handle, assume we are using wayland and try GL ES/2.

View File

@ -0,0 +1,2 @@
# Silence rpmlint error. The libraries SONAME won't change
addFilter("shlib-policy-name-error .*")

1861
libqt5-qtwebengine.changes Normal file

File diff suppressed because it is too large Load Diff

493
libqt5-qtwebengine.spec Normal file
View File

@ -0,0 +1,493 @@
#
# spec file for package libqt5-qtwebengine
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without system_ffmpeg
%bcond_without system_minizip
%bcond_without pipewire
# The default python version is too old on Leap 15
%if 0%{?suse_version} < 1550
%bcond_without python39
%else
%bcond_without python3
%endif
# spellchecking dictionary directory
%global _qtwebengine_dictionaries_dir %{_libqt5_datadir}/qtwebengine_dictionaries
Name: libqt5-qtwebengine
Version: 5.15.16
Release: 0
Summary: Qt 5 WebEngine Library
License: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
Group: Development/Libraries/X11
URL: https://www.qt.io
%define base_name libqt5
%define real_version 5.15.16
%define so_version 5.15.16
%define tar_version qtwebengine-everywhere-src-%{version}
Source: %{tar_version}.tar.xz
# Use a git snapshot for catapult to build with python3 (git rev: 2da767c6)
Source1: catapult-git.tar.xz
Source99: libqt5-qtwebengine-rpmlintrc
# PATCH-FIX-UPSTREAM armv6-ffmpeg-no-thumb.patch - Fix ffmpeg configuration for armv6
Patch0: armv6-ffmpeg-no-thumb.patch
# PATCH-FIX-OPENSUSE disable-gpu-when-using-nouveau-boo-1005323.diff
Patch1: disable-gpu-when-using-nouveau-boo-1005323.diff
# PATCH-FIX-OPENSUSE
Patch2: rtc-dont-use-h264.patch
# PATCH-FIX-UPSTREAM
Patch3: 0001-skia-Some-includes-to-fix-build-with-GCC-12.patch
# PATCH-FIX-UPSTREAM -- build with pipewire 0.3
Patch4: qtwebengine-pipewire-0.3.patch
# PATCH-FIX-OPENSUSE -- build with python 3
Patch5: qtwebengine-python3.patch
# PATCH-FIX-UPSTREAM -- handle futex_time64
Patch6: sandbox_futex_time64.patch
# PATCH-FIX-UPSTREAM -- python 3.11 fixes
Patch7: python311-fixes.patch
### Patch 50-99 are applied conditionally
# PATCH-FIX-OPENSUSE -- allow building qtwebengine with ffmpeg5
Patch50: qtwebengine-ffmpeg5.patch
###
# http://www.chromium.org/blink is not ported to PowerPC & s390
ExcludeArch: ppc ppc64 ppc64le s390 s390x
# Try to fix i586 MemoryErrors with rpmlint
#!BuildIgnore: rpmlint
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flac-devel
BuildRequires: flex
BuildRequires: git-core
BuildRequires: gperf
BuildRequires: krb5
BuildRequires: krb5-devel
BuildRequires: libQt5QuickControls2-devel
BuildRequires: libcap-devel
BuildRequires: libgcrypt-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libqt5-qtbase-private-headers-devel >= 5.12
BuildRequires: libqt5-qtdeclarative-private-headers-devel >= 5.12
BuildRequires: libqt5-qtlocation-private-headers-devel >= 5.12
# For building pdf examples...
BuildRequires: libqt5-qtsvg-devel
BuildRequires: libqt5-qttools-private-headers-devel >= 5.12
BuildRequires: libqt5-qtwebchannel-private-headers-devel >= 5.12
BuildRequires: libqt5-qtxmlpatterns-private-headers-devel >= 5.12
BuildRequires: memory-constraints
BuildRequires: ninja
BuildRequires: nodejs-default
BuildRequires: pam-devel
BuildRequires: pciutils-devel
BuildRequires: perl
BuildRequires: perl-JSON
%if %{with pipewire}
BuildRequires: pipewire-devel
%endif
BuildRequires: pkgconfig
%if %{with python3}
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-xml
%endif
%if %{with python39}
BuildRequires: python39
BuildRequires: python39-devel
BuildRequires: python39-xml
%endif
BuildRequires: re2c
BuildRequires: sed
BuildRequires: snappy-devel
BuildRequires: update-desktop-files
BuildRequires: usbutils
BuildRequires: util-linux
%ifnarch %{arm}
BuildRequires: valgrind-devel
%endif
BuildRequires: wdiff
BuildRequires: xz
BuildRequires: yasm
BuildRequires: yasm-devel
BuildRequires: perl(Switch)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(atk)
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2) >= 2.4.2
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.32
BuildRequires: pkgconfig(glproto)
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gthread-2.0)
BuildRequires: pkgconfig(harfbuzz) >= 2.4.0
BuildRequires: pkgconfig(icu-i18n) >= 65.0
BuildRequires: pkgconfig(icu-uc) >= 65.0
BuildRequires: pkgconfig(jsoncpp)
BuildRequires: pkgconfig(lcms2)
%if %{with system_ffmpeg}
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
%endif
BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libevent)
BuildRequires: pkgconfig(libexif)
BuildRequires: pkgconfig(libmtp)
BuildRequires: pkgconfig(libpci)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libsrtp)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(libwebp)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libxslt)
%if %{with system_minizip}
BuildRequires: pkgconfig(minizip)
%endif
BuildRequires: pkgconfig(nspr)
BuildRequires: pkgconfig(nss)
BuildRequires: pkgconfig(opus)
BuildRequires: pkgconfig(pangocairo)
BuildRequires: pkgconfig(pangoft2)
BuildRequires: pkgconfig(poppler-cpp)
BuildRequires: pkgconfig(protobuf)
# re2 >= 2023-07-01 breaks the build, use libre2-10-devel if needed
BuildRequires: pkgconfig(re2) <= 10.0.0
BuildRequires: pkgconfig(speex)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(vpx) >= 1.8.0
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xdamage)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xkbfile)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(xscrnsaver)
BuildRequires: pkgconfig(xt)
BuildRequires: pkgconfig(xtst)
BuildRequires: pkgconfig(zlib)
BuildRequires: yasm-devel
%requires_ge libQt5Network5
%requires_ge libQtQuick5
%requires_ge libQt5Widgets5
%description
Qt WebEngine provides functionality for rendering regions of dynamic
web content.
The functionality in Qt WebEngine is divided into the following
modules:
* QtWebEngineCore: Provides public API shared by both QtWebEngine and
QtWebEngineWidgets
* QtWebEngine: Provides QML types for rendering web content within a
QML application
* QtWebEngineWidgets: Provides a web browser engine as well as C++
classes to render and interact with web content
%package devel
Summary: Development files for the Qt5 WebEngine library
Group: Development/Libraries/X11
Requires: %{name} = %{version}
%description devel
You need this package if you want to compile programs with Qt WebEngine.
%package private-headers-devel
Summary: Non-ABI stable experimental API for the Qt5 WebEngine library
Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version}
%requires_ge libqt5-qtbase-private-headers-devel
%requires_ge libqt5-qtdeclarative-private-headers-devel
BuildArch: noarch
%description private-headers-devel
This package provides private headers of libqt5-qtwebengine that are normally
not used by application development and that do not have any ABI or
API guarantees. The packages that build against these have to require
the exact Qt version.
%package examples
Summary: Qt5 WebEngine examples
Group: Development/Libraries/X11
Requires: libqt5-qtquickcontrols2
Recommends: %{name}-devel
%description examples
Examples for the libqt5-qtwebengine module.
%package -n libQt5Pdf5
Summary: Qt5 PDF library
Group: Development/Libraries/X11
%description -n libQt5Pdf5
Main library of the Qt PDF module.
%package -n libQt5PdfWidgets5
Summary: Qt5 PDF library for Qt Widgets
Group: Development/Libraries/X11
%description -n libQt5PdfWidgets5
Library of the Qt PDF module with support for Qt Widgets.
%package -n libqt5-qtpdf-imports
Summary: Qt5 PDF module for QML
Group: Development/Libraries/X11
%description -n libqt5-qtpdf-imports
Qt Quick module for the Qt PDF library.
%package -n libqt5-qtpdf-devel
Summary: Development files for the Qt5 PDF library
Group: Development/Libraries/X11
Requires: libQt5Pdf5 = %{version}
Requires: libQt5PdfWidgets5 = %{version}
%description -n libqt5-qtpdf-devel
You need this package if you want to compile programs with Qt PDF.
%package -n libqt5-qtpdf-private-headers-devel
Summary: Non-ABI stable experimental API for the Qt5 PDF library
Group: Development/Libraries/C and C++
Requires: libqt5-qtpdf-devel = %{version}
%requires_ge libqt5-qtbase-private-headers-devel
BuildArch: noarch
%description -n libqt5-qtpdf-private-headers-devel
This package provides private headers of libqt5-qtpdf that are normally
not used by application development and that do not have any ABI or
API guarantees. The packages that build against these have to require
the exact Qt version.
%package -n libqt5-qtpdf-examples
Summary: Qt5 PDF examples
Group: Development/Libraries/X11
Recommends: libqt5-qtpdf-devel
%description -n libqt5-qtpdf-examples
Examples for the libqt5-qtpdf module.
%prep
%setup -q -n %{tar_version}
# Leap 15 doesn't understand '%%autopatch -m'
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
# Replace the whole catapult folder rather than picking individual changes
pushd src/3rdparty/chromium/third_party
rm -r catapult
tar xJf %{SOURCE1}
mv catapult-git catapult
popd
# FFmpeg 5
%if %{with system_ffmpeg}
%if %{pkg_vcmp libavcodec-devel >= 5}
%patch50 -p1
%endif
%endif
sed -i 's|$(STRIP)|strip|g' src/core/core_module.pro
#force the configure script to generate the forwarding headers (it checks whether .git directory exists)
mkdir .git
# QTBUG-61128
sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \
src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
%build
rm -r src/3rdparty/chromium/third_party/openh264/src
%if %{with python39}
sed -i 's#QMAKE_PYTHON = python3#QMAKE_PYTHON = python3.9#' mkspecs/features/functions.prf
sed -i 's#python3#python3.9#' configure.pri
%endif
%ifnarch x86_64
RPM_OPT_FLAGS="$RPM_OPT_FLAGS "
export RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-g / }
%endif
# Upstream does not care about those warnings, but optflags has -Werror=return-type.
export RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -Wno-return-type"
# It does not actually include proprietary codecs, it only makes it attempt to use ffmpeg
# Link pulseaudio to work around QTBUG-77037
%qmake5 QMAKE_CFLAGS="$RPM_OPT_FLAGS" \
QMAKE_CXXFLAGS="$RPM_OPT_FLAGS" \
QMAKE_LFLAGS+="-Wl,--no-keep-memory -Wl,--hash-size=31 -Wl,--reduce-memory-overheads" \
gn_args+="link_pulseaudio=true" \
gn_args+="media_use_openh264=false" \
gn_args+="use_system_libxml=true use_system_libxslt=true" \
qtwebengine.pro -- \
-webengine-alsa \
-no-webengine-embedded-build \
-webengine-kerberos \
-system-webengine-icu \
-system-webengine-opus \
-system-webengine-webp \
-webengine-pepper-plugins \
-webengine-printing-and-pdf \
%if %{with system_ffmpeg}
-system-webengine-ffmpeg \
-webengine-proprietary-codecs \
%endif
%if %{with pipewire}
-webengine-webrtc-pipewire
%endif
# Determine the right number of parallel processes based on the available memory
%limit_build -m 2750
# Ensure that also the internal chromium build follows the right number of parallel
# processes instead of its defaults.
export NINJAFLAGS="%{?_smp_mflags}"
# Warning: Don't use %%make_build or the chromium build log won't be available
make %{_smp_mflags} VERBOSE=1
%install
%qmake5_install
find %{buildroot}%{_libdir} -type f -name '*la' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} +
find %{buildroot}%{_libdir} -type f -name '*pc' -print -exec perl -pi -e "s, -L$RPM_BUILD_DIR/?\S+,,g" {} + -exec sed -i -e "s,^moc_location=.*,moc_location=%libqt5_bindir/moc," -e "s,uic_location=.*,uic_location=%libqt5_bindir/uic," {} +
find %{buildroot}%{_libdir} -type f -name '*pc' -exec sed -i -e "/^RPM_BUILD_DIR/d" {} +
sed -i '/^Libs.private/d' %{buildroot}%{_libdir}/pkgconfig/Qt*Web*.pc
# kill .la files
rm -f %{buildroot}%{_libqt5_libdir}/*.la
# Workaround to allow using QtWE with older Qt versions
%global qtcore_version %(printf %{pkg_version libQt5Core5} | cut -d + -f 1)
# NOTE the space after '%%{version}' is important to only match '5.15.X ${_Qt5XXX_FIND_VERSION_EXACT}'
sed -i 's#%{version} #%{qtcore_version} #' %{buildroot}%{_libqt5_libdir}/cmake/*/*Config.cmake
# Hunspell dictionaries will be converted and put here on package installation
mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir}
%if %{pkg_vcmp libQt5Core5 >= 5.15}
# CMake files for plugins are only useful for static builds
rm -r %{buildroot}%{_libqt5_libdir}/cmake/Qt5Gui
%endif
%ldconfig_scriptlets
%ldconfig_scriptlets -n libQt5Pdf5
%ldconfig_scriptlets -n libQt5PdfWidgets5
%filetriggerin -- %{_datadir}/hunspell
# Convert Hunspell dictionaries on package installation
while read filename ; do
case "$filename" in
*.dic)
bdicname=%{_qtwebengine_dictionaries_dir}/`basename -s .dic "$filename"`.bdic
%{_libqt5_bindir}/qwebengine_convert_dict "$filename" "$bdicname" &> /dev/null || :
;;
esac
done
%files
%license LICENSE.*
%dir %{_datadir}/qt5/
%dir %{_qtwebengine_dictionaries_dir}
%dir %{_datadir}/qt5/resources/
%{_datadir}/qt5/resources/qtwebengine_*
%dir %{_datadir}/qt5/translations/
%{_datadir}/qt5/translations/qtwebengine_locales/
%{_libqt5_archdatadir}/qml/QtWebEngine/
%{_libqt5_bindir}/qwebengine_convert_dict
%{_libqt5_libdir}/libQt5WebEngine.so.*
%{_libqt5_libdir}/libQt5WebEngineCore.so.*
%{_libqt5_libdir}/libQt5WebEngineWidgets.so.*
%dir %{_libqt5_libexecdir}
%{_libqt5_libexecdir}/QtWebEngineProcess
%files private-headers-devel
%license LICENSE.*
%{_libqt5_includedir}/QtWebEngine*/%{so_version}
%files devel
%exclude %{_libqt5_includedir}/QtWebEngine*/%{so_version}
%{_libqt5_includedir}/QtWebEngine*/
%dir %{_libqt5_libdir}/cmake/Qt5Designer/
%{_libqt5_libdir}/cmake/Qt5Designer/Qt5Designer_QWebEngineViewPlugin.cmake
%{_libqt5_libdir}/cmake/Qt5WebEngine*/
%{_libqt5_libdir}/libQt5WebEngine*.prl
%{_libqt5_libdir}/libQt5WebEngine*.so
%{_libqt5_libdir}/pkgconfig/Qt5WebEngine*.pc
%{_libqt5_libdir}/qt5/mkspecs/modules/qt_lib_webengine*.pri
%dir %{_libqt5_plugindir}/designer/
%{_libqt5_plugindir}/designer/libqwebengineview.so
%files examples
%license LICENSE.*
%dir %{_libqt5_examplesdir}
%{_libqt5_examplesdir}/webengine*/
%files -n libQt5Pdf5
%license LICENSE.*
%{_libqt5_archdatadir}/plugins/imageformats/libqpdf.so
%{_libqt5_libdir}/libQt5Pdf.so.*
%files -n libQt5PdfWidgets5
%license LICENSE.*
%{_libqt5_libdir}/libQt5PdfWidgets.so.*
%files -n libqt5-qtpdf-imports
%license LICENSE.*
%{_libqt5_archdatadir}/qml/QtQuick/Pdf/
%files -n libqt5-qtpdf-private-headers-devel
%license LICENSE.*
%{_libqt5_includedir}/QtPdf/%{so_version}
%{_libqt5_includedir}/QtPdfWidgets/%{so_version}
%files -n libqt5-qtpdf-devel
%license LICENSE.*
%exclude %{_libqt5_includedir}/QtPdf*/%{so_version}
%{_libqt5_includedir}/QtPdf/
%{_libqt5_includedir}/QtPdfWidgets/
%{_libqt5_libdir}/cmake/Qt5Pdf/
%{_libqt5_libdir}/cmake/Qt5PdfWidgets/
%{_libqt5_libdir}/libQt5Pdf.prl
%{_libqt5_libdir}/libQt5Pdf.so
%{_libqt5_libdir}/libQt5PdfWidgets.prl
%{_libqt5_libdir}/libQt5PdfWidgets.so
%{_libqt5_libdir}/pkgconfig/Qt5Pdf.pc
%{_libqt5_libdir}/pkgconfig/Qt5PdfWidgets.pc
%{_libqt5_libdir}/qt5/mkspecs/modules/qt_lib_pdf*.pri
%files -n libqt5-qtpdf-examples
%license LICENSE.*
%dir %{_libqt5_examplesdir}
%{_libqt5_examplesdir}/pdf*/
%changelog

149
python311-fixes.patch Normal file
View File

@ -0,0 +1,149 @@
From f90f49df8db04dcb72f7ce0c4d0b2fe329bab00c Mon Sep 17 00:00:00 2001
From: Dan Harrington <harringtond@chromium.org>
Date: Fri, 04 Jun 2021 16:46:25 +0000
Subject: [PATCH] Migrate presubmit to python3
Fixed a couple warnings I found when running the unit
tests in python3.
Bug: 1212110
Change-Id: I3d1b5859b5c517ad5eea30cb816fad0389715f73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2934203
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#889331}
---
Index: qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/PRESUBMIT.py
===================================================================
--- qtwebengine-everywhere-src-5.15.13.orig/src/3rdparty/chromium/tools/metrics/ukm/PRESUBMIT.py
+++ qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/PRESUBMIT.py
@@ -8,6 +8,8 @@ See http://dev.chromium.org/developers/h
for more details on the presubmit API built into gcl.
"""
+USE_PYTHON3 = True
+
UKM_XML = 'ukm.xml'
Index: qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/gen_builders_test.py
===================================================================
--- qtwebengine-everywhere-src-5.15.13.orig/src/3rdparty/chromium/tools/metrics/ukm/gen_builders_test.py
+++ qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/gen_builders_test.py
@@ -25,8 +25,8 @@ class GenBuildersTest(unittest.TestCase)
def testGenerateCode(self):
relpath = '.'
- data = ukm_model.UKM_XML_TYPE.Parse(
- open('../../tools/metrics/ukm/ukm.xml').read())
+ with open('../../tools/metrics/ukm/ukm.xml') as f:
+ data = ukm_model.UKM_XML_TYPE.Parse(f.read())
event = data[ukm_model._EVENT_TYPE.tag][0]
metric = event[ukm_model._METRIC_TYPE.tag][0]
self.assertIsNotNone(event)
Index: qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py
===================================================================
--- qtwebengine-everywhere-src-5.15.13.orig/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py
+++ qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py
@@ -39,15 +39,16 @@ _INDEX_TYPE = models.ObjectNodeType(
],
single_line=True)
-_STATISTICS_TYPE = models.ObjectNodeType(
+_STATISTICS_TYPE = models.ObjectNodeType(
'statistics',
attributes=[
- ('export', str, r'^(?i)(|true|false)$'),
+ ('export', str, r'(?i)^(|true|false)$'),
],
children=[
models.ChildType(_QUANTILES_TYPE.tag, _QUANTILES_TYPE, multiple=False),
- models.ChildType(
- _ENUMERATION_TYPE.tag, _ENUMERATION_TYPE, multiple=False),
+ models.ChildType(_ENUMERATION_TYPE.tag,
+ _ENUMERATION_TYPE,
+ multiple=False),
])
_HISTORY_TYPE = models.ObjectNodeType(
@@ -90,25 +91,34 @@ _METRIC_TYPE = models.ObjectNodeType(
_AGGREGATION_TYPE.tag, _AGGREGATION_TYPE, multiple=True),
])
-_EVENT_TYPE = models.ObjectNodeType(
- 'event',
- attributes=[
- ('name', str, r'^[A-Za-z0-9.]+$'),
- ('singular', str, r'^(?i)(|true|false)$'),
- ],
- alphabetization=[
- (_OBSOLETE_TYPE.tag, _KEEP_ORDER),
- (_OWNER_TYPE.tag, _KEEP_ORDER),
- (_SUMMARY_TYPE.tag, _KEEP_ORDER),
- (_METRIC_TYPE.tag, _LOWERCASE_FN('name')),
- ],
- extra_newlines=(1, 1, 1),
- children=[
- models.ChildType(_OBSOLETE_TYPE.tag, _OBSOLETE_TYPE, multiple=False),
- models.ChildType(_OWNER_TYPE.tag, _OWNER_TYPE, multiple=True),
- models.ChildType(_SUMMARY_TYPE.tag, _SUMMARY_TYPE, multiple=False),
- models.ChildType(_METRIC_TYPE.tag, _METRIC_TYPE, multiple=True),
- ])
+_EVENT_TYPE = models.ObjectNodeType('event',
+ attributes=[
+ ('name', str, r'^[A-Za-z0-9.]+$'),
+ ('singular', str,
+ r'(?i)^(|true|false)$'),
+ ],
+ alphabetization=[
+ (_OBSOLETE_TYPE.tag, _KEEP_ORDER),
+ (_OWNER_TYPE.tag, _KEEP_ORDER),
+ (_SUMMARY_TYPE.tag, _KEEP_ORDER),
+ (_METRIC_TYPE.tag,
+ _LOWERCASE_FN('name')),
+ ],
+ extra_newlines=(1, 1, 1),
+ children=[
+ models.ChildType(_OBSOLETE_TYPE.tag,
+ _OBSOLETE_TYPE,
+ multiple=False),
+ models.ChildType(_OWNER_TYPE.tag,
+ _OWNER_TYPE,
+ multiple=True),
+ models.ChildType(_SUMMARY_TYPE.tag,
+ _SUMMARY_TYPE,
+ multiple=False),
+ models.ChildType(_METRIC_TYPE.tag,
+ _METRIC_TYPE,
+ multiple=True),
+ ])
_UKM_CONFIGURATION_TYPE = models.ObjectNodeType(
'ukm-configuration',
Index: qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/PRESUBMIT_test_mocks.py
===================================================================
--- qtwebengine-everywhere-src-5.15.13.orig/src/3rdparty/chromium/PRESUBMIT_test_mocks.py
+++ qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/PRESUBMIT_test_mocks.py
@@ -119,7 +119,7 @@ class MockInputApi(object):
def PresubmitLocalPath(self):
return self.presubmit_local_path
- def ReadFile(self, filename, mode='rU'):
+ def ReadFile(self, filename, mode='r'):
if hasattr(filename, 'AbsoluteLocalPath'):
filename = filename.AbsoluteLocalPath()
for file_ in self.files:
Index: qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/grit/grit/util.py
===================================================================
--- qtwebengine-everywhere-src-5.15.13.orig/src/3rdparty/chromium/tools/grit/grit/util.py
+++ qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/grit/grit/util.py
@@ -211,7 +211,7 @@ def ReadFile(filename, encoding):
mode = 'rb'
encoding = None
else:
- mode = 'rU'
+ mode = 'r'
with io.open(abs(filename), mode, encoding=encoding) as f:
return f.read()

BIN
qtwebengine-everywhere-src-5.15.16.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

153
qtwebengine-ffmpeg5.patch Normal file
View File

@ -0,0 +1,153 @@
Allow building qtwebengine using ffmpeg 5
Origin: ArchLinux, https://github.com/archlinux/svntogit-packages/tree/packages/qt5-webengine/trunk
diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
index 2734a48..70b1877 100644
--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
+++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
@@ -29,6 +29,7 @@ extern "C" {
#include <libavformat/avformat.h>
#include <libavformat/avio.h>
#include <libavutil/avutil.h>
+#include <libavutil/channel_layout.h>
#include <libavutil/imgutils.h>
#include <libavutil/log.h>
#include <libavutil/mastering_display_metadata.h>
diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc
index cb81d92..bd73908 100644
--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc
+++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc
@@ -85,7 +85,7 @@ bool AudioFileReader::OpenDemuxer() {
}
bool AudioFileReader::OpenDecoder() {
- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
if (codec) {
// MP3 decodes to S16P which we don't support, tell it to use S16 instead.
if (codec_context_->sample_fmt == AV_SAMPLE_FMT_S16P)
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
index 0d825ed..72fac61 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
@@ -329,7 +329,7 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) {
}
}
- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
if (!codec ||
avcodec_open2(codec_context_.get(), codec, &codec_options) < 0) {
DLOG(ERROR) << "Could not initialize audio decoder: "
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
index d34db63..427565b 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
@@ -98,12 +98,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) {
// Next try to use the first DTS value, for codecs where we know PTS == DTS
// (excludes all H26x codecs). The start time must be returned in PTS.
- if (stream->first_dts != kNoFFmpegTimestamp &&
+ if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
const base::TimeDelta first_pts =
- ConvertFromTimeBase(stream->time_base, stream->first_dts);
+ ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
if (first_pts < start_time)
start_time = first_pts;
}
@@ -408,11 +408,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
scoped_refptr<DecoderBuffer> buffer;
if (type() == DemuxerStream::TEXT) {
- int id_size = 0;
+ size_t id_size = 0;
uint8_t* id_data = av_packet_get_side_data(
packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
- int settings_size = 0;
+ size_t settings_size = 0;
uint8_t* settings_data = av_packet_get_side_data(
packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
@@ -424,7 +424,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
side_data.data(), side_data.size());
} else {
- int side_data_size = 0;
+ size_t side_data_size = 0;
uint8_t* side_data = av_packet_get_side_data(
packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
@@ -485,7 +485,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
packet->size - data_offset);
}
- int skip_samples_size = 0;
+ size_t skip_samples_size = 0;
const uint32_t* skip_samples_ptr =
reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc
index 0ef3521..8483ecc 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc
@@ -59,7 +59,6 @@ static int64_t AVIOSeekOperation(void* opaque, int64_t offset, int whence) {
}
void FFmpegGlue::InitializeFFmpeg() {
- av_register_all();
}
static void LogContainer(bool is_local_file,
@@ -95,9 +94,6 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) {
// Enable fast, but inaccurate seeks for MP3.
format_context_->flags |= AVFMT_FLAG_FAST_SEEK;
- // Ensures we can read out various metadata bits like vp8 alpha.
- format_context_->flags |= AVFMT_FLAG_KEEP_SIDE_DATA;
-
// Ensures format parsing errors will bail out. From an audit on 11/2017, all
// instances were real failures. Solves bugs like http://crbug.com/710791.
format_context_->error_recognition |= AV_EF_EXPLODE;
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
index ef12477..7996606 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
@@ -391,7 +391,7 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
if (decode_nalus_)
codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS;
- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) {
ReleaseFFmpegResources();
return false;
diff --git a/src/3rdparty/chromium/media/filters/media_file_checker.cc b/src/3rdparty/chromium/media/filters/media_file_checker.cc
index 59c2a2f..1a9872c 100644
--- a/src/3rdparty/chromium/media/filters/media_file_checker.cc
+++ b/src/3rdparty/chromium/media/filters/media_file_checker.cc
@@ -68,7 +68,7 @@ bool MediaFileChecker::Start(base::TimeDelta check_time) {
auto context = AVStreamToAVCodecContext(format_context->streams[i]);
if (!context)
continue;
- AVCodec* codec = avcodec_find_decoder(cp->codec_id);
+ const AVCodec* codec = avcodec_find_decoder(cp->codec_id);
if (codec && avcodec_open2(context.get(), codec, nullptr) >= 0) {
auto loop = std::make_unique<FFmpegDecodingLoop>(context.get());
stream_contexts[i] = {std::move(context), std::move(loop)};
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
index 9002b87..d12fade 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
@@ -203,7 +203,7 @@ int32_t H264DecoderImpl::InitDecode(const VideoCodec* codec_settings,
// a pointer |this|.
av_context_->opaque = this;
- AVCodec* codec = avcodec_find_decoder(av_context_->codec_id);
+ const AVCodec* codec = avcodec_find_decoder(av_context_->codec_id);
if (!codec) {
// This is an indication that FFmpeg has not been initialized or it has not
// been compiled/initialized with the correct set of codecs.

File diff suppressed because it is too large Load Diff

2058
qtwebengine-python3.patch Normal file

File diff suppressed because it is too large Load Diff

32
rtc-dont-use-h264.patch Normal file
View File

@ -0,0 +1,32 @@
From: Fabian Vogt <fabian@ritter-vogt.de>
Subject: Don't require open264 when proprietary_codecs are supported
diff --git a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni b/chromium/third_party/webrtc/webrtc.gni
index ca8acdbf259..36897a72aa8 100644
--- a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni
+++ b/src/3rdparty/chromium/third_party/webrtc/webrtc.gni
@@ -151,8 +151,7 @@ declare_args() {
#
# Enabling H264 when building with MSVC is currently not supported, see
# bugs.webrtc.org/9213#c13 for more info.
- rtc_use_h264 =
- proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang)
+ rtc_use_h264 = false
# Enable this flag to make webrtc::Mutex be implemented by absl::Mutex.
rtc_use_absl_mutex = false
diff --git a/src/core/config/common.pri b/src/core/config/common.pri
index d9d64e76..cd0fd120 100644
--- a/src/core/config/common.pri
+++ b/src/core/config/common.pri
@@ -26,9 +26,6 @@ qtConfig(webengine-webrtc) {
qtConfig(webengine-proprietary-codecs) {
gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\"
- qtConfig(webengine-webrtc) {
- gn_args += rtc_use_h264=true
- }
} else {
gn_args += proprietary_codecs=false
}

View File

@ -0,0 +1,53 @@
From 6abdfb1d7638c787081d16bb90022cde7a86309f Mon Sep 17 00:00:00 2001
From: Matthew Denton <mpdenton@chromium.org>
Date: Tue, 16 Mar 2021 06:38:05 +0000
Subject: [PATCH] Linux sandbox: support futex_time64 on 32-bit platforms
This updates futex-related syscall sets to include futex_time64, which
is a version of the futex syscall which uses 64 bit time on 32-bit
systems, to prepare for the Y2038 problem.
Change-Id: Ie933d9fec221233bf837f00c08eb7daee204081d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2753571
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#863166}
---
sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc | 7 ++++++-
sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc | 3 +++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
index 5e650d93c4b..b37f082dd69 100644
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
@@ -198,8 +198,13 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno,
}
#endif
- if (sysno == __NR_futex)
+ if (sysno == __NR_futex
+#if defined(__NR_futex_time64)
+ || sysno == __NR_futex_time64
+#endif
+ ) {
return RestrictFutex();
+ }
if (sysno == __NR_set_robust_list)
return Error(EPERM);
diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
index d1ea8e99a1c..3a8a924cc0a 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
@@ -427,6 +427,9 @@ bool SyscallSets::IsAllowedFutex(int sysno) {
case __NR_get_robust_list:
case __NR_set_robust_list:
case __NR_futex:
+#if defined(__NR_futex_time64)
+ case __NR_futex_time64:
+#endif
default:
return false;
}