rpms/imsettings/F-12 imsettings-fix-race-on-popen.patch, NONE, 1.1 imsettings-no-restart-with-exit0.patch, NONE, 1.1 imsettings.spec, 1.52, 1.53

Akira TAGOH tagoh at fedoraproject.org
Thu Jun 24 09:41:34 UTC 2010


Author: tagoh

Update of /cvs/pkgs/rpms/imsettings/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv13508

Modified Files:
	imsettings.spec 
Added Files:
	imsettings-fix-race-on-popen.patch 
	imsettings-no-restart-with-exit0.patch 
Log Message:
* Thu Jun 24 2010 Akira TAGOH <tagoh at redhat.com> - 0.108.0-4
- Fix a segfault. (#599924)

imsettings-fix-race-on-popen.patch:
 imsettings-info.c |    5 +++++
 1 file changed, 5 insertions(+)

--- NEW FILE imsettings-fix-race-on-popen.patch ---
2010-06-04  Akira TAGOH  <tagoh at redhat.com>

	* imsettings/imsettings-info.c (imsettings_info_notify_properties): 
	Fix the race condition issue during popen. (rhbz#599924)

Index: imsettings/imsettings-info.c
===================================================================
--- imsettings/imsettings-info.c	(リビジョン 396)
+++ imsettings/imsettings-info.c	(作業コピー)
@@ -107,6 +107,7 @@
 
 
 G_DEFINE_TYPE (IMSettingsInfo, imsettings_info, IMSETTINGS_TYPE_OBJECT);
+G_LOCK_DEFINE_STATIC (info);
 
 /*
  * Private functions
@@ -228,6 +229,8 @@
 	g_free(xinputinfo);
 	g_free(lang);
 
+	G_LOCK (info);
+
 	if (lstat(filename, &st) == -1 ||
 	    (fp = popen(cmd->str, "r")) == NULL) {
 		/* error happens. don't list. */
@@ -304,6 +307,8 @@
 		}
 		pclose(fp);
 	}
+
+	G_UNLOCK (info);
 	g_string_free(cmd, TRUE);
 	g_string_free(str, TRUE);
 

imsettings-no-restart-with-exit0.patch:
 factory.c |    4 ++++
 1 file changed, 4 insertions(+)

--- NEW FILE imsettings-no-restart-with-exit0.patch ---
2010-05-18  Akira TAGOH  <tagoh at redhat.com>

	* src/factory.c (_watch_im_status_cb): don't restart the process
	if the exit status is 0. (rhbz#573604)

Index: src/factory.c
===================================================================
--- src/factory.c	(リビジョン 392)
+++ src/factory.c	(リビジョン 393)
@@ -422,6 +422,10 @@
 
 		if (WIFEXITED (status)) {
 			g_string_append_printf(status_message, "the status %d", WEXITSTATUS (status));
+			if (WEXITSTATUS (status) == 0) {
+				/* don't restart the process. the process died intentionally */
+				g_hash_table_remove(priv->pid2id, GINT_TO_POINTER (pid));
+			}
 		} else if (WIFSIGNALED (status)) {
 			g_string_append_printf(status_message, "the signal %d", WTERMSIG (status));
 			if (WCOREDUMP (status)) {


Index: imsettings.spec
===================================================================
RCS file: /cvs/pkgs/rpms/imsettings/F-12/imsettings.spec,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -p -r1.52 -r1.53
--- imsettings.spec	15 Apr 2010 07:03:35 -0000	1.52
+++ imsettings.spec	24 Jun 2010 09:41:34 -0000	1.53
@@ -1,6 +1,6 @@
 Name:		imsettings
 Version:	0.108.0
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	LGPLv2+
 URL:		http://code.google.com/p/imsettings/
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -21,6 +21,8 @@ Patch0:		imsettings-constraint-of-langua
 Patch1:		imsettings-disable-xim.patch
 Patch2:		imsettings-none.conf-gtk-xim-default.patch
 Patch3:		imsettings-fix-lxde-fail.patch
+Patch4:		imsettings-no-restart-with-exit0.patch
+Patch5:		imsettings-fix-race-on-popen.patch
 
 Summary:	Delivery framework for general Input Method configuration
 Group:		Applications/System
@@ -83,6 +85,20 @@ immediately without any need to restart 
 or the desktop.
 
 This package contains a plugin to get this working on Xfce.  
+
+%package	lxde
+Summary:	LXDE support on imsettings
+Group:		Applications/System
+Requires:	%{name} = %{version}-%{release}
+Requires:	lxde-settings-daemon
+
+%description	lxde
+IMSettings is a framework that delivers Input Method
+settings and applies the changes so they take effect
+immediately without any need to restart applications
+or the desktop.
+
+This package contains a helper program to get this working on LXDE.
 %endif
 
 %prep
@@ -91,6 +107,8 @@ This package contains a plugin to get th
 %patch1 -p1 -b .1-xim
 %patch2 -p1 -b .2-xim
 %patch3 -p0 -b .3-lxde
+%patch4 -p0 -b .4-no-restart
+%patch5 -p0 -b .5-popen
 autoreconf -Im4macros -f
 
 %build
@@ -116,13 +134,13 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/xfce4/mc
 %if 0%{?rhel}
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/imsettings-xfce-helper.desktop
 rm -f $RPM_BUILD_ROOT%{_bindir}/imsettings-xfce-helper
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/imsettings-lxde-helper.desktop
+rm -f $RPM_BUILD_ROOT%{_bindir}/imsettings-lxde-helper
 %endif
 
 # still not stable
 rm -f $RPM_BUILD_ROOT%{_datadir}/dbus-1/services/qt-im-settings-daemon.service
 rm -f $RPM_BUILD_ROOT%{_libexecdir}/qt-im-settings-daemon
-rm -f $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/imsettings-lxde-helper.desktop
-rm -f $RPM_BUILD_ROOT%{_bindir}/imsettings-lxde-helper
 
 # workaround for KDE
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kde/env
@@ -218,12 +236,25 @@ fi
 %doc AUTHORS COPYING ChangeLog NEWS README
 %{_bindir}/imsettings-xfce-helper
 %{_sysconfdir}/xdg/autostart/imsettings-xfce-helper.desktop
+
+%files	lxde
+%defattr(-, root, root, -)
+%doc AUTHORS COPYING ChangeLog NEWS README
+%{_bindir}/imsettings-lxde-helper
+%{_sysconfdir}/xdg/autostart/imsettings-lxde-helper.desktop
 %endif
 
 
 %changelog
+* Thu Jun 24 2010 Akira TAGOH <tagoh at redhat.com> - 0.108.0-4
+- Fix a segfault. (#599924)
+
+* Tue May 18 2010 Akira TAGOH <tagoh at redhat.com> - 0.108.0-3
+- Don't restart the IM process when the exit status is 0.
+
 * Thu Apr 15 2010 Akira TAGOH <tagoh at redhat.com> - 0.108.0-2
 - Fix issue the invocation of IM always fails in the internal status. (#582448)
+- Add imsettings-lxde subpackage.
 
 * Tue Mar 23 2010 Akira TAGOH <tagoh at redhat.com> - 0.108.0-1
 - New upstream release.



More information about the scm-commits mailing list