rpms/xfce4-xkb-plugin/F-12 xfce4-xkb-plugin-0.5.2-xklavier-api.patch, NONE, 1.1 xfce4-xkb-plugin-0.5.3.3-fix-various-segfaults.patch, NONE, 1.1 xfce4-xkb-plugin.spec, 1.22, 1.23 xxp-0.5.2-xklavier-api.patch, 1.1, NONE

Christoph Wickert cwickert at fedoraproject.org
Fri Feb 12 00:22:35 UTC 2010


Author: cwickert

Update of /cvs/pkgs/rpms/xfce4-xkb-plugin/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9885/F-12

Modified Files:
	xfce4-xkb-plugin.spec 
Added Files:
	xfce4-xkb-plugin-0.5.2-xklavier-api.patch 
	xfce4-xkb-plugin-0.5.3.3-fix-various-segfaults.patch 
Removed Files:
	xxp-0.5.2-xklavier-api.patch 
Log Message:
* Fri Feb 12 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.5.3.3-3
- Fix various segfaults. Thanks to Lionel Le Folgoc (#525471, #547553)


xfce4-xkb-plugin-0.5.2-xklavier-api.patch:
 xkb-config.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE xfce4-xkb-plugin-0.5.2-xklavier-api.patch ---
diff -up xfce4-xkb-plugin-0.5.2/panel-plugin/xkb-config.c.jx xfce4-xkb-plugin-0.5.2/panel-plugin/xkb-config.c
--- xfce4-xkb-plugin-0.5.2/panel-plugin/xkb-config.c.jx	2008-11-10 04:06:31.000000000 -0500
+++ xfce4-xkb-plugin-0.5.2/panel-plugin/xkb-config.c	2009-07-07 15:42:40.000000000 -0400
@@ -153,7 +153,7 @@ xkb_config_initialize_xkb_options (t_xkb
     config->application_map = g_hash_table_new (g_direct_hash, NULL);
 
     registry = xkl_config_registry_get_instance (config->engine);
-    xkl_config_registry_load (registry);
+    xkl_config_registry_load (registry, FALSE);
     
     config_item = xkl_config_item_new ();
 
@@ -529,7 +529,7 @@ xkb_config_get_xkl_registry ()
     if (!config) return NULL;
 
     registry = xkl_config_registry_get_instance (config->engine);
-    xkl_config_registry_load (registry);
+    xkl_config_registry_load (registry, FALSE);
 
     return registry;
 }

xfce4-xkb-plugin-0.5.3.3-fix-various-segfaults.patch:
 b/panel-plugin/xkb-config.c |    3 +--
 panel-plugin/xkb-config.c   |    5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

--- NEW FILE xfce4-xkb-plugin-0.5.3.3-fix-various-segfaults.patch ---
>From 2856ccfd12b7d9844538ea43a34e9f7af9e945a6 Mon Sep 17 00:00:00 2001
From: Lionel Le Folgoc <mrpouit at ubuntu.com>
Date: Mon, 8 Feb 2010 20:05:12 +0100
Subject: [PATCH 1/2] Use g_strdup("") for options, instead of "", because it is later free'd (thus segfaults).

---
 panel-plugin/xkb-config.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c
index bff77dd..020e915 100644
--- a/panel-plugin/xkb-config.c
+++ b/panel-plugin/xkb-config.c
@@ -290,7 +290,7 @@ xkb_config_update_settings (t_xkb_settings *settings)
         if (settings->kbd_config->toggle_option
                 && strlen (settings->kbd_config->toggle_option) > 0)
             options = g_strdup (settings->kbd_config->toggle_option);
-        else options = "";
+        else options = g_strdup ("");
 
         if (settings->kbd_config->compose_key_position
                 && strlen (settings->kbd_config->compose_key_position) > 0)
-- 
1.6.3.3


>From 04022389eee43503381f88f4f14ea76ec4941464 Mon Sep 17 00:00:00 2001
From: Lionel Le Folgoc <mrpouit at ubuntu.com>
Date: Mon, 8 Feb 2010 20:28:37 +0100
Subject: [PATCH 2/2] Fix another segfault.

---
 panel-plugin/xkb-config.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c
index 020e915..8546b31 100644
--- a/panel-plugin/xkb-config.c
+++ b/panel-plugin/xkb-config.c
@@ -312,11 +312,11 @@ xkb_config_update_settings (t_xkb_settings *settings)
     {
         prefix = g_strsplit(*opt, ":", 2);
         if (settings->kbd_config->toggle_option == NULL
-                && prefix && strcmp(*prefix, "grp") == 0)
+                && prefix && *prefix && strcmp(*prefix, "grp") == 0)
         {
             settings->kbd_config->toggle_option = g_strdup (*opt);
         }
-        else if (prefix && strcmp(*prefix, "compose") == 0)
+        else if (prefix && *prefix && strcmp(*prefix, "compose") == 0)
         {
             settings->kbd_config->compose_key_position = g_strdup (*opt);
         }
-- 
1.6.3.3



Index: xfce4-xkb-plugin.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xfce4-xkb-plugin/F-12/xfce4-xkb-plugin.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -p -r1.22 -r1.23
--- xfce4-xkb-plugin.spec	8 Aug 2009 23:59:47 -0000	1.22
+++ xfce4-xkb-plugin.spec	12 Feb 2010 00:22:35 -0000	1.23
@@ -1,12 +1,16 @@
 Name:		xfce4-xkb-plugin
 Version:	0.5.3.3
-Release:	1%{?dist}
+Release:	3%{?dist}
 Summary:	XKB layout switcher for the Xfce panel
 
 Group:		User Interface/Desktops
 License:	BSD
 URL:		http://goodies.xfce.org/projects/panel-plugins/%{name}
 Source0:	http://goodies.xfce.org/releases/%{name}/%{name}-%{version}.tar.gz
+Patch0:		xfce4-xkb-plugin-0.5.2-xklavier-api.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=525471
+# fix at http://bugzilla.xfce.org/show_bug.cgi?id=6122#c1
+Patch2:		xfce4-xkb-plugin-0.5.3.3-fix-various-segfaults.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	xfce4-panel-devel >= 4.3.20, libxfcegui4-devel >= 4.3.90.2, libxml2-devel
@@ -14,8 +18,6 @@ BuildRequires:	libxklavier-devel >= 3.2,
 BuildRequires:	gettext, intltool
 Requires:	xfce4-panel >= 4.4.0
 
-Patch0:		xxp-0.5.2-xklavier-api.patch
-
 %description
 Xfce XKB layout switch plugin for the Xfce panel. It displays the current 
 keyboard layout, and refreshes when layout changes. The layout can be 
@@ -25,8 +27,10 @@ XF86Config file or some other way (e.g. 
 
 %prep
 %setup -q
-%if 0%{?fedora} >= 12
-%patch0 -p1 -b .api
+%patch2 -p1 -b .orig
+# Fedora > 11 has libxklavier 4.0
+%if 0%{?fedora} > 11
+%patch0 -p1 -b .xklavier4
 %endif
 
 %build
@@ -51,6 +55,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/xfce4/xkb/flags/*.svg
 
 %changelog
+* Fri Feb 12 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.5.3.3-3
+- Fix various segfaults. Thanks to Lionel Le Folgoc (#525471, #547553)
+
 * Sun Aug 09 2009 Christoph Wickert <cwickert at fedoraproject.org> - 0.5.3.3-1
 - Update to 0.5.3.3 (#502878)
 


--- xxp-0.5.2-xklavier-api.patch DELETED ---



More information about the scm-commits mailing list