Browse Source

n/gpa: Upgraded to gpa-0.10.0.

slackware-14.2
Damien Goutte-Gattat 3 years ago
parent
commit
79ff07aae8
  1. 1
      n/gpa/gpa-0.10.0.tar.bz2.sha256
  2. 57
      n/gpa/gpa-0.9.10-fix-tofu-deadlock.patch
  3. 1
      n/gpa/gpa-0.9.10.tar.bz2.sha1
  4. 14
      n/gpa/gpa.SlackBuild

1
n/gpa/gpa-0.10.0.tar.bz2.sha256

@ -0,0 +1 @@
95dbabe75fa5c8dc47e3acf2df7a51cee096051e5a842b4c9b6d61e40a6177b1 gpa-0.10.0.tar.bz2

57
n/gpa/gpa-0.9.10-fix-tofu-deadlock.patch

@ -1,57 +0,0 @@
From 108d9d26cd41e63d38557bbe440f9a369c71e9a1 Mon Sep 17 00:00:00 2001
From: Damien Goutte-Gattat <dgouttegattat@incenp.org>
Date: Sun, 18 Feb 2018 23:10:52 +0000
Subject: [PATCH gpa] Load the secret keyring before the public one.
To: gnupg-devel@gnupg.org
* src/keylist.c (gpa_keylist_init): Forcefully load the secret
keyring before attempting to load the public keys.
--
Gpa loads the private keyring in a kind of "lazy mode", in that
the private keyring is only loaded the first time Gpa needs to
lookup a private key. This normally happens during the loading
of the public keyring, since for each public key Gpa must lookup
in the private keyring to check whether a private counterpart is
available.
The result is that a Gpg process is spawn to list the secret keys
while another Gpg process is still listing the public keys. If
the trust model happens to be TOFU or TOFU+PGP, this can cause
some problems with regard to the locking of the TOFU database.
To avoid that, this patch makes sure the private keyring is
actively and synchronously loaded before we fetch the public keys
(no more lazy loading).
GnuPG-bug-id: 3748
Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
---
src/keylist.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/keylist.c b/src/keylist.c
index 442da08..2c8e7e8 100644
--- a/src/keylist.c
+++ b/src/keylist.c
@@ -231,7 +231,16 @@ gpa_keylist_init (GTypeInstance *instance, void *class_ptr)
}
else
{
- /* Initialize from the global keytable. */
+ /* Initialize from the global keytable.
+ *
+ * We must forcefully load the secret keytable first to
+ * prevent concurrent access to the TOFU database. */
+ gpa_keytable_force_reload (gpa_keytable_get_secret_instance (),
+ NULL, (GpaKeyTableEndFunc) gtk_main_quit,
+ NULL);
+ gtk_main ();
+
+ /* Now we can load the public keyring. */
gpa_keytable_list_keys (gpa_keytable_get_public_instance(),
gpa_keylist_next, gpa_keylist_end, list);
}
--
2.14.1

1
n/gpa/gpa-0.9.10.tar.bz2.sha1

@ -1 +0,0 @@
c629348725c1bf5dafd57f8a70187dc89815ce60 gpa-0.9.10.tar.bz2

14
n/gpa/gpa.SlackBuild

@ -28,13 +28,13 @@
# Source package infos
NAMESRC=${NAMESRC:-gpa}
VERSION=${VERSION:-0.9.10}
VERSION=${VERSION:-0.10.0}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.bz2}
WGET=${WGET:-https://www.gnupg.org/ftp/gcrypt/gpa/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-gpa}
BUILD=${BUILD:-2GGD}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@ -77,7 +77,7 @@ if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
@ -85,9 +85,6 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
# Fix https://dev.gnupg.org/T3748
# https://lists.gnupg.org/pipermail/gnupg-devel/2018-February/033453.html
patch -p 1 < $CWD/gpa-0.9.10-fix-tofu-deadlock.patch
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
@ -110,6 +107,11 @@ install -m 644 AUTHORS COPYING ChangeLog NEWS README THANKS TODO \
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Add dependency infos
cat > $PKG/install/slack-required <<EOF
gpgme
EOF
# Package the tree
cd $PKG
mkdir -p $OUT

Loading…
Cancel
Save