diff options
author | Pacho Ramos <pacho@gentoo.org> | 2015-06-19 16:56:56 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2015-06-19 16:56:56 +0000 |
commit | 78a863422dba82b837bca417ae94a9913c84d922 (patch) | |
tree | b4d573c69def337cd252bf7b1414763d57239356 /app-crypt/seahorse | |
parent | Mask virtual/libgudev-230 and related providers for bug 552036. (diff) | |
download | gentoo-2-78a863422dba82b837bca417ae94a9913c84d922.tar.gz gentoo-2-78a863422dba82b837bca417ae94a9913c84d922.tar.bz2 gentoo-2-78a863422dba82b837bca417ae94a9913c84d922.zip |
Fix gnupg detection (#546980)
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'app-crypt/seahorse')
-rw-r--r-- | app-crypt/seahorse/ChangeLog | 8 | ||||
-rw-r--r-- | app-crypt/seahorse/files/seahorse-3.16.0-gnupg-detection.patch | 173 | ||||
-rw-r--r-- | app-crypt/seahorse/seahorse-3.16.0-r1.ebuild | 68 |
3 files changed, 248 insertions, 1 deletions
diff --git a/app-crypt/seahorse/ChangeLog b/app-crypt/seahorse/ChangeLog index 7878526d2e5b..823ac737da21 100644 --- a/app-crypt/seahorse/ChangeLog +++ b/app-crypt/seahorse/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-crypt/seahorse # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/seahorse/ChangeLog,v 1.193 2015/06/09 10:04:01 eva Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-crypt/seahorse/ChangeLog,v 1.194 2015/06/19 16:56:56 pacho Exp $ + +*seahorse-3.16.0-r1 (19 Jun 2015) + + 19 Jun 2015; Pacho Ramos <pacho@gentoo.org> + +files/seahorse-3.16.0-gnupg-detection.patch, +seahorse-3.16.0-r1.ebuild: + Fix gnupg detection (#546980) *seahorse-3.16.0 (09 Jun 2015) diff --git a/app-crypt/seahorse/files/seahorse-3.16.0-gnupg-detection.patch b/app-crypt/seahorse/files/seahorse-3.16.0-gnupg-detection.patch new file mode 100644 index 000000000000..63004af374db --- /dev/null +++ b/app-crypt/seahorse/files/seahorse-3.16.0-gnupg-detection.patch @@ -0,0 +1,173 @@ +From dfabc8de30e87fd7b6dc6d12f34fa29858caed95 Mon Sep 17 00:00:00 2001 +From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +Date: Fri, 5 Jun 2015 16:01:43 -0400 +Subject: Avoid binding seahorse to the build-time version of gpg + +As a user of gpgme, seahorse should prefer gpg2 over gpg, since gpgme +is more fully-functional when it works with gpg2. + +Moreover, seahorse should not assume that the version of gpg that it +was built against is the same version of gpg that it is running +against. + +GPGME has allowed a NULL value for the file_name parameter for +gpgme_set_engine_info ever since the function appeared. This will use +gpgme's default engine selection, which is likely to be better than +hardcoding the path that seahorse found during compile time. + +Moreover, seahorse should not bother trying to build against archaic +versions of these branches, and certainly shouldn't hardcode numeric +values that only worked for old versions in the seahorse headers. + +This changeset adjusts the configure.ac tests to make sure that the +build environment has a non-archaic version of gnupg at least. + +Signed-off-by: Stef Walter <stefw@redhat.com> + * Remove support for GnuPG 1.4.x as discussed at linked bug + +https://bugzilla.gnome.org/show_bug.cgi?id=750468 + +diff --git a/configure.ac b/configure.ac +index 760ec98..bf34ea9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -9,7 +9,7 @@ GCR_REQUIRED=3.11.91 + GTK_REQ=3.4.0 + GTK_MAX=GTK_VERSION_3_4 + +-GNUPG_ACCEPTED="1.2 1.4 2.0" ++GNUPG_ACCEPTED="2.0.12 2.1.4" + GPGME_REQUIRED=1.0.0 + LIBSECRET_REQUIRED=0.16 + AVAHI_GLIB_REQUIRED=0.6 +@@ -130,7 +130,7 @@ else + DO_CHECK=$enableval, DO_CHECK=yes) + + if test "$DO_CHECK" = "yes"; then +- AC_PATH_PROGS(GNUPG, [gpg gpg2], no) ++ AC_PATH_PROGS(GNUPG, [gpg2 gpg], no) + AC_DEFINE_UNQUOTED(GNUPG, "$GNUPG", [Path to gpg executable.]) + ok="no" + if test "$GNUPG" != "no"; then +@@ -144,12 +144,16 @@ else + sed 's/^gpg (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` + + for ver in $GNUPG_ACCEPTED; do +- if test "$ver" = "$major.$minor"; then +- AC_DEFINE_UNQUOTED(GPG_MAJOR, [$major], [GPG Major Version]) +- AC_DEFINE_UNQUOTED(GPG_MINOR, [$minor], [GPG Minor Version]) +- AC_DEFINE_UNQUOTED(GPG_MICRO, [$micro], [GPG Micro Version]) +- ok="yes" +- break ++ branch=`echo $ver | sed 's/\.[[0-9]]*$//'` ++ if test "$branch" = "$major.$minor"; then ++ min_micro=`echo $ver | sed 's/^[[0-9]]*\.[[0-9]]*\.//'` ++ if test "$min_micro" -le "$micro"; then ++ AC_DEFINE_UNQUOTED(GPG_MAJOR, [$major], [GPG Major Version]) ++ AC_DEFINE_UNQUOTED(GPG_MINOR, [$minor], [GPG Minor Version]) ++ AC_DEFINE_UNQUOTED(GPG_MICRO, [$micro], [GPG Micro Version]) ++ ok="yes" ++ break ++ fi + fi + done + fi +@@ -206,7 +210,7 @@ fi + + if test "$enable_pgp" = "yes"; then + if test -z "$have_gpg"; then +- AC_MSG_ERROR([Appropriate version of GnuPG not found. Please install one of versions: $GNUPG_ACCEPTED]) ++ AC_MSG_ERROR([Appropriate version of GnuPG not found. Please install one of the following versions (or later): $GNUPG_ACCEPTED]) + fi + + if test -z "$have_gpgme"; then +diff --git a/pgp/seahorse-gpg-op.c b/pgp/seahorse-gpg-op.c +index f34d9ec..3c3b9b5 100644 +--- a/pgp/seahorse-gpg-op.c ++++ b/pgp/seahorse-gpg-op.c +@@ -111,9 +111,6 @@ seahorse_gpg_op_num_uids (gpgme_ctx_t ctx, const char *pattern, guint *number) + found += 3; + } + +- if ((GPG_MAJOR == 1) && (GPG_MINOR == 2)) +- *number = *number + 1; +- + g_free (output); + return GPG_OK; + } +diff --git a/pgp/seahorse-gpgme-key-op.h b/pgp/seahorse-gpgme-key-op.h +index 622c93a..0acbfc0 100644 +--- a/pgp/seahorse-gpgme-key-op.h ++++ b/pgp/seahorse-gpgme-key-op.h +@@ -30,43 +30,10 @@ + #include "pgp/seahorse-gpgme-uid.h" + #include "pgp/seahorse-gpgme-photo.h" + +-/* +- * Key type options. +- * Sadly these are not consistent between versions of GPG. ++/* ++ * Key type options. ++ * We only support GPG version >=2.0.12 or >= 2.1.4 + */ +-#if ( GPG_MAJOR == 2 && GPG_MINOR == 0 && GPG_MICRO < 12 ) || \ +- ( GPG_MAJOR == 1 && ( GPG_MINOR < 4 || GPG_MICRO < 10 ) ) +- +-typedef enum { +- /* DSA key with ElGamal subkey. The ElGamal length is variable +- * within #ELGAMAL_MIN and #LENGTH_MAX. The DSA key will have a +- * length equal to the ElGamal key's up to a limit of #DSA_MAX. +- * Only used in seahorse_ops_key_generate(). +- */ +- DSA_ELGAMAL = 1, +- /* DSA key, sign only. Can be a subkey or a primary key. +- * See #DSA_MIN and #DSA_MAX. +- */ +- DSA = 2, +- /* ElGamal subkey, encrypt only. See #ELGAMAL_MIN and #LENGTH_MAX. +- * Only used in seahorse_ops_key_add_subkey(). +- */ +- ELGAMAL = 4, +- /* RSA key, sign only. Can be a subkey or a primary key. +- * See #RSA_MIN and #LENGTH_MAX. +- */ +- RSA_SIGN = 5, +- /* RSA subkey, encrypt only. See #RSA_MIN and #LENGTH_MAX. +- * Only used in seahorse_ops_key_add_subkey(). +- */ +- RSA_ENCRYPT = 6, +- /* RSA sign-only key with RSA encrypt-only subkey. See #RSA_MIN and +- * #LENGTH_MAX. Only used in seahorse_ops_key_generate(). +- */ +- RSA_RSA = 11 +-} SeahorseKeyEncType; +- +-#else /* GPG version >=1.4.10 or >=2.0.12 */ + + typedef enum { + RSA_RSA = 1, +@@ -77,8 +44,6 @@ typedef enum { + RSA_ENCRYPT = 6 + } SeahorseKeyEncType; + +-#endif /* GPG version >=1.4.10 or >=2.0.12 */ +- + /* Length ranges for key types */ + typedef enum { + /* Minimum length for #DSA. */ +diff --git a/pgp/seahorse-pgp-backend.c b/pgp/seahorse-pgp-backend.c +index 4b267c3..ce613b8 100644 +--- a/pgp/seahorse-pgp-backend.c ++++ b/pgp/seahorse-pgp-backend.c +@@ -311,7 +311,7 @@ seahorse_pgp_backend_initialize (void) + + g_return_if_fail (pgp_backend != NULL); + +- gpgme_set_engine_info (GPGME_PROTOCOL_OpenPGP, GNUPG, NULL); ++ gpgme_set_engine_info (GPGME_PROTOCOL_OpenPGP, NULL, NULL); + } + + SeahorseGpgmeKeyring * +-- +cgit v0.10.2 + diff --git a/app-crypt/seahorse/seahorse-3.16.0-r1.ebuild b/app-crypt/seahorse/seahorse-3.16.0-r1.ebuild new file mode 100644 index 000000000000..7561308e1b0e --- /dev/null +++ b/app-crypt/seahorse/seahorse-3.16.0-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/seahorse/seahorse-3.16.0-r1.ebuild,v 1.1 2015/06/19 16:56:56 pacho Exp $ + +EAPI="5" +GCONF_DEBUG="no" + +inherit autotools eutils gnome2 + +DESCRIPTION="A GNOME application for managing encryption keys" +HOMEPAGE="https://wiki.gnome.org/Apps/Seahorse" + +LICENSE="GPL-2+ FDL-1.1+" +SLOT="0" +IUSE="debug ldap zeroconf" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" + +COMMON_DEPEND=" + >=app-crypt/gcr-3.11.91:= + >=dev-libs/glib-2.10:2 + >=x11-libs/gtk+-3.4:3 + >=app-crypt/libsecret-0.16 + >=net-libs/libsoup-2.33.92:2.4 + x11-misc/shared-mime-info + + net-misc/openssh + >=app-crypt/gpgme-1 + >=app-crypt/gnupg-2.0.12 + + ldap? ( net-nds/openldap:= ) + zeroconf? ( >=net-dns/avahi-0.6:= ) +" +DEPEND="${COMMON_DEPEND} + >=dev-util/intltool-0.35 + sys-devel/gettext + virtual/pkgconfig +" +# Need seahorse-plugins git snapshot +RDEPEND="${COMMON_DEPEND} + !<app-crypt/seahorse-plugins-2.91.0_pre20110114 +" + +src_prepare() { + # Do not mess with CFLAGS with USE="debug" + sed -e '/CFLAGS="$CFLAGS -g/d' \ + -e '/CFLAGS="$CFLAGS -O0/d' \ + -i configure.ac configure || die "sed 1 failed" + + # Avoid binding seahorse to the build-time version of gpg (from 'master') + epatch "${FILESDIR}"/${PN}-3.16.0-gnupg-detection.patch + + eautoreconf + gnome2_src_prepare +} + +src_configure() { + # bindir is needed due to bad macro expansion in desktop file, bug #508610 + gnome2_src_configure \ + --bindir=/usr/bin \ + --enable-pgp \ + --enable-ssh \ + --enable-pkcs11 \ + --enable-hkp \ + $(use_enable debug) \ + $(use_enable ldap) \ + $(use_enable zeroconf sharing) \ + VALAC=$(type -P true) +} |