From 92f8fd1c7199167dd80ad05caae2b7393c03c007 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Oct 03 2009 00:20:20 +0000 Subject: avoid long longout delay --- diff --git a/gnome-keyring-no-logout-delay.patch b/gnome-keyring-no-logout-delay.patch new file mode 100644 index 0000000..a1c3feb --- /dev/null +++ b/gnome-keyring-no-logout-delay.patch @@ -0,0 +1,59 @@ +diff --git a/daemon/gkr-daemon.c b/daemon/gkr-daemon.c +index c63081e..ea85edf 100644 +--- a/daemon/gkr-daemon.c ++++ b/daemon/gkr-daemon.c +@@ -43,6 +43,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -90,6 +91,8 @@ static gboolean run_for_start = FALSE; + static gchar* run_components = NULL; + static gchar* login_password = NULL; + static gboolean initialization_completed = FALSE; ++static gboolean s_thread_valid = FALSE; ++static pthread_t s_thread; + + static GOptionEntry option_entries[] = { + { "foreground", 'f', 0, G_OPTION_ARG_NONE, &run_foreground, +@@ -370,7 +373,7 @@ signal_thread (gpointer user_data) + static void + setup_signal_handling (GMainLoop *loop) + { +- GError *error = NULL; ++ int res; + + /* + * Block these signals for this thread, and any threads +@@ -387,11 +390,12 @@ setup_signal_handling (GMainLoop *loop) + sigaddset (&signal_set, SIGTERM); + pthread_sigmask (SIG_BLOCK, &signal_set, NULL); + +- g_thread_create (signal_thread, loop, FALSE, &error); +- if (error != NULL) { ++ res = pthread_create (&s_thread, NULL, signal_thread, loop); ++ if (res == 0) { ++ s_thread_valid = TRUE; ++ } else { + g_warning ("couldn't startup thread for signal handling: %s", +- error && error->message ? error->message : ""); +- g_clear_error (&error); ++ strerror (res)); + } + } + +@@ -404,7 +408,10 @@ gkr_daemon_quit (void) + * starts the shutdown process. + */ + +- raise (SIGTERM); ++ if (s_thread_valid) ++ pthread_kill (s_thread, SIGTERM); ++ else ++ raise (SIGTERM); + } + + static void diff --git a/gnome-keyring.spec b/gnome-keyring.spec index c62f9a3..e867450 100644 --- a/gnome-keyring.spec +++ b/gnome-keyring.spec @@ -8,10 +8,14 @@ Summary: Framework for managing passwords and other secrets Name: gnome-keyring Version: 2.28.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Libraries Source: http://download.gnome.org/sources/gnome-keyring/2.28/gnome-keyring-%{version}.tar.bz2 + +# https://bugzilla.gnome.org/show_bug.cgi?id=595698 +Patch0: gnome-keyring-no-logout-delay.patch + URL: http://www.gnome.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -64,6 +68,7 @@ automatically unlock the "login" keyring when the user logs in. %prep %setup -q -n gnome-keyring-%{version} +%patch0 -p1 -b .logout-delay %build %configure --disable-gtk-doc --with-pam-dir=/%{_lib}/security --disable-acl-prompts @@ -141,6 +146,9 @@ fi %changelog +* Fri Oct 2 2009 Matthias Clasen - 2.28.0-2 +- Avoid a 10 second delay at logout + * Mon Sep 21 2009 Tomas Bzatek - 2.28.0-1 - Update to 2.28.0