qt5: upgrade to v5.15.3-lts-lgpl

* https://github.com/meta-qt5/meta-qt5/issues/455
* https://lists.qt-project.org/pipermail/development/2022-March/042262.html

qtbase/0021-qfloat16-Include-limits-header.patch partially resolved in upstream commit:
  0afad46bb7 Fix build with GCC 11: include <limits>

qtbase/0022-fix_timezone_dst.patch resolved in upstream commits:
  692c7e021f Fix QTzTimeZonePrivate::displayName()'s fallback
  5f91ed1493 QTzTimeZonePrivate::init(): fix handling of empty ID
  9f74724d84 Fix handling of Sunday in POSIX time-zone rules

qtsvg/CVE-2021-3481.patch: partially resolved in upstream commit:
  aceea78 Improve handling of malformed numeric values in svg files
but the 2nd part is still needed.

qtcoap, qtknx, qtmqtt, qtopcua: keep QT_MODULE_BRANCH "5.15.2" as
  it still wasn't downmerged to 5.15 branch and there is no
  v5.15.3-lts-lgpl tag in these as well

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Martin Jansa
2022-03-07 13:44:09 +01:00
parent 32e6203c8c
commit 74c27fa59b
68 changed files with 182 additions and 299 deletions

View File

@@ -25,7 +25,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
# common for qtbase-native, qtbase-nativesdk and qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.15-shared
# 5.15.meta-qt5-shared.2
# 5.15.meta-qt5-shared.3
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
@@ -38,24 +38,23 @@ SRC_URI += "\
file://0009-Add-OE-specific-specs-for-clang-compiler.patch \
file://0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \
file://0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \
file://0013-Disable-ltcg-for-host_build.patch \
file://0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0015-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \
file://0019-Define-__NR_futex-if-it-does-not-exist.patch \
file://0020-Revert-Fix-workaround-in-pthread-destructor.patch \
file://0021-qfloat16-Include-limits-header.patch \
file://0022-fix_timezone_dst.patch \
file://0023-tst_QPluginLoader-Simplify-creating-a-fake-pointer-i.patch \
file://0012-Disable-ltcg-for-host_build.patch \
file://0013-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0014-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0015-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0016-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \
file://0017-Define-__NR_futex-if-it-does-not-exist.patch \
file://0018-Revert-Fix-workaround-in-pthread-destructor.patch \
file://0019-tst_QPluginLoader-Simplify-creating-a-fake-pointer-i.patch \
file://0020-qbytearraymatcher-Include-limits-header.patch \
"
# common for qtbase-native and nativesdk-qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.15-native
# 5.15.meta-qt5-native.2
# 5.15.meta-qt5-native.3
SRC_URI += " \
file://0019-Always-build-uic-and-qvkgen.patch \
file://0020-Avoid-renameeat2-for-native-sdk-builds.patch \
file://0021-Always-build-uic-and-qvkgen.patch \
file://0022-Avoid-renameeat2-for-native-sdk-builds.patch \
"
# CMake's toolchain configuration of nativesdk-qtbase
@@ -202,4 +201,4 @@ fakeroot do_generate_qt_environment_file() {
do_generate_qt_environment_file[umask] = "022"
addtask generate_qt_environment_file after do_install before do_package
SRCREV = "40143c189b7c1bf3c2058b77d00ea5c4e3be8b28"
SRCREV = "c95f96550fc74b00bb0d3a82e7cb6b0e20bc76ac"

View File

@@ -38,6 +38,6 @@ do_configure:prepend() {
${S}/src/quick3d/imports/input/importsinput.pro
}
SRCREV = "34171b1d99f55fde1627df3c57eed50480ab2ae7"
SRCREV = "0559db47fefd7fb474cd795f94815e6e863234c8"
BBCLASSEXTEND += "native nativesdk"

View File

@@ -2,7 +2,7 @@
# Copyright (C) 2013-2020 Martin Jansa <martin.jansa@gmail.com>
QT_MODULE ?= "${BPN}"
QT_MODULE_BRANCH ?= "5.15.2"
QT_MODULE_BRANCH ?= "5.15"
QT_MODULE_BRANCH_PARAM ?= "branch=${QT_MODULE_BRANCH}"
# each module needs to define valid SRCREV
@@ -14,4 +14,4 @@ CVE_PRODUCT = "qt"
S = "${WORKDIR}/git"
PV = "5.15.2+git${SRCPV}"
PV = "5.15.3+git${SRCPV}"

View File

@@ -18,7 +18,7 @@ require qt5-git.inc
# common for qtbase-native, qtbase-nativesdk and qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.15-shared
# 5.15.meta-qt5-shared.2
# 5.15.meta-qt5-shared.3
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
@@ -31,29 +31,28 @@ SRC_URI += "\
file://0009-Add-OE-specific-specs-for-clang-compiler.patch \
file://0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \
file://0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \
file://0013-Disable-ltcg-for-host_build.patch \
file://0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0015-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \
file://0019-Define-__NR_futex-if-it-does-not-exist.patch \
file://0020-Revert-Fix-workaround-in-pthread-destructor.patch \
file://0021-qfloat16-Include-limits-header.patch \
file://0022-fix_timezone_dst.patch \
file://0023-tst_QPluginLoader-Simplify-creating-a-fake-pointer-i.patch \
file://0012-Disable-ltcg-for-host_build.patch \
file://0013-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0014-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0015-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0016-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \
file://0017-Define-__NR_futex-if-it-does-not-exist.patch \
file://0018-Revert-Fix-workaround-in-pthread-destructor.patch \
file://0019-tst_QPluginLoader-Simplify-creating-a-fake-pointer-i.patch \
file://0020-qbytearraymatcher-Include-limits-header.patch \
"
# common for qtbase-native and nativesdk-qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.15-native
# 5.15.meta-qt5-native.2
# 5.15.meta-qt5-native.3
SRC_URI += " \
file://0019-Always-build-uic-and-qvkgen.patch \
file://0020-Avoid-renameeat2-for-native-sdk-builds.patch \
file://0021-Always-build-uic-and-qvkgen.patch \
file://0022-Avoid-renameeat2-for-native-sdk-builds.patch \
"
# only for qtbase-native
SRC_URI += " \
file://0021-Bootstrap-without-linkat-feature.patch \
file://0023-Bootstrap-without-linkat-feature.patch \
"
CLEANBROKEN = "1"
@@ -146,4 +145,4 @@ do_install() {
echo 'set(_qt5_corelib_extra_includes "${_qt5Core_install_prefix}/lib${QT_DIR_NAME}/mkspecs/linux-oe-g++")' > ${D}${libdir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake
}
SRCREV = "40143c189b7c1bf3c2058b77d00ea5c4e3be8b28"
SRCREV = "c95f96550fc74b00bb0d3a82e7cb6b0e20bc76ac"

View File

@@ -1,4 +1,4 @@
From f7b84519234ff0cecb6495d31f377910dce34b62 Mon Sep 17 00:00:00 2001
From 168e5332f1f0dd4000f19b0ced0b1d68a1d65f16 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Mon, 15 Apr 2013 04:29:32 +0200
Subject: [PATCH] Add linux-oe-g++ platform
@@ -24,17 +24,17 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
mkspecs/features/configure.prf | 4 +--
mkspecs/features/qt.prf | 6 ++---
mkspecs/features/qt_functions.prf | 2 +-
mkspecs/linux-oe-g++/qmake.conf | 40 ++++++++++++++++++++++++++++
mkspecs/linux-oe-g++/qmake.conf | 39 ++++++++++++++++++++++++++++
mkspecs/linux-oe-g++/qplatformdefs.h | 1 +
6 files changed, 48 insertions(+), 7 deletions(-)
6 files changed, 47 insertions(+), 7 deletions(-)
create mode 100644 mkspecs/linux-oe-g++/qmake.conf
create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h
diff --git a/configure b/configure
index f9407ef587..467f57f960 100755
index b6c9b462f2..4e3fcd41d1 100755
--- a/configure
+++ b/configure
@@ -709,7 +709,7 @@ fi
@@ -708,7 +708,7 @@ fi
# is where the resulting variable is written to
setBootstrapVariable()
{
@@ -65,10 +65,10 @@ index 934a18a924..0f5b1b6333 100644
msg = "test $$1 succeeded"
write_file($$QMAKE_CONFIG_LOG, msg, append)
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 89f4946c50..97c1b43ccb 100644
index 69d1954306..37f7c9c4a2 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -148,7 +148,7 @@ import_plugins:qtConfig(static) {
@@ -151,7 +151,7 @@ import_plugins:qtConfig(static) {
plug_name = $$QMAKE_PREFIX_STATICLIB$${plug}$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
plug_path = $$eval(QT_PLUGIN.$${plug}.PATH)
isEmpty(plug_path): \
@@ -77,7 +77,7 @@ index 89f4946c50..97c1b43ccb 100644
LIBS += $$plug_path/$$plug_type/$$plug_name
} else {
LIBS += -l$${plug}$$qtPlatformTargetSuffix()
@@ -271,8 +271,8 @@ for(ever) {
@@ -274,8 +274,8 @@ for(ever) {
# static builds: link qml import plugins into the target.
contains(all_qt_module_deps, qml): \
qtConfig(static):import_plugins:!host_build:!no_import_scan {
@@ -89,10 +89,10 @@ index 89f4946c50..97c1b43ccb 100644
# run qmlimportscanner
qtPrepareTool(QMLIMPORTSCANNER, qmlimportscanner, , system)
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 1903e509c8..c093dd4592 100644
index 7777e615bd..8d792fa70a 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -69,7 +69,7 @@ defineTest(qtHaveModule) {
@@ -87,7 +87,7 @@ defineTest(qtHaveModule) {
defineTest(qtPrepareTool) {
cmd = $$eval(QT_TOOL.$${2}.binary)
isEmpty(cmd) {
@@ -103,10 +103,10 @@ index 1903e509c8..c093dd4592 100644
cmd = perl -w $$system_path($${cmd}.pl)
diff --git a/mkspecs/linux-oe-g++/qmake.conf b/mkspecs/linux-oe-g++/qmake.conf
new file mode 100644
index 0000000000..9275fc7d74
index 0000000000..c202c47fa1
--- /dev/null
+++ b/mkspecs/linux-oe-g++/qmake.conf
@@ -0,0 +1,40 @@
@@ -0,0 +1,39 @@
+#
+# qmake configuration for linux-g++ with modifications for building with OpenEmbedded
+#
@@ -117,9 +117,8 @@ index 0000000000..9275fc7d74
+
+include(../common/linux.conf)
+
+# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar, objcopy, and strip
+# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip
+QMAKE_AR = $$(OE_QMAKE_AR) cqs
+QMAKE_OBJCOPY = $$(OE_QMAKE_OBJCOPY)
+QMAKE_STRIP = $$(OE_QMAKE_STRIP)
+
+include(../common/gcc-base-unix.conf)

View File

@@ -1,4 +1,4 @@
From 826dbd9eac2b99c25e3e97f210eec3eef90941da Mon Sep 17 00:00:00 2001
From c92850bf1a43d0a0271f8c5e356b91f710189ebf Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 6 Apr 2013 13:15:07 +0200
Subject: [PATCH] cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS
@@ -19,7 +19,7 @@ Change-Id: Iacaa1c5531cd6dcc094891610c351673db55d7b2
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index 4c1c3a612b..8b0f6b16ee 100644
index 0d02edb41c..ec934c3931 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -8,7 +8,7 @@ if (NOT TARGET Qt5::qmake)

View File

@@ -1,4 +1,4 @@
From 64518ca83c405b8666739909f0c9daba4928f070 Mon Sep 17 00:00:00 2001
From 31a126a7e5e08fe1d3ba84639d2121453a71606f Mon Sep 17 00:00:00 2001
From: Holger Freyther <zecke@selfish.org>
Date: Wed, 26 Sep 2012 17:22:30 +0200
Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the
@@ -20,7 +20,7 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index f1d7832e46..312fd2b0c8 100644
index 8ceb763491..ea102f788d 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -183,7 +183,10 @@ void QLibrarySettings::load()

View File

@@ -1,4 +1,4 @@
From 44e37eab48ff04bd20815fd4ae0b5d79d493aabc Mon Sep 17 00:00:00 2001
From 20cadec59408c63adcdb41619a886422e34e6410 Mon Sep 17 00:00:00 2001
From: Denys Dmytriyenko <denys@ti.com>
Date: Tue, 25 Aug 2015 10:05:15 -0400
Subject: [PATCH] configure: bump path length from 256 to 512 characters

View File

@@ -1,4 +1,4 @@
From 018b5507d9f01db2d408aaecffb837d283e9e36a Mon Sep 17 00:00:00 2001
From 33e847c682efe11e10a0a42a262f096343418b97 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Mon, 24 Oct 2016 09:45:18 +0300
Subject: [PATCH] Disable all unknown features instead of erroring out

View File

@@ -1,4 +1,4 @@
From 9ccf2216dae8288a31824dad570cf63443d0e66d Mon Sep 17 00:00:00 2001
From 4afd71e88a906eba8a8f14a12599abcc8582d22c Mon Sep 17 00:00:00 2001
From: Pascal Bach <pascal.bach@siemens.com>
Date: Wed, 11 May 2016 15:20:41 +0200
Subject: [PATCH] Pretend Qt5 wasn't found if OE_QMAKE_PATH_EXTERNAL_HOST_BINS
@@ -30,7 +30,7 @@ Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
2 files changed, 10 insertions(+)
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 309798a767..d9a83cf6db 100644
index db18dbece6..13908c8fe5 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -2,6 +2,11 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0)

View File

@@ -1,4 +1,4 @@
From 43394997b285f11450dc2c2b7184d730c2fba30b Mon Sep 17 00:00:00 2001
From 7974ec566c4ede9cbd73fd0df2c35d7ff3dbcba5 Mon Sep 17 00:00:00 2001
From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Date: Wed, 7 Jun 2017 21:00:49 +0900
Subject: [PATCH] Delete qlonglong and qulonglong

View File

@@ -1,4 +1,4 @@
From 18904a169397f343e75bee5f29fa9ae1444a295f Mon Sep 17 00:00:00 2001
From 2bb8b79b41eed87b843eb0159d6fa21a92c4c152 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 27 Jul 2017 08:02:51 -0700
Subject: [PATCH] Replace pthread_yield with sched_yield

View File

@@ -1,4 +1,4 @@
From 7fb3964a19710834d4eb700c538015b8234af347 Mon Sep 17 00:00:00 2001
From d47ae4638bf698c39225ff94dfb9f03ba4261b42 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 3 Sep 2017 09:11:44 -0700
Subject: [PATCH] Add OE specific specs for clang compiler

View File

@@ -1,4 +1,4 @@
From df227467c195289a779f45a33be9dd32d1786ffe Mon Sep 17 00:00:00 2001
From 638dcaa0123c170473594d2e44217755008f145e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 3 Sep 2017 09:44:48 -0700
Subject: [PATCH] linux-clang: Invert conditional for defining QT_SOCKLEN_T

View File

@@ -1,4 +1,4 @@
From 5cdbde95e65bf641dda1a74711fd67b3237fb410 Mon Sep 17 00:00:00 2001
From eaf5d2ec9953b8bd299f486fc96d85d2f114c40d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 3 Sep 2017 10:11:50 -0700
Subject: [PATCH] tst_qlocale: Enable QT_USE_FENV only on glibc
@@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index 11ba032d82..027aef00fd 100644
index 6ff6995440..1f36c6fefa 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -46,7 +46,7 @@

View File

@@ -1,4 +1,4 @@
From be570ecd63da95a11428552723519393cc0cb53e Mon Sep 17 00:00:00 2001
From 5c5461c606b028bf3b31e370a43fba2ce8156b36 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Tue, 23 Oct 2018 09:54:57 +0300
Subject: [PATCH] Disable ltcg for host_build

View File

@@ -1,4 +1,4 @@
From 261a2abc536391dadd9e799c3ee32d31ab140d15 Mon Sep 17 00:00:00 2001
From 0574975fb4a981568e69461c4df99767cc1faa72 Mon Sep 17 00:00:00 2001
From: Max Krummenacher <max.krummenacher@toradex.com>
Date: Sat, 27 Oct 2018 12:29:31 +0000
Subject: [PATCH] Qt5GuiConfigExtras.cmake.in: cope with variable path to

View File

@@ -1,4 +1,4 @@
From c09fe6a87c444dc20b93334a9530d5bfd9ab03ff Mon Sep 17 00:00:00 2001
From e98382d11622179a2ab4712fa781c2b46d8b35b2 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 6 Dec 2018 11:47:52 -0800
Subject: [PATCH] corelib: Include sys/types.h for uint32_t

View File

@@ -1,4 +1,4 @@
From a83f643bfea108dda725a7b0c7eb8c957004466f Mon Sep 17 00:00:00 2001
From f339005f6ee97911bd0c2ed9d9445f5aac514155 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 6 Dec 2018 15:06:20 -0800
Subject: [PATCH] Define QMAKE_CXX.COMPILER_MACROS for clang on linux
@@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 9 insertions(+)
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index 03612e5689..f227e0772e 100644
index 11ecd6b2a5..a9a65c6800 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -41,6 +41,13 @@ defineReplace(qtVariablesFromGCC) {

View File

@@ -1,4 +1,4 @@
From 6c9e68cffb15cc1e848ca57ea12d4e5905d46507 Mon Sep 17 00:00:00 2001
From be12f3c3a5240b8bbb6837a3b23d36b61303b455 Mon Sep 17 00:00:00 2001
From: Nicola Lunghi <nick83ola@gmail.com>
Date: Wed, 5 Feb 2020 15:32:25 +0000
Subject: [PATCH] tst_qpainter: FE_ macros are not defined for every platform

View File

@@ -1,4 +1,4 @@
From bf314645e665d82c65771fb0d5f58558bbe1ba87 Mon Sep 17 00:00:00 2001
From 308746ac207de4f1c3429d6e61ff071809378b70 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 26 Oct 2020 22:10:02 -0700
Subject: [PATCH] Define __NR_futex if it does not exist
@@ -31,6 +31,3 @@ index f287b752d7..fa5307a604 100644
# define QT_ALWAYS_USE_FUTEX
// if not defined in linux/futex.h
--
2.29.1

View File

@@ -1,4 +1,4 @@
From aeaea761f21e5430d3199d2ca4414d18ed7b0fd5 Mon Sep 17 00:00:00 2001
From d46b92ecdae0c7dd2f284e3333641866aab4f604 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Tue, 26 Jan 2021 08:50:45 +0100
Subject: [PATCH] Revert "Fix workaround in pthread destructor"
@@ -16,7 +16,6 @@ causing build failures in configurations which use this
| /home/jenkins/workspace/luneos-unstable/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-halium-webos-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+40143c189b-r0/git/src/corelib/thread/qthread_unix.cpp:121:5: error: 'currentThreadData' was not declared in this scope
| 121 | currentThreadData = data;
| | ^~~~~~~~~~~~~~~~~
---
src/corelib/thread/qthread_unix.cpp | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)

View File

@@ -1,7 +1,8 @@
From 639655f8c3c885734163f1ffd4f29e475fe7e636 Mon Sep 17 00:00:00 2001
From f6b67c71be078d5f58042882e801b9af6634e483 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Fri, 20 Aug 2021 12:10:25 +0300
Subject: [PATCH] tst_QPluginLoader: Simplify creating a fake pointer in fakeplugin.cpp
Subject: [PATCH] tst_QPluginLoader: Simplify creating a fake pointer in
fakeplugin.cpp
When assigning multiple variables to a specific section, both GCC
and Clang legitimately error out if those variables wouldn't end
@@ -60,6 +61,3 @@ index 9e7a1f750b..a6d53f350f 100644
+QT_PLUGIN_METADATA_SECTION const uintptr_t pluginSection = 0xc0ffee;
#endif
QT_PLUGIN_METADATA_SECTION const char message[] = "QTMETADATA";
--
2.34.1

View File

@@ -1,7 +1,7 @@
From f680222892b44b3c1de129dc086613c6fe025c2d Mon Sep 17 00:00:00 2001
From 36691306941c8835a5c77d8a7170f04c3e432a08 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 2 Mar 2021 13:18:47 -0800
Subject: [PATCH] qfloat16: Include <limits> header
Subject: [PATCH] qbytearraymatcher: Include <limits> header
gcc11 complains
error: 'numeric_limits' is not a class template
@@ -10,22 +10,17 @@ gcc11 complains
This is because its missing right header which perhaps is included
implicitly in older compilers
Change-Id: Ic4e697c8a4c1b6b5448ba56f1749ae7293125ccd
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
src/corelib/global/qfloat16.h | 1 +
1 file changed, 1 insertion(+)
src/corelib/text/qbytearraymatcher.h | 1 +
src/corelib/tools/qoffsetstringarray_p.h | 1 +
2 files changed, 2 insertions(+)
--- a/src/corelib/global/qfloat16.h
+++ b/src/corelib/global/qfloat16.h
@@ -44,6 +44,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qmetatype.h>
#include <string.h>
+#include <limits>
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
// All processors that support AVX2 do support F16C too. That doesn't mean
diff --git a/src/corelib/text/qbytearraymatcher.h b/src/corelib/text/qbytearraymatcher.h
index 0eedfc1d20..7b80e2becd 100644
--- a/src/corelib/text/qbytearraymatcher.h
+++ b/src/corelib/text/qbytearraymatcher.h
@@ -40,6 +40,7 @@
@@ -36,6 +31,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <QtCore/qbytearray.h>
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/tools/qoffsetstringarray_p.h b/src/corelib/tools/qoffsetstringarray_p.h
index 4dd9e9603b..e26a57ff43 100644
--- a/src/corelib/tools/qoffsetstringarray_p.h
+++ b/src/corelib/tools/qoffsetstringarray_p.h
@@ -55,6 +55,7 @@

View File

@@ -1,4 +1,4 @@
From 6a7c34194c6bbb53c2b13375db3cb2d6a9aabe31 Mon Sep 17 00:00:00 2001
From 418c46b025edadc142ac60a6eb4c553dad19efed Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 16 Nov 2013 00:32:30 +0100
Subject: [PATCH] Always build uic and qvkgen
@@ -14,10 +14,10 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/src.pro b/src/src.pro
index 6658cbc9e0..d4a0e68e8d 100644
index 8990109743..105feee924 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -242,7 +242,7 @@ qtConfig(gui) {
@@ -244,7 +244,7 @@ qtConfig(gui) {
}
}
}

View File

@@ -1,4 +1,4 @@
From db1700a72d62f7b8686f94cf262d96171c298f5f Mon Sep 17 00:00:00 2001
From 9ff02d5ebc1d0969306c57cbf77df861ec3924fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sun, 14 Apr 2019 13:27:58 +0200
Subject: [PATCH] Avoid renameeat2 for native(sdk) builds
@@ -46,10 +46,10 @@ index b3daf43c04..e1df2ac580 100644
# define QT_FEATURE_statx -1
#endif
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 67cff7c68c..86e45320d5 100644
index 231e5cb0ea..8da5872c5e 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -1435,16 +1435,6 @@ bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSy
@@ -1443,16 +1443,6 @@ bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSy
Q_CHECK_FILE_NAME(srcPath, false);
Q_CHECK_FILE_NAME(tgtPath, false);

View File

@@ -1,80 +0,0 @@
From: Dilshod Mukhtarov <dilshodm@gmail.com>
Date: Tue, 2 Nov 2021 22:57:47 +0400
Subject: [PATCH] fix incorrect dst dates bug (backport from Qt 6.2)
In Qt 5.15.2 the DST is incorrectly calculated using Yocto's tzdata
(example America/Los_Angeles).
For example in year 2021 DST has to end at Nov 7, 2021, with this bug it shows Nov 1, 2021.
Upstream-Status: Backport [in Qt 6 the timezone was reworked, closest upstream commit fixing this is probably https://codereview.qt-project.org/c/qt/qtbase/+/343933]
Signed-off-by: Dilshod Mukhtarov <dilshodm@gmail.com>
diff -Nru a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp
--- a/src/corelib/time/qtimezoneprivate_tz.cpp 2020-10-27 12:02:10.000000000 +0400
+++ b/src/corelib/time/qtimezoneprivate_tz.cpp 2021-11-02 22:03:48.529270348 +0400
@@ -350,6 +350,11 @@
static QDate calculateDowDate(int year, int month, int dayOfWeek, int week)
{
+ if (dayOfWeek == 0) // Sunday; we represent it as 7, POSIX uses 0
+ dayOfWeek = 7;
+ else if (dayOfWeek & ~7 || month < 1 || month > 12 || week < 1 || week > 5)
+ return QDate();
+
QDate date(year, month, 1);
int startDow = date.dayOfWeek();
if (startDow <= dayOfWeek)
@@ -364,28 +369,37 @@
static QDate calculatePosixDate(const QByteArray &dateRule, int year)
{
+ bool ok;
// Can start with M, J, or a digit
if (dateRule.at(0) == 'M') {
// nth week in month format "Mmonth.week.dow"
QList<QByteArray> dateParts = dateRule.split('.');
- int month = dateParts.at(0).mid(1).toInt();
- int week = dateParts.at(1).toInt();
- int dow = dateParts.at(2).toInt();
- if (dow == 0)
- ++dow;
- return calculateDowDate(year, month, dow, week);
+ if (dateParts.count() > 2) {
+ int month = dateParts.at(0).mid(1).toInt(&ok);
+ int week = ok ? dateParts.at(1).toInt(&ok) : 0;
+ int dow = ok ? dateParts.at(2).toInt(&ok) : 0;
+ if (ok)
+ return calculateDowDate(year, month, dow, week);
+ }
} else if (dateRule.at(0) == 'J') {
- // Day of Year ignores Feb 29
- int doy = dateRule.mid(1).toInt();
- QDate date = QDate(year, 1, 1).addDays(doy - 1);
- if (QDate::isLeapYear(date.year()))
- date = date.addDays(-1);
- return date;
+ // Day of Year 1...365, ignores Feb 29.
+ // So March always starts on day 60.
+ int doy = dateRule.mid(1).toInt(&ok);
+ if (ok && doy > 0 && doy < 366) {
+ // Subtract 1 because we're adding days *after* the first of
+ // January, unless it's after February in a leap year, when the leap
+ // day cancels that out:
+ if (!QDate::isLeapYear(year) || doy < 60)
+ --doy;
+ return QDate(year, 1, 1).addDays(doy);
+ }
} else {
- // Day of Year includes Feb 29
- int doy = dateRule.toInt();
- return QDate(year, 1, 1).addDays(doy - 1);
+ // Day of Year 0...365, includes Feb 29
+ int doy = dateRule.toInt(&ok);
+ if (ok && doy >= 0 && doy < 366)
+ return QDate(year, 1, 1).addDays(doy);
}
+ return QDate();
}
// returns the time in seconds, INT_MIN if we failed to parse

View File

@@ -1,4 +1,4 @@
From 0422ea8555c7d42e2e3091e1f5ee9fe172b6a89f Mon Sep 17 00:00:00 2001
From f992d0551cd14c11fdb61511ac1d36ecf853089a Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Fri, 24 Nov 2017 15:16:31 +0200
Subject: [PATCH] Bootstrap without linkat feature

View File

@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
# common for qtbase-native, qtbase-nativesdk and qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.15-shared
# 5.15.meta-qt5-shared.2
# 5.15.meta-qt5-shared.3
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
@@ -27,16 +27,15 @@ SRC_URI += "\
file://0009-Add-OE-specific-specs-for-clang-compiler.patch \
file://0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \
file://0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \
file://0013-Disable-ltcg-for-host_build.patch \
file://0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0015-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \
file://0019-Define-__NR_futex-if-it-does-not-exist.patch \
file://0020-Revert-Fix-workaround-in-pthread-destructor.patch \
file://0021-qfloat16-Include-limits-header.patch \
file://0022-fix_timezone_dst.patch \
file://0023-tst_QPluginLoader-Simplify-creating-a-fake-pointer-i.patch \
file://0012-Disable-ltcg-for-host_build.patch \
file://0013-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0014-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0015-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0016-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \
file://0017-Define-__NR_futex-if-it-does-not-exist.patch \
file://0018-Revert-Fix-workaround-in-pthread-destructor.patch \
file://0019-tst_QPluginLoader-Simplify-creating-a-fake-pointer-i.patch \
file://0020-qbytearraymatcher-Include-limits-header.patch \
"
# Disable LTO for now, QT5 patches are being worked upstream, perhaps revisit with
@@ -309,4 +308,4 @@ sed -i \
$D${OE_QMAKE_PATH_ARCHDATA}/mkspecs/qmodule.pri
}
SRCREV = "40143c189b7c1bf3c2058b77d00ea5c4e3be8b28"
SRCREV = "c95f96550fc74b00bb0d3a82e7cb6b0e20bc76ac"

View File

@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtdeclarative qtmultimedia"
SRCREV = "a67f812548b008e3eedcd2bb9313828a195fd23b"
SRCREV = "db9fba7299d904385e25db40c677cc6201d31df0"
# The same issue as in qtbase:
# http://errors.yoctoproject.org/Errors/Details/152641/

View File

@@ -11,4 +11,5 @@ PACKAGECONFIG[qtdeclarative] = ",,qtdeclarative"
DEPENDS += "qtbase"
QT_MODULE_BRANCH = "5.15.2"
SRCREV = "628d3b8abd47ffde45252cf6591ed10ec2fa28ac"

View File

@@ -19,4 +19,4 @@ PACKAGECONFIG[bluez] = "-feature-bluez,-no-feature-bluez,bluez5"
EXTRA_QMAKEVARS_CONFIGURE += "${PACKAGECONFIG_CONFARGS}"
SRCREV = "ca6cc606d9fc0947ea6c27738a1ca8f12f3258ea"
SRCREV = "cb2e0b59c46bfe234b1d43f2fd31f53199f0252c"

View File

@@ -8,4 +8,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtdeclarative qtmultimedia qtxmlpatterns"
SRCREV = "1168c788a117e4556e6cd0ba1e267a86ef62b0c4"
SRCREV = "b83f9933f1fa01eb84d04476f809c588f4d49caa"

View File

@@ -55,6 +55,6 @@ do_install:append:class-nativesdk() {
rm -rf ${D}${OE_QMAKE_PATH_QML}
}
SRCREV = "104eae5b17b0ec700391e9539ee3a4f638588194"
SRCREV = "32b37e20f7d0aebb9f4138229939dd756d4c05ec"
BBCLASSEXTEND =+ "native nativesdk"

View File

@@ -16,4 +16,4 @@ PACKAGECONFIG[sdl2] = "-feature-sdl2,-no-feature-sdl2,libsdl2"
EXTRA_QMAKEVARS_CONFIGURE += "${PACKAGECONFIG_CONFARGS}"
SRCREV = "ff933a4e72826a77c81c4153f1adcf765ead35f0"
SRCREV = "549f7a5482f9a2856d6a1ef2434f9ca0b9713b9b"

View File

@@ -18,4 +18,4 @@ RDEPENDS:${PN}-dev = ""
# http://errors.yoctoproject.org/Errors/Build/44912/
LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
SRCREV = "66b7fbaca4b323dce337e87e3093c8836577c561"
SRCREV = "2d4168e142c65411b9258ab48bb1164bd6aa011f"

View File

@@ -25,4 +25,4 @@ PACKAGECONFIG[libwebp] = ",CONFIG+=done_config_libwebp,libwebp"
EXTRA_QMAKEVARS_PRE += "${PACKAGECONFIG_CONFARGS}"
SRCREV = "74a5bc4a45195b876454e596e76cb23aeb365410"
SRCREV = "3f5d4216e52351a76ba9deae18c7f022c0c8b163"

View File

@@ -9,4 +9,5 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase"
QT_MODULE_BRANCH = "5.15.2"
SRCREV = "0d2ce613010c0cc9c69f6821c06a34b6721482b4"

View File

@@ -35,7 +35,7 @@ SRC_URI += " \
${QT_GIT}/qtlocation-mapboxgl.git;name=qtlocation-mapboxgl;branch=${QT_MODULE_BRANCH_MAPBOXGL};protocol=${QT_GIT_PROTOCOL};destsuffix=git/src/3rdparty/mapbox-gl-native \
"
SRCREV_qtlocation = "02a21217a9706402802f38c646797be8eccb86e4"
SRCREV_qtlocation = "9909253b0fbf825830a5947a883526ee54fe55af"
SRCREV_qtlocation-mapboxgl = "d3101bbc22edd41c9036ea487d4a71eabd97823d"
SRCREV_FORMAT = "qtlocation_qtlocation-mapboxgl"

View File

@@ -9,4 +9,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtdeclarative"
SRCREV = "b182dcd78a35b4667b2568857b7719d555c7fddb"
SRCREV = "74d5b59155788fff06efa12d3f2de671e2235b5d"

View File

@@ -9,4 +9,5 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase"
QT_MODULE_BRANCH = "5.15.2"
SRCREV = "cade213f562049400da81e60762400df68d7c56b"

View File

@@ -40,7 +40,7 @@ SRC_URI += "\
# http://errors.yoctoproject.org/Errors/Build/44914/
LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
SRCREV = "fd30913d4601d12437404e1d20113a1ed6364ccc"
SRCREV = "185f37e68e62548e83d16cad3a6cf8850faf4ee4"
# Temporary work around for Qt5MultimediaConfig.cmake referencing non-existent videoeglvideonode directory
do_install:append() {

View File

@@ -9,4 +9,4 @@ require qt5-git.inc
DEPENDS += "qtbase"
SRCREV = "fb2d6d47a0c961278d63309789a1141c3734818b"
SRCREV = "43c7f5204fe0a4cc1b3c9e7a34dea4559d2b28b1"

View File

@@ -18,4 +18,5 @@ SECURITY_STRINGFORMAT = ""
DEPENDS += "qtbase"
QT_MODULE_BRANCH = "5.15.2"
SRCREV = "6d45793cae6f9e744c7bba82f905e431978ce3d0"

View File

@@ -10,4 +10,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtdeclarative"
SRCREV = "ddfa4d16243128d2871a51c513e025d518151b17"
SRCREV = "557dece3865641befabd27ca724e2b6ae59b5a53"

View File

@@ -21,7 +21,7 @@ FILES:${PN}-qmlplugins += " \
${OE_QMAKE_PATH_QML}/QtQuick3D/Helpers/meshes/*.mesh \
"
SRCREV_qtquick3d = "2e05e6d6546635a8f25882c5140fb17697be0062"
SRCREV_qtquick3d = "9753b6eaf48ae39d528153f08dd9330813a91723"
SRCREV_assimp = "8f0c6b04b2257a520aaab38421b2e090204b69df"
SRCREV_FORMAT = "qtquick3d_assimp"

View File

@@ -12,4 +12,4 @@ DEPENDS += "qtdeclarative qtdeclarative-native"
SRC_URI += "file://0001-Revert-Get-the-scale-of-the-popup-item-when-setting-.patch"
SRCREV = "16f27dfa3588c2bf377568ce00bf534af48c9558"
SRCREV = "30cd2468bd94e908a8510e65f982c716f28db52b"

View File

@@ -17,4 +17,4 @@ FILES:${PN}-qmlplugins += " \
${OE_QMAKE_PATH_QML}/QtQuick/Dialogs/qml/icons.ttf \
"
SRCREV = "7c29283041a50def3ceca7de4471f211c9b30d4e"
SRCREV = "31b940bd0c696a01137a65f58573696a3fb5181b"

View File

@@ -10,4 +10,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS = "qtbase qtdeclarative"
SRCREV = "147ad75c589fc4804429710fdb177cc48a80dbea"
SRCREV = "4f06d202d1b6f84b8de2dae4f69295172bb49446"

View File

@@ -25,6 +25,6 @@ PACKAGECONFIG[tools-only] = "CONFIG+=tools-only"
EXTRA_QMAKEVARS_PRE += "${PACKAGECONFIG_CONFARGS}"
SRCREV = "8e889442508e284691c923470eb4552c96afdfe3"
SRCREV = "4cc0da8ae4d34d9bc89123cfe483a8931092fcaa"
BBCLASSEXTEND += "native nativesdk"

View File

@@ -36,4 +36,5 @@ DEPENDS += "qtbase"
# http://errors.yoctoproject.org/Errors/Build/44915/
LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
SRCREV = "5da7de1800eee3d604eb7e787b114479b61ffc93"
# v5.15.8-lts
SRCREV = "4d8e4bd20b7100b0b7192547b19c3c239aaf7034"

View File

@@ -10,7 +10,7 @@ require qt5-git.inc
DEPENDS += "qtbase qtdeclarative qtxmlpatterns qtscxml-native"
SRCREV = "95aa78be795a862b95371afa75e1417029ec0a16"
SRCREV = "49f49bdb84e91c2fa799a29faf53d5ada97d1da8"
# Patches from https://github.com/meta-qt5/qtscxml/commits/b5.15
# 5.15.meta-qt5.1

View File

@@ -12,4 +12,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtdeclarative"
SRCREV = "5618198e6df5e0224f79f786a44af7527b431545"
SRCREV = "25a92014e7fa1bd9118379105cfb2dd6ca24c123"

View File

@@ -11,4 +11,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtserialport"
SRCREV = "1aa9b03756baead139943712839af5ecedeb2989"
SRCREV = "792909313f7cc056d0538945500069876cd3c2ee"

View File

@@ -12,4 +12,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase"
SRCREV = "192e376b01e65e7277772bdc94106613c22cf531"
SRCREV = "84ccf4dd454fadd15d20919be3c24fd519947e27"

View File

@@ -0,0 +1,44 @@
From 861999c07eca77807bb000939406d07bfec8e419 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Thu, 4 Mar 2021 14:28:48 +0100
Subject: [PATCH] Clamp parsed doubles to float representable values
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Parts of our rendering assumes incoming doubles can still be sane
floats.
Pick-to: 6.1 6.0 5.15 5.12
Fixes: QTBUG-91507
Change-Id: I7086a121e1b5ed47695a1251ea90e774dd8f148d
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
---
src/svg/qsvghandler.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index b3d9aaf..9dac05c 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -673,7 +673,8 @@ static qreal toDouble(const QChar *&str)
val = -val;
} else {
val = QByteArray::fromRawData(temp, pos).toDouble();
- if (qFpClassify(val) != FP_NORMAL)
+ // Do not tolerate values too wild to be represented normally by floats
+ if (qFpClassify(float(val)) != FP_NORMAL)
val = 0;
}
return val;
@@ -3046,6 +3047,8 @@ static QSvgStyleProperty *createRadialGradientNode(QSvgNode *node,
ncy = toDouble(cy);
if (!r.isEmpty())
nr = toDouble(r);
+ if (nr < 0.5)
+ nr = 0.5;
qreal nfx = ncx;
if (!fx.isEmpty())

View File

@@ -1,73 +0,0 @@
CVE: CVE-2021-3481
Upstream-Status: Backport [https://codereview.qt-project.org/gitweb?p=qt%2Fqtsvg.git;a=commit;h=bfd6ee0]
Backport and squash commits 85b70a721695991e8a5bbe4aa52e5320e170e90c and
bfd6ee0d8cf34b63d32adf10ed93daa0086b359f to fix CVE-2021-3481.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
From 6c40fd492eafabe67177c0e84839beec5be298b8 Mon Sep 17 00:00:00 2001
From: Eirik Aavitsland <eirik.aavitsland@qt.io>
Date: Tue, 1 Dec 2020 14:39:59 +0100
Subject: [PATCH] Improve handling of malformed numeric values in svg files
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Catch cases where the input is not containable in a qreal, and avoid
passing on inf values.
Pick-to: 6.0 5.15 5.12
Change-Id: I1ab8932d94473916815385240c29e03afb0e0c9e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Clamp parsed doubles to float representable values
Parts of our rendering assumes incoming doubles can still be sane
floats.
Pick-to: 6.1 6.0 5.15 5.12
Fixes: QTBUG-91507
Change-Id: I7086a121e1b5ed47695a1251ea90e774dd8f148d
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
---
src/svg/qsvghandler.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index c937254..9dac05c 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -65,6 +65,7 @@
#include "private/qmath_p.h"
#include "float.h"
+#include <cmath>
QT_BEGIN_NAMESPACE
@@ -672,6 +673,9 @@ static qreal toDouble(const QChar *&str)
val = -val;
} else {
val = QByteArray::fromRawData(temp, pos).toDouble();
+ // Do not tolerate values too wild to be represented normally by floats
+ if (qFpClassify(float(val)) != FP_NORMAL)
+ val = 0;
}
return val;
@@ -3043,6 +3047,8 @@ static QSvgStyleProperty *createRadialGradientNode(QSvgNode *node,
ncy = toDouble(cy);
if (!r.isEmpty())
nr = toDouble(r);
+ if (nr < 0.5)
+ nr = 0.5;
qreal nfx = ncx;
if (!fx.isEmpty())
--
2.29.2

View File

@@ -12,6 +12,6 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase"
SRC_URI:append = " file://CVE-2021-3481.patch"
SRC_URI:append = " file://0001-Clamp-parsed-doubles-to-float-representable-values.patch"
SRCREV = "52d3788c7b0116ea3db232dccca5f1e3f1e229ac"
SRCREV = "da19a7140dfd23a42792274ca4f497f20ffd29f4"

View File

@@ -39,7 +39,7 @@ EXTRA_QMAKEVARS_PRE += " \
${@bb.utils.contains('PACKAGECONFIG', 'qtwebkit', '', 'CONFIG+=noqtwebkit', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'clang', 'CONFIG+=disable_external_rpath CONFIG+=assistant', 'CONFIG+=noqdoc', d)} \
"
SRCREV = "cc52debd905e0ed061290d6fd00a5f1ab67478a5"
SRCREV = "d488fd08333d53636880c9b2198ef38ef17cf56c"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -98,4 +98,4 @@ FILES:${PN}-qthelp = " \
${OE_QMAKE_PATH_TRANSLATIONS}/qt_help_*.qm \
"
SRCREV = "cb1857418b36780b0444333f3aa6250ca3780f19"
SRCREV = "726e47301f7e0e0a85534e7686f00521de15f1f6"

View File

@@ -71,4 +71,4 @@ FILES:${PN} += "${OE_QMAKE_PATH_DATA}/qtvirtualkeyboard/lipi_toolkit"
DEPENDS += "qtbase qtdeclarative qtmultimedia qtquickcontrols qtsvg qtxmlpatterns qtdeclarative-native"
SRCREV = "7b90415c58dd02c682a9ba317f273d7b3398ff88"
SRCREV = "5ab286d42421f387d8f2d23b33225ec2469958d7"

View File

@@ -48,7 +48,7 @@ PACKAGECONFIG[wayland-vulkan-server-buffer] = "-feature-wayland-vulkan-server-bu
EXTRA_QMAKEVARS_CONFIGURE += "${PACKAGECONFIG_CONFARGS}"
SRCREV = "3cc17177b1b03053276eb6236fda137c588261a7"
SRCREV = "f9dfeb6e7236711cba303858005693d40e90be90"
BBCLASSEXTEND =+ "native nativesdk"

View File

@@ -12,4 +12,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtdeclarative qtwebsockets"
SRCREV = "90cffd49575b075b0dc28440c693753d860fee87"
SRCREV = "30faac50ff3feb0def83a84126d4c0725fdb5953"

View File

@@ -18,4 +18,4 @@ do_configure:prepend() {
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'qtdeclarative', 'CONFIG+=OE_QTDECLARATIVE_ENABLED', '', d)}"
SRCREV = "5e41e564aaf96b7e49403af5099995efbe4cac8e"
SRCREV = "4eb3929a15d42efd855d8af3fec1abebc79634c5"

View File

@@ -11,4 +11,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtdeclarative"
SRCREV = "f73735911b2124ef16aa39228bf8f89ee900ba5d"
SRCREV = "428f9cb79dc3b649122c63e763a213afb2d9e60f"

View File

@@ -23,4 +23,4 @@ python() {
if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
}
SRCREV = "800926cc4e0ecfdb37a3b34486403354b66a37a4"
SRCREV = "00745be5c1d9c6cbe62cfdf4172c3720155a5c43"

View File

@@ -12,4 +12,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase"
SRCREV = "9bb0adeac84da6723cf57a2bb0d0c3b405691a15"
SRCREV = "e2146e32f300c854a669dd7e4e05b8606a4e62bf"

View File

@@ -25,6 +25,6 @@ do_configure:prepend() {
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'qtdeclarative', 'CONFIG+=OE_QTDECLARATIVE_ENABLED', '', d)}"
SRCREV = "50421402f05b3ee3c76c6cff455a69efaf576b6d"
SRCREV = "4d471ba94cfee1e27efe011ed0c2d4313136412c"
BBCLASSEXTEND =+ "native nativesdk"