From e7d99498f9ef6efcfe9232f7466050c429c01253 Mon Sep 17 00:00:00 2001 From: edd Date: Fri, 7 Apr 2017 16:21:53 +0000 Subject: [PATCH] Update gnupg2 to 2.1.20. OK pea@ --- security/gnupg2/Makefile | 7 +- security/gnupg2/distinfo | 4 +- .../gnupg2/patches/patch-agent_gpg-agent_c | 97 ------------------- security/gnupg2/patches/patch-common_init_c | 40 -------- .../gnupg2/patches/patch-dirmngr_dirmngr_c | 95 ------------------ security/gnupg2/patches/patch-doc_Makefile_in | 18 ++++ security/gnupg2/patches/patch-scd_scdaemon_c | 43 -------- security/gnupg2/pkg/PLIST | 5 +- 8 files changed, 26 insertions(+), 283 deletions(-) delete mode 100644 security/gnupg2/patches/patch-agent_gpg-agent_c delete mode 100644 security/gnupg2/patches/patch-common_init_c delete mode 100644 security/gnupg2/patches/patch-dirmngr_dirmngr_c create mode 100644 security/gnupg2/patches/patch-doc_Makefile_in delete mode 100644 security/gnupg2/patches/patch-scd_scdaemon_c diff --git a/security/gnupg2/Makefile b/security/gnupg2/Makefile index a79e24eaa94..7328ae77445 100644 --- a/security/gnupg2/Makefile +++ b/security/gnupg2/Makefile @@ -1,9 +1,8 @@ -# $OpenBSD: Makefile,v 1.47 2016/11/18 11:30:53 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.48 2017/04/07 16:21:53 edd Exp $ COMMENT = GNU privacy guard - a free PGP replacement -DISTNAME = gnupg-2.1.15 -REVISION = 2 +DISTNAME = gnupg-2.1.20 CATEGORIES = security MASTER_SITES = ${MASTER_SITE_GNUPG:=gnupg/} @@ -43,8 +42,6 @@ CONFIGURE_ARGS += --disable-ldap RUN_DEPENDS = security/pinentry -# gpg-agent must be installed to run the regress tests -# Make sure you dont have gpg aliased (e.g. to gpg2) when running tests. TEST_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH} PORTHOME=${WRKDIR} diff --git a/security/gnupg2/distinfo b/security/gnupg2/distinfo index 5aa6d762efb..cb9dfbd8fe1 100644 --- a/security/gnupg2/distinfo +++ b/security/gnupg2/distinfo @@ -1,2 +1,2 @@ -SHA256 (gnupg-2.1.15.tar.bz2) = wowaII8bitY722uI0lL2c0/00z3mtU44SUsR1J4A/90= -SIZE (gnupg-2.1.15.tar.bz2) = 5723689 +SHA256 (gnupg-2.1.20.tar.bz2) = JM+aaTab5kqfb4zBGhvjOrd4Ctd6ahuTcZQ49J9plg0= +SIZE (gnupg-2.1.20.tar.bz2) = 6456128 diff --git a/security/gnupg2/patches/patch-agent_gpg-agent_c b/security/gnupg2/patches/patch-agent_gpg-agent_c deleted file mode 100644 index 0635cfabcfe..00000000000 --- a/security/gnupg2/patches/patch-agent_gpg-agent_c +++ /dev/null @@ -1,97 +0,0 @@ -$OpenBSD: patch-agent_gpg-agent_c,v 1.1 2016/11/18 11:30:53 ajacoutot Exp $ - -From eda17649f8bd3b8ce7bfc00a3c11cbcae63c845d Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Tue, 4 Oct 2016 09:01:13 +0900 -Subject: [PATCH] agent, dirmngr, scd: npth_init must be after fork. - -From fc0b392e766af8127094e8b529d25abb84ad1d65 Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Fri, 7 Oct 2016 10:45:22 +0900 -Subject: [PATCH] agent, dirmngr, scd: Fix init_common_subsystems. - ---- agent/gpg-agent.c.orig Fri Nov 18 12:26:38 2016 -+++ agent/gpg-agent.c Fri Nov 18 12:26:33 2016 -@@ -715,7 +715,31 @@ finalize_rereadable_options (void) - } - - -+static void -+thread_init_once (void) -+{ -+ static int npth_initialized = 0; - -+ if (!npth_initialized) -+ { -+ npth_initialized++; -+ npth_init (); -+ } -+ gpgrt_set_syscall_clamp (npth_unprotect, npth_protect); -+} -+ -+static void -+initialize_modules (void) -+{ -+ thread_init_once (); -+ assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH); -+ initialize_module_cache (); -+ initialize_module_call_pinentry (); -+ initialize_module_call_scd (); -+ initialize_module_trustlist (); -+} -+ -+ - /* The main entry point. */ - int - main (int argc, char **argv ) -@@ -762,14 +786,11 @@ main (int argc, char **argv ) - i18n_init (); - init_common_subsystems (&argc, &argv); - -- npth_init (); -- - malloc_hooks.malloc = gcry_malloc; - malloc_hooks.realloc = gcry_realloc; - malloc_hooks.free = gcry_free; - assuan_set_malloc_hooks (&malloc_hooks); - assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT); -- assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH); - assuan_sock_init (); - setup_libassuan_logging (&opt.debug); - -@@ -1051,16 +1072,12 @@ main (int argc, char **argv ) - exit (1); - } - -- initialize_module_cache (); -- initialize_module_call_pinentry (); -- initialize_module_call_scd (); -- initialize_module_trustlist (); -- - /* Try to create missing directories. */ - create_directories (); - - if (debug_wait && pipe_server) - { -+ thread_init_once (); - log_debug ("waiting for debugger - my pid is %u .....\n", - (unsigned int)getpid()); - gnupg_sleep (debug_wait); -@@ -1167,6 +1184,8 @@ main (int argc, char **argv ) - /* This is the simple pipe based server */ - ctrl_t ctrl; - -+ initialize_modules (); -+ - ctrl = xtrycalloc (1, sizeof *ctrl); - if (!ctrl) - { -@@ -1369,6 +1388,8 @@ main (int argc, char **argv ) - /* - This is the child - */ -+ -+ initialize_modules (); - - /* Detach from tty and put process into a new session */ - if (!nodetach ) diff --git a/security/gnupg2/patches/patch-common_init_c b/security/gnupg2/patches/patch-common_init_c deleted file mode 100644 index 9689df864fa..00000000000 --- a/security/gnupg2/patches/patch-common_init_c +++ /dev/null @@ -1,40 +0,0 @@ -$OpenBSD: patch-common_init_c,v 1.1 2016/11/18 11:30:53 ajacoutot Exp $ - -From eda17649f8bd3b8ce7bfc00a3c11cbcae63c845d Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Tue, 4 Oct 2016 09:01:13 +0900 -Subject: [PATCH] agent, dirmngr, scd: npth_init must be after fork. - ---- common/init.c.orig Thu Aug 18 17:00:16 2016 -+++ common/init.c Fri Nov 18 12:26:33 2016 -@@ -29,20 +29,12 @@ - - #include - --#ifdef WITHOUT_NPTH /* Give the Makefile a chance to build without Pth. */ --#undef HAVE_NPTH --#undef USE_NPTH --#endif -- - #ifdef HAVE_W32_SYSTEM - # ifdef HAVE_WINSOCK2_H - # include - # endif - # include - #endif --#ifdef HAVE_NPTH --# include --#endif - #ifdef HAVE_W32CE_SYSTEM - # include /* For _assuan_w32ce_finish_pipe. */ - #endif -@@ -197,9 +189,6 @@ _init_common_subsystems (gpg_err_source_t errsource, i - /* Initialize the Estream library. */ - gpgrt_init (); - gpgrt_set_alloc_func (gcry_realloc); --#ifdef USE_NPTH -- gpgrt_set_syscall_clamp (npth_unprotect, npth_protect); --#endif - - /* Special hack for Windows CE: We extract some options from arg - to setup the standard handles. */ diff --git a/security/gnupg2/patches/patch-dirmngr_dirmngr_c b/security/gnupg2/patches/patch-dirmngr_dirmngr_c deleted file mode 100644 index 2f47f4c13dc..00000000000 --- a/security/gnupg2/patches/patch-dirmngr_dirmngr_c +++ /dev/null @@ -1,95 +0,0 @@ -$OpenBSD: patch-dirmngr_dirmngr_c,v 1.1 2016/11/18 11:30:53 ajacoutot Exp $ - -From eda17649f8bd3b8ce7bfc00a3c11cbcae63c845d Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Tue, 4 Oct 2016 09:01:13 +0900 -Subject: [PATCH] agent, dirmngr, scd: npth_init must be after fork. - -From fc0b392e766af8127094e8b529d25abb84ad1d65 Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Fri, 7 Oct 2016 10:45:22 +0900 -Subject: [PATCH] agent, dirmngr, scd: Fix init_common_subsystems. - ---- dirmngr/dirmngr.c.orig Fri Nov 18 12:26:43 2016 -+++ dirmngr/dirmngr.c Fri Nov 18 12:26:33 2016 -@@ -636,6 +636,23 @@ pid_suffix_callback (unsigned long *r_suffix) - #endif /*!HAVE_W32_SYSTEM*/ - - -+static void -+thread_init (void) -+{ -+ npth_init (); -+ gpgrt_set_syscall_clamp (npth_unprotect, npth_protect); -+ -+ /* Now with NPth running we can set the logging callback. Our -+ windows implementation does not yet feature the NPth TLS -+ functions. */ -+#ifndef HAVE_W32_SYSTEM -+ if (npth_key_create (&my_tlskey_current_fd, NULL) == 0) -+ if (npth_setspecific (my_tlskey_current_fd, NULL) == 0) -+ log_set_pid_suffix_cb (pid_suffix_callback); -+#endif /*!HAVE_W32_SYSTEM*/ -+} -+ -+ - int - main (int argc, char **argv) - { -@@ -669,8 +686,6 @@ main (int argc, char **argv) - i18n_init (); - init_common_subsystems (&argc, &argv); - -- npth_init (); -- - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - - /* Check that the libraries are suitable. Do it here because -@@ -711,15 +726,6 @@ main (int argc, char **argv) - if (shell && strlen (shell) >= 3 && !strcmp (shell+strlen (shell)-3, "csh") ) - csh_style = 1; - -- /* Now with NPth running we can set the logging callback. Our -- windows implementation does not yet feature the NPth TLS -- functions. */ --#ifndef HAVE_W32_SYSTEM -- if (npth_key_create (&my_tlskey_current_fd, NULL) == 0) -- if (npth_setspecific (my_tlskey_current_fd, NULL) == 0) -- log_set_pid_suffix_cb (pid_suffix_callback); --#endif /*!HAVE_W32_SYSTEM*/ -- - /* Reset rereadable options to default values. */ - parse_rereadable_options (NULL, 0); - -@@ -970,6 +976,7 @@ main (int argc, char **argv) - ldap_wrapper_launch_thread (); - #endif /*USE_LDAP*/ - -+ thread_init (); - cert_cache_init (); - crl_cache_init (); - start_command_handler (ASSUAN_INVALID_FD); -@@ -1168,6 +1175,7 @@ main (int argc, char **argv) - ldap_wrapper_launch_thread (); - #endif /*USE_LDAP*/ - -+ thread_init (); - cert_cache_init (); - crl_cache_init (); - handle_connections (fd); -@@ -1195,6 +1203,7 @@ main (int argc, char **argv) - #if USE_LDAP - ldap_wrapper_launch_thread (); - #endif /*USE_LDAP*/ -+ thread_init (); - cert_cache_init (); - crl_cache_init (); - if (!argc) -@@ -1220,6 +1229,7 @@ main (int argc, char **argv) - #if USE_LDAP - ldap_wrapper_launch_thread (); - #endif /*USE_LDAP*/ -+ thread_init (); - cert_cache_init (); - crl_cache_init (); - rc = crl_fetch (&ctrlbuf, argv[0], &reader); diff --git a/security/gnupg2/patches/patch-doc_Makefile_in b/security/gnupg2/patches/patch-doc_Makefile_in new file mode 100644 index 00000000000..7e25d26b9a7 --- /dev/null +++ b/security/gnupg2/patches/patch-doc_Makefile_in @@ -0,0 +1,18 @@ +$OpenBSD: patch-doc_Makefile_in,v 1.1 2017/04/07 16:21:53 edd Exp $ +--- doc/Makefile.in.orig Thu Apr 6 09:49:58 2017 ++++ doc/Makefile.in Thu Apr 6 09:50:22 2017 +@@ -461,14 +461,6 @@ libcommontls = ../common/libcommontls.a + libcommontlsnpth = ../common/libcommontlsnpth.a + examples = examples/README examples/scd-event examples/trustlist.txt \ + examples/vsnfd.prf examples/debug.prf \ +- examples/systemd-user/README \ +- examples/systemd-user/dirmngr.service \ +- examples/systemd-user/dirmngr.socket \ +- examples/systemd-user/gpg-agent.service \ +- examples/systemd-user/gpg-agent.socket \ +- examples/systemd-user/gpg-agent-ssh.socket \ +- examples/systemd-user/gpg-agent-browser.socket \ +- examples/systemd-user/gpg-agent-extra.socket \ + examples/gpgconf.conf examples/pwpattern.list + + helpfiles = help.txt help.be.txt help.ca.txt help.cs.txt \ diff --git a/security/gnupg2/patches/patch-scd_scdaemon_c b/security/gnupg2/patches/patch-scd_scdaemon_c deleted file mode 100644 index f69c4f370c9..00000000000 --- a/security/gnupg2/patches/patch-scd_scdaemon_c +++ /dev/null @@ -1,43 +0,0 @@ -$OpenBSD: patch-scd_scdaemon_c,v 1.1 2016/11/18 11:30:53 ajacoutot Exp $ - -From eda17649f8bd3b8ce7bfc00a3c11cbcae63c845d Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Tue, 4 Oct 2016 09:01:13 +0900 -Subject: [PATCH] agent, dirmngr, scd: npth_init must be after fork. - -From fc0b392e766af8127094e8b529d25abb84ad1d65 Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Fri, 7 Oct 2016 10:45:22 +0900 -Subject: [PATCH] agent, dirmngr, scd: Fix init_common_subsystems. - ---- scd/scdaemon.c.orig Fri Nov 18 12:26:40 2016 -+++ scd/scdaemon.c Fri Nov 18 12:26:33 2016 -@@ -422,8 +422,6 @@ main (int argc, char **argv ) - i18n_init (); - init_common_subsystems (&argc, &argv); - -- npth_init (); -- - ksba_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free); - - malloc_hooks.malloc = gcry_malloc; -@@ -724,6 +722,9 @@ main (int argc, char **argv ) - } - #endif - -+ npth_init (); -+ gpgrt_set_syscall_clamp (npth_unprotect, npth_protect); -+ - /* If --debug-allow-core-dump has been given we also need to - switch the working directory to a place where we can actually - write. */ -@@ -860,6 +861,9 @@ main (int argc, char **argv ) - } /* end parent */ - - /* This is the child. */ -+ -+ npth_init (); -+ gpgrt_set_syscall_clamp (npth_unprotect, npth_protect); - - /* Detach from tty and put process into a new session. */ - if (!nodetach ) diff --git a/security/gnupg2/pkg/PLIST b/security/gnupg2/pkg/PLIST index 186c29d539c..343b8c7ad95 100644 --- a/security/gnupg2/pkg/PLIST +++ b/security/gnupg2/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.15 2016/09/19 17:09:37 edd Exp $ +@comment $OpenBSD: PLIST,v 1.16 2017/04/07 16:21:53 edd Exp $ @option no-default-conflict @option is-branch @conflict gnupg->=2 @@ -19,6 +19,7 @@ @bin libexec/gpg-check-pattern @bin libexec/gpg-preset-passphrase @bin libexec/gpg-protect-tool +@bin libexec/gpg-wks-client @bin libexec/scdaemon @man man/man1/dirmngr-client.1 @man man/man1/gpg-agent.1 @@ -49,10 +50,12 @@ share/doc/gnupg2/README share/doc/gnupg2/TRANSLATE share/doc/gnupg2/examples/ share/doc/gnupg2/examples/README +share/doc/gnupg2/examples/debug.prf share/doc/gnupg2/examples/gpgconf.conf share/doc/gnupg2/examples/pwpattern.list share/doc/gnupg2/examples/scd-event share/doc/gnupg2/examples/trustlist.txt +share/doc/gnupg2/examples/vsnfd.prf share/doc/pkg-readmes/${FULLPKGNAME} share/gnupg/ share/gnupg/dirmngr-conf.skel