summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-06-14 11:25:07 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-06-14 11:25:36 +0200
commit34183adb0b20533e5a61c1ab863ace6108193aa7 (patch)
treef328eed56cbd9c5ba4bf05e34053a9c859f8014c /dev-qt
parentsys-fs/lsscsi: drop 0.31 (diff)
downloadgentoo-34183adb0b20533e5a61c1ab863ace6108193aa7.tar.gz
gentoo-34183adb0b20533e5a61c1ab863ace6108193aa7.tar.bz2
gentoo-34183adb0b20533e5a61c1ab863ace6108193aa7.zip
dev-qt/qtwebengine: 5.15.2_p20210224 security cleanup
Bug: https://bugs.gentoo.org/787950 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtwebengine/Manifest1
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-fix-crash-w-app-locales.patch135
-rw-r--r--dev-qt/qtwebengine/qtwebengine-5.15.2_p20210224.ebuild189
3 files changed, 0 insertions, 325 deletions
diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest
index 33cfb335e2b2..a189e345d822 100644
--- a/dev-qt/qtwebengine/Manifest
+++ b/dev-qt/qtwebengine/Manifest
@@ -1,4 +1,3 @@
DIST qtwebengine-5.15.2-chromium87-ppc64le.tar.xz 28536 BLAKE2B 98f8e01e7026d9df1d30ae453d4394d3c4ad04c0620a2496235d45f5f1080c2280e040826cde7f72d9771bfc80d0c3df56c9dcbe4f763cec432ad56de37d64c5 SHA512 c90a76f44a9d720624016fd082ab3036f12e13b9789e869ebaf5e4774afca7d4187faf187f365f696d1a7eda05ca75516556ee9d291cdb3408d57cc4b23e2654
-DIST qtwebengine-5.15.2_p20210224.tar.xz 320052028 BLAKE2B a1ebaae7cf114041576f4920de1e484bea70c715a470e83e7c47bd8ff95480fc4e408bba173990480732bd464a9eb07d304f4afdb90d943c0a8cbe1e8299df84 SHA512 939292511703f3a6d758d38f1c860ffacd003be65761b19f23e8817bf1121cb9e6351216f737126d8defb1c97ca877e1c6f352e7cfee8e9289274d0793348b51
DIST qtwebengine-5.15.2_p20210421.tar.xz 320142308 BLAKE2B 1ed6e3daad8e8da7336c1575f524f1474eb043a44a86eebdc2375e9a01dbb21a4bf622b01525c627ff5846bb375b19617ca78f418749d6e4ce53b376da0b8317 SHA512 3a57cc8eb1aab086ae2ef69b1b1eaac47827d1f460ff53d5954b0dcb6753cc0e5fb24db490ea186141e6659e26a59862e8096126450a9fde6ed1230c00e4ceaa
DIST qtwebengine-5.15.2_p20210521.tar.xz 320126348 BLAKE2B 49a910d19487a720bca751d40bb694536d2ac7002b10de5b949b9bb98baf5f86001e89f522bb05edafc5c050a55f7ac15b6689138cff0912990472735a46bfbc SHA512 f71941667abd1a797442dedb501010cb67512e2df9a818b15ff8901a49987211bddcba80e7cc2a4652db9bf56fc9d969e8fa38de1f3ad112838a1a9c9facde8f
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-fix-crash-w-app-locales.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-fix-crash-w-app-locales.patch
deleted file mode 100644
index 3a372381ebd8..000000000000
--- a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-fix-crash-w-app-locales.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 199ea00a9eea13315a652c62778738629185b059 Mon Sep 17 00:00:00 2001
-From: Allan Sandfeld Jensen <allan.jensen@qt.io>
-Date: Wed, 10 Mar 2021 17:14:27 +0100
-Subject: Fix normalization of app locales
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Use the internal Chromium routine to get the app locale Chromium
-expects.
-
-Fixes: QTBUG-91715
-Change-Id: I5042eb066cb6879ad69628959912f2841867b4e8
-Reviewed-by: Michael Brüning <michael.bruning@qt.io>
----
- src/core/content_browser_client_qt.cpp | 7 ++++++-
- src/core/content_browser_client_qt.h | 2 ++
- src/core/web_engine_library_info.cpp | 18 ++++++++--------
- .../widgets/qwebengineview/tst_qwebengineview.cpp | 24 ++++++++++++++++++++++
- 4 files changed, 40 insertions(+), 11 deletions(-)
-
-diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
-index e13ecd8d1..c2c78ff8b 100644
---- a/src/core/content_browser_client_qt.cpp
-+++ b/src/core/content_browser_client_qt.cpp
-@@ -471,7 +471,12 @@ std::unique_ptr<net::ClientCertStore> ContentBrowserClientQt::CreateClientCertSt
-
- std::string ContentBrowserClientQt::GetApplicationLocale()
- {
-- return WebEngineLibraryInfo::getApplicationLocale();
-+ std::string bcp47Name = QLocale().bcp47Name().toStdString();
-+ if (m_cachedQtLocale != bcp47Name) {
-+ m_cachedQtLocale = bcp47Name;
-+ m_appLocale = WebEngineLibraryInfo::getApplicationLocale();
-+ }
-+ return m_appLocale;
- }
-
- std::string ContentBrowserClientQt::GetAcceptLangs(content::BrowserContext *context)
-diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
-index 7c8aa3ac9..1ccd2926d 100644
---- a/src/core/content_browser_client_qt.h
-+++ b/src/core/content_browser_client_qt.h
-@@ -269,6 +269,8 @@ public:
-
- private:
- scoped_refptr<ShareGroupQtQuick> m_shareGroupQtQuick;
-+ std::string m_appLocale;
-+ std::string m_cachedQtLocale;
- };
-
- } // namespace QtWebEngineCore
-diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
-index 2ad5b7565..09a4141b0 100644
---- a/src/core/web_engine_library_info.cpp
-+++ b/src/core/web_engine_library_info.cpp
-@@ -46,6 +46,7 @@
- #include "components/spellcheck/spellcheck_buildflags.h"
- #include "content/public/common/content_paths.h"
- #include "sandbox/policy/switches.h"
-+#include "ui/base/l10n/l10n_util.h"
- #include "ui/base/ui_base_paths.h"
- #include "ui/base/ui_base_switches.h"
-
-@@ -353,18 +354,15 @@ base::string16 WebEngineLibraryInfo::getApplicationName()
- std::string WebEngineLibraryInfo::getApplicationLocale()
- {
- base::CommandLine *parsedCommandLine = base::CommandLine::ForCurrentProcess();
-- if (!parsedCommandLine->HasSwitch(switches::kLang)) {
-+ if (parsedCommandLine->HasSwitch(switches::kLang)) {
-+ return parsedCommandLine->GetSwitchValueASCII(switches::kLang);
-+ } else {
- const QString &locale = QLocale().bcp47Name();
--
-- // QLocale::bcp47Name returns "en" for American English locale. Chromium requires the "US" suffix
-- // to clarify the dialect and ignores the shorter version.
-- if (locale == "en")
-- return "en-US";
--
-- return locale.toStdString();
-+ std::string resolvedLocale;
-+ if (l10n_util::CheckAndResolveLocale(locale.toStdString(), &resolvedLocale))
-+ return resolvedLocale;
- }
--
-- return parsedCommandLine->GetSwitchValueASCII(switches::kLang);
-+ return "en-US";
- }
-
- #if defined(OS_WIN)
-diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
-index 021986381..bf2c28ae6 100644
---- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
-+++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
-@@ -123,6 +123,7 @@ private Q_SLOTS:
- void doNotBreakLayout();
-
- void changeLocale();
-+ void mixLangLocale();
- void inputMethodsTextFormat_data();
- void inputMethodsTextFormat();
- void keyboardEvents();
-@@ -1210,6 +1211,29 @@ void tst_QWebEngineView::changeLocale()
- QCOMPARE(errorLines.first().toUtf8(), QByteArrayLiteral("Die Website ist nicht erreichbar"));
- }
-
-+void tst_QWebEngineView::mixLangLocale()
-+{
-+ for (QString locale : { "en_DK", "de_CH", "eu_ES" }) {
-+ QLocale::setDefault(locale);
-+ QWebEngineView view;
-+ QSignalSpy loadSpy(&view, &QWebEngineView::loadFinished);
-+
-+ bool terminated = false;
-+ auto sc = connect(view.page(), &QWebEnginePage::renderProcessTerminated, [&] () { terminated = true; });
-+
-+ view.load(QUrl("qrc:///resources/dummy.html"));
-+ QTRY_VERIFY(terminated || loadSpy.count() == 1);
-+
-+ QVERIFY2(!terminated,
-+ qPrintable(QString("Locale [%1] terminated: %2, loaded: %3").arg(locale).arg(terminated).arg(loadSpy.count())));
-+ QVERIFY(loadSpy.first().first().toBool());
-+
-+ QString content = toPlainTextSync(view.page());
-+ QVERIFY2(!content.isEmpty() && content.contains("test content"), qPrintable(content));
-+ }
-+ QLocale::setDefault(QLocale("en"));
-+}
-+
- void tst_QWebEngineView::inputMethodsTextFormat_data()
- {
- QTest::addColumn<QString>("string");
---
-cgit v1.2.1
-
diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210224.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210224.ebuild
deleted file mode 100644
index 756f19123c42..000000000000
--- a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210224.ebuild
+++ /dev/null
@@ -1,189 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-QTVER=$(ver_cut 1-3)
-inherit multiprocessing python-any-r1 qt5-build
-
-DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applications"
-
-if [[ ${QT5_BUILD_TYPE} == release ]]; then
- KEYWORDS="amd64 ~arm arm64 ~ppc64 x86"
- if [[ ${PV} == ${QTVER}_p* ]]; then
- SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${P}.tar.xz"
- S="${WORKDIR}/${P}"
- QT5_BUILD_DIR="${S}_build"
- fi
-fi
-
-# patchset based on https://github.com/chromium-ppc64le releases
-SRC_URI+=" ppc64? ( https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-5.15.2-chromium87-ppc64le.tar.xz )"
-
-IUSE="alsa bindist designer geolocation +jumbo-build kerberos pulseaudio +system-ffmpeg +system-icu widgets"
-REQUIRED_USE="designer? ( widgets )"
-
-RDEPEND="
- app-arch/snappy:=
- dev-libs/glib:2
- dev-libs/nspr
- dev-libs/nss
- dev-libs/expat
- dev-libs/libevent:=
- dev-libs/libxml2[icu]
- dev-libs/libxslt
- dev-libs/re2:=
- ~dev-qt/qtcore-${QTVER}
- ~dev-qt/qtdeclarative-${QTVER}
- ~dev-qt/qtgui-${QTVER}
- ~dev-qt/qtnetwork-${QTVER}
- ~dev-qt/qtprintsupport-${QTVER}
- ~dev-qt/qtwebchannel-${QTVER}[qml]
- media-libs/fontconfig
- media-libs/freetype
- media-libs/harfbuzz:=
- media-libs/lcms:2
- media-libs/libjpeg-turbo:=
- media-libs/libpng:0=
- >=media-libs/libvpx-1.5:=[svc(+)]
- media-libs/libwebp:=
- media-libs/mesa[egl,X(+)]
- media-libs/opus
- sys-apps/dbus
- sys-apps/pciutils
- sys-libs/zlib[minizip]
- virtual/libudev
- x11-libs/libdrm
- x11-libs/libX11
- x11-libs/libXcomposite
- x11-libs/libXcursor
- x11-libs/libXdamage
- x11-libs/libXext
- x11-libs/libXfixes
- x11-libs/libXi
- x11-libs/libXrandr
- x11-libs/libXrender
- x11-libs/libXScrnSaver
- x11-libs/libXtst
- alsa? ( media-libs/alsa-lib )
- designer? ( ~dev-qt/designer-${QTVER} )
- geolocation? ( ~dev-qt/qtpositioning-${QTVER} )
- kerberos? ( virtual/krb5 )
- pulseaudio? ( media-sound/pulseaudio:= )
- system-ffmpeg? ( media-video/ffmpeg:0= )
- system-icu? ( >=dev-libs/icu-68.2:= )
- widgets? (
- ~dev-qt/qtdeclarative-${QTVER}[widgets]
- ~dev-qt/qtwidgets-${QTVER}
- )
-"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- >=app-arch/gzip-1.7
- dev-util/gperf
- dev-util/ninja
- dev-util/re2c
- net-libs/nodejs
- sys-devel/bison
- ppc64? ( >=dev-util/gn-0.1807 )
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.15.0-disable-fatal-warnings.patch" # bug 695446
- "${FILESDIR}/${P}-fix-crash-w-app-locales.patch" # bug 773919, QTBUG-91715
- "${FILESDIR}/${P}-chromium-87-v8-icu68.patch" # downstream, bug 757606
- "${FILESDIR}/${P}-disable-git.patch" # downstream snapshot fix
-)
-
-src_prepare() {
- if [[ ${PV} == ${QTVER}_p* ]]; then
- # This is made from git, and for some reason will fail w/o .git directories.
- mkdir -p .git src/3rdparty/chromium/.git || die
-
- # We need to make sure this integrates well into Qt 5.15.2 installation.
- # Otherwise revdeps fail w/o heavy changes. This is the simplest way to do it.
- sed -e "/^MODULE_VERSION/s/5.*/${QTVER}/" -i .qmake.conf || die
- fi
-
- # QTBUG-88657 - jumbo-build could still make trouble
- if ! use jumbo-build; then
- sed -i -e 's|use_jumbo_build=true|use_jumbo_build=false|' \
- src/buildtools/config/common.pri || die
- fi
-
- # bug 630834 - pass appropriate options to ninja when building GN
- sed -e "s/\['ninja'/&, '-j$(makeopts_jobs)', '-l$(makeopts_loadavg "${MAKEOPTS}" 0)', '-v'/" \
- -i src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py || die
-
- # bug 620444 - ensure local headers are used
- find "${S}" -type f -name "*.pr[fio]" | \
- xargs sed -i -e 's|INCLUDEPATH += |&$${QTWEBENGINE_ROOT}_build/include $${QTWEBENGINE_ROOT}/include |' || die
-
- if use system-icu; then
- # Sanity check to ensure that bundled copy of ICU is not used.
- # Whole src/3rdparty/chromium/third_party/icu directory cannot be deleted because
- # src/3rdparty/chromium/third_party/icu/BUILD.gn is used by build system.
- # If usage of headers of bundled copy of ICU occurs, then lists of shim headers in
- # shim_headers("icui18n_shim") and shim_headers("icuuc_shim") in
- # src/3rdparty/chromium/third_party/icu/BUILD.gn should be updated.
- local file
- while read file; do
- echo "#error This file should not be used!" > "${file}" || die
- done < <(find src/3rdparty/chromium/third_party/icu -type f "(" -name "*.c" -o -name "*.cpp" -o -name "*.h" ")" 2>/dev/null)
- fi
-
- qt_use_disable_config alsa webengine-alsa src/buildtools/config/linux.pri
- qt_use_disable_config pulseaudio webengine-pulseaudio src/buildtools/config/linux.pri
-
- qt_use_disable_mod designer webenginewidgets src/plugins/plugins.pro
-
- qt_use_disable_mod widgets widgets src/src.pro
-
- qt5-build_src_prepare
-
- # we need to generate ppc64 stuff because upstream does not ship it yet
- if use ppc64; then
- einfo "Patching for ppc64le and generating build files"
- eapply "${FILESDIR}/qtwebengine-5.15.2-enable-ppc64.patch"
- pushd src/3rdparty/chromium > /dev/null || die
- eapply -p0 "${WORKDIR}/${PN}-ppc64le"
- popd > /dev/null || die
- pushd src/3rdparty/chromium/third_party/libvpx > /dev/null || die
- mkdir -vp source/config/linux/ppc64 || die
- mkdir -p source/libvpx/test || die
- touch source/libvpx/test/test.mk || die
- ./generate_gni.sh || die
- popd >/dev/null || die
- fi
-}
-
-src_configure() {
- export NINJA_PATH=/usr/bin/ninja
- export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}"
-
- local myqmakeargs=(
- --
- -no-build-qtpdf
- -printing-and-pdf
- -system-opus
- -system-webp
- $(usex alsa '-alsa' '-no-alsa')
- $(usex bindist '-no-proprietary-codecs' '-proprietary-codecs')
- $(usex geolocation '-webengine-geolocation' '-no-webengine-geolocation')
- $(usex kerberos '-webengine-kerberos' '-no-webengine-kerberos')
- $(usex pulseaudio '-pulseaudio' '-no-pulseaudio')
- $(usex system-ffmpeg '-system-ffmpeg' '-qt-ffmpeg')
- $(usex system-icu '-webengine-icu' '-no-webengine-icu')
- )
- qt5-build_src_configure
-}
-
-src_install() {
- qt5-build_src_install
-
- # bug 601472
- if [[ ! -f ${D}${QT5_LIBDIR}/libQt5WebEngine.so ]]; then
- die "${CATEGORY}/${PF} failed to build anything. Please report to https://bugs.gentoo.org/"
- fi
-}