[PackageKit] fix segfault

Matthias Clasen mclasen at fedoraproject.org
Fri Sep 9 00:26:34 UTC 2011


commit 043e7dde6743be3a7ba3df90290baea298b08d00
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Thu Sep 8 20:25:47 2011 -0400

    fix segfault

 PackageKit.spec      |    9 ++++++++-
 pk-glib-signal.patch |   23 +++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/PackageKit.spec b/PackageKit.spec
index c4a7877..f29c46e 100644
--- a/PackageKit.spec
+++ b/PackageKit.spec
@@ -3,7 +3,7 @@
 Summary:   Package management service
 Name:      PackageKit
 Version:   0.6.18
-Release:   1%{?dist}
+Release:   2%{?dist}
 License:   GPLv2+ and LGPLv2+
 URL:       http://www.packagekit.org
 Source0:   http://www.packagekit.org/releases/%{name}-%{version}.tar.xz
@@ -14,6 +14,9 @@ Patch0:    PackageKit-0.3.8-Fedora-Vendor.conf.patch
 # Fedora specific: the yum backend doesn't do time estimation correctly
 Patch1:    PackageKit-0.4.4-Fedora-turn-off-time.conf.patch
 
+# upstream fix
+Patch2:    pk-glib-signal.patch
+
 Requires: PackageKit-glib = %{version}-%{release}
 Requires: PackageKit-backend
 Requires: shared-mime-info
@@ -250,6 +253,7 @@ user to restart the computer or remove and re-insert the device.
 %setup -q
 %patch0 -p1 -b .fedora
 %patch1 -p1 -b .no-time
+%patch2 -p1 -b .glib-signal
 
 %build
 %configure \
@@ -463,6 +467,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
 %{_includedir}/PackageKit/backend/*.h
 
 %changelog
+* Thu Sep  8 2011 Matthias Clasen <mclasen at redhat.com> - 0.6.18-2
+- Fix segfault with glib 2.29.90
+
 * Mon Sep 05 2011 Richard Hughes  <rhughes at redhat.com> - 0.6.18-1
 - New upstream release.
 - Fix a small memory leak in the glib client library
diff --git a/pk-glib-signal.patch b/pk-glib-signal.patch
new file mode 100644
index 0000000..2fc564c
--- /dev/null
+++ b/pk-glib-signal.patch
@@ -0,0 +1,23 @@
+diff -up PackageKit-0.6.18/src/pk-main.c.signal PackageKit-0.6.18/src/pk-main.c
+--- PackageKit-0.6.18/src/pk-main.c.signal	2011-09-08 20:17:51.479976840 -0400
++++ PackageKit-0.6.18/src/pk-main.c	2011-09-08 20:20:33.134971062 -0400
+@@ -271,13 +271,13 @@ main (int argc, char *argv[])
+ 		goto exit_program;
+ 	}
+ 
+-#if GLIB_CHECK_VERSION(2,29,4)
++#if GLIB_CHECK_VERSION(2,29,90)
+ 	/* do stuff on ctrl-c */
+-	g_unix_signal_add_watch_full (SIGINT,
+-				      G_PRIORITY_DEFAULT,
+-				      pk_main_sigint_cb,
+-				      loop,
+-				      NULL);
++	g_unix_signal_add_full (G_PRIORITY_DEFAULT,
++                                SIGINT,
++			        pk_main_sigint_cb,
++			        loop,
++			        NULL);
+ #else
+ 	signal (SIGINT, pk_main_sigint_handler);
+ #endif


More information about the scm-commits mailing list