summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Perier <mrpouet@gentoo.org>2009-10-17 20:30:51 +0000
committerRomain Perier <mrpouet@gentoo.org>2009-10-17 20:30:51 +0000
commit91c3faf30c6172340894e532cf5cef63e9da676b (patch)
tree7ed9203a489dec3ab516f1329f8e870a9c20507f
parentVersion bump (diff)
downloadgentoo-2-91c3faf30c6172340894e532cf5cef63e9da676b.tar.gz
gentoo-2-91c3faf30c6172340894e532cf5cef63e9da676b.tar.bz2
gentoo-2-91c3faf30c6172340894e532cf5cef63e9da676b.zip
Fix compatibility with gnupg-2.0.12 per bug #275291, patch import from upstream bug #586855.
(Portage version: 2.2_rc46/cvs/Linux x86_64)
-rw-r--r--app-crypt/seahorse-plugins/ChangeLog10
-rw-r--r--app-crypt/seahorse-plugins/files/seahorse-plugins-2.26.2-agent-gpg-compat.patch164
-rw-r--r--app-crypt/seahorse-plugins/seahorse-plugins-2.26.2-r1.ebuild88
3 files changed, 261 insertions, 1 deletions
diff --git a/app-crypt/seahorse-plugins/ChangeLog b/app-crypt/seahorse-plugins/ChangeLog
index ef66f76fc2a4..bd7695091259 100644
--- a/app-crypt/seahorse-plugins/ChangeLog
+++ b/app-crypt/seahorse-plugins/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-crypt/seahorse-plugins
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/seahorse-plugins/ChangeLog,v 1.7 2009/10/16 22:53:08 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/seahorse-plugins/ChangeLog,v 1.8 2009/10/17 20:30:51 mrpouet Exp $
+
+*seahorse-plugins-2.26.2-r1 (17 Oct 2009)
+
+ 17 Oct 2009; Romain Perier <mrpouet@gentoo.org>
+ +seahorse-plugins-2.26.2-r1.ebuild,
+ +files/seahorse-plugins-2.26.2-agent-gpg-compat.patch:
+ Fix compatibility with gnupg-2.0.12 per bug #275291, patch import from
+ upstream bug #586855.
16 Oct 2009; Markus Meier <maekke@gentoo.org>
seahorse-plugins-2.26.2.ebuild:
diff --git a/app-crypt/seahorse-plugins/files/seahorse-plugins-2.26.2-agent-gpg-compat.patch b/app-crypt/seahorse-plugins/files/seahorse-plugins-2.26.2-agent-gpg-compat.patch
new file mode 100644
index 000000000000..98e8dc576fc2
--- /dev/null
+++ b/app-crypt/seahorse-plugins/files/seahorse-plugins-2.26.2-agent-gpg-compat.patch
@@ -0,0 +1,164 @@
+From 3c4cbf986cee18016b958634e47beacb2748b567 Mon Sep 17 00:00:00 2001
+From: Peter Bloomfield <peterbloomfield@bellsouth.net>
+Date: Sun, 04 Oct 2009 21:15:45 +0000
+Subject: Bug 586855 - seahorse-agent does not work with gnupg-2.0.12
+
+Patch from Peter Bloomfield to add the get-info command to
+seahorse-agent
+---
+diff --git a/agent/seahorse-agent-io.c b/agent/seahorse-agent-io.c
+index 11f2a3c..ffb9417 100644
+--- a/agent/seahorse-agent-io.c
++++ b/agent/seahorse-agent-io.c
+@@ -93,12 +93,14 @@ struct _SeahorseAgentConn {
+ #define ASS_OPTION "OPTION"
+ #define ASS_GETPASS "GET_PASSPHRASE"
+ #define ASS_CLRPASS "CLEAR_PASSPHRASE"
++#define ASS_GETINFO "GETINFO"
+
+ #define ASS_OPT_DISPLAY "display="
+
+ /* Options */
+ #define ASS_FLAG_DATA "data"
+ #define ASS_FLAG_CHECK "check"
++#define ASS_FLAG_REPEAT "repeat"
+
+ /* Responses */
+ #define ASS_OK "OK "
+@@ -269,8 +271,21 @@ static guint32
+ parse_assuan_flag (gchar *flag)
+ {
+ g_assert (flag);
+- if (g_str_equal (flag, "data"))
++ if (g_str_equal (flag, ASS_FLAG_DATA))
+ return SEAHORSE_AGENT_PASS_AS_DATA;
++ else if (g_str_has_prefix (flag, ASS_FLAG_REPEAT)) {
++ gint count = 1;
++
++ flag += strlen(ASS_FLAG_REPEAT);
++ if (*flag == '=') {
++ count = atoi (++flag);
++ if (!(count == 0 || count == 1))
++ g_warning ("--repeat=%d treated as --repeat=1", count);
++ }
++
++ if (count)
++ return SEAHORSE_AGENT_REPEAT;
++ }
+ return 0;
+ }
+
+@@ -373,6 +388,68 @@ x11_displays_eq (const gchar *d1, const gchar *d2)
+ return (g_ascii_strncasecmp (d1, d2, l1 > l2 ? l1 : l2) == 0);
+ }
+
++/* Does command have option? */
++static gboolean
++command_has_option (SeahorseAgentConn *cn, gchar * command, gchar * option)
++{
++ gboolean has_option = FALSE;
++
++ if (!strcmp (command, ASS_GETPASS)) {
++ has_option = (!strcmp (option, ASS_FLAG_DATA) ||
++ !strcmp (option, ASS_FLAG_REPEAT));
++ }
++ /* else if (other commands) */
++
++ if (has_option)
++ seahorse_agent_io_reply (cn, TRUE, NULL);
++
++ return has_option;
++}
++
++/* Process a GETINFO request */
++static void
++ass_getinfo (SeahorseAgentConn *cn, gchar * request)
++{
++ gchar *args;
++ gboolean implemented = FALSE;
++
++ args = strchr (request, ' ');
++ if (args) {
++ *args = 0;
++ args++;
++ while (isspace (*args))
++ args++;
++ }
++
++ if (!strcmp (request, "cmd_has_option")) {
++ gchar *command = args;
++ gchar *option;
++
++ if (!command || !*command) {
++ seahorse_agent_io_reply (cn, FALSE, "105 parameter error");
++ return;
++ }
++
++ option = strchr(args, ' ');
++
++ if (option) {
++ *option = 0;
++ option++;
++ while (isspace (*option))
++ option++;
++ } else {
++ seahorse_agent_io_reply (cn, FALSE, "105 parameter error");
++ return;
++ }
++
++ implemented = command_has_option(cn, command, option);
++ }
++ /* else if (other info request) */
++
++ if (!implemented)
++ seahorse_agent_io_reply (cn, FALSE, "100 not implemented");
++}
++
+ /* Process a request line from client */
+ static void
+ process_line (SeahorseAgentConn *cn, gchar *string)
+@@ -484,6 +561,10 @@ process_line (SeahorseAgentConn *cn, gchar *string)
+ seahorse_agent_actions_clrpass (cn, id);
+ }
+
++ else if (strcasecmp (string, ASS_GETINFO) == 0) {
++ ass_getinfo (cn, args);
++ }
++
+ else if (strcasecmp (string, ASS_NOP) == 0) {
+ seahorse_agent_io_reply (cn, TRUE, NULL);
+ }
+diff --git a/agent/seahorse-agent-prompt.c b/agent/seahorse-agent-prompt.c
+index e897464..b69b773 100644
+--- a/agent/seahorse-agent-prompt.c
++++ b/agent/seahorse-agent-prompt.c
+@@ -155,8 +155,13 @@ seahorse_agent_prompt_pass (SeahorseAgentPassReq *pr)
+
+ g_return_if_fail (!seahorse_agent_prompt_have ());
+
+- dialog = seahorse_passphrase_prompt_show (NULL, pr->errmsg ? pr->errmsg : pr->description,
+- pr->prompt, NULL, FALSE);
++ dialog =
++ seahorse_passphrase_prompt_show (NULL,
++ (pr->errmsg ?
++ pr->errmsg : pr->description),
++ pr->prompt, NULL,
++ pr->flags & SEAHORSE_AGENT_REPEAT);
++
+ g_signal_connect (dialog, "response", G_CALLBACK (passphrase_response), pr);
+ g_current_win = GTK_WIDGET (dialog);
+ }
+diff --git a/agent/seahorse-agent.h b/agent/seahorse-agent.h
+index 92267a9..0be3209 100644
+--- a/agent/seahorse-agent.h
++++ b/agent/seahorse-agent.h
+@@ -81,6 +81,7 @@ void seahorse_agent_io_data (SeahorseAgentConn *cn, const gchar *data);
+ */
+
+ #define SEAHORSE_AGENT_PASS_AS_DATA 0x00000001
++#define SEAHORSE_AGENT_REPEAT 0x00000002
+
+ typedef struct _SeahorseAgentPassReq {
+ const gchar *id;
+--
+cgit v0.8.2
diff --git a/app-crypt/seahorse-plugins/seahorse-plugins-2.26.2-r1.ebuild b/app-crypt/seahorse-plugins/seahorse-plugins-2.26.2-r1.ebuild
new file mode 100644
index 000000000000..dec11a81f285
--- /dev/null
+++ b/app-crypt/seahorse-plugins/seahorse-plugins-2.26.2-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/seahorse-plugins/seahorse-plugins-2.26.2-r1.ebuild,v 1.1 2009/10/17 20:30:51 mrpouet Exp $
+
+EAPI="2"
+
+inherit eutils gnome2
+
+DESCRIPTION="A GNOME application for managing encryption keys"
+HOMEPAGE="http://www.gnome.org/projects/seahorse/index.html"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="applet debug epiphany gedit libnotify nautilus test"
+
+RDEPEND="
+ >=gnome-base/libglade-2.0
+ >=gnome-base/gconf-2.0
+ >=x11-libs/gtk+-2.10
+ >=dev-libs/glib-2.16
+ >=dev-libs/dbus-glib-0.72
+ >=app-crypt/gpgme-1.0.0
+ >=app-crypt/seahorse-2.25
+ >=gnome-base/gnome-keyring-2.25
+ >=gnome-extra/evolution-data-server-1.8
+
+ || (
+ =app-crypt/gnupg-1.4*
+ =app-crypt/gnupg-2.0* )
+
+ nautilus? ( >=gnome-base/nautilus-2.12 )
+ epiphany? (
+ >=www-client/epiphany-2.24
+ >=dev-libs/libxml2-2.6.0 )
+ gedit? ( >=app-editors/gedit-2.16 )
+ applet? ( >=gnome-base/gnome-panel-2.10 )
+ libnotify? ( >=x11-libs/libnotify-0.3.2 )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ >=app-text/gnome-doc-utils-0.3.2
+ >=app-text/scrollkeeper-0.3
+ >=dev-util/pkgconfig-0.20
+ >=dev-util/intltool-0.35"
+
+pkg_setup() {
+ if use epiphany ; then
+ if has_version '>=www-client/epiphany-2.24.3-r10'; then
+ G2CONF="${G2CONF} --with-gecko=libxul-unstable"
+ else
+ # Now, epiphany could be using xul-1.8, xul-1.9 or ff-2
+ # Let it auto-detect.
+ :
+ fi
+ fi
+
+ G2CONF="${G2CONF}
+ --enable-agent
+ --disable-update-mime-database
+ --disable-static
+ $(use_enable applet)
+ $(use_enable debug)
+ $(use_enable epiphany)
+ $(use_enable gedit)
+ $(use_enable libnotify)
+ $(use_enable nautilus)
+ $(use_enable test tests)"
+}
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Fix intltoolize broken file, see upstream #577133
+ sed "s:'\^\$\$lang\$\$':\^\$\$lang\$\$:g" -i po/Makefile.in.in || die "sed failed"
+
+ # Fix build with gpgme built with lfs support, bug #275445
+ epatch "${FILESDIR}/${P}-gpgme-lfs.patch"
+ # Fix compatibility with gnupg-2.0.12, patch import from upstream bug #586855,
+ # solves gentoo bug #275291.
+ epatch "${FILESDIR}/${P}-agent-gpg-compat.patch"
+}
+
+src_install() {
+ gnome2_src_install
+
+ exeinto /etc/X11/xinit/xinitrc.d/
+ doexe "${FILESDIR}/70-seahorse-agent" || die "doexe failed"
+}