diff --git a/0001-Fix-Qt5DBusMacros.cmake-for-CMake-3.9.patch b/0001-Fix-Qt5DBusMacros.cmake-for-CMake-3.9.patch new file mode 100644 index 0000000..0732bbf --- /dev/null +++ b/0001-Fix-Qt5DBusMacros.cmake-for-CMake-3.9.patch @@ -0,0 +1,41 @@ +From f7aaff01de9d5555e333cedcbbc07236cd653d0a Mon Sep 17 00:00:00 2001 +From: David Faure +Date: Sun, 2 Jul 2017 18:10:39 +0200 +Subject: [PATCH] Fix Qt5DBusMacros.cmake for CMake 3.9 + +CMake gained support for running AUTOMOC on generated headers, +so we need to mark them with SKIP_AUTOMOC since we're generating +moc files for those already. Otherwise we get duplicated symbols. + +Change-Id: Iabd387832cfc74809fc5e6ff4782f4fc83cc07d8 +Reviewed-by: Thiago Macieira +Reviewed-by: Rolf Eike Beer +Reviewed-by: Kevin Funk +Reviewed-by: Stephen Kelly +--- + src/dbus/Qt5DBusMacros.cmake | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/dbus/Qt5DBusMacros.cmake b/src/dbus/Qt5DBusMacros.cmake +index ef3eb73276..0bd7364637 100644 +--- a/src/dbus/Qt5DBusMacros.cmake ++++ b/src/dbus/Qt5DBusMacros.cmake +@@ -62,6 +62,7 @@ function(QT5_ADD_DBUS_INTERFACE _sources _interface _basename) + DEPENDS ${_infile} VERBATIM) + + set_source_files_properties("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE) ++ set_source_files_properties("${_header}" PROPERTIES SKIP_AUTOMOC TRUE) + + qt5_generate_moc("${_header}" "${_moc}") + +@@ -147,6 +148,7 @@ function(QT5_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optio + + qt5_generate_moc("${_header}" "${_moc}") + set_source_files_properties("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE) ++ set_source_files_properties("${_header}" PROPERTIES SKIP_AUTOMOC TRUE) + macro_add_file_dependencies("${_impl}" "${_moc}") + + list(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}") +-- +2.14.1 + diff --git a/libqt5-qtbase.changes b/libqt5-qtbase.changes index 928fa6f..5aa3813 100644 --- a/libqt5-qtbase.changes +++ b/libqt5-qtbase.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Sep 13 12:38:49 UTC 2017 - fabian@ritter-vogt.de + +- Add patch to fix crash with XLIB_SKIP_ARGB_VISUALS set: + * qglxconvenience-avoid-null-pointer-deref.patch (boo#1057971, kde#384540) + +------------------------------------------------------------------- +Thu Aug 31 11:36:32 UTC 2017 - christophe@krop.fr + +- Add 0001-Fix-Qt5DBusMacros.cmake-for-CMake-3.9.patch. + Fixes a race condition when building KMail due to the DBus + interface files being used in several places. + ------------------------------------------------------------------- Tue Aug 29 10:46:47 UTC 2017 - fabian@ritter-vogt.de diff --git a/libqt5-qtbase.spec b/libqt5-qtbase.spec index dce1729..5f1bbec 100644 --- a/libqt5-qtbase.spec +++ b/libqt5-qtbase.spec @@ -67,8 +67,12 @@ Patch16: dont-abort-missing-display.patch # PATCH-FIX-UPSTREAM Patch17: qapplication-emit-palettechanged.patch # patches 1000-2000 and above from upstream 5.9 branch # +# PATCH-FIX-UPSTREAM 0001-Fix-Qt5DBusMacros.cmake-for-CMake-3.9.patch -- Skip automoc for generated headers +Patch1000: 0001-Fix-Qt5DBusMacros.cmake-for-CMake-3.9.patch # patches 2000-3000 and above from upstream 5.10/dev branch # -Patch2000: 0001-QSslSocket-OpenSSL-1.1-backend.patch +Patch2000: 0001-QSslSocket-OpenSSL-1.1-backend.patch +# PATCH-FIX-UPSTREAM (https://codereview.qt-project.org/#/c/205268/) +Patch4000: qglxconvenience-avoid-null-pointer-deref.patch BuildRequires: alsa-devel BuildRequires: cups-devel BuildRequires: double-conversion-devel @@ -159,7 +163,9 @@ handling. %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch1000 -p1 %patch2000 -p1 +%patch4000 -p1 # be sure not to use them rm -rf src/3rdparty/{libjpeg,freetype,zlib} diff --git a/qglxconvenience-avoid-null-pointer-deref.patch b/qglxconvenience-avoid-null-pointer-deref.patch new file mode 100644 index 0000000..e5e750c --- /dev/null +++ b/qglxconvenience-avoid-null-pointer-deref.patch @@ -0,0 +1,33 @@ +From 37b279dda0387ad917da586c19c0605c0be10afc Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik +Date: Tue, 12 Sep 2017 16:18:58 +0200 +Subject: [PATCH] qglxconvenience: Avoid null pointer dereference +References: boo#1057971, kde#384540 + +glXGetVisualFromFBConfig according to documentation can return NULL [1]. +This may result in a crash when running Qt applications using ARGB windows +with XLIB_SKIP_ARGB_VISUALS defined. + +[1] https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXGetVisualFromFBConfig.xml + +Change-Id: Ie076a1e906ed632543bdab03ef365f699533a61a +--- + src/platformsupport/glxconvenience/qglxconvenience.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp +index 8c26550..46bd579 100644 +--- a/src/platformsupport/glxconvenience/qglxconvenience.cpp ++++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp +@@ -202,6 +202,8 @@ GLXFBConfig qglx_findConfig(Display *display, int screen , QSurfaceFormat format + GLXFBConfig candidate = configs[i]; + + QXlibPointer visual(glXGetVisualFromFBConfig(display, candidate)); ++ if (!visual) ++ continue; + + const int actualRed = qPopulationCount(visual->red_mask); + const int actualGreen = qPopulationCount(visual->green_mask); +-- +2.7.4 +