summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorshannonjr <shannonjr>2006-10-20 15:23:57 +0000
committershannonjr <shannonjr>2006-10-20 15:23:57 +0000
commit038b9ba151191e21deecfe0aeb6f87113ebfc0e4 (patch)
tree1f5c8af55da82f04580646bc1faac896d3731556 /security
parent4f5f97b6c81306b634c71b22b16fe8c69d7a5891 (diff)
downloadpkgsrc-038b9ba151191e21deecfe0aeb6f87113ebfc0e4.tar.gz
Re: pkg/34856: upgrade to GnuPG 1.9.93
This release is mainly to fix bugs found in 1.9.92.
Diffstat (limited to 'security')
-rw-r--r--security/gnupg-devel/Makefile26
-rw-r--r--security/gnupg-devel/PLIST7
-rw-r--r--security/gnupg-devel/distinfo21
-rw-r--r--security/gnupg-devel/patches/patch-aa54
-rw-r--r--security/gnupg-devel/patches/patch-ab8
-rw-r--r--security/gnupg-devel/patches/patch-ac21
-rw-r--r--security/gnupg-devel/patches/patch-ad29
-rw-r--r--security/gnupg-devel/patches/patch-ae59
-rw-r--r--security/gnupg-devel/patches/patch-af12
-rw-r--r--security/gnupg-devel/patches/patch-ag13
-rw-r--r--security/gnupg-devel/patches/patch-ah13
-rw-r--r--security/gnupg-devel/patches/patch-ai12
-rw-r--r--security/gnupg-devel/patches/patch-aj45
13 files changed, 308 insertions, 12 deletions
diff --git a/security/gnupg-devel/Makefile b/security/gnupg-devel/Makefile
index 0ac4020a0a3..97238ed4271 100644
--- a/security/gnupg-devel/Makefile
+++ b/security/gnupg-devel/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.19 2006/10/11 11:59:21 shannonjr Exp $
+# $NetBSD: Makefile,v 1.20 2006/10/20 15:23:57 shannonjr Exp $
#
-DISTNAME= gnupg-1.9.22
+DISTNAME= gnupg-1.9.93
PKGNAME= ${DISTNAME:S/gnupg/gnupg-devel/}
CATEGORIES= security
MASTER_SITES= ftp://ftp.gnupg.org/gcrypt/alpha/gnupg/
@@ -9,6 +9,8 @@ EXTRACT_SUFX= .tar.bz2
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
DISTFILES+= pth-2.0.7.tar.gz
SITES.pth-2.0.7.tar.gz= ${MASTER_SITE_GNU:=pth/}
+DISTFILES+= libassuan-0.9.3.tar.bz2
+SITES.libassuan-0.9.3.tar.bz2= ftp://ftp.gnupg.org/gcrypt/alpha/libassuan/
MAINTAINER= shannonjr@NetBSD.org
HOMEPAGE= ftp://ftp.gnupg.org/gcrypt/alpha/gnupg/
@@ -18,12 +20,16 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
GNU_CONFIGURE= yes
USE_TOOLS+= gmake
+USE_TOOLS+= autoconf
+USE_TOOLS+= automake
USE_LIBTOOL= yes
USE_PKGLOCALEDIR= yes
CONFIGURE_ARGS+= --with-static-rnd=auto
CONFIGURE_ARGS+= --without-included-gettext
CONFIGURE_ARGS+= --with-pth-prefix=${WRKDIR}/pth
+CONFIGURE_ARGS+= --with-libassuan-prefix=${WRKDIR}/libassuan
+CONFIGURE_ARGS+= --enable-maintainer-mode
CONFIGURE_ENV+= gnupg_cv_pth_is_sane=yes
TEST_TARGET= check
@@ -49,18 +55,26 @@ PLIST_SRC+= ${.CURDIR}/PLIST.gpgsm
# We are building a static pth library and linking against it
# While this is not very satisfying, gpgme hangs in it's gpgsm tests if we depend on the shared (pkgsrc) pth library
+# We are also building libassuan here to get libassuan-pth.
pre-configure:
- cd ${WRKDIR}/pth-2.0.7 && ./configure --prefix=${WRKDIR}/pth --enable-pthread --enable-static --disable-shared && ${MAKE} install
+ cd ${WRKDIR}/pth-2.0.7 && \
+ ./configure --prefix=${WRKDIR}/pth --enable-pthread --enable-static --disable-shared && \
+ ${MAKE} install
+ cd ${WRKDIR}/libassuan-0.9.3 && \
+ ${SETENV} ${CONFIGURE_ENV} ./autogen.sh && \
+ ${SETENV} ${CONFIGURE_ENV} ./configure --enable-maintainer-mode --prefix=${WRKDIR}/libassuan --with-pth-prefix=${WRKDIR}/pth && \
+ ${SETENV} ${PKGSRC_MAKE_ENV} ${MAKE} install
+ cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./autogen.sh
-BUILDLINK_API_DEPENDS.libgpg-error+= libgpg-error>=1.0.0
+BUILDLINK_API_DEPENDS.libgpg-error+= libgpg-error>=1.4
+BUILDLINK_API_DEPENDS.libksba+= libksba>=1.0.0
.include "../../databases/openldap-client/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
-.include "../../security/libassuan/buildlink3.mk"
.include "../../security/libgcrypt/buildlink3.mk"
.include "../../security/libgpg-error/buildlink3.mk"
.include "../../security/libksba/buildlink3.mk"
-.include "../../security/pinentry/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/security/gnupg-devel/PLIST b/security/gnupg-devel/PLIST
index 0b947bf7cd2..8d457c32d65 100644
--- a/security/gnupg-devel/PLIST
+++ b/security/gnupg-devel/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2006/04/17 07:07:33 jlam Exp $
+@comment $NetBSD: PLIST,v 1.5 2006/10/20 15:23:57 shannonjr Exp $
bin/gpg-agent
bin/gpg-connect-agent
bin/gpgconf
@@ -6,10 +6,13 @@ bin/gpgkey2ssh
bin/gpgparsemail
bin/gpgsm-gencert.sh
bin/watchgnupg
-info/gnupg.info
libexec/gpg-preset-passphrase
libexec/gpg-protect-tool
sbin/addgnupghome
share/gnupg/qualified.txt
share/locale/de/LC_MESSAGES/gnupg2.mo
+share/gnupg/FAQ
+share/gnupg/com-certs.pem
+share/gnupg/faq.html
+share/gnupg/gpg-conf.skel
@dirrm share/gnupg
diff --git a/security/gnupg-devel/distinfo b/security/gnupg-devel/distinfo
index 443cb43e0fe..79c0bbf6952 100644
--- a/security/gnupg-devel/distinfo
+++ b/security/gnupg-devel/distinfo
@@ -1,8 +1,21 @@
-$NetBSD: distinfo,v 1.14 2006/10/11 11:59:21 shannonjr Exp $
+$NetBSD: distinfo,v 1.15 2006/10/20 15:23:57 shannonjr Exp $
-SHA1 (gnupg-1.9.22.tar.bz2) = 10b2a5c256598d9ed25c84d55ea111710b3f8906
-RMD160 (gnupg-1.9.22.tar.bz2) = 43b3e8a17d5e116f5fa0c34bc3beaf68250ec3c3
-Size (gnupg-1.9.22.tar.bz2) = 1908546 bytes
+SHA1 (gnupg-1.9.93.tar.bz2) = 41d8ede14312ea491ddcd207508b5ffb192eb3d1
+RMD160 (gnupg-1.9.93.tar.bz2) = 418c7a3d6f2dc391c939ca7407985e63116f6d7c
+Size (gnupg-1.9.93.tar.bz2) = 3862475 bytes
+SHA1 (libassuan-0.9.3.tar.bz2) = e1a74bd344fe9135759c00b454a65b2e166521df
+RMD160 (libassuan-0.9.3.tar.bz2) = aaf93786454880c3cb1aaa1192e3035359493f6d
+Size (libassuan-0.9.3.tar.bz2) = 255193 bytes
SHA1 (pth-2.0.7.tar.gz) = 9a71915c89ff2414de69fe104ae1016d513afeee
RMD160 (pth-2.0.7.tar.gz) = 80bc66777ba20d9648b7aaf3f58d593be6416910
Size (pth-2.0.7.tar.gz) = 652640 bytes
+SHA1 (patch-aa) = 916346ad387ae4efd638b2c19bbedfe6f309eb2e
+SHA1 (patch-ab) = 501bce9a8474ac37a8e01eceae9b52f0e87868d5
+SHA1 (patch-ac) = ca9e1044a0eb8d3e25cd9c20174047a96038c236
+SHA1 (patch-ad) = 01e9c4449f3cb957facd4642c6298936d7747998
+SHA1 (patch-ae) = b94ff40cdf6ffd2b96d28d541dcd77a8226125c8
+SHA1 (patch-af) = dc81cd9cdd223dc4cff4fe800e63b596b67b649b
+SHA1 (patch-ag) = c65e7499463eb1518c1e38d2deee59afd0726667
+SHA1 (patch-ah) = f4661d5352f0e13aa72b1de5aecf6fc87c193a3c
+SHA1 (patch-ai) = 41223e03b55a8ec7496171fb9fbc96d6c1c9bb1d
+SHA1 (patch-aj) = cb244f9d364db13ed783ab017f2b7caeff279477
diff --git a/security/gnupg-devel/patches/patch-aa b/security/gnupg-devel/patches/patch-aa
new file mode 100644
index 00000000000..fe226da831e
--- /dev/null
+++ b/security/gnupg-devel/patches/patch-aa
@@ -0,0 +1,54 @@
+$NetBSD: patch-aa,v 1.4 2006/10/20 15:23:58 shannonjr Exp $
+
+--- common/memrchr.c.orig 2006-10-19 04:13:12.000000000 -0600
++++ common/memrchr.c
+@@ -0,0 +1,49 @@
++/* memrchr.c - libc replacement function
++ * Copyright (C) 2005 Free Software Foundation, Inc.
++ *
++ * This file is part of GnuPG.
++ *
++ * GnuPG is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * GnuPG is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
++ * USA.
++ */
++
++/*
++ memrchr() is a GNU function that might not be available everywhere.
++ It's basically the inverse of memchr() - search backwards in a
++ memory block for a particular character.
++*/
++
++#include <config.h>
++#include <string.h>
++
++/* There are many ways to optimize this, but this is a simple
++ unoptimized implementation. */
++void *
++memrchr(const void *s, int c, size_t n)
++{
++ const unsigned char *start=s,*end=s;
++
++ end+=n-1;
++
++ while(end>=start)
++ {
++ if(*end==c)
++ return (void *)end;
++ else
++ end--;
++ }
++
++ return NULL;
++}
diff --git a/security/gnupg-devel/patches/patch-ab b/security/gnupg-devel/patches/patch-ab
new file mode 100644
index 00000000000..7c457c1b64b
--- /dev/null
+++ b/security/gnupg-devel/patches/patch-ab
@@ -0,0 +1,8 @@
+$NetBSD: patch-ab,v 1.7 2006/10/20 15:23:58 shannonjr Exp $
+
+--- common/memrchr.h.orig 2006-10-19 04:13:17.000000000 -0600
++++ common/memrchr.h
+@@ -0,0 +1,3 @@
++#include <string.h>
++void *
++memrchr(const void *s, int c, size_t n);
diff --git a/security/gnupg-devel/patches/patch-ac b/security/gnupg-devel/patches/patch-ac
new file mode 100644
index 00000000000..54852db2d5a
--- /dev/null
+++ b/security/gnupg-devel/patches/patch-ac
@@ -0,0 +1,21 @@
+$NetBSD: patch-ac,v 1.3 2006/10/20 15:23:58 shannonjr Exp $
+
+--- common/Makefile.am.orig 2006-10-17 05:49:02.000000000 -0600
++++ common/Makefile.am
+@@ -26,7 +26,7 @@ TESTS = $(module_tests)
+
+ AM_CPPFLAGS = -I$(top_srcdir)/gl
+
+-AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS)
++AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS)
+
+ common_sources = \
+ common-defs.h \
+@@ -46,6 +46,7 @@ common_sources = \
+ xasprintf.c \
+ xreadline.c \
+ membuf.c membuf.h \
++ memrchr.c memrchr.h \
+ iobuf.c iobuf.h \
+ ttyio.c ttyio.h \
+ asshelp.c asshelp.h \
diff --git a/security/gnupg-devel/patches/patch-ad b/security/gnupg-devel/patches/patch-ad
new file mode 100644
index 00000000000..2c9379d9cee
--- /dev/null
+++ b/security/gnupg-devel/patches/patch-ad
@@ -0,0 +1,29 @@
+$NetBSD: patch-ad,v 1.3 2006/10/20 15:23:58 shannonjr Exp $
+
+--- ../libassuan-0.9.3/src/libassuan.m4.orig 2006-10-19 04:50:01.000000000 -0600
++++ ../libassuan-0.9.3/src/libassuan.m4
+@@ -125,8 +125,8 @@ dnl
+ AC_DEFUN([AM_PATH_LIBASSUAN_PTH],
+ [ _AM_PATH_LIBASSUAN_COMMON($1,pth)
+ if test $ok = yes; then
+- LIBASSUAN_PTH_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags`
+- LIBASSUAN_PTH_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs`
++ LIBASSUAN_PTH_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pth --cflags`
++ LIBASSUAN_PTH_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pth --libs`
+ ifelse([$2], , :, [$2])
+ else
+ LIBASSUAN_PTH_CFLAGS=""
+@@ -144,10 +144,10 @@ dnl Test for libassuan and define LIBASS
+ dnl and LIBASSUAN_PTHREAD_LIBS
+ dnl
+ AC_DEFUN([AM_PATH_LIBASSUAN_PTHREAD],
+-[ _AM_PATH_LIBASSUAN_COMMON($1,pth)
++[ _AM_PATH_LIBASSUAN_COMMON($1,pthread)
+ if test $ok = yes; then
+- LIBASSUAN_PTHREAD_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags`
+- LIBASSUAN_PTHREAD_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs`
++ LIBASSUAN_PTHREAD_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pthread --cflags`
++ LIBASSUAN_PTHREAD_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pthread --libs`
+ ifelse([$2], , :, [$2])
+ else
+ LIBASSUAN_PTHREAD_CFLAGS=""
diff --git a/security/gnupg-devel/patches/patch-ae b/security/gnupg-devel/patches/patch-ae
new file mode 100644
index 00000000000..c0f8ad36ff2
--- /dev/null
+++ b/security/gnupg-devel/patches/patch-ae
@@ -0,0 +1,59 @@
+$NetBSD: patch-ae,v 1.1 2006/10/20 15:23:58 shannonjr Exp $
+
+--- agent/findkey.c.orig 2006-10-20 05:29:57.000000000 -0600
++++ agent/findkey.c
+@@ -30,6 +30,7 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <assert.h>
++#include <pth.h> /* (we use pth_sleep) */
+
+ #include "agent.h"
+
+@@ -41,7 +42,7 @@ struct try_unprotect_arg_s {
+
+
+ /* Write an S-expression formatted key to our key storage. With FORCE
+- pased as true an existsing key with the given GRIP will get
++ pased as true an existing key with the given GRIP will get
+ overwritten. */
+ int
+ agent_write_private_key (const unsigned char *grip,
+@@ -253,6 +254,7 @@ unprotect (ctrl_t ctrl, const char *desc
+ void *cache_marker;
+ const char *pw;
+
++ retry:
+ pw = agent_get_cache (hexgrip, cache_mode, &cache_marker);
+ if (pw)
+ {
+@@ -266,6 +268,29 @@ unprotect (ctrl_t ctrl, const char *desc
+ }
+ rc = 0;
+ }
++
++ /* If the pinentry is currently in use, we wait up to 60 seconds
++ for it close and check the cache again. This solves a common
++ situation where several requests for unprotecting a key have
++ been made but the user is still entering the passphrase for
++ the first request. Because all requests to agent_askpin are
++ serialized they would then pop up one after the other to
++ request the passphrase - despite that the user has already
++ entered it and is then available in the cache. This
++ implementation is not race free but in the worst case the
++ user has to enter the passphrase only once more. */
++ if (pinentry_active_p (ctrl, 0))
++ {
++ /* Active - wait */
++ if (!pinentry_active_p (ctrl, 60))
++ {
++ /* We need to give the other thread a chance to actually put
++ it into the cache. */
++ pth_sleep (1);
++ goto retry;
++ }
++ /* Timeout - better call pinentry now the plain way. */
++ }
+ }
+
+ pi = gcry_calloc_secure (1, sizeof (*pi) + 100);
diff --git a/security/gnupg-devel/patches/patch-af b/security/gnupg-devel/patches/patch-af
new file mode 100644
index 00000000000..cc170f4784b
--- /dev/null
+++ b/security/gnupg-devel/patches/patch-af
@@ -0,0 +1,12 @@
+$NetBSD: patch-af,v 1.1 2006/10/20 15:23:58 shannonjr Exp $
+
+--- ../libassuan-0.9.3/src/Makefile.am.orig 2006-10-09 04:26:41.000000000 -0600
++++ ../libassuan-0.9.3/src/Makefile.am
+@@ -26,6 +26,7 @@ MOSTLYCLEANFILES = assuan-errors.c
+
+ if HAVE_PTH
+ libassuan_pth = libassuan-pth.a
++AM_CFLAGS=$(PTH_CFLAGS)
+ else
+ libassuan_pth =
+ endif
diff --git a/security/gnupg-devel/patches/patch-ag b/security/gnupg-devel/patches/patch-ag
new file mode 100644
index 00000000000..f7804fefd6d
--- /dev/null
+++ b/security/gnupg-devel/patches/patch-ag
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1 2006/10/20 15:23:58 shannonjr Exp $
+
+--- g10/Makefile.am.orig 2006-10-17 06:06:37.000000000 -0600
++++ g10/Makefile.am
+@@ -27,7 +27,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top
+
+ include $(top_srcdir)/am/cmacros.am
+
+-AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
++AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
+
+ needed_libs = ../gl/libgnu.a ../common/libcommon.a ../jnlib/libjnlib.a
+
diff --git a/security/gnupg-devel/patches/patch-ah b/security/gnupg-devel/patches/patch-ah
new file mode 100644
index 00000000000..d2d91478f93
--- /dev/null
+++ b/security/gnupg-devel/patches/patch-ah
@@ -0,0 +1,13 @@
+$NetBSD: patch-ah,v 1.1 2006/10/20 15:23:58 shannonjr Exp $
+
+--- sm/Makefile.am.orig 2006-10-17 06:49:50.000000000 -0600
++++ sm/Makefile.am
+@@ -22,7 +22,7 @@
+
+ bin_PROGRAMS = gpgsm
+
+-AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS)
++AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS)
+
+ AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl
+ include $(top_srcdir)/am/cmacros.am
diff --git a/security/gnupg-devel/patches/patch-ai b/security/gnupg-devel/patches/patch-ai
new file mode 100644
index 00000000000..e055cd5f259
--- /dev/null
+++ b/security/gnupg-devel/patches/patch-ai
@@ -0,0 +1,12 @@
+$NetBSD: patch-ai,v 1.1 2006/10/20 15:23:58 shannonjr Exp $
+
+--- agent/agent.h.orig 2006-10-20 05:31:35.000000000 -0600
++++ agent/agent.h
+@@ -205,6 +205,7 @@ int agent_key_available (const unsigned
+ void initialize_module_query (void);
+ void agent_query_dump_state (void);
+ void agent_reset_query (ctrl_t ctrl);
++int pinentry_active_p (ctrl_t ctrl, int waitseconds);
+ int agent_askpin (ctrl_t ctrl,
+ const char *desc_text, const char *prompt_text,
+ const char *inital_errtext,
diff --git a/security/gnupg-devel/patches/patch-aj b/security/gnupg-devel/patches/patch-aj
new file mode 100644
index 00000000000..5ae7384431d
--- /dev/null
+++ b/security/gnupg-devel/patches/patch-aj
@@ -0,0 +1,45 @@
+$NetBSD: patch-aj,v 1.1 2006/10/20 15:23:58 shannonjr Exp $
+
+--- agent/call-pinentry.c.orig 2006-10-20 05:32:59.000000000 -0600
++++ agent/call-pinentry.c
+@@ -300,6 +300,40 @@ start_pinentry (ctrl_t ctrl)
+ return 0;
+ }
+
++/* Returns True is the pinentry is currently active. If WAITSECONDS is
++ greater than zero the function will wait for this many seconds
++ before returning. */
++int
++pinentry_active_p (ctrl_t ctrl, int waitseconds)
++{
++ if (waitseconds > 0)
++ {
++ pth_event_t evt;
++ int rc;
++
++ evt = pth_event (PTH_EVENT_TIME, pth_timeout (waitseconds, 0));
++ if (!pth_mutex_acquire (&entry_lock, 0, evt))
++ {
++ if (pth_event_occurred (evt))
++ rc = gpg_error (GPG_ERR_TIMEOUT);
++ else
++ rc = gpg_error (GPG_ERR_INTERNAL);
++ pth_event_free (evt, PTH_FREE_THIS);
++ return rc;
++ }
++ pth_event_free (evt, PTH_FREE_THIS);
++ }
++ else
++ {
++ if (!pth_mutex_acquire (&entry_lock, 1, NULL))
++ return gpg_error (GPG_ERR_LOCKED);
++ }
++
++ if (!pth_mutex_release (&entry_lock))
++ log_error ("failed to release the entry lock at %d\n", __LINE__);
++ return 0;
++}
++
+
+ static int
+ getpin_cb (void *opaque, const void *buffer, size_t length)