[packages/qt4] - rel 5; few more patches from FC; few old FC patches renamed

arekm arekm at pld-linux.org
Sun Sep 27 17:17:35 CEST 2015


commit a08501330b6b9cb2af9363ce3d13a1069919f43e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Sep 27 17:17:12 2015 +0200

    - rel 5; few more patches from FC; few old FC patches renamed

 ...erywhere-opensource-src-4.8.5-QTBUG-21900.patch | 84 ++++++++++++++++++++++
 ...erywhere-opensource-src-4.8.5-QTBUG-35459.patch | 12 ++++
 ...verywhere-opensource-src-4.8.5-QTBUG-4862.patch | 29 ++++++++
 ...erywhere-opensource-src-4.8.6-QTBUG-34614.patch |  0
 ...erywhere-opensource-src-4.8.6-QTBUG-37380.patch | 46 ++++--------
 ...erywhere-opensource-src-4.8.6-QTBUG-38585.patch |  0
 ...ensource-src-4.5.0-fix-qatomic-inline-asm.patch | 50 +++++++++++++
 qt4.spec                                           | 26 +++++--
 8 files changed, 208 insertions(+), 39 deletions(-)
---
diff --git a/qt4.spec b/qt4.spec
index 4ed5e7c..0c15a6d 100644
--- a/qt4.spec
+++ b/qt4.spec
@@ -61,7 +61,7 @@ Summary(pl.UTF-8):	Biblioteka Qt do tworzenia GUI
 Summary(pt_BR.UTF-8):	Estrutura para rodar aplicações GUI Qt
 Name:		qt4
 Version:	4.8.7
-Release:	4
+Release:	5
 License:	LGPL v2.1 or GPL v3.0
 Group:		X11/Libraries
 Source0:	http://download.qt-project.org/official_releases/qt/4.8/%{version}/qt-everywhere-opensource-src-%{version}.tar.gz
@@ -95,11 +95,17 @@ Patch14:	x32.patch
 # https://bugreports.qt-project.org/browse/QTBUG-5545
 Patch15:	qt-everywhere-opensource-src-4.8.4-qgtkstyle_disable_gtk_theme_check.patch
 Patch16:	qt-everywhere-opensource-src-4.8.3-QTBUG-4862.patch
-Patch17:	l-qclipboard_delay.patch
-Patch18:	l-qclipboard_fix_recursive.patch
-Patch19:	qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch
+
 Patch20:	%{name}-oracle-instantclient.patch
 Patch27:	moc-boost-workaround.patch
+# from FC
+Patch28:	qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch
+Patch29:	qt-everywhere-opensource-src-4.8.6-QTBUG-38585.patch
+Patch30:	qt-everywhere-opensource-src-4.8.6-QTBUG-37380.patch
+Patch31:	qt-everywhere-opensource-src-4.8.6-QTBUG-34614.patch
+Patch32:	qt-everywhere-opensource-src-4.8.5-QTBUG-35459.patch
+Patch33:	qt-everywhere-opensource-src-4.8.5-QTBUG-4862.patch
+Patch34:	qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch
 URL:		http://qt-project.org/
 %{?with_ibase:BuildRequires:	Firebird-devel}
 %{?with_openvg:BuildRequires:	Mesa-libOpenVG-devel}
@@ -1507,13 +1513,19 @@ Programas exemplo para o Qt versão.
 %patch14 -p1
 %patch15 -p1
 %patch16 -p1
-%patch17 -p0
-%patch18 -p0
-%patch19 -p1
+
 %patch20 -p1
 
 %patch27 -p1
 
+%patch28 -p1
+%patch29 -p0
+%patch30 -p1
+%patch31 -p0
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
+
 %{__sed} -i -e 's,usr/X11R6/,usr/g,' mkspecs/linux-g++-64/qmake.conf \
 	mkspecs/common/linux.conf
 
