Skip to content

Instantly share code, notes, and snippets.

@glitsj16
Created September 1, 2017 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glitsj16/adf02afe2011450d49ff19a1684f4fd5 to your computer and use it in GitHub Desktop.
Save glitsj16/adf02afe2011450d49ff19a1684f4fd5 to your computer and use it in GitHub Desktop.
# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Michel Brabants <michel.linux@tiscali.be>
pkgname=seahorse
pkgver=3.20.0
pkgrel=3
pkgdesc="GNOME application for managing PGP keys."
arch=(i686 x86_64)
license=(GPL)
url="http://projects.gnome.org/seahorse/"
depends=(gtk3 gcr libsecret libsoup desktop-file-utils dconf gpgme gnome-keyring)
makedepends=(libldap intltool yelp-tools gobject-introspection openssh gnome-common git)
optdepends=('openssh: SSH support')
provides=(x11-ssh-askpass)
groups=(gnome-extra)
source=("http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/${pkgver:0:4}/${pkgname}-${pkgver}.tar.xz"
'fix.key.considered.patch'
'fix.key.description.patch')
sha256sums=('e2b07461ed54a8333e5628e9b8e517ec2b731068377bf376570aad998274c6df'
'83723cb451e2acec4363af18bc43f91f8177c79aeb1d84fd40f02d70df9b51aa'
'a65e7200c119f0af9f26658b7f269652bac973c1ad6e8e46e1ae52f646f9461f')
prepare() {
cd "${pkgname}-${pkgver}"
# cherry-picked upstream post-3.20.0 patches
patch -Np1 -i "${srcdir}/fix.key.considered.patch"
patch -Np1 -i "${srcdir}/fix.key.description.patch"
}
build() {
cd "${pkgname}-${pkgver}"
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--enable-ldap --enable-hkp --disable-schemas-compile --disable-valac
make
}
package() {
cd "${pkgname}-${pkgver}"
make DESTDIR="$pkgdir" install
}
@glitsj16
Copy link
Author

glitsj16 commented Sep 1, 2017

Additional files:

** fix.key.considered.patch **

From cdfc5b297d7420e47b9c973e8b8cb1b0fb576421 Mon Sep 17 00:00:00 2001
From: Tobias Mueller <muelli@cryptobitch.de>
Date: Tue, 14 Feb 2017 22:05:19 +0100
Subject: gpg: Ignore KEY_CONSIDERED line introduced in gpg 2.1.13

gpg 2.1.13 introduced a new status line, KEY_CONSIDERED:
https://lists.gnupg.org/pipermail/gnupg-announce/2016q2/000390.html
gpgme 1.7.0 supported it:
https://lists.gnupg.org/pipermail/gnupg-commits/2016-May/012130.html

The line seems innocent in the sense that it tells you what keys GnuPG
looked at without doing anything.  We can probably safely ignore that
line, as we ignore many other lines already.

https://bugzilla.gnome.org/show_bug.cgi?id=778607

Signed-off-by: Stef Walter <stefw@redhat.com>
 * Fixed this so it compiles
---
 configure.ac                | 2 +-
 pgp/seahorse-gpgme-key-op.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0f748e3..fc4493c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@ GTK_REQ=3.4.0
 GTK_MAX=GTK_VERSION_3_4
 
 GNUPG_ACCEPTED="2.0.12 2.1.4"
-GPGME_REQUIRED=1.0.0
+GPGME_REQUIRED=1.7.0
 LIBSECRET_REQUIRED=0.16
 AVAHI_GLIB_REQUIRED=0.6
 
diff --git a/pgp/seahorse-gpgme-key-op.c b/pgp/seahorse-gpgme-key-op.c
index a765033..3f81850 100644
--- a/pgp/seahorse-gpgme-key-op.c
+++ b/pgp/seahorse-gpgme-key-op.c
@@ -330,7 +330,8 @@ seahorse_gpgme_key_op_edit (gpointer data, gpgme_status_code_t status,
 	    status == GPGME_STATUS_BAD_PASSPHRASE || status == GPGME_STATUS_USERID_HINT ||
 	    status == GPGME_STATUS_SIGEXPIRED || status == GPGME_STATUS_KEYEXPIRED ||
 	    status == GPGME_STATUS_PROGRESS || status == GPGME_STATUS_KEY_CREATED ||
-	    status == GPGME_STATUS_ALREADY_SIGNED || status == GPGME_STATUS_MISSING_PASSPHRASE)		
+	    status == GPGME_STATUS_ALREADY_SIGNED || status == GPGME_STATUS_MISSING_PASSPHRASE ||
+	    status == GPGME_STATUS_KEY_CONSIDERED)
 		return parms->err;
 
 	g_debug ("[edit key] state: %d / status: %d / args: %s",
-- 
cgit v0.12

** fix.key.description.patch **

From 82daa60c6c67c1a054850e486b0303b82af3c84e Mon Sep 17 00:00:00 2001
From: Philip Withnall <withnall@endlessm.com>
Date: Thu, 26 Jan 2017 23:26:25 +0000
Subject: =?UTF-8?q?gkr:=20Don=E2=80=99t=20update=20key=20description=20if?=
 =?UTF-8?q?=20it=20doesn=E2=80=99t=20change?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

If the user right-clicks in the ‘Description’ entry in the item
properties window, without changing the description, their text
selection will be dropped. This is because Seahorse is trying to update
the item description in the background, as a result of the entry losing
focus.

Avoid trying to update the item description if it has not changed, which
will cover most cases of the user right-clicking.

https://bugzilla.gnome.org/show_bug.cgi?id=777802
---
 gkr/gkr-item-properties.vala | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gkr/gkr-item-properties.vala b/gkr/gkr-item-properties.vala
index df3dabd..9e6e89d 100644
--- a/gkr/gkr-item-properties.vala
+++ b/gkr/gkr-item-properties.vala
@@ -260,6 +260,8 @@ public class ItemProperties : Gtk.Dialog {
 	{
 		if (this._updating_description)
 			return;
+		if (this.item.label == description.text)
+			return;
 
 		this._updating_description = true;
 		description.sensitive = false;
-- 
cgit v0.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment