diff --git a/.gitignore b/.gitignore index ec214b6..10fa526 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ pinentry-0.8.0.tar.gz pinentry-0.8.0.tar.gz.sig +/pinentry-0.8.1.tar.gz +/pinentry-0.8.1.tar.gz.sig diff --git a/0001-Fix-pinentry-gtk-2-SIGSEGV-when-unfocusing-with-g-ar.patch b/0001-Fix-pinentry-gtk-2-SIGSEGV-when-unfocusing-with-g-ar.patch deleted file mode 100644 index aa3acf0..0000000 --- a/0001-Fix-pinentry-gtk-2-SIGSEGV-when-unfocusing-with-g-ar.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 977d49018cebcc37d0b667713ad422f80ba9c8d2 Mon Sep 17 00:00:00 2001 -From: Stanislav Ochotnicky -Date: Fri, 16 Apr 2010 16:17:04 +0200 -Subject: [PATCH] Fix pinentry-gtk-2 SIGSEGV when unfocusing with -g argument - -gdk_window_set_transient_for cannot be used with parent = NULL to -unset transient hint (unlike gtk_ version which can). Replacement -code is taken from gtk_window_transient_parent_unrealized - -Applied cleanly at least over 0.8.0 and 0.7.6 - -More info see: https://bugzilla.redhat.com/show_bug.cgi?id=520236 ---- - gtk+-2/pinentry-gtk-2.c | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c -index 7cd7616..fdd5822 100644 ---- a/gtk+-2/pinentry-gtk-2.c -+++ b/gtk+-2/pinentry-gtk-2.c -@@ -145,7 +145,8 @@ ungrab_keyboard (GtkWidget *win, GdkEvent *event, gpointer data) - { - gdk_keyboard_ungrab (gdk_event_get_time (event)); - /* Unmake window transient for the root window. */ -- gdk_window_set_transient_for (win->window, NULL); -+ gdk_property_delete (win->window, -+ gdk_atom_intern_static_string ("WM_TRANSIENT_FOR")); - } - - --- -1.6.6.1 diff --git a/0004-Fix-qt4-pinentry-window-created-in-the-background.patch b/0001-Fix-qt4-pinentry-window-created-in-the-background.patch similarity index 56% rename from 0004-Fix-qt4-pinentry-window-created-in-the-background.patch rename to 0001-Fix-qt4-pinentry-window-created-in-the-background.patch index d4bfa42..8f9faae 100644 --- a/0004-Fix-qt4-pinentry-window-created-in-the-background.patch +++ b/0001-Fix-qt4-pinentry-window-created-in-the-background.patch @@ -1,19 +1,22 @@ -From 0cc3dd71213687ccb5ec0a1866864558bf03260b Mon Sep 17 00:00:00 2001 +From c2ab12b3742c929a225c3753439438edc27bfa81 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky -Date: Fri, 7 May 2010 14:45:44 +0200 +Date: Tue, 1 Feb 2011 14:42:27 +0100 Subject: [PATCH] Fix qt4 pinentry window created in the background This is probably just a workaround. Proper fix is being investigated. +See: +https://bugzilla.redhat.com/show_bug.cgi?id=589532 +http://stackoverflow.com/questions/2788518/calling-activatewindow-on-qdialog-sends-window-to-background --- qt4/pinentrydialog.cpp | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/qt4/pinentrydialog.cpp b/qt4/pinentrydialog.cpp -index 8644136..6064ab9 100644 +index 541baf4..d634eb6 100644 --- a/qt4/pinentrydialog.cpp +++ b/qt4/pinentrydialog.cpp -@@ -63,7 +63,6 @@ void raiseWindow( QWidget* w ) - SetForegroundWindowEx( w->winId() ); +@@ -69,7 +69,6 @@ void raiseWindow( QWidget* w ) + SetForegroundWindow( w->winId() ); #endif w->raise(); - w->activateWindow(); @@ -21,5 +24,5 @@ index 8644136..6064ab9 100644 QPixmap icon( QStyle::StandardPixmap which ) -- -1.6.6.1 +1.7.3.5 diff --git a/0002-Fix-sigabrt-on-fail-grab-r229.patch b/0002-Fix-sigabrt-on-fail-grab-r229.patch deleted file mode 100644 index 2436ce9..0000000 --- a/0002-Fix-sigabrt-on-fail-grab-r229.patch +++ /dev/null @@ -1,34 +0,0 @@ -Index: gtk+-2/pinentry-gtk-2.c -=================================================================== ---- gtk+-2/pinentry-gtk-2.c (revision 228) -+++ gtk+-2/pinentry-gtk-2.c (revision 229) -@@ -52,6 +52,7 @@ - #endif - - static pinentry_t pinentry; -+static int grab_failed; - static int passphrase_ok; - typedef enum { CONFIRM_CANCEL, CONFIRM_OK, CONFIRM_NOTOK } confirm_value_t; - static confirm_value_t confirm_value; -@@ -135,7 +136,11 @@ - return; - - if (gdk_keyboard_grab (win->window, FALSE, gdk_event_get_time (event))) -- g_error ("could not grab keyboard"); -+ { -+ g_critical ("could not grab keyboard"); -+ grab_failed = 1; -+ gtk_main_quit (); -+ } - } - - -@@ -520,7 +525,7 @@ - while (gtk_events_pending ()) - gtk_main_iteration (); - -- if (confirm_value == CONFIRM_CANCEL) -+ if (confirm_value == CONFIRM_CANCEL || grab_failed) - pe->canceled = 1; - - pinentry = NULL; diff --git a/0003-pinentry-gtk-x11-race.patch b/0003-pinentry-gtk-x11-race.patch deleted file mode 100644 index 252b0d9..0000000 --- a/0003-pinentry-gtk-x11-race.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c -index 2bf920b..658161c 100644 ---- a/gtk+-2/pinentry-gtk-2.c -+++ b/gtk+-2/pinentry-gtk-2.c -@@ -305,9 +309,11 @@ create_window (int confirm_mode) - if (pinentry->grab) - g_signal_connect (G_OBJECT (win), - "realize", G_CALLBACK (make_transient), NULL); -+ //we need to grab the keyboard when its visible! not when its mapped (there is a difference) -+ g_object_set(G_OBJECT(win), "events", GDK_VISIBILITY_NOTIFY_MASK | GDK_STRUCTURE_MASK, NULL); - - g_signal_connect (G_OBJECT (win), -- pinentry->grab ? "map-event" : "focus-in-event", -+ pinentry->grab ? "visibility-notify-event" : "focus-in-event", - G_CALLBACK (grab_keyboard), NULL); - g_signal_connect (G_OBJECT (win), - pinentry->grab ? "unmap-event" : "focus-out-event", diff --git a/pinentry.spec b/pinentry.spec index 3fdda3e..4f082a8 100644 --- a/pinentry.spec +++ b/pinentry.spec @@ -6,7 +6,7 @@ %define qt3 qt3 %else %define qt3 qt -%define _enable_pinentry_qt --enable-pinentry-qt +%define _enable_pinentry_qt --enable-pinentry-qt %endif %if 0%{?fedora} && 0%{?fedora} > 12 @@ -16,8 +16,8 @@ %endif Name: pinentry -Version: 0.8.0 -Release: 3%{?dist} +Version: 0.8.1 +Release: 1%{?dist} Summary: Collection of simple PIN or passphrase entry dialogs Group: Applications/System @@ -30,13 +30,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # borrowed from opensuse Source10: pinentry-wrapper -## Backported patches from SVN -Patch50: 0001-Fix-pinentry-gtk-2-SIGSEGV-when-unfocusing-with-g-ar.patch -Patch51: 0002-Fix-sigabrt-on-fail-grab-r229.patch -Patch52: 0003-pinentry-gtk-x11-race.patch - ## Patches not yet in SVN -Patch53: 0004-Fix-qt4-pinentry-window-created-in-the-background.patch +Patch53: 0001-Fix-qt4-pinentry-window-created-in-the-background.patch BuildRequires: gtk2-devel BuildRequires: libcap-devel @@ -102,9 +97,6 @@ Support for Qt4 is new, and a bit experimental. %prep %setup -q -%patch50 -p1 -b .rhbug_520236 -%patch51 -p0 -b .rhbug_585422 -%patch52 -p1 -b .rhbug_589998 %patch53 -p1 -b .rhbug_589532 # hack around auto* madness, lack of proper support for moc @@ -125,7 +117,7 @@ unset QTDIR || : ; . /etc/profile.d/qt.sh --disable-dependency-tracking \ --disable-pinentry-gtk \ %{?_enable_pinentry_qt} %{!?_enable_pinentry_qt:--disable-pinentry-qt} \ - %{?_enable_pinentry_qt4} %{!?_enable_pinentry_qt4:--disable-pinentry-qt4} + %{?_enable_pinentry_qt4} %{!?_enable_pinentry_qt4:--disable-pinentry-qt4} make %{?_smp_mflags} @@ -196,6 +188,9 @@ fi %changelog +* Tue Feb 1 2011 Stanislav Ochotnicky - 0.8.1-1 +- Updated to latest upstream version (0.8.1) + * Fri May 7 2010 Stanislav Ochotnicky - 0.8.0-3 - Fix X11 even race with gtk (#589998) - Fix qt4 problems with creating window in the background (#589532) @@ -266,7 +261,7 @@ fi * Wed Aug 09 2006 Rex Dieter - 0.7.2-2 - fc6 respin -* Wed Mar 01 2006 Rex Dieter +* Wed Mar 01 2006 Rex Dieter - fc5: gcc/glibc respin * Tue Oct 18 2005 Ville Skyttä - 0.7.2-1 diff --git a/sources b/sources index 0652bb1..c4d6ea5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -590be1b00f9ab63205843c7fed8caf35 pinentry-0.8.0.tar.gz -12467655a6ba5188c5204f2fbe7f4015 pinentry-0.8.0.tar.gz.sig +81f99904daee5331eb6738408bb024b6 pinentry-0.8.1.tar.gz +defb44904ff18f793b3782baf92ee91c pinentry-0.8.1.tar.gz.sig