diff --git a/qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch b/qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch
new file mode 100644
index 0000000..018872f
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch
@@ -0,0 +1,84 @@
+diff -up qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp.QTBUG-21900 qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp
+--- qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp.QTBUG-21900	2013-05-30 16:18:05.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp	2013-06-09 11:53:45.891771748 -0500
+@@ -818,6 +818,27 @@ static Bool qt_sync_request_scanner(Disp
+ #endif
+ #endif // QT_NO_XSYNC
+ 
++struct qt_configure_event_data
++{
++    WId window;
++    WId parent;
++};
++
++static Bool qt_configure_event_scanner(Display*, XEvent *event, XPointer arg)
++{
++    qt_configure_event_data *data =
++        reinterpret_cast<qt_configure_event_data*>(arg);
++    if (event->type == ConfigureNotify &&
++        event->xconfigure.window == data->window) {
++        return true;
++    } else if (event->type == ReparentNotify &&
++               event->xreparent.window == data->window) {
++        data->parent = event->xreparent.parent;
++    }
++
++    return false;
++}
++
+ static void qt_x11_create_intern_atoms()
+ {
+     const char *names[QX11Data::NAtoms];
+@@ -5302,8 +5323,11 @@ bool QETWidget::translateConfigEvent(con
+         if (d->extra->compress_events) {
+             // ConfigureNotify compression for faster opaque resizing
+             XEvent otherEvent;
+-            while (XCheckTypedWindowEvent(X11->display, internalWinId(), ConfigureNotify,
+-                                          &otherEvent)) {
++            qt_configure_event_data configureData;
++            configureData.window = internalWinId();
++            configureData.parent = d->topData()->parentWinId;
++            while (XCheckIfEvent(X11->display, &otherEvent,
++                                 &qt_configure_event_scanner, (XPointer)&configureData)) {
+                 if (qt_x11EventFilter(&otherEvent))
+                     continue;
+ 
+@@ -5316,13 +5340,19 @@ bool QETWidget::translateConfigEvent(con
+                 newSize.setWidth(otherEvent.xconfigure.width);
+                 newSize.setHeight(otherEvent.xconfigure.height);
+ 
++                trust = isVisible()
++                        && (configureData.parent == XNone ||
++                            configureData.parent == QX11Info::appRootWindow());
++
+                 if (otherEvent.xconfigure.send_event || trust) {
+                     newCPos.rx() = otherEvent.xconfigure.x +
+                                    otherEvent.xconfigure.border_width;
+                     newCPos.ry() = otherEvent.xconfigure.y +
+                                    otherEvent.xconfigure.border_width;
+                     isCPos = true;
+-                }
++                } else {
++                    isCPos = false;
++               }
+             }
+ #ifndef QT_NO_XSYNC
+             qt_sync_request_event_data sync_event;
+@@ -5335,9 +5365,14 @@ bool QETWidget::translateConfigEvent(con
+         }
+ 
+         if (!isCPos) {
+-            // we didn't get an updated position of the toplevel.
+-            // either we haven't moved or there is a bug in the window manager.
+-            // anyway, let's query the position to be certain.
++            // If the last configure event didn't have a trustable position,
++            // it's necessary to query, see ICCCM 4.24:
++            //
++            //  Any real ConfigureNotify event on a top-level window implies
++            //  that the window’s position on the root may have changed, even
++            //  though the event reports that the window’s position in its
++            //  parent is unchanged because the window may have been reparented.
++
+             int x, y;
+             Window child;
+             XTranslateCoordinates(X11->display, internalWinId(),
diff --git a/qt-everywhere-opensource-src-4.8.5-QTBUG-35459.patch b/qt-everywhere-opensource-src-4.8.5-QTBUG-35459.patch
new file mode 100644
index 0000000..dede832
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.5-QTBUG-35459.patch
@@ -0,0 +1,12 @@
+diff -ur qt-everywhere-opensource-src-4.8.5-CVE-2013-4549/src/xml/sax/qxml.cpp qt-everywhere-opensource-src-4.8.5-QTBUG-35459/src/xml/sax/qxml.cpp
+--- qt-everywhere-opensource-src-4.8.5-CVE-2013-4549/src/xml/sax/qxml.cpp	2013-12-05 19:23:33.000000000 +0100
++++ qt-everywhere-opensource-src-4.8.5-QTBUG-35459/src/xml/sax/qxml.cpp	2014-01-13 20:13:59.000000000 +0100
+@@ -428,7 +428,7 @@
+     // for the DTD currently being parsed.
+     static const int dtdRecursionLimit = 2;
+     // The maximum amount of characters an entity value may contain, after expansion.
+-    static const int entityCharacterLimit = 1024;
++    static const int entityCharacterLimit = 65536;
+ 
+     const QString &string();
+     void stringClear();
diff --git a/qt-everywhere-opensource-src-4.8.5-QTBUG-4862.patch b/qt-everywhere-opensource-src-4.8.5-QTBUG-4862.patch
new file mode 100644
index 0000000..ee1d191
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.5-QTBUG-4862.patch
@@ -0,0 +1,29 @@
+diff -up qt-everywhere-opensource-src-4.8.5/src/corelib/io/qfilesystemengine_unix.cpp.QTBUG-4862 qt-everywhere-opensource-src-4.8.5/src/corelib/io/qfilesystemengine_unix.cpp
+--- qt-everywhere-opensource-src-4.8.5/src/corelib/io/qfilesystemengine_unix.cpp.QTBUG-4862	2013-06-09 12:02:50.323221694 -0500
++++ qt-everywhere-opensource-src-4.8.5/src/corelib/io/qfilesystemengine_unix.cpp	2013-06-09 12:38:53.140804742 -0500
+@@ -624,6 +624,25 @@ QString QFileSystemEngine::homePath()
+ {
+     QString home = QFile::decodeName(qgetenv("HOME"));
+     if (home.isEmpty())
++    {
++#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)
++        int size_max = sysconf(_SC_GETPW_R_SIZE_MAX);
++        if (size_max == -1)
++            size_max = 1024;
++        QVarLengthArray<char, 1024> buf(size_max);
++#endif
++        struct passwd *pw = 0;
++        uid_t user_id = getuid();
++        pw = getpwuid(user_id);
++#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)
++        struct passwd entry;
++        getpwuid_r(user_id, &entry, buf.data(), buf.size(), &pw);
++#else
++        pw = getpwuid(user_id);
++#endif
++        home = QFile::decodeName(QByteArray(pw->pw_dir));
++    }
++    if (home.isEmpty())
+         home = rootPath();
+     return QDir::cleanPath(home);
+ }
diff --git a/l-qclipboard_fix_recursive.patch b/qt-everywhere-opensource-src-4.8.6-QTBUG-34614.patch
similarity index 100%
rename from l-qclipboard_fix_recursive.patch
rename to qt-everywhere-opensource-src-4.8.6-QTBUG-34614.patch
diff --git a/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch b/qt-everywhere-opensource-src-4.8.6-QTBUG-37380.patch
similarity index 58%
rename from qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch
rename to qt-everywhere-opensource-src-4.8.6-QTBUG-37380.patch
index 0fcc1fa..6949bbf 100644
--- a/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch
+++ b/qt-everywhere-opensource-src-4.8.6-QTBUG-37380.patch
@@ -1,29 +1,14 @@
-From 267feb2de49eed0823ca0c29f1cd5238537c7116 Mon Sep 17 00:00:00 2001
-From: Jan-Marek Glogowski <glogow at fbihome.de>
-Date: Thu, 6 Mar 2014 18:44:43 +0100
-Subject: Honor ExcludeSocketNotifiers in glib event loop
+Author: Jan-Marek Glogowski <glogow at fbihome.de>
+Date:   Thu Mar 06 18:44:43 2014 +0100
 
-Implements QEventLoop::ExcludeSocketNotifiers in the same way
-QEventLoop::X11ExcludeTimers is already implemented for the glib
-event loop.
+    Honor QEventLoop::ExcludeSocketNotifiers in glib event loop.
+    
+    Implements QEventLoop::ExcludeSocketNotifiers in the same way 
+    QEventLoop::X11ExcludeTimers is already implemented for the glib
+    event loop.
 
-This prevents crashes when QClipboard checks for clipboard events
-and
-  qApp->clipboard()->setProperty( "useEventLoopWhenWaiting", true );
-is set.
-
-Task-number: QTBUG-34614
-Task-number: QTBUG-37380
-
-Change-Id: Id4e2a74c6bdf8c3b439a4e3813d24d11368b607d
----
- src/corelib/kernel/qeventdispatcher_glib.cpp | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
-index 0b0e308..ba522fa 100644
---- a/src/corelib/kernel/qeventdispatcher_glib.cpp
-+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
+--- qt4-x11-4.8.1.orig/src/corelib/kernel/qeventdispatcher_glib.cpp
++++ qt4-x11-4.8.1/src/corelib/kernel/qeventdispatcher_glib.cpp
 @@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier
  struct GSocketNotifierSource
  {
@@ -32,7 +17,7 @@ index 0b0e308..ba522fa 100644
      QList<GPollFDWithQSocketNotifier *> pollfds;
  };
  
-@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceCheck(GSource *source)
+@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceChec
      GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
  
      bool pending = false;
@@ -42,7 +27,7 @@ index 0b0e308..ba522fa 100644
      for (int i = 0; !pending && i < src->pollfds.count(); ++i) {
          GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
  
-@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDispatch(GSource *source, GSourceFunc, gpoin
+@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDisp
      QEvent event(QEvent::SockAct);
  
      GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
@@ -52,7 +37,7 @@ index 0b0e308..ba522fa 100644
      for (int i = 0; i < src->pollfds.count(); ++i) {
          GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
  
-@@ -331,6 +338,7 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
+@@ -330,6 +337,7 @@ QEventDispatcherGlibPrivate::QEventDispa
          reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs,
                                                                 sizeof(GSocketNotifierSource)));
      (void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>();
@@ -60,7 +45,7 @@ index 0b0e308..ba522fa 100644
      g_source_set_can_recurse(&socketNotifierSource->source, true);
      g_source_attach(&socketNotifierSource->source, mainContext);
  
-@@ -416,6 +424,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
+@@ -415,6 +423,7 @@ bool QEventDispatcherGlib::processEvents
      // tell postEventSourcePrepare() and timerSource about any new flags
      QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
      d->timerSource->processEventsFlags = flags;
@@ -68,7 +53,7 @@ index 0b0e308..ba522fa 100644
  
      if (!(flags & QEventLoop::EventLoopExec)) {
          // force timers to be sent at normal priority
-@@ -427,6 +436,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
+@@ -426,6 +435,7 @@ bool QEventDispatcherGlib::processEvents
          result = g_main_context_iteration(d->mainContext, canWait);
  
      d->timerSource->processEventsFlags = savedFlags;
@@ -76,6 +61,3 @@ index 0b0e308..ba522fa 100644
  
      if (canWait)
          emit awake();
--- 
-2.0.0
-
diff --git a/l-qclipboard_delay.patch b/qt-everywhere-opensource-src-4.8.6-QTBUG-38585.patch
similarity index 100%
rename from l-qclipboard_delay.patch
rename to qt-everywhere-opensource-src-4.8.6-QTBUG-38585.patch
diff --git a/qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch b/qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch
new file mode 100644
index 0000000..e5ab4ba
--- /dev/null
+++ b/qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch
@@ -0,0 +1,50 @@
+diff -ur qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_i386.h qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_i386.h
+--- qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_i386.h	2009-02-25 22:09:21.000000000 +0100
++++ qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_i386.h	2009-04-01 17:54:21.000000000 +0200
+@@ -115,8 +115,8 @@
+     asm volatile("lock\n"
+                  "incl %0\n"
+                  "setne %1"
+-                 : "=m" (_q_value), "=qm" (ret)
+-                 : "m" (_q_value)
++                 : "+m" (_q_value), "=qm" (ret)
++                 :
+                  : "memory");
+     return ret != 0;
+ }
+@@ -127,8 +127,8 @@
+     asm volatile("lock\n"
+                  "decl %0\n"
+                  "setne %1"
+-                 : "=m" (_q_value), "=qm" (ret)
+-                 : "m" (_q_value)
++                 : "+m" (_q_value), "=qm" (ret)
++                 :
+                  : "memory");
+     return ret != 0;
+ }
+diff -ur qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_x86_64.h qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_x86_64.h
+--- qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_x86_64.h	2009-02-25 22:09:21.000000000 +0100
++++ qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_x86_64.h	2009-04-01 17:54:32.000000000 +0200
+@@ -116,8 +116,8 @@
+     asm volatile("lock\n"
+                  "incl %0\n"
+                  "setne %1"
+-                 : "=m" (_q_value), "=qm" (ret)
+-                 : "m" (_q_value)
++                 : "+m" (_q_value), "=qm" (ret)
++                 :
+                  : "memory");
+     return ret != 0;
+ }
+@@ -128,8 +128,8 @@
+     asm volatile("lock\n"
+                  "decl %0\n"
+                  "setne %1"
+-                 : "=m" (_q_value), "=qm" (ret)
+-                 : "m" (_q_value)
++                 : "+m" (_q_value), "=qm" (ret)
++                 :
+                  : "memory");
+     return ret != 0;
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qt4.git/commitdiff/a08501330b6b9cb2af9363ce3d13a1069919f43e



More information about the pld-cvs-commit mailing list