From 66fd103fac58b0efdc6a2103101f097a93d4160e Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 9 Oct 2020 00:59:42 +0000 Subject: [PATCH] Bump mail/opendkim to 2.11.0-Beta2 --- mail/opendkim/Makefile | 12 +- mail/opendkim/distinfo | 15 +-- mail/opendkim/patches/patch-configure.ac | 68 +++------- .../patches/patch-libopendkim_dkim-dns.c | 92 ++++++++++++++ .../patches/patch-libopendkim_dkim-dns.h | 14 +++ mail/opendkim/patches/patch-librbl_rbl.c | 116 ++++++++++++++++++ .../patches/patch-opendkim_opendkim-crypto.c | 34 ----- 7 files changed, 253 insertions(+), 98 deletions(-) create mode 100644 mail/opendkim/patches/patch-libopendkim_dkim-dns.c create mode 100644 mail/opendkim/patches/patch-libopendkim_dkim-dns.h create mode 100644 mail/opendkim/patches/patch-librbl_rbl.c delete mode 100644 mail/opendkim/patches/patch-opendkim_opendkim-crypto.c diff --git a/mail/opendkim/Makefile b/mail/opendkim/Makefile index a7a48bf4e57d..67f2eeb9be75 100644 --- a/mail/opendkim/Makefile +++ b/mail/opendkim/Makefile @@ -1,12 +1,14 @@ # $NetBSD: Makefile,v 1.35 2021/05/24 19:52:43 wiz Exp $ -DISTNAME= opendkim-2.10.3 -PKGREVISION= 8 +GITHUB_PROJECT= OpenDKIM +GITHUB_TAG= 2.11.0-Beta2 +DISTNAME= ${GITHUB_PROJECT}-${GITHUB_TAG} +PKGNAME= opendkim-2.11.0b2 CATEGORIES= mail -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=opendkim/} +MASTER_SITES= ${MASTER_SITE_GITHUB:=trusteddomainproject/} MAINTAINER= pettai@NetBSD.org -HOMEPAGE= http://opendkim.org/ +HOMEPAGE= http://www.trusteddomain.org/ COMMENT= Open source DKIM library, MTA filter implementation and tools LICENSE= sendmail-open-source-license @@ -16,6 +18,8 @@ USE_TOOLS+= pkg-config perl:run GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} +LIBS.SunOS+= -lnsl + REPLACE_PERL+= opendkim/opendkim-genkey.in FILES_SUBST+= DKIM_USER=${DKIM_USER} DKIM_GROUP=${DKIM_GROUP} diff --git a/mail/opendkim/distinfo b/mail/opendkim/distinfo index e158d27838b5..af5b0cf2be01 100644 --- a/mail/opendkim/distinfo +++ b/mail/opendkim/distinfo @@ -1,9 +1,10 @@ $NetBSD: distinfo,v 1.21 2021/03/19 09:50:21 manu Exp $ -SHA1 (opendkim-2.10.3.tar.gz) = 4e9b966860bcfbca6441ed84a95bbe762fff69f4 -RMD160 (opendkim-2.10.3.tar.gz) = c6553757ae9675434e647f3cc1e6357bc60c7d2a -SHA512 (opendkim-2.10.3.tar.gz) = 97923e533d072c07ae4d16a46cbed95ee799aa50f19468d8bc6d1dc534025a8616c3b4b68b5842bc899b509349a2c9a67312d574a726b048c0ea46dd4fcc45d8 -Size (opendkim-2.10.3.tar.gz) = 1210224 bytes -SHA1 (patch-configure.ac) = c9ae182ed2c5c2ec3018fe4c6066ed7fa0d3686f -SHA1 (patch-libopendkim_dkim-canon.c) = 82dc322f86981feddc2ad0100b33ce1eca7435d6 -SHA1 (patch-opendkim_opendkim-crypto.c) = d7d08fda3dba5bf9cb834123218b1e89b78878e5 +SHA1 (OpenDKIM-2.11.0-Beta2.tar.gz) = dc511f3faa7efd598a122e4ec297b904e0fd6299 +RMD160 (OpenDKIM-2.11.0-Beta2.tar.gz) = 0402b03481a6958d56e8bedbf418c3d102ba1734 +SHA512 (OpenDKIM-2.11.0-Beta2.tar.gz) = 6574755db70b4959a9d6f9f854a889f3905057b8563690571a3a13b6215658b9c5ea365fa34316208c71561eefd9bdcacbccea420557d5a76a7744e98f095980 +Size (OpenDKIM-2.11.0-Beta2.tar.gz) = 792991 bytes +SHA1 (patch-configure.ac) = 424652ad2900f80ff50c67e35bddbf6b77797ae6 +SHA1 (patch-libopendkim_dkim-dns.c) = 93cae38341b30e381253afd15b10440e611ebe0c +SHA1 (patch-libopendkim_dkim-dns.h) = d720cdcadc54b13a7be4fe13f06d1c6567da7e3e +SHA1 (patch-librbl_rbl.c) = c50029d01fa5c7acdbda14614ee129e73ee61e6e diff --git a/mail/opendkim/patches/patch-configure.ac b/mail/opendkim/patches/patch-configure.ac index 621125969196..d50df7059959 100644 --- a/mail/opendkim/patches/patch-configure.ac +++ b/mail/opendkim/patches/patch-configure.ac @@ -1,59 +1,21 @@ $NetBSD: patch-configure.ac,v 1.2 2020/01/07 13:35:13 sborrill Exp $ -- compat for OpenSSL 1.1 https://sourceforge.net/p/opendkim/patches/37/ -- fix == bashism +- https://github.com/trusteddomainproject/OpenDKIM/pull/99 +- https://github.com/trusteddomainproject/OpenDKIM/pull/34 ---- configure.ac.orig 2015-05-12 19:43:09.000000000 +0100 -+++ configure.ac 2020-01-07 13:30:01.000000000 +0000 -@@ -860,26 +860,28 @@ - AC_SEARCH_LIBS([ERR_peek_error], [crypto], , - AC_MSG_ERROR([libcrypto not found])) - -- AC_SEARCH_LIBS([SSL_library_init], [ssl], , -- [ -- if test x"$enable_shared" = x"yes" -- then -- AC_MSG_ERROR([Cannot build shared opendkim -- against static openssl libraries. -- Configure with --disable-shared -- to get this working or obtain a -- shared libssl library for -- opendkim to use.]) -- fi - -- # avoid caching issue - last result of SSL_library_init -- # shouldn't be cached for this next check -- unset ac_cv_search_SSL_library_init -- LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" -- AC_SEARCH_LIBS([SSL_library_init], [ssl], , -- AC_MSG_ERROR([libssl not found]), [-ldl]) -- ] -- ) -+ AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM([[#include ]], -+ [[SSL_library_init();]])], -+ [od_have_ossl="yes";], -+ [od_have_ossl="no";]) -+ if test x"$od_have_ossl" = x"no" -+ then -+ if test x"$enable_shared" = x"yes" -+ then -+ AC_MSG_ERROR([Cannot build shared opendkim -+ against static openssl libraries. -+ Configure with --disable-shared -+ to get this working or obtain a -+ shared libssl library for -+ opendkim to use.]) -+ fi -+ -+ LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" -+ AC_SEARCH_LIBS([SSL_library_init], [ssl], , -+ AC_MSG_ERROR([libssl not found]), [-ldl]) -+ fi - - AC_CHECK_DECL([SHA256_DIGEST_LENGTH], - AC_DEFINE([HAVE_SHA256], 1, -@@ -2184,7 +2186,7 @@ +--- configure.ac.orig 2018-11-15 00:47:38.000000000 +0000 ++++ configure.ac +@@ -125,9 +125,6 @@ AC_SEARCH_LIBS(res_ninit, resolv, + AC_DEFINE(HAVE_RES_NINIT, 1, + [Define to 1 if you have the `res_ninit()' function.])) + m4_rename_force([saved_AC_LANG_CALL], [AC_LANG_CALL]) +-AC_SEARCH_LIBS(res_setservers, resolv bind, +- AC_DEFINE(HAVE_RES_SETSERVERS, 1, +- [Define to 1 if you have the `res_setservers()' function.])) + AC_SEARCH_LIBS(getopt_long, iberty, + AC_DEFINE(HAVE_GETOPT_LONG, 1, + [Define to 1 if you have the `getopt_long()' function.])) +@@ -2209,7 +2206,7 @@ then AC_MSG_ERROR([reputation requires libjansson]) fi diff --git a/mail/opendkim/patches/patch-libopendkim_dkim-dns.c b/mail/opendkim/patches/patch-libopendkim_dkim-dns.c new file mode 100644 index 000000000000..fd9147179749 --- /dev/null +++ b/mail/opendkim/patches/patch-libopendkim_dkim-dns.c @@ -0,0 +1,92 @@ +$NetBSD$ + +- https://github.com/trusteddomainproject/OpenDKIM/pull/99 + +--- libopendkim/dkim-dns.c.orig 2020-10-09 02:30:56.209138165 +0000 ++++ libopendkim/dkim-dns.c +@@ -247,85 +247,3 @@ dkim_res_waitreply(void *srv, void *qh, + + return DKIM_DNS_SUCCESS; + } +- +-/* +-** DKIM_RES_SETNS -- set nameserver list +-** +-** Parameters: +-** srv -- service handle +-** nslist -- nameserver list, as a string +-** +-** Return value: +-** DKIM_DNS_SUCCESS -- success +-** DKIM_DNS_ERROR -- error +-*/ +- +-int +-dkim_res_nslist(void *srv, const char *nslist) +-{ +-#ifdef HAVE_RES_SETSERVERS +- int nscount = 0; +- char *tmp; +- char *ns; +- char *last = NULL; +- struct sockaddr_in in; +-# ifdef AF_INET6 +- struct sockaddr_in6 in6; +-# endif /* AF_INET6 */ +- struct state *res; +- res_sockaddr_union nses[MAXNS]; +- +- assert(srv != NULL); +- assert(nslist != NULL); +- +- memset(nses, '\0', sizeof nses); +- +- tmp = strdup(nslist); +- if (tmp == NULL) +- return DKIM_DNS_ERROR; +- +- for (ns = strtok_r(tmp, ",", &last); +- ns != NULL && nscount < MAXNS; +- ns = strtok_r(NULL, ",", &last) +- { +- memset(&in, '\0', sizeof in); +-# ifdef AF_INET6 +- memset(&in6, '\0', sizeof in6); +-# endif /* AF_INET6 */ +- +- if (inet_pton(AF_INET, ns, (struct in_addr *) &in.sin_addr, +- sizeof in.sin_addr) == 1) +- { +- in.sin_family= AF_INET; +- in.sin_port = htons(DNSPORT); +- memcpy(&nses[nscount].sin, &in, +- sizeof nses[nscount].sin); +- nscount++; +- } +-# ifdef AF_INET6 +- else if (inet_pton(AF_INET6, ns, +- (struct in6_addr *) &in6.sin6_addr, +- sizeof in6.sin6_addr) == 1) +- { +- in6.sin6_family= AF_INET6; +- in6.sin6_port = htons(DNSPORT); +- memcpy(&nses[nscount].sin6, &in6, +- sizeof nses[nscount].sin6); +- nscount++; +- } +-# endif /* AF_INET6 */ +- else +- { +- free(tmp); +- return DKIM_DNS_ERROR; +- } +- } +- +- res = srv; +- res_setservers(res, nses, nscount); +- +- free(tmp); +-#endif /* HAVE_RES_SETSERVERS */ +- +- return DKIM_DNS_SUCCESS; +-} diff --git a/mail/opendkim/patches/patch-libopendkim_dkim-dns.h b/mail/opendkim/patches/patch-libopendkim_dkim-dns.h new file mode 100644 index 000000000000..b786cc9d8ca9 --- /dev/null +++ b/mail/opendkim/patches/patch-libopendkim_dkim-dns.h @@ -0,0 +1,14 @@ +$NetBSD$ + +- https://github.com/trusteddomainproject/OpenDKIM/pull/99 + +--- libopendkim/dkim-dns.h.orig 2020-10-09 02:33:21.947346707 +0000 ++++ libopendkim/dkim-dns.h +@@ -13,7 +13,6 @@ + extern int dkim_res_cancel __P((void *, void *)); + extern void dkim_res_close __P((void *)); + extern int dkim_res_init __P((void **)); +-extern int dkim_res_nslist __P((void *, const char *)); + extern int dkim_res_query __P((void *, int, unsigned char *, unsigned char *, + size_t, void **)); + extern int dkim_res_waitreply __P((void *, void *, struct timeval *, diff --git a/mail/opendkim/patches/patch-librbl_rbl.c b/mail/opendkim/patches/patch-librbl_rbl.c new file mode 100644 index 000000000000..75cb48c6022f --- /dev/null +++ b/mail/opendkim/patches/patch-librbl_rbl.c @@ -0,0 +1,116 @@ +$NetBSD$ + +- https://github.com/trusteddomainproject/OpenDKIM/pull/99 + +--- librbl/rbl.c.orig 2020-10-09 02:35:12.584361423 +0000 ++++ librbl/rbl.c +@@ -235,87 +235,6 @@ rbl_res_waitreply(void *srv, void *qh, s + } + + /* +-** RBL_RES_SETNS -- set nameserver list +-** +-** Parameters: +-** srv -- service handle +-** nslist -- nameserver list, as a string +-** +-** Return value: +-** 0 -- success +-** !0 -- error +-*/ +- +-int +-rbl_res_nslist(void *srv, const char *nslist) +-{ +-#ifdef HAVE_RES_SETSERVERS +- int nscount = 0; +- char *tmp; +- char *ns; +- char *last = NULL; +- struct sockaddr_in in; +-# ifdef AF_INET6 +- struct sockaddr_in6 in6; +-# endif /* AF_INET6 */ +- struct state *res; +- res_sockaddr_union nses[MAXNS]; +- +- assert(srv != NULL); +- assert(nslist != NULL); +- +- memset(nses, '\0', sizeof nses); +- +- tmp = strdup(nslist); +- if (tmp == NULL) +- return -1; +- +- for (ns = strtok_r(tmp, ",", &last); +- ns != NULL && nscount < MAXNS; +- ns = strtok_r(NULL, ",", &last) +- { +- memset(&in, '\0', sizeof in); +-# ifdef AF_INET6 +- memset(&in6, '\0', sizeof in6); +-# endif /* AF_INET6 */ +- +- if (inet_pton(AF_INET, ns, (struct in_addr *) &in.sin_addr, +- sizeof in.sin_addr) == 1) +- { +- in.sin_family= AF_INET; +- in.sin_port = htons(DNSPORT); +- memcpy(&nses[nscount].sin, &in, +- sizeof nses[nscount].sin); +- nscount++; +- } +-# ifdef AF_INET6 +- else if (inet_pton(AF_INET6, ns, +- (struct in6_addr *) &in6.sin6_addr, +- sizeof in6.sin6_addr) == 1) +- { +- in6.sin6_family= AF_INET6; +- in6.sin6_port = htons(DNSPORT); +- memcpy(&nses[nscount].sin6, &in6, +- sizeof nses[nscount].sin6); +- nscount++; +- } +-# endif /* AF_INET6 */ +- else +- { +- free(tmp); +- return -1; +- } +- } +- +- res = srv; +- res_setservers(res, nses, nscount); +- +- free(tmp); +-#endif /* HAVE_RES_SETSERVERS */ +- return 0; +-} +- +-/* + ** RBL_RES_CLOSE -- shut down the resolver + ** + ** Parameters: +@@ -379,7 +298,7 @@ rbl_init(void *(*caller_mallocf)(void *c + new->rbl_dns_start = rbl_res_query; + new->rbl_dns_waitreply = rbl_res_waitreply; + new->rbl_dns_cancel = rbl_res_cancel; +- new->rbl_dns_setns = rbl_res_nslist; ++ new->rbl_dns_setns = NULL; + new->rbl_dns_close = rbl_res_close; + + return new; +@@ -664,11 +583,7 @@ void + rbl_dns_set_nslist(RBL *lib, int (*func)(void *, const char *)) + { + assert(lib != NULL); +- +- if (func != NULL) +- lib->rbl_dns_setns = func; +- else +- lib->rbl_dns_setns = rbl_res_nslist; ++ lib->rbl_dns_setns = func; + } + + /* diff --git a/mail/opendkim/patches/patch-opendkim_opendkim-crypto.c b/mail/opendkim/patches/patch-opendkim_opendkim-crypto.c deleted file mode 100644 index 216efdedcd10..000000000000 --- a/mail/opendkim/patches/patch-opendkim_opendkim-crypto.c +++ /dev/null @@ -1,34 +0,0 @@ -$NetBSD: patch-opendkim_opendkim-crypto.c,v 1.1 2019/11/24 23:20:40 christos Exp $ - -- OpenSSL 1.1 compat https://sourceforge.net/p/opendkim/patches/37/ - ---- opendkim/opendkim-crypto.c.orig 2013-02-25 16:02:41.000000000 -0500 -+++ opendkim/opendkim-crypto.c 2019-11-24 18:04:07.924299914 -0500 -@@ -222,7 +222,11 @@ - { - assert(pthread_setspecific(id_key, ptr) == 0); - -+#if OPENSSL_VERSION_NUMBER >= 0x10100000 -+ OPENSSL_thread_stop(); -+#else - ERR_remove_state(0); -+#endif - - free(ptr); - -@@ -392,11 +396,15 @@ - { - if (crypto_init_done) - { -+#if OPENSSL_VERSION_NUMBER >= 0x10100000 -+ OPENSSL_thread_stop(); -+#else - CRYPTO_cleanup_all_ex_data(); - CONF_modules_free(); - EVP_cleanup(); - ERR_free_strings(); - ERR_remove_state(0); -+#endif - - if (nmutexes > 0) - {