Skip to content

Commit

Permalink
Bump mail/opendkim to 2.11.0-Beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
rhansen committed Oct 9, 2020
1 parent 409eb91 commit fdee0bd
Show file tree
Hide file tree
Showing 7 changed files with 253 additions and 97 deletions.
12 changes: 8 additions & 4 deletions mail/opendkim/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# $NetBSD: Makefile,v 1.33 2020/08/31 18:09:58 wiz Exp $

DISTNAME= opendkim-2.10.3
PKGREVISION= 6
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

Expand All @@ -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}
Expand Down
14 changes: 8 additions & 6 deletions mail/opendkim/distinfo
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
$NetBSD: distinfo,v 1.20 2020/01/07 13:35:13 sborrill 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-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
68 changes: 15 additions & 53 deletions mail/opendkim/patches/patch-configure.ac
Original file line number Diff line number Diff line change
@@ -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 <openssl/ssl.h>]],
+ [[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

Expand Down
92 changes: 92 additions & 0 deletions mail/opendkim/patches/patch-libopendkim_dkim-dns.c
Original file line number Diff line number Diff line change
@@ -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;
-}
14 changes: 14 additions & 0 deletions mail/opendkim/patches/patch-libopendkim_dkim-dns.h
Original file line number Diff line number Diff line change
@@ -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 *,
116 changes: 116 additions & 0 deletions mail/opendkim/patches/patch-librbl_rbl.c
Original file line number Diff line number Diff line change
@@ -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;
}

/*
34 changes: 0 additions & 34 deletions mail/opendkim/patches/patch-opendkim_opendkim-crypto.c

This file was deleted.

0 comments on commit fdee0bd

Please sign in to comment.