fix segfault

This commit is contained in:
Matthias Clasen 2011-09-08 20:25:47 -04:00
parent 1345086c41
commit 043e7dde67
2 changed files with 31 additions and 1 deletions

View File

@ -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@redhat.com> - 0.6.18-2
- Fix segfault with glib 2.29.90
* Mon Sep 05 2011 Richard Hughes <rhughes@redhat.com> - 0.6.18-1
- New upstream release.
- Fix a small memory leak in the glib client library

23
pk-glib-signal.patch Normal file
View File

@ -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