rpms/kdelibs/devel kdelibs-4.0.3-kconfig_sync_crash.patch, NONE, 1.1 kdelibs.spec, 1.303, 1.304

Rex Dieter (rdieter) fedora-extras-commits at redhat.com
Fri Apr 4 12:14:40 UTC 2008


Author: rdieter

Update of /cvs/pkgs/rpms/kdelibs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23963

Modified Files:
	kdelibs.spec 
Added Files:
	kdelibs-4.0.3-kconfig_sync_crash.patch 
Log Message:
* Fri Apr  4 2008 Rex Dieter <rdieter at fedoraproject.org> 4.0.3-5
- kconfig_sync_crash patch


kdelibs-4.0.3-kconfig_sync_crash.patch:

--- NEW FILE kdelibs-4.0.3-kconfig_sync_crash.patch ---
--- branches/KDE/4.0/kdelibs/kdecore/kernel/kglobal.cpp	2008/01/04 09:09:11	757128
+++ branches/KDE/4.0/kdelibs/kdecore/kernel/kglobal.cpp	2008/04/04 08:48:53	793504
@@ -28,6 +28,12 @@
 #include "kglobal.h"
 #include "kglobal_p.h"
 
+#include <config.h>
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
 #include <QtCore/QList>
 #include <QtCore/QSet>
 
@@ -40,6 +46,7 @@
 #include <QtCore/QCoreApplication>
 #include <QtCore/QTextCodec>
 #include "kcmdlineargs.h"
+#include <unistd.h> // umask
 
 #ifndef NDEBUG
 #define MYASSERT(x) if (!x) \
@@ -55,6 +62,7 @@
 Q_CONSTRUCTOR_FUNCTION(qrand)
 
 typedef QSet<QString> KStringDict;
+mode_t s_umsk;
 
 class KGlobalPrivate
 {
@@ -64,6 +72,10 @@
             locale(0),
             charsets(0)
         {
+            // the umask is read here before any threads are created to avoid race conditions
+            mode_t tmp = 0;
+            s_umsk = umask(tmp);
+            umask(s_umsk);
         }
 
         inline ~KGlobalPrivate()
@@ -151,6 +163,12 @@
     return d->charsets;
 }
 
+mode_t KGlobal::umask()
+{
+    // Don't use PRIVATE_DATA here. This is called by ~KGlobalPrivate -> ~KConfig -> sync -> KSaveFile, so there's no KGlobalPrivate anymore.
+    return s_umsk;
+}
+
 KComponentData KGlobal::activeComponent()
 {
     PRIVATE_DATA;


Index: kdelibs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdelibs/devel/kdelibs.spec,v
retrieving revision 1.303
retrieving revision 1.304
diff -u -r1.303 -r1.304
--- kdelibs.spec	3 Apr 2008 17:00:04 -0000	1.303
+++ kdelibs.spec	4 Apr 2008 12:13:52 -0000	1.304
@@ -1,7 +1,7 @@
 
 Summary: K Desktop Environment 4 - Libraries
 Version: 4.0.3
-Release: 4%{?dist}
+Release: 5%{?dist}
 
 %if 0%{?fedora} > 8
 Name: kdelibs
@@ -80,6 +80,11 @@
 # patch KStandardDirs to use %{_libexecdir}/kde4 instead of %{_libdir}/kde4/libexec
 Patch14: kdelibs-4.0.3-libexecdir.patch
 
+## upstream patches
+# based on SVN commit 793504 by dfaure
+# Move the umask value out of KConfigPrivate to avoid a crash on exit when ~KConfig calls sync.
+Patch100: kdelibs-4.0.3-kconfig_sync_crash.patch 
+
 BuildRequires: qt4-devel >= 4.3.0
 Requires: qt4 >= %{_qt4_version} 
 Requires: xdg-utils
@@ -199,6 +204,8 @@
 %patch13 -p1 -b .fedora-buildtype
 %patch14 -p1 -b .libexecdir
 
+%patch100 -p4 -b .kconfig_sync_crash
+
 
 %build
 
@@ -358,6 +365,9 @@
 
 
 %changelog
+* Fri Apr  4 2008 Rex Dieter <rdieter at fedoraproject.org> 4.0.3-5
+- kconfig_sync_crash patch
+
 * Thu Apr  3 2008 Lukáš Tinkl <ltinkl at redhat.com> 4.0.3-4
 - rebuild for the new %%{_kde4_buildtype}
 




More information about the fedora-extras-commits mailing list