Gentoo Archives: gentoo-commits

From: Gilles Dartiguelongue <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/libcryptui/files/, x11-libs/libcryptui/
Date: Sat, 02 Sep 2017 18:00:55
Message-Id: 1504375244.fc384ea88d3813e749f584146f912eb70fd9cbe2.eva@gentoo
1 commit: fc384ea88d3813e749f584146f912eb70fd9cbe2
2 Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 2 16:09:59 2017 +0000
4 Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 2 18:00:44 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc384ea8
7
8 x11-libs/libcryptui: allow build with GnuPG 2.2, bug #629572
9
10 Also apply patches from master also found in Debian package.
11
12 Package-Manager: Portage-2.3.8, Repoman-2.3.3
13
14 .../files/libcryptui-3.12.2-fix-return-types.patch | 34 +++++
15 .../files/libcryptui-3.12.2-gnupg-2.1.patch | 20 ++-
16 .../files/libcryptui-3.12.2-gnupg-2.2.patch | 25 ++++
17 .../files/libcryptui-3.12.2-port-gcr-3.patch | 154 +++++++++++++++++++++
18 .../files/libcryptui-3.12.2-prompt-recipient.patch | 38 +++++
19 x11-libs/libcryptui/libcryptui-3.12.2-r1.ebuild | 73 ++++++++++
20 6 files changed, 341 insertions(+), 3 deletions(-)
21
22 diff --git a/x11-libs/libcryptui/files/libcryptui-3.12.2-fix-return-types.patch b/x11-libs/libcryptui/files/libcryptui-3.12.2-fix-return-types.patch
23 new file mode 100644
24 index 00000000000..d3fdf3c408d
25 --- /dev/null
26 +++ b/x11-libs/libcryptui/files/libcryptui-3.12.2-fix-return-types.patch
27 @@ -0,0 +1,34 @@
28 +From a576e407d913b35804f838d615da52899681d61d Mon Sep 17 00:00:00 2001
29 +From: Andreas Henriksson <andreas@×××××.se>
30 +Date: Mon, 15 Aug 2016 18:12:06 +0200
31 +Subject: [PATCH 2/3] daemon: fix conflicting return types
32 +
33 +... in functions seahorse_dbus_server_{init,cleanup}
34 +
35 +Reported-by: Michael Tautschnig <mt@××××××.org>
36 +Bug-Debian: https://bugs.debian.org/749001
37 +
38 +https://bugzilla.gnome.org/show_bug.cgi?id=769943
39 +---
40 + daemon/seahorse-daemon.h | 4 ++--
41 + 1 file changed, 2 insertions(+), 2 deletions(-)
42 +
43 +diff --git a/daemon/seahorse-daemon.h b/daemon/seahorse-daemon.h
44 +index 93c0c452..09716bb5 100644
45 +--- a/daemon/seahorse-daemon.h
46 ++++ b/daemon/seahorse-daemon.h
47 +@@ -24,9 +24,9 @@
48 + /* seahorse-dbus-server.c --------------------------------------------------- */
49 +
50 +
51 +-gboolean seahorse_dbus_server_init ();
52 ++void seahorse_dbus_server_init ();
53 +
54 +-gboolean seahorse_dbus_server_cleanup ();
55 ++void seahorse_dbus_server_cleanup ();
56 +
57 + DBusGConnection* seahorse_dbus_server_get_connection ();
58 +
59 +--
60 +2.14.1
61 +
62
63 diff --git a/x11-libs/libcryptui/files/libcryptui-3.12.2-gnupg-2.1.patch b/x11-libs/libcryptui/files/libcryptui-3.12.2-gnupg-2.1.patch
64 index ecf3a2eecf8..d968dd367a1 100644
65 --- a/x11-libs/libcryptui/files/libcryptui-3.12.2-gnupg-2.1.patch
66 +++ b/x11-libs/libcryptui/files/libcryptui-3.12.2-gnupg-2.1.patch
67 @@ -1,6 +1,17 @@
68 ---- a/configure.ac~ 2014-05-13 20:53:02.000000000 +0200
69 -+++ b/configure.ac 2015-06-27 11:29:32.574106982 +0200
70 -@@ -95,7 +95,7 @@
71 +From 183d7619c29482a5d4ae8019692899f87f198171 Mon Sep 17 00:00:00 2001
72 +From: Antoine Jacoutot <ajacoutot@×××××.org>
73 +Date: Sat, 17 Oct 2015 08:52:35 +0200
74 +Subject: [PATCH] Allow building with gnupg 2.1.
75 +
76 +---
77 + configure.ac | 2 +-
78 + 1 file changed, 1 insertion(+), 1 deletion(-)
79 +
80 +diff --git a/configure.ac b/configure.ac
81 +index 406b9f3f..b621b236 100644
82 +--- a/configure.ac
83 ++++ b/configure.ac
84 +@@ -95,7 +95,7 @@ AC_ARG_ENABLE(gpg-check,
85 DO_CHECK=$enableval, DO_CHECK=yes)
86
87 if test "$DO_CHECK" = "yes"; then
88 @@ -9,3 +20,6 @@
89 AC_PATH_PROGS(GNUPG, [gpg gpg2], no)
90 AC_DEFINE_UNQUOTED(GNUPG, "$GNUPG", [Path to gpg executable.])
91 ok="no"
92 +--
93 +2.14.1
94 +
95
96 diff --git a/x11-libs/libcryptui/files/libcryptui-3.12.2-gnupg-2.2.patch b/x11-libs/libcryptui/files/libcryptui-3.12.2-gnupg-2.2.patch
97 new file mode 100644
98 index 00000000000..4feaf2b1826
99 --- /dev/null
100 +++ b/x11-libs/libcryptui/files/libcryptui-3.12.2-gnupg-2.2.patch
101 @@ -0,0 +1,25 @@
102 +From 98afc46861678162aad8cae1c4c01dc4d6780bef Mon Sep 17 00:00:00 2001
103 +From: Gilles Dartiguelongue <eva@g.o>
104 +Date: Sat, 2 Sep 2017 17:48:44 +0200
105 +Subject: [PATCH] Allow building with gnupg 2.2
106 +
107 +---
108 + configure.ac | 2 +-
109 + 1 file changed, 1 insertion(+), 1 deletion(-)
110 +
111 +diff --git a/configure.ac b/configure.ac
112 +index 4486e7b2..be5b28b4 100644
113 +--- a/configure.ac
114 ++++ b/configure.ac
115 +@@ -95,7 +95,7 @@ AC_ARG_ENABLE(gpg-check,
116 + DO_CHECK=$enableval, DO_CHECK=yes)
117 +
118 + if test "$DO_CHECK" = "yes"; then
119 +- accepted_versions="1.2 1.4 2.0 2.1"
120 ++ accepted_versions="1.2 1.4 2.0 2.1 2.2"
121 + AC_PATH_PROGS(GNUPG, [gpg gpg2], no)
122 + AC_DEFINE_UNQUOTED(GNUPG, "$GNUPG", [Path to gpg executable.])
123 + ok="no"
124 +--
125 +2.14.1
126 +
127
128 diff --git a/x11-libs/libcryptui/files/libcryptui-3.12.2-port-gcr-3.patch b/x11-libs/libcryptui/files/libcryptui-3.12.2-port-gcr-3.patch
129 new file mode 100644
130 index 00000000000..5ca31f66413
131 --- /dev/null
132 +++ b/x11-libs/libcryptui/files/libcryptui-3.12.2-port-gcr-3.patch
133 @@ -0,0 +1,154 @@
134 +From 728aceb6defd4e6e4f07fa49ca76f5e745230fee Mon Sep 17 00:00:00 2001
135 +From: Marc-Antoine Perennou <Marc-Antoine@××××××××.com>
136 +Date: Fri, 16 Sep 2016 11:46:55 +0200
137 +Subject: [PATCH 3/3] daemon: port to gcr-3
138 +
139 +This removes the dependency on libgnome-keyring and adds a dependency
140 +on libgcr instead.
141 +
142 +Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@××××××××.com>
143 +Signed-off-by: Stef Walter <stefw@××××××.com>
144 + * Updated commit message
145 +
146 +https://bugzilla.gnome.org/show_bug.cgi?id=771522
147 +---
148 + configure.ac | 14 +++++++-------
149 + daemon/seahorse-secure-buffer.c | 7 ++++---
150 + daemon/seahorse-secure-memory.c | 21 +++++++++++----------
151 + 3 files changed, 22 insertions(+), 20 deletions(-)
152 +
153 +diff --git a/configure.ac b/configure.ac
154 +index b621b236..4486e7b2 100644
155 +--- a/configure.ac
156 ++++ b/configure.ac
157 +@@ -252,18 +252,18 @@ if test "$enable_fatal_messages" = "yes" && test "$enable_debug" = "yes"; then
158 + fi
159 +
160 + dnl ****************************************************************************
161 +-dnl GNOME-KEYRING
162 ++dnl GCR
163 + dnl ****************************************************************************
164 +
165 +-PKG_CHECK_MODULES([GNOME_KEYRING], gnome-keyring-1 >= 2.25.5,
166 +- [enable_gnome_keyring=yes],[enable_gnome_keyring=no])
167 ++PKG_CHECK_MODULES([GCR], gcr-3,
168 ++ [enable_gcr=yes],[enable_gcr=no])
169 +
170 +-if test "$enable_gnome_keyring" = "no"; then
171 +- AC_MSG_ERROR([gnome-keyring library or headers not found.])
172 ++if test "$enable_gcr" = "no"; then
173 ++ AC_MSG_ERROR([gcr library or headers not found.])
174 + fi
175 +
176 +-SEAHORSE_CFLAGS="$SEAHORSE_CFLAGS $GNOME_KEYRING_CFLAGS"
177 +-SEAHORSE_LIBS="$SEAHORSE_LIBS $GNOME_KEYRING_LIBS"
178 ++SEAHORSE_CFLAGS="$SEAHORSE_CFLAGS $GCR_CFLAGS"
179 ++SEAHORSE_LIBS="$SEAHORSE_LIBS $GCR_LIBS"
180 +
181 + dnl ****************************************************************************
182 + dnl LIBCRYPTUI
183 +diff --git a/daemon/seahorse-secure-buffer.c b/daemon/seahorse-secure-buffer.c
184 +index 0db87961..63f87cd3 100644
185 +--- a/daemon/seahorse-secure-buffer.c
186 ++++ b/daemon/seahorse-secure-buffer.c
187 +@@ -20,7 +20,8 @@
188 + #include "config.h"
189 +
190 + #include "seahorse-secure-buffer.h"
191 +-#include <gnome-keyring-memory.h>
192 ++#define GCR_API_SUBJECT_TO_CHANGE 1
193 ++#include <gcr/gcr.h>
194 +
195 + #include <string.h>
196 +
197 +@@ -92,7 +93,7 @@ seahorse_secure_buffer_real_insert_text (GtkEntryBuffer *buffer, guint position,
198 + }
199 + }
200 +
201 +- pv->text = gnome_keyring_memory_realloc (pv->text, pv->text_size);
202 ++ pv->text = gcr_secure_memory_realloc (pv->text, pv->text_size);
203 + }
204 +
205 + /* Actual text insertion */
206 +@@ -158,7 +159,7 @@ seahorse_secure_buffer_finalize (GObject *obj)
207 + SeahorseSecureBufferPrivate *pv = self->priv;
208 +
209 + if (pv->text) {
210 +- gnome_keyring_memory_free (pv->text);
211 ++ gcr_secure_memory_free (pv->text);
212 + pv->text = NULL;
213 + pv->text_bytes = pv->text_size = 0;
214 + pv->text_chars = 0;
215 +diff --git a/daemon/seahorse-secure-memory.c b/daemon/seahorse-secure-memory.c
216 +index 3d94a674..f201d1df 100644
217 +--- a/daemon/seahorse-secure-memory.c
218 ++++ b/daemon/seahorse-secure-memory.c
219 +@@ -23,7 +23,8 @@
220 +
221 + #include <glib.h>
222 +
223 +-#include <gnome-keyring-memory.h>
224 ++#define GCR_API_SUBJECT_TO_CHANGE 1
225 ++#include <gcr/gcr.h>
226 +
227 + #include "seahorse-secure-memory.h"
228 +
229 +@@ -47,7 +48,7 @@ switch_malloc (gsize size)
230 + if (size == 0)
231 + return NULL;
232 + if (seahorse_use_secure_mem)
233 +- p = gnome_keyring_memory_try_alloc (size);
234 ++ p = gcr_secure_memory_try_alloc (size);
235 + else
236 + p = malloc (size);
237 + return p;
238 +@@ -71,7 +72,7 @@ switch_calloc (gsize num, gsize size)
239 + if (size == 0 || num == 0)
240 + return NULL;
241 + if (seahorse_use_secure_mem)
242 +- p = gnome_keyring_memory_try_alloc (size * num);
243 ++ p = gcr_secure_memory_try_alloc (size * num);
244 + else
245 + p = calloc (num, size);
246 + return p;
247 +@@ -99,11 +100,11 @@ switch_realloc (gpointer mem, gsize size)
248 +
249 + if (!mem) {
250 + if (seahorse_use_secure_mem)
251 +- p = gnome_keyring_memory_alloc (size);
252 ++ p = gcr_secure_memory_alloc (size);
253 + else
254 + p = malloc (size);
255 +- } else if (gnome_keyring_memory_is_secure (mem))
256 +- p = gnome_keyring_memory_try_realloc (mem, size);
257 ++ } else if (gcr_secure_memory_is_secure (mem))
258 ++ p = gcr_secure_memory_try_realloc (mem, size);
259 + else
260 + p = realloc (mem, size);
261 + return p;
262 +@@ -120,8 +121,8 @@ static void
263 + switch_free (gpointer mem)
264 + {
265 + if (mem) {
266 +- if (gnome_keyring_memory_is_secure (mem))
267 +- gnome_keyring_memory_free (mem);
268 ++ if (gcr_secure_memory_is_secure (mem))
269 ++ gcr_secure_memory_free (mem);
270 + else
271 + free (mem);
272 + }
273 +@@ -138,9 +139,9 @@ seahorse_try_gk_secure_memory ()
274 + {
275 + gpointer p;
276 +
277 +- p = gnome_keyring_memory_try_alloc (10);
278 ++ p = gcr_secure_memory_try_alloc (10);
279 + if (p != NULL) {
280 +- gnome_keyring_memory_free (p);
281 ++ gcr_secure_memory_free (p);
282 + return TRUE;
283 + }
284 +
285 +--
286 +2.14.1
287 +
288
289 diff --git a/x11-libs/libcryptui/files/libcryptui-3.12.2-prompt-recipient.patch b/x11-libs/libcryptui/files/libcryptui-3.12.2-prompt-recipient.patch
290 new file mode 100644
291 index 00000000000..0a172a63510
292 --- /dev/null
293 +++ b/x11-libs/libcryptui/files/libcryptui-3.12.2-prompt-recipient.patch
294 @@ -0,0 +1,38 @@
295 +From 7c805b5d4eca798a03ac56b40e53cb335e30c187 Mon Sep 17 00:00:00 2001
296 +From: Vlad Orlov <monsta@×××××.ru>
297 +Date: Mon, 15 Aug 2016 18:23:31 +0200
298 +Subject: [PATCH 1/3] libcryptui: fix logic flaw in the prompt recipients
299 + dialog
300 +
301 +The prompt recipients dialog has been broken in commit
302 +https://github.com/GNOME/libcryptui/commit/cd74aa6bf810a5ce0935d2ec89d6db64dbbde24d#diff-f0ea8a1eef5386b0149314d2a1743e85L202
303 +
304 +The patch fixes the logic there and makes seahorse-tool's
305 +encrypt command work again. Therefore, seahorse plugins for both
306 +Nautilus and Nemo should start working as well.
307 +
308 +Bug-Debian: https://bugs.debian.org/770436
309 +
310 +https://bugzilla.gnome.org/show_bug.cgi?id=769944
311 +
312 +Reviewed-by: Stef Walter <stefw@×××××.org>
313 +---
314 + libcryptui/cryptui.c | 2 +-
315 + 1 file changed, 1 insertion(+), 1 deletion(-)
316 +
317 +diff --git a/libcryptui/cryptui.c b/libcryptui/cryptui.c
318 +index 92f0d5d4..2bbfa409 100644
319 +--- a/libcryptui/cryptui.c
320 ++++ b/libcryptui/cryptui.c
321 +@@ -211,7 +211,7 @@ cryptui_prompt_recipients_with_symmetric (CryptUIKeyset *keyset,
322 + *symmetric = cryptui_key_chooser_get_symmetric (chooser);
323 + }
324 +
325 +- if (symmetric != NULL && !*symmetric) {
326 ++ if (symmetric == NULL || *symmetric == FALSE) {
327 + recipients = cryptui_key_chooser_get_recipients (chooser);
328 + keys = g_new0(gchar*, g_list_length (recipients) + 1);
329 + for (l = recipients, i = 0; l; l = g_list_next (l), i++)
330 +--
331 +2.14.1
332 +
333
334 diff --git a/x11-libs/libcryptui/libcryptui-3.12.2-r1.ebuild b/x11-libs/libcryptui/libcryptui-3.12.2-r1.ebuild
335 new file mode 100644
336 index 00000000000..c97291428d8
337 --- /dev/null
338 +++ b/x11-libs/libcryptui/libcryptui-3.12.2-r1.ebuild
339 @@ -0,0 +1,73 @@
340 +# Copyright 1999-2017 Gentoo Foundation
341 +# Distributed under the terms of the GNU General Public License v2
342 +
343 +EAPI=6
344 +GNOME2_EAUTORECONF="yes"
345 +
346 +inherit gnome2
347 +
348 +DESCRIPTION="User interface components for OpenPGP"
349 +HOMEPAGE="https://wiki.gnome.org/Apps/Seahorse"
350 +
351 +LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1"
352 +SLOT="0"
353 +IUSE="debug +introspection libnotify"
354 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
355 +
356 +# Pull in libnotify-0.7 because it's controlled via an automagic ifdef
357 +COMMON_DEPEND="
358 + >=dev-libs/glib-2.32:2
359 + >=x11-libs/gtk+-3:3[introspection?]
360 + >=dev-libs/dbus-glib-0.72
361 + >=app-crypt/gcr-3
362 + x11-libs/libICE
363 + x11-libs/libSM
364 +
365 + >=app-crypt/gpgme-1:1=
366 + >=app-crypt/gnupg-1.4
367 +
368 + introspection? ( >=dev-libs/gobject-introspection-0.6.4:= )
369 + libnotify? ( >=x11-libs/libnotify-0.7:= )
370 +"
371 +DEPEND="${COMMON_DEPEND}
372 + app-text/rarian
373 + >=dev-util/gtk-doc-am-1.9
374 + >=dev-util/intltool-0.35
375 + sys-devel/gettext
376 + virtual/pkgconfig
377 +"
378 +# Before 3.1.4, libcryptui was part of seahorse
379 +RDEPEND="${COMMON_DEPEND}
380 + !<app-crypt/seahorse-3.1.4
381 +"
382 +
383 +PATCHES=(
384 + # Support GnuPG 2.1, in master
385 + # https://bugzilla.gnome.org/show_bug.cgi?id=745843
386 + "${FILESDIR}"/${PN}-3.12.2-gnupg-2.1.patch
387 + # from master, in Debian as well
388 + "${FILESDIR}"/${PN}-3.12.2-prompt-recipient.patch
389 + "${FILESDIR}"/${PN}-3.12.2-fix-return-types.patch
390 + "${FILESDIR}"/${PN}-3.12.2-port-gcr-3.patch
391 + # Support GnuPG 2.2
392 + # https://bugs.gentoo.org/show_bug.cgi?id=629572
393 + "${FILESDIR}"/${PN}-3.12.2-gnupg-2.2.patch
394 +)
395 +
396 +src_prepare() {
397 + # FIXME: Do not mess with CFLAGS with USE="debug"
398 + sed -e '/CFLAGS="$CFLAGS -g -O0/d' \
399 + -e 's/-Werror//' \
400 + -i configure.ac configure || die "sed failed"
401 +
402 + gnome2_src_prepare
403 +}
404 +
405 +src_configure() {
406 + gnome2_src_configure \
407 + --disable-static \
408 + --disable-update-mime-database \
409 + $(use_enable debug) \
410 + $(use_enable introspection) \
411 + $(use_enable libnotify)
412 +}