git: 142c06a26e0f - main - security/gnupg: Update to 2.3.8

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Sun, 06 Nov 2022 10:48:44 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=142c06a26e0fb9293c1614890a1bb5fe04072240

commit 142c06a26e0fb9293c1614890a1bb5fe04072240
Author:     Herbert J. Skuhra <herbert@gojira.at>
AuthorDate: 2022-11-06 08:26:36 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2022-11-06 10:46:51 +0000

    security/gnupg: Update to 2.3.8
    
    Changelog:
    https://lists.gnupg.org/pipermail/gnupg-announce/2022q4/000476.html
    
    Some additional changes to submitted patch:
    - Change PORTVERSION to DISTVERSION
    - Generate patch using "make makepatch"
    - Remove obsolete configure switch
    
    PR:             267152
    Reviewed by:    adridg (maintainer)
    Tested by:      Dennis Clarke <dclarke@blastwave.org>
---
 security/gnupg/Makefile                         |  5 ++---
 security/gnupg/distinfo                         |  6 ++---
 security/gnupg/files/patch-common_homedir.c     | 30 -------------------------
 security/gnupg/files/patch-dirmngr_server.c     | 13 +++++++++++
 security/gnupg/files/patch-tools_gpgconf-comp.c | 11 ---------
 security/gnupg/pkg-plist                        |  2 ++
 6 files changed, 20 insertions(+), 47 deletions(-)

diff --git a/security/gnupg/Makefile b/security/gnupg/Makefile
index aa6a5cc5a695..6860156fa8ac 100644
--- a/security/gnupg/Makefile
+++ b/security/gnupg/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	gnupg
-PORTVERSION=	2.3.3
-PORTREVISION=	3
+DISTVERSION=	2.3.8
 CATEGORIES=	security
 MASTER_SITES=	GNUPG
 
@@ -25,7 +24,7 @@ USES=		compiler:c11 cpe gmake iconv makeinfo pkgconfig readline sqlite tar:bzip2
 CONFLICTS=	dirmngr
 CPE_VENDOR=	gnupg
 
-CONFIGURE_ARGS=	--disable-ntbtls --enable-gpg-is-gpg2 --enable-symcryptrun
+CONFIGURE_ARGS=	--disable-ntbtls --enable-gpg-is-gpg2
 GNU_CONFIGURE=	yes
 INFO=		gnupg
 TEST_TARGET=	check
diff --git a/security/gnupg/distinfo b/security/gnupg/distinfo
index 62baae4167de..72aa673c8552 100644
--- a/security/gnupg/distinfo
+++ b/security/gnupg/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1634135268
-SHA256 (gnupg-2.3.3.tar.bz2) = 5789b86da6a1a6752efb38598f16a77af51170a8494039c3842b085032e8e937
-SIZE (gnupg-2.3.3.tar.bz2) = 7590874
+TIMESTAMP = 1666020426
+SHA256 (gnupg-2.3.8.tar.bz2) = 540b7a40e57da261fb10ef521a282e0021532a80fd023e75fb71757e8a4969ed
+SIZE (gnupg-2.3.8.tar.bz2) = 7644926
diff --git a/security/gnupg/files/patch-common_homedir.c b/security/gnupg/files/patch-common_homedir.c
deleted file mode 100644
index c383ef03b1d5..000000000000
--- a/security/gnupg/files/patch-common_homedir.c
+++ /dev/null
@@ -1,30 +0,0 @@
---- common/homedir.c.orig	2021-10-01 12:44:06 UTC
-+++ common/homedir.c
-@@ -68,7 +68,9 @@
-  * text was read.  */
- #if __linux__
- # define MYPROC_SELF_EXE "/proc/self/exe"
--#else /* Assume *BSD*/
-+#elif defined(__NetBSD__)
-+# define MYPROC_SELF_EXE "/proc/curproc/exe"
-+#else /* Assume other BSDs */
- # define MYPROC_SELF_EXE "/proc/curproc/file"
- #endif
- 
-@@ -495,13 +497,13 @@ unix_rootdir (int want_sysconfdir)
-           if (nread < 0)
-             {
-               err = gpg_error_from_syserror ();
--              log_info ("error reading symlink '%s': %s\n",
--                        MYPROC_SELF_EXE, gpg_strerror (err));
-               buffer[0] = 0;
-               if ((name = getenv ("GNUPG_BUILD_ROOT")) && *name == '/')
-                 {
-                   /* Try a fallback for systems w/o a supported /proc
--                   * file system.  */
-+                   * file system if we are running a regression test.  */
-+                  log_info ("error reading symlink '%s': %s\n",
-+                            MYPROC_SELF_EXE, gpg_strerror (err));
-                   xfree  (buffer);
-                   buffer = xstrconcat (name, "/bin/gpgconf", NULL);
-                   log_info ("trying fallback '%s'\n", buffer);
diff --git a/security/gnupg/files/patch-dirmngr_server.c b/security/gnupg/files/patch-dirmngr_server.c
new file mode 100644
index 000000000000..3a20a36994a1
--- /dev/null
+++ b/security/gnupg/files/patch-dirmngr_server.c
@@ -0,0 +1,13 @@
+--- dirmngr/server.c.orig	2022-10-07 13:23:50 UTC
++++ dirmngr/server.c
+@@ -3137,8 +3137,10 @@ start_command_handler (assuan_fd_t fd, unsigned int se
+                ctrl->refcount);
+   else
+     {
++#if USE_LDAP
+       ks_ldap_free_state (ctrl->ks_get_state);
+       ctrl->ks_get_state = NULL;
++#endif /*USE_LDAP*/
+       release_ctrl_ocsp_certs (ctrl);
+       xfree (ctrl->server_local);
+       dirmngr_deinit_default_ctrl (ctrl);
diff --git a/security/gnupg/files/patch-tools_gpgconf-comp.c b/security/gnupg/files/patch-tools_gpgconf-comp.c
deleted file mode 100644
index d2b0244aa335..000000000000
--- a/security/gnupg/files/patch-tools_gpgconf-comp.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- tools/gpgconf-comp.c.orig	2021-10-10 16:28:51 UTC
-+++ tools/gpgconf-comp.c
-@@ -676,6 +676,8 @@ static struct
-    { TPM2DAEMON_NAME, TPM2DAEMON_DISP_NAME, "gnupg", N_("TPM"),
-      GNUPG_MODULE_NAME_TPM2DAEMON, TPM2DAEMON_NAME ".conf",
-      known_options_tpm2daemon, NULL, tpm2daemon_runtime_change},
-+#else
-+     { NULL }, /* Another dummy, to keep the enum in sync with this table */
- #endif
- 
-    { DIRMNGR_NAME, DIRMNGR_DISP_NAME, "gnupg",   N_("Network"),
diff --git a/security/gnupg/pkg-plist b/security/gnupg/pkg-plist
index 0b9ff4870b66..33becc416461 100644
--- a/security/gnupg/pkg-plist
+++ b/security/gnupg/pkg-plist
@@ -17,6 +17,7 @@ bin/gpgv2
 bin/kbxutil
 bin/watchgnupg
 %%DIRMNGRLDAP%%libexec/dirmngr_ldap
+libexec/gpg-auth
 libexec/gpg-check-pattern
 libexec/gpg-pair-tool
 libexec/gpg-preset-passphrase
@@ -60,6 +61,7 @@ sbin/applygnupgdefaults
 %%PORTDOCS%%%%DOCSDIR%%/examples/common.conf
 %%PORTDOCS%%%%DOCSDIR%%/examples/debug.prf
 %%PORTDOCS%%%%DOCSDIR%%/examples/gpgconf.conf
+%%PORTDOCS%%%%DOCSDIR%%/examples/gpgconf.rnames
 %%PORTDOCS%%%%DOCSDIR%%/examples/pwpattern.list
 %%PORTDOCS%%%%DOCSDIR%%/examples/qualified.txt
 %%PORTDOCS%%%%DOCSDIR%%/examples/scd-event