diff --git a/security/gnupg/Makefile b/security/gnupg/Makefile index 043ffd5aded4..f95068570253 100644 --- a/security/gnupg/Makefile +++ b/security/gnupg/Makefile @@ -1,82 +1,82 @@ PORTNAME= gnupg PORTVERSION= 2.3.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= GNUPG MAINTAINER= adridg@FreeBSD.org COMMENT= Complete and free PGP implementation LICENSE= GPLv3 LGPL3 LICENSE_COMB= multi LICENSE_FILE_GPLv3= ${WRKSRC}/COPYING LICENSE_FILE_LGPL3= ${WRKSRC}/COPYING.LGPL3 LIB_DEPENDS= libassuan.so:security/libassuan \ libgcrypt.so:security/libgcrypt \ libgpg-error.so:security/libgpg-error \ libksba.so:security/libksba \ libnpth.so:devel/npth RUN_DEPENDS= pinentry:security/pinentry USES= compiler:c11 cpe gmake iconv makeinfo pkgconfig readline sqlite tar:bzip2 CONFLICTS= gnupg-2.0.* dirmngr CPE_VENDOR= gnupg CONFIGURE_ARGS= --disable-ntbtls --enable-gpg-is-gpg2 --enable-symcryptrun GNU_CONFIGURE= yes INFO= gnupg TEST_TARGET= check TEST_ARGS= TESTARGS=--parallel SUB_FILES= pkg-message OPTIONS_DEFINE= DOCS GNUTLS LARGE_RSA LDAP NLS SCDAEMON SUID_GPG WKS_SERVER OPTIONS_DEFAULT=GNUTLS SCDAEMON WKS_SERVER OPTIONS_SUB= yes LARGE_RSA_DESC= Enable support for 8192-bit RSA keys LDAP_DESC= LDAP keyserver interface SCDAEMON_DESC= Enable Smartcard daemon (with libusb) SUID_GPG_DESC= Install GPG as SUID root WKS_SERVER_DESC=Install the Web Key Service server GNUTLS_CONFIGURE_ENABLE=gnutls GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls LARGE_RSA_CONFIGURE_ENABLE= large-secmem LDAP_CONFIGURE_WITH= ldap=${LOCALBASE} LDAP_LIBS= -L${LOCALBASE}/lib LDAP_USE= OPENLDAP=yes NLS_CONFIGURE_ENABLE= nls NLS_USES= gettext SCDAEMON_CONFIGURE_ENABLE= scdaemon WKS_SERVER_CONFIGURE_ENABLE= wks-tools .include .if ${PORT_OPTIONS:MGNUTLS} && ${PORT_OPTIONS:MLDAP} PLIST_SUB+= DIRMNGRLDAP="" .else PLIST_SUB+= DIRMNGRLDAP="@comment " .endif # Touch the texinfo files to force makeinfo to run. This fixes Linuxisms in # the paths in the man pages. pre-build: ${TOUCH} ${WRKSRC}/doc/*.texi post-install: ${MV} ${STAGEDIR}${PREFIX}/bin/gpgsplit ${STAGEDIR}${PREFIX}/bin/gpgsplit2 ${MV} ${STAGEDIR}${DATADIR}/help*.txt ${STAGEDIR}${DOCSDIR} # Necessary because of --enable-gpg-is-gpg2 pre-test: ${LN} -s gpg ${WRKSRC}/bin/gpg2 .include diff --git a/security/gnupg/files/patch-common_homedir.c b/security/gnupg/files/patch-common_homedir.c index 619818f4ab54..c383ef03b1d5 100644 --- a/security/gnupg/files/patch-common_homedir.c +++ b/security/gnupg/files/patch-common_homedir.c @@ -1,30 +1,30 @@ ---- common/homedir.c.orig 2021-10-01 12:44:06.000000000 +0000 -+++ common/homedir.c 2021-10-26 08:14:01.320259000 +0000 +--- 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 @@ +@@ -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-tools_gpgconf-comp.c b/security/gnupg/files/patch-tools_gpgconf-comp.c new file mode 100644 index 000000000000..d2b0244aa335 --- /dev/null +++ b/security/gnupg/files/patch-tools_gpgconf-comp.c @@ -0,0 +1,11 @@ +--- 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"),