Compare commits

...

37 Commits
master ... f33

Author SHA1 Message Date
Jan Grulich 6ae41be826 FileChooser portal: send window id in hex 2021-03-09 09:28:57 +01:00
Rex Dieter 5068fa5739 %build: explicitly pass -egl build option
unconditional BR: pkgconfig(glesv2) again
2021-02-19 12:58:32 -06:00
Pavel Raiskup ad76910087 Rebuild for libpq ABI change once more
Related: rhbz#1908268
2021-02-09 13:02:39 +01:00
Jan Grulich 799f1df9e3 Use Wayland platform on GNOME for RHEL 9 2021-02-08 11:42:10 +01:00
Pavel Raiskup 232aaf9801 rebuild for libpq ABI fix
Related: rhbz#1908268
2021-02-08 10:27:59 +01:00
Rex Dieter 4c363d0363 FTBFS: qendian.h (and qfloat16.h) missing <limits> include (QTBUG-90395)
Qt build on GCC 11 (QTBUG-89977)
2021-02-06 17:08:39 -06:00
Jan Grulich ca6fb1879d Disable getentropy on RHEL 2021-02-01 09:08:11 +01:00
Jan Grulich c699625b6c Disable statx and renameat2 on RHEL 2021-01-29 09:59:12 +01:00
Fedora Release Engineering 8005265f87 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 14:42:38 +00:00
Tom Stellard 90cf7f7329 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-09 05:53:03 +00:00
Rex Dieter 13faecf546 rebuild (gcc11) 2020-12-19 22:25:50 -06:00
Rex Dieter 350a9f57c0 re-enable vulkan support on s390x, root cause fixed 2020-11-30 15:44:11 -06:00
Rex Dieter dbbb20763b fix vulkan conditional 2020-11-29 08:59:23 -06:00
Rex Dieter c3b686ca07 drop vulkan support on s390x (#1902449) 2020-11-29 01:14:45 -06:00
Jan Grulich ab8ab2c460 Require qt-settings on.y in Fedora builds 2020-11-27 11:40:37 +01:00
Rex Dieter 417bbd6746 add bug reference 2020-11-25 08:24:45 -06:00
Rex Dieter d4ab2137a5 -no-reduce-relocations (#1900527) 2020-11-23 13:35:34 -06:00
Jan Grulich 88950cc031 Drop uselesss patch and update files 2020-11-20 12:08:17 +01:00
Jan Grulich 3df69d9b9f Missing sources 2020-11-20 09:32:03 +01:00
Jan Grulich 8525318401 5.15.2 2020-11-20 09:29:10 +01:00
Sandro Mani 6f0b990f87 Backport upstream fix for QTBUG-86319 2020-11-03 18:25:54 +01:00
Jeff Law ca011ab502 Add missing #includes for gcc-11 2020-10-18 11:51:29 -06:00
Jan Grulich 9d109333a3 Upstream fix: Emit QScreen::geometryChanged when the logical DPI changes 2020-09-30 15:39:47 +02:00
Yaroslav Fedevych 7cbf037b48 The -devel package requires vulkan headers to be there 2020-09-29 12:16:10 +00:00
Rex Dieter dccfb0dbe7 update %%files for vulkan too 2020-09-17 09:38:29 -05:00
Rex Dieter e3ed774441 enable vulkan support (#1794969) 2020-09-17 09:02:59 -05:00
Rex Dieter 38cf7adadb .spec comment on LTO 2020-09-17 09:00:21 -05:00
Troy Dawson 560ee417b6 Removing un-needed %if, libinput and xkbcommon are in RHEL7+ 2020-09-16 07:46:56 -07:00
Troy Dawson cad89b6c8a Remove un-needed %if that was causing failed builds on RHEL 2020-09-16 07:21:52 -07:00
Rex Dieter 6dbb795e9f CentOS8 - numpad do not work in KDE Plasma (#1868371)
Simplify xkb config (same on fedora and rhel7+)
Simplify openssl conditionals

Effectively drops support for el6, more work to do,
but this is a start.
2020-09-10 14:14:43 -05:00
Jan Grulich 904f17ae5f 5.15.1 2020-09-10 17:13:05 +02:00
Troy Dawson 51993712f1 use mariadb-connector-c-devel on RHEL > 8 2020-08-05 07:43:59 -07:00
Fedora Release Engineering 23d3d0c170 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 05:10:18 +00:00
Jeff Law d3af2911d1 Disable LTO 2020-07-01 12:45:46 -06:00
Troy Dawson bf02227cc1 no_sse2 in RHEL9+, add it to the %if 2020-06-24 09:44:47 -07:00
Rex Dieter 47664d654e Qt5 private header packaging breaks Qt5 Cmake files (#1846613) 2020-06-15 08:29:37 -05:00
Pete Walter 11a00ce244 Rebuild for ICU 67 2020-05-16 08:23:35 +01:00
10 changed files with 424 additions and 297 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@
/qtbase-everywhere-src-5.12.5.tar.xz
/qtbase-everywhere-src-5.13.2.tar.xz
/qtbase-everywhere-src-5.14.2.tar.xz
/qtbase-everywhere-src-5.15.1.tar.xz
/qtbase-everywhere-src-5.15.2.tar.xz

View File

@ -1,109 +0,0 @@
From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Thu, 2 Apr 2020 12:08:41 -0300
Subject: [PATCH 44/49] QLibrary: fix deadlock caused by fix to QTBUG-39642
Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around
the entire load_sys(). We had reasoed that deadlocks would only occur if
the object creation in instance() recursed into its own instance(),
which was already a bug. But we had forgotten that dlopen()/
LoadLibrary() executes initialization code from the module being loaded,
which could cause a recursion back into the same QPluginLoader or
QLibrary object. This recursion is benign because the module *is* loaded
and dlopen()/LoadLibrary() returns the same handle.
[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that
would happen if the plugin or library being loaded has load-time
initialization code (C++ global variables) that recursed back into the
same QLibrary or QPluginLoader object.
PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex
lock, so pluginState should be made an atomic variable. Once that is
done, we'll only need locking the mutex to update errorString (no
locking before loading).
Fixes: QTBUG-83207
Task-number: QTBUG-39642
Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
---
src/corelib/plugin/qlibrary.cpp | 2 --
src/corelib/plugin/qlibrary_unix.cpp | 4 ++++
src/corelib/plugin/qlibrary_win.cpp | 3 +++
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index ddb053c26f..be9d92b204 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -576,9 +576,7 @@ bool QLibraryPrivate::load()
Q_TRACE(QLibraryPrivate_load_entry, fileName);
- mutex.lock();
bool ret = load_sys();
- mutex.unlock();
if (qt_debug_component()) {
if (ret) {
qDebug() << "loaded library" << fileName;
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
index 017aa97b66..a5c72f81d9 100644
--- a/src/corelib/plugin/qlibrary_unix.cpp
+++ b/src/corelib/plugin/qlibrary_unix.cpp
@@ -123,6 +123,7 @@ QStringList QLibraryPrivate::prefixes_sys()
bool QLibraryPrivate::load_sys()
{
+ QMutexLocker locker(&mutex);
QString attempt;
QFileSystemEntry fsEntry(fileName);
@@ -213,6 +214,7 @@ bool QLibraryPrivate::load_sys()
}
#endif
+ locker.unlock();
bool retry = true;
Handle hnd = nullptr;
for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) {
@@ -273,6 +275,8 @@ bool QLibraryPrivate::load_sys()
}
}
#endif
+
+ locker.relock();
if (!hnd) {
errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror());
}
diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp
index 000bf76276..ef58724be8 100644
--- a/src/corelib/plugin/qlibrary_win.cpp
+++ b/src/corelib/plugin/qlibrary_win.cpp
@@ -78,6 +78,7 @@ bool QLibraryPrivate::load_sys()
// fileName
//
// NB If it's a plugin we do not ever try the ".dll" extension
+ QMutexLocker locker(&mutex);
QStringList attempts;
if (pluginState != IsAPlugin)
@@ -95,6 +96,7 @@ bool QLibraryPrivate::load_sys()
attempts.prepend(QDir::rootPath() + fileName);
#endif
+ locker.unlock();
Handle hnd = nullptr;
for (const QString &attempt : qAsConst(attempts)) {
#ifndef Q_OS_WINRT
@@ -115,6 +117,7 @@ bool QLibraryPrivate::load_sys()
#ifndef Q_OS_WINRT
SetErrorMode(oldmode);
#endif
+ locker.relock();
if (!hnd) {
errorString = QLibrary::tr("Cannot load library %1: %2").arg(
QDir::toNativeSeparators(fileName), qt_error_string());
--
2.25.2

View File

@ -1,146 +0,0 @@
From f432c08882ffebe5074ea28de871559a98a4d094 Mon Sep 17 00:00:00 2001
From: Lars Knoll <lars.knoll@qt.io>
Date: Wed, 26 Feb 2020 10:42:10 +0100
Subject: Add an expansion limit for entities
Recursively defined entities can easily exhaust all available
memory. Limit entity expansion to a default of 4096 characters to
avoid DoS attacks when a user loads untrusted content.
[ChangeLog][QtCore][QXmlStream] QXmlStreamReader does now
limit the expansion of entities to 4096 characters. Documents where
a single entity expands to more characters than the limit are not
considered well formed. The limit is there to avoid DoS attacks through
recursively expanding entities when loading untrusted content. Qt 5.15
will add methods that allow changing that limit.
Fixes: QTBUG-47417
Change-Id: I94387815d74fcf34783e136387ee57fac5ded0c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit fd4be84d23a0db4186cb42e736a9de3af722c7f7)
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
---
src/corelib/serialization/qxmlstream.g | 14 ++++++++++++-
src/corelib/serialization/qxmlstream_p.h | 14 ++++++++++++-
.../serialization/qxmlstream/tst_qxmlstream.cpp | 23 ++++++++++++++++++++--
3 files changed, 47 insertions(+), 4 deletions(-)
diff --git a/src/corelib/serialization/qxmlstream.g b/src/corelib/serialization/qxmlstream.g
index 10bfcd491c..5726bafb26 100644
--- a/src/corelib/serialization/qxmlstream.g
+++ b/src/corelib/serialization/qxmlstream.g
@@ -277,9 +277,19 @@ public:
QHash<QStringView, Entity> entityHash;
QHash<QStringView, Entity> parameterEntityHash;
QXmlStreamSimpleStack<Entity *>entityReferenceStack;
+ int entityExpansionLimit = 4096;
+ int entityLength = 0;
inline bool referenceEntity(Entity &entity) {
if (entity.isCurrentlyReferenced) {
- raiseWellFormedError(QXmlStream::tr("Recursive entity detected."));
+ raiseWellFormedError(QXmlStream::tr("Self-referencing entity detected."));
+ return false;
+ }
+ // entityLength represents the amount of additional characters the
+ // entity expands into (can be negative for e.g. &amp;). It's used to
+ // avoid DoS attacks through recursive entity expansions
+ entityLength += entity.value.size() - entity.name.size() - 2;
+ if (entityLength > entityExpansionLimit) {
+ raiseWellFormedError(QXmlStream::tr("Entity expands to more characters than the entity expansion limit."));
return false;
}
entity.isCurrentlyReferenced = true;
@@ -830,6 +840,8 @@ entity_done ::= ENTITY_DONE;
/.
case $rule_number:
entityReferenceStack.pop()->isCurrentlyReferenced = false;
+ if (entityReferenceStack.isEmpty())
+ entityLength = 0;
clearSym();
break;
./
diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h
index 61f501f81b..31053f8e0b 100644
--- a/src/corelib/serialization/qxmlstream_p.h
+++ b/src/corelib/serialization/qxmlstream_p.h
@@ -774,9 +774,19 @@ public:
QHash<QStringView, Entity> entityHash;
QHash<QStringView, Entity> parameterEntityHash;
QXmlStreamSimpleStack<Entity *>entityReferenceStack;
+ int entityExpansionLimit = 4096;
+ int entityLength = 0;
inline bool referenceEntity(Entity &entity) {
if (entity.isCurrentlyReferenced) {
- raiseWellFormedError(QXmlStream::tr("Recursive entity detected."));
+ raiseWellFormedError(QXmlStream::tr("Self-referencing entity detected."));
+ return false;
+ }
+ // entityLength represents the amount of additional characters the
+ // entity expands into (can be negative for e.g. &amp;). It's used to
+ // avoid DoS attacks through recursive entity expansions
+ entityLength += entity.value.size() - entity.name.size() - 2;
+ if (entityLength > entityExpansionLimit) {
+ raiseWellFormedError(QXmlStream::tr("Entity expands to more characters than the entity expansion limit."));
return false;
}
entity.isCurrentlyReferenced = true;
@@ -1308,6 +1318,8 @@ bool QXmlStreamReaderPrivate::parse()
case 10:
entityReferenceStack.pop()->isCurrentlyReferenced = false;
+ if (entityReferenceStack.isEmpty())
+ entityLength = 0;
clearSym();
break;
diff --git a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
index 8fdf91b090..1f9a0d575d 100644
--- a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
+++ b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
@@ -393,8 +393,6 @@ public:
return true;
}
- QXmlStreamReader reader(&inputFile);
-
/* See testcases.dtd which reads: 'Nonvalidating parsers
* must also accept "invalid" testcases, but validating ones must reject them.' */
if(type == QLatin1String("invalid") || type == QLatin1String("valid"))
@@ -580,6 +578,8 @@ private slots:
void roundTrip() const;
void roundTrip_data() const;
+ void entityExpansionLimit() const;
+
private:
static QByteArray readFile(const QString &filename);
@@ -1756,6 +1756,25 @@ void tst_QXmlStream::roundTrip_data() const
"</root>\n";
}
+void tst_QXmlStream::entityExpansionLimit() const
+{
+ QString xml = QStringLiteral("<?xml version=\"1.0\"?>"
+ "<!DOCTYPE foo ["
+ "<!ENTITY a \"0123456789\" >"
+ "<!ENTITY b \"&a;&a;&a;&a;&a;&a;&a;&a;&a;&a;\" >"
+ "<!ENTITY c \"&b;&b;&b;&b;&b;&b;&b;&b;&b;&b;\" >"
+ "<!ENTITY d \"&c;&c;&c;&c;&c;&c;&c;&c;&c;&c;\" >"
+ "]>"
+ "<foo>&d;&d;&d;</foo>");
+ {
+ QXmlStreamReader reader(xml);
+ do {
+ reader.readNext();
+ } while (!reader.atEnd());
+ QCOMPARE(reader.error(), QXmlStreamReader::NotWellFormedError);
+ }
+}
+
void tst_QXmlStream::roundTrip() const
{
QFETCH(QString, in);
--
cgit v0.2.1

171
qt5-qtbase-gcc11.patch Normal file
View File

@ -0,0 +1,171 @@
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 06fd88da..dbff3239 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -38,6 +38,7 @@
**
****************************************************************************/
+#include <limits>
#include "qplatformdefs.h"
#include "qtextcodec.h"
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
index 8561f908..8128d3cf 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -38,6 +38,8 @@
**
****************************************************************************/
+#include <limits>
+
#include "qutfcodec_p.h"
#include "qlist.h"
#include "qendian.h"
diff --git a/src/corelib/global/qendian.cpp b/src/corelib/global/qendian.cpp
index eb08b2f8..6b41b3dd 100644
--- a/src/corelib/global/qendian.cpp
+++ b/src/corelib/global/qendian.cpp
@@ -38,6 +38,7 @@
**
****************************************************************************/
+#include <limits>
#include "qendian.h"
#include "qalgorithms.h"
diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp
index c9733174..c62a1972 100644
--- a/src/corelib/global/qfloat16.cpp
+++ b/src/corelib/global/qfloat16.cpp
@@ -38,6 +38,7 @@
**
****************************************************************************/
+#include <limits>
#include "qfloat16.h"
#include "private/qsimd_p.h"
#include <cmath> // for fpclassify()'s return values
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp
index 10672c1f..6d5fd63e 100644
--- a/src/corelib/global/qrandom.cpp
+++ b/src/corelib/global/qrandom.cpp
@@ -40,6 +40,7 @@
// for rand_s
#define _CRT_RAND_S
+#include <limits>
#include "qrandom.h"
#include "qrandom_p.h"
#include <qobjectdefs.h>
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
index 13eee353..9e7a7a41 100644
--- a/src/corelib/plugin/qelfparser_p.cpp
+++ b/src/corelib/plugin/qelfparser_p.cpp
@@ -37,6 +37,7 @@
**
****************************************************************************/
+#include <limits>
#include "qelfparser_p.h"
#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
diff --git a/src/corelib/plugin/qmachparser.cpp b/src/corelib/plugin/qmachparser.cpp
index 11670caf..39f5596b 100644
--- a/src/corelib/plugin/qmachparser.cpp
+++ b/src/corelib/plugin/qmachparser.cpp
@@ -37,6 +37,8 @@
**
****************************************************************************/
+#include <limits>
+
#include "qmachparser_p.h"
#if defined(Q_OF_MACH_O)
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 83873edf..5aafb4e5 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -38,6 +38,7 @@
**
****************************************************************************/
+#include <limits>
#include "quuid.h"
#include "qcryptographichash.h"
diff --git a/src/corelib/serialization/qdatastream.cpp b/src/corelib/serialization/qdatastream.cpp
index 5082a8cb..7eecfcca 100644
--- a/src/corelib/serialization/qdatastream.cpp
+++ b/src/corelib/serialization/qdatastream.cpp
@@ -40,6 +40,8 @@
#include "qdatastream.h"
#include "qdatastream_p.h"
+#include <limits>
+
#if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED)
#include "qbuffer.h"
#include "qfloat16.h"
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp
index 9a72df58..6651ee98 100644
--- a/src/corelib/text/qbytearray.cpp
+++ b/src/corelib/text/qbytearray.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include <limits>
#include "qbytearray.h"
#include "qbytearraymatcher.h"
#include "private/qtools_p.h"
diff --git a/src/corelib/text/qbytearraymatcher.cpp b/src/corelib/text/qbytearraymatcher.cpp
index 72e09226..80511cb5 100644
--- a/src/corelib/text/qbytearraymatcher.cpp
+++ b/src/corelib/text/qbytearraymatcher.cpp
@@ -37,6 +37,7 @@
**
****************************************************************************/
+#include <limits>
#include "qbytearraymatcher.h"
#include <limits.h>
diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp
index ab3054d5..22efb3a0 100644
--- a/src/corelib/tools/qbitarray.cpp
+++ b/src/corelib/tools/qbitarray.cpp
@@ -38,6 +38,7 @@
**
****************************************************************************/
+#include <limits>
#include "qbitarray.h"
#include <qalgorithms.h>
#include <qdatastream.h>
diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp
index fa8d21e0..cd85956d 100644
--- a/src/corelib/tools/qcryptographichash.cpp
+++ b/src/corelib/tools/qcryptographichash.cpp
@@ -38,6 +38,7 @@
**
****************************************************************************/
+#include <limits>
#include <qcryptographichash.h>
#include <qiodevice.h>
diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp
index e00f9d05..917ab5f9 100644
--- a/src/gui/text/qfontengine_qpf2.cpp
+++ b/src/gui/text/qfontengine_qpf2.cpp
@@ -37,6 +37,7 @@
**
****************************************************************************/
+#include <limits>
#include "qfontengine_qpf2_p.h"
#include <QtCore/QFile>

View File

@ -2,13 +2,9 @@
%global multilib_archs x86_64 %{ix86} %{?mips} ppc64 ppc s390x s390 sparc64 sparcv9
%global multilib_basearchs x86_64 %{?mips64} ppc64 s390x sparc64
# support openssl-1.1
%if 0%{?fedora} > 26
%global openssl11 1
%endif
%global openssl -openssl-linked
%if 0%{?fedora} < 29
%if 0%{?fedora} < 29 && 0%{?rhel} < 9
%ifarch %{ix86}
%global no_sse2 -no-sse2
%endif
@ -16,10 +12,13 @@
# workaround https://bugzilla.redhat.com/show_bug.cgi?id=1668865
# for current stable releases
%if 0%{?fedora} && 0%{?fedora} < 30
%if 0%{?fedora} < 30 || 0%{?rhel} > 6
%global no_feature_statx -no-feature-statx
%global no_feature_renameat2 -no-feature-renameat2
%endif
%if 0%{?rhel} && 0%{?rhel} > 6
%global no_feature_getentropy -no-feature-getentropy
%endif
# support qtchooser (adds qtchooser .conf file)
%global qtchooser 1
@ -41,9 +40,12 @@
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
# use external qt_settings pkg
%if 0%{?fedora}
%global qt_settings 1
%endif
%global journald -journald
BuildRequires: make
BuildRequires: pkgconfig(libsystemd)
%global examples 1
@ -52,8 +54,9 @@ BuildRequires: pkgconfig(libsystemd)
Name: qt5-qtbase
Summary: Qt5 - QtBase components
Version: 5.14.2
Release: 4%{?dist}
Version: 5.15.2
Release: 15%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -125,11 +128,16 @@ Patch68: qtbase-everywhere-src-5.11.1-python3.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1732129
Patch80: qtbase-use-wayland-on-gnome.patch
# gcc-11
Patch90: %{name}-gcc11.patch
# glibc stat
## upstream patches
Patch100: qt5-qtbase-CVE-2015-9541.patch
Patch144: 0044-QLibrary-fix-deadlock-caused-by-fix-to-QTBUG-39642.patch
# see also patch90
Patch200: qtbase-QTBUG-90395.patch
Patch201: qtbase-QTBUG-89977.patch
Patch202: qtbase-filechooser-portal-send-window-id-in-hex.patch
# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires.
# Those themes are there for platform integration. If the required libraries are
@ -169,36 +177,22 @@ BuildRequires: pkgconfig(libproxy-1.0)
BuildRequires: pkgconfig(ice) pkgconfig(sm)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libudev)
%if 0%{?fedora} == 26
BuildRequires: compat-openssl10-devel
%else
BuildRequires: openssl-devel%{?openssl11: >= 1.1}
%endif
BuildRequires: openssl-devel
BuildRequires: pkgconfig(libpulse) pkgconfig(libpulse-mainloop-glib)
%if 0%{?fedora}
#global xkbcommon -system-xkbcommon
BuildRequires: pkgconfig(libinput)
BuildRequires: pkgconfig(xcb-xkb) >= 1.10
BuildRequires: pkgconfig(xcb-util)
BuildRequires: pkgconfig(xkbcommon) >= 0.4.1
BuildRequires: pkgconfig(xkbcommon-x11) >= 0.4.1
%else
# not Fedora
%if 0%{?rhel} == 6
%global xcb -qt-xcb
%endif
#global xkbcommon -qt-xkbcommon
Provides: bundled(libxkbcommon) = 0.4.1
%endif
BuildRequires: pkgconfig(xkeyboard-config)
%global vulkan 1
BuildRequires: pkgconfig(vulkan)
%if 0%{?fedora} || 0%{?rhel} > 6
%global egl 1
BuildRequires: libEGL-devel
BuildRequires: pkgconfig(gbm)
## TODO: apparently only needed if building opengl_es2 support, do we actually use it? -- rex
## this dep was removed in rawhide with introduction of mesa-19.1
%if 0%{?fedora} < 30
BuildRequires: pkgconfig(glesv2)
%endif
%global sqlite -system-sqlite
BuildRequires: pkgconfig(sqlite3) >= 3.7
%if 0%{?fedora} > 22
@ -277,6 +271,9 @@ Requires: %{name}-gui%{?_isa}
Requires: libEGL-devel
%endif
Requires: pkgconfig(gl)
%if 0%{?vulkan}
Requires: pkgconfig(vulkan)
%endif
Requires: qt5-rpm-macros
%if 0%{?use_clang}
Requires: clang >= 3.7.0
@ -306,10 +303,8 @@ Summary: Static library files for %{name}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: pkgconfig(fontconfig)
Requires: pkgconfig(glib-2.0)
%if 0%{?fedora}
Requires: pkgconfig(libinput)
Requires: pkgconfig(xkbcommon)
%endif
Requires: pkgconfig(zlib)
%description static
@ -326,7 +321,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%package mysql
Summary: MySQL driver for Qt5's SQL classes
%if 0%{?fedora} > 27
%if 0%{?fedora} > 27 || 0%{?rhel} > 8
BuildRequires: mariadb-connector-c-devel
%else
BuildRequires: mysql-devel
@ -396,13 +391,15 @@ Qt5 libraries used for drawing widgets and OpenGL items.
%endif
%patch68 -p1
%if 0%{?fedora} > 30
%if 0%{?fedora} > 30 || 0%{?rhel} > 8
%patch80 -p1 -b .use-wayland-on-gnome.patch
%endif
%patch90 -p1 -b .gcc11
## upstream patches
%patch100 -p1 -b .CVE-2015-9541
%patch144 -p1 -b .0044
%patch200 -p1 -b .QTBUG-90395
%patch201 -p1 -b .QTBUG-89977
# move some bundled libs to ensure they're not accidentally used
pushd src/3rdparty
@ -429,6 +426,13 @@ sed -i -e "s|^#!/usr/bin/env perl$|#!%{__perl}|" \
%build
# QT is known not to work properly with LTO at this point. Some of the issues
# are being worked on upstream and disabling LTO should be re-evaluated as
# we update this change. Until such time...
# Disable LTO
# https://bugzilla.redhat.com/1900527
%define _lto_cflags %{nil}
## FIXME/TODO:
# * for %%ix86, add sse2 enabled builds for Qt5Gui, Qt5Core, QtNetwork, see also:
# http://anonscm.debian.org/cgit/pkg-kde/qt/qtbase.git/tree/debian/rules (234-249)
@ -469,6 +473,7 @@ export MAKEFLAGS="%{?_smp_mflags}"
-shared \
-accessibility \
%{?dbus}%{!?dbus:-dbus-runtime} \
%{?egl:-egl} \
-fontconfig \
-glib \
-gtk \
@ -480,6 +485,7 @@ export MAKEFLAGS="%{?_smp_mflags}"
%{!?examples:-nomake examples} \
%{!?tests:-nomake tests} \
-no-pch \
-no-reduce-relocations \
-no-rpath \
-no-separate-debug-info \
%{?no_sse2} \
@ -498,6 +504,7 @@ export MAKEFLAGS="%{?_smp_mflags}"
-no-feature-relocatable \
%{?no_feature_renameat2} \
%{?no_feature_statx} \
%{?no_feature_getentropy} \
QMAKE_CFLAGS_RELEASE="${CFLAGS:-$RPM_OPT_FLAGS}" \
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-$RPM_OPT_FLAGS}" \
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-$RPM_LD_FLAGS}"
@ -540,7 +547,7 @@ translationdir=%{_qt5_translationdir}
Name: Qt5
Description: Qt5 Configuration
Version: %{version}
Version: 5.15.2
EOF
# rpm macros
@ -606,7 +613,7 @@ popd
install -p -m755 -D %{SOURCE6} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/10-qt5-check-opengl2.sh
# f29+ enables sse2 unconditionally on ix86 -- rex
%if 0%{?fedora} < 29
%if 0%{?fedora} < 29 && 0%{?rhel} < 9
# fix bz#1442553 multilib issue
privat_header_file=%{buildroot}%{_qt5_headerdir}/QtCore/%{version}/QtCore/private/qconfig_p.h
grep -v QT_FEATURE_sse2 $privat_header_file > ${privat_header_file}.me
@ -849,7 +856,6 @@ fi
%{_qt5_libdir}/cmake/Qt5Xml/Qt5XmlConfig*.cmake
%{_qt5_libdir}/cmake/Qt5/Qt5ModuleLocation.cmake
%{_qt5_libdir}/cmake/Qt5AccessibilitySupport/Qt5AccessibilitySupportConfig*.cmake
%{_qt5_libdir}/cmake/Qt5Bootstrap/Qt5BootstrapConfig*.cmake
%{_qt5_libdir}/cmake/Qt5DeviceDiscoverySupport/Qt5DeviceDiscoverySupportConfig*.cmake
%{_qt5_libdir}/cmake/Qt5EdidSupport/Qt5EdidSupportConfig*.cmake
%{_qt5_libdir}/cmake/Qt5EglFSDeviceIntegration/Qt5EglFSDeviceIntegrationConfig*.cmake
@ -867,6 +873,9 @@ fi
%{_qt5_libdir}/cmake/Qt5ThemeSupport/Qt5ThemeSupportConfig*.cmake
%{_qt5_libdir}/cmake/Qt5XcbQpa/Qt5XcbQpaConfig*.cmake
%{_qt5_libdir}/cmake/Qt5XkbCommonSupport/Qt5XkbCommonSupportConfig*.cmake
%{_qt5_libdir}/metatypes/qt5core_metatypes.json
%{_qt5_libdir}/metatypes/qt5gui_metatypes.json
%{_qt5_libdir}/metatypes/qt5widgets_metatypes.json
%{_qt5_libdir}/pkgconfig/Qt5.pc
%{_qt5_libdir}/pkgconfig/Qt5Concurrent.pc
%{_qt5_libdir}/pkgconfig/Qt5Core.pc
@ -887,10 +896,10 @@ fi
## private-devel globs
# keep mkspecs/modules stuff in -devel for now, https://bugzilla.redhat.com/show_bug.cgi?id=1705280
%{_qt5_archdatadir}/mkspecs/modules/qt_lib_*_private.pri
%exclude %{_qt5_headerdir}/*/%{version}/*/private/
%exclude %{_qt5_headerdir}/*/%{version}/
%files private-devel
%{_qt5_headerdir}/*/%{version}/*/private/
%{_qt5_headerdir}/*/%{version}/
#{_qt5_archdatadir}/mkspecs/modules/qt_lib_*_private.pri
%files static
@ -943,6 +952,12 @@ fi
%{_qt5_libdir}/libQt5EdidSupport.prl
%{_qt5_libdir}/libQt5XkbCommonSupport.*a
%{_qt5_libdir}/libQt5XkbCommonSupport.prl
%if 0%{?vulkan}
%{_qt5_headerdir}/QtVulkanSupport/
%{_qt5_libdir}/cmake/Qt5VulkanSupport/
%{_qt5_libdir}/libQt5VulkanSupport.*a
%{_qt5_libdir}/libQt5VulkanSupport.prl
%endif
%if 0%{?examples}
%files examples
@ -988,10 +1003,8 @@ fi
%{_qt5_plugindir}/generic/libqevdevmouseplugin.so
%{_qt5_plugindir}/generic/libqevdevtabletplugin.so
%{_qt5_plugindir}/generic/libqevdevtouchplugin.so
%if 0%{?fedora}
%{_qt5_plugindir}/generic/libqlibinputplugin.so
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QLibInputPlugin.cmake
%endif
%{_qt5_plugindir}/generic/libqtuiotouchplugin.so
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEvdevKeyboardPlugin.cmake
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEvdevMousePlugin.cmake
@ -1048,6 +1061,86 @@ fi
%changelog
* Tue Mar 09 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-15
- FileChooser portal: send window id in hex
* Fri Feb 19 2021 Rex Dieter <rdieter@fedoraproject.org> - 5.15.2-14
- %%build: explicitly pass -egl build option
- unconditional BR: pkgconfig(glesv2) again
* Tue Feb 09 2021 Pavel Raiskup <praiskup@redhat.com> - 5.15.2-13
- rebuild all postgresql deps once more, for libpq ABI fix rhbz#1908268
* Mon Feb 08 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-12
- Use Wayland platform on GNOME for RHEL 9
* Mon Feb 08 2021 Pavel Raiskup <praiskup@redhat.com> - 5.15.2-11
- rebuild for libpq ABI fix rhbz#1908268
* Sat Feb 06 2021 Rex Dieter <rdieter@fedoraproject.org> - 5.15.2-10
- FTBFS: qendian.h (and qfloat16.h) missing <limits> include (QTBUG-90395)
- Qt build on GCC 11 (QTBUG-89977)
* Mon Feb 01 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-9
- Disable getentropy on RHEL
* Fri Jan 29 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-8
- Disable statx and renameat2 on RHEL
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.15.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Dec 19 2020 Rex Dieter <rdieter@fedoraproject.org> - 5.15.2-6
- rebuild (gcc11)
* Mon Nov 30 2020 Rex Dieter <rdieter@fedoraproject.org> - 5.15.2-5
- re-enable vulkan support on s390x, root cause fixed
* Sun Nov 29 2020 Rex Dieter <rdieter@fedoraproject.org> - 5.15.2-4
- drop vulkan support on s390x (#1902449)
* Fri Nov 27 2020 Jan Grulich <jgrulich@redhat.com> - 5.15.2-3
- Require qt-settings only in Fedora builds
* Mon Nov 23 2020 Rex Dieter <rdieter@fedoraproject.org> - 5.15.2-2
- -no-reduce-relocations (#1900527)
* Fri Nov 20 09:27:41 CET 2020 Jan Grulich <jgrulich@redhat.com> - 5.15.2-1
- 5.15.2
* Tue Nov 03 2020 Sandro Mani <manisandro@gmail.com> - 5.15.1-7
- Backport upstream fix for QTBUG-86319
* Sun Oct 18 2020 Jeff Law <law@redhat.com> - 5.15.1-6
- Fix missing #includes for gcc-11
* Wed Sep 30 2020 Jan Grulich <jgrulich@redhat.com> - 5.15.1-5
- Upstream fix: Emit QScreen::geometryChanged when the logical DPI changes
* Tue Sep 29 2020 Yaroslav Fedevych <yaroslav@fedevych.name> - 5.15.1-4
- qt5-qtbase-devel requires vulkan headers
* Thu Sep 17 2020 Rex Dieter <rdieter@fedoraproject.org> - 5.15.1-3
- enable vulkan support (#1794969)
* Thu Sep 10 2020 Rex Dieter <rdieter@fedoraproject.org> - 5.15.1-2
- CentOS8 - numpad do not work in KDE Plasma (#1868371)
* Thu Sep 10 2020 Jan Grulich <jgrulich@redhat.com> - 5.15.1-1
- 5.15.1
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.14.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 01 2020 Jeff Law <law@redhat.com> - 5.14.2-7
- Disable LTO
* Mon Jun 15 2020 Rex Dieter <rdieter@fedoraproject.org> - 5.14.2-6
- Qt5 private header packaging breaks Qt5 Cmake files (#1846613)
* Sat May 16 2020 Pete Walter <pwalter@fedoraproject.org> - 5.14.2-5
- Rebuild for ICU 67
* Tue Apr 14 2020 Rex Dieter <rdieter@fedoraproject.org> - 5.14.2-4
- backport "Mutex deadlock in QPluginLoader, Krita fails to start" (QTBUG-83207)

11
qtbase-QTBUG-89977.patch Normal file
View File

@ -0,0 +1,11 @@
diff -up qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h.foo qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h
--- qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h.foo 2020-10-27 03:02:11.000000000 -0500
+++ qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h 2021-02-06 17:05:04.879201352 -0600
@@ -51,6 +49,7 @@
#include <string>
#include <iterator>
+#include <limits>
#ifdef truncate
#error qbytearray.h must be included before any header file that defines truncate

23
qtbase-QTBUG-90395.patch Normal file
View File

@ -0,0 +1,23 @@
diff -up qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h.QTBUG-90395 qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h
--- qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h.QTBUG-90395 2020-10-27 03:02:11.000000000 -0500
+++ qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h 2021-02-06 16:36:27.072105717 -0600
@@ -44,6 +44,8 @@
#include <QtCore/qfloat16.h>
#include <QtCore/qglobal.h>
+#include <limits>
+
// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
#include <stdlib.h>
#include <string.h>
diff -up qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h.QTBUG-90395 qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h
--- qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h.QTBUG-90395 2021-02-06 16:36:27.074105730 -0600
+++ qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h 2021-02-06 16:37:19.212440114 -0600
@@ -43,6 +43,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qmetatype.h>
+#include <limits>
#include <string.h>
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)

View File

@ -0,0 +1,56 @@
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index d294cc38..dd31e31c 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3155,13 +3155,14 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP
bool availableGeometryChanged = e->availableGeometry != s->d_func()->availableGeometry;
s->d_func()->availableGeometry = e->availableGeometry;
- if (geometryChanged) {
- Qt::ScreenOrientation primaryOrientation = s->primaryOrientation();
+ const Qt::ScreenOrientation primaryOrientation = s->primaryOrientation();
+ if (geometryChanged)
s->d_func()->updatePrimaryOrientation();
- emit s->geometryChanged(s->geometry());
+ s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);
+
+ if (geometryChanged) {
emit s->physicalSizeChanged(s->physicalSize());
- emit s->physicalDotsPerInchChanged(s->physicalDotsPerInch());
emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch());
if (s->primaryOrientation() != primaryOrientation)
@@ -3171,8 +3172,6 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP
updateFilteredScreenOrientation(s);
}
- s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);
-
resetCachedDevicePixelRatio();
}
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index df628fcc..a1afc1ba 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -88,6 +88,9 @@ void QScreenPrivate::updateGeometriesWithSignals()
void QScreenPrivate::emitGeometryChangeSignals(bool geometryChanged, bool availableGeometryChanged)
{
Q_Q(QScreen);
+ if (geometryChanged)
+ emit q->geometryChanged(geometry);
+
if (availableGeometryChanged)
emit q->availableGeometryChanged(availableGeometry);
@@ -96,6 +99,9 @@ void QScreenPrivate::emitGeometryChangeSignals(bool geometryChanged, bool availa
for (QScreen* sibling : siblings)
emit sibling->virtualGeometryChanged(sibling->virtualGeometry());
}
+
+ if (geometryChanged)
+ emit q->physicalDotsPerInchChanged(q->physicalDotsPerInch());
}
void QScreenPrivate::setPlatformScreen(QPlatformScreen *screen)

View File

@ -0,0 +1,26 @@
From acaabc9108dfe75530960cf8e3ec4f3602cd82e0 Mon Sep 17 00:00:00 2001
From: Jan Grulich <jgrulich@redhat.com>
Date: Mon, 08 Mar 2021 12:29:21 +0100
Subject: [PATCH] FileChooser portal: send window id in hex
We send window id in decimal, however, it is expected to be send in hex.
This causes a mismatch and makes portal dialog to show in background.
Pick-to: 5.15 6.0 6.1
Change-Id: Ibd77199bbb4a2ad4782a0457ddc5506c6b5608fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
---
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
index ec153f6..85bdd1a 100644
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
@@ -185,7 +185,7 @@
QLatin1String("/org/freedesktop/portal/desktop"),
QLatin1String("org.freedesktop.portal.FileChooser"),
d->saveFile ? QLatin1String("SaveFile") : QLatin1String("OpenFile"));
- QString parentWindowId = QLatin1String("x11:") + QString::number(d->winId);
+ QString parentWindowId = QLatin1String("x11:") + QString::number(d->winId, 16);
QVariantMap options;
if (!d->acceptLabel.isEmpty())

View File

@ -1 +1 @@
SHA512 (qtbase-everywhere-src-5.14.2.tar.xz) = 8c83e06d58b56e9f288e83d6c3dd4ad6cc9f1eb1a32c7b44fb912fda34ed7255766fd9fa60cd740ee001df7d6172f25df05f1f95e986c3e793fbcd9bf4f18de9
SHA512 (qtbase-everywhere-src-5.15.2.tar.xz) = a549bfaf867d746ff744ab224eb65ac1bdcdac7e8457dfa379941b2b225a90442fcfc1e1175b9afb1f169468f8130b7ab917c67be67156520a4bfb5c92d304f9