diff --git a/mail/opendkim-devel/Makefile b/mail/opendkim-devel/Makefile index 98e4dabd7050..5d79a28edb39 100644 --- a/mail/opendkim-devel/Makefile +++ b/mail/opendkim-devel/Makefile @@ -1,230 +1,223 @@ PORTNAME= opendkim DISTVERSIONPREFIX= rel-opendkim- -DISTVERSION= 2.11.0-Beta2-48 -DISTVERSIONSUFFIX= -g551ab382 -PORTREVISION= 3 +DISTVERSION= 2.11.0-Beta2-49 +DISTVERSIONSUFFIX= -g1c7a9f47c CATEGORIES= mail security PKGNAMESUFFIX= -devel MAINTAINER= ports@FreeBSD.org COMMENT= DKIM library and milter implementation WWW= http://opendkim.org/ LICENSE= BSD3CLAUSE SENDMAIL LICENSE_COMB= multi LICENSE_GROUPS_SENDMAIL= FSF OSI LICENSE_NAME_SENDMAIL= Sendmail Open Source License LICENSE_FILE_SENDMAIL= ${WRKSRC}/LICENSE.Sendmail LICENSE_PERMS_SENDMAIL= dist-mirror dist-sell pkg-mirror pkg-sell \ auto-accept USES= autoreconf cpe libtool perl5 pkgconfig shebangfix ssl USE_GITHUB= yes GH_ACCOUNT= trusteddomainproject GH_PROJECT= OpenDKIM +GH_TAGNAME= 1c7a9f47c658a2e2ff7f2211b9800c44f4ec046d USE_LDCONFIG= yes USE_PERL5= run SHEBANG_FILES= opendkim/opendkim-genkey* reprrd/opendkim-reprrdimport* \ reputation/opendkim-* stats/opendkim-* -GNU_CONFIGURE= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --with-test-socket=./test.sock MAKE_ARGS= pkgconfigdir="${PREFIX}/libdata/pkgconfig" MAKE_ENV= INSTALL_STRIP_FLAG=${STRIP} TEST_TARGET= check -CONFLICTS_INSTALL= opendkim +CONFLICTS_INSTALL= ${PORTNAME} ${PORTNAME}-devel* PORTDOCS= * -OPTIONS_DEFINE= BDB_BASE CURL DOCS FILTER GNUTLS JANSSON LDNS \ - LMDB LUA MEMCACHED OPENDBX OPENLDAP POPAUTH \ +OPTIONS_DEFINE= BDB_BASE CURL DOCS FILTER GNUTLS JANSSON LMDB \ + LUA MEMCACHED OPENDBX OPENLDAP POPAUTH \ QUERY_CACHE SASL OPTIONS_DEFAULT= FILTER LUA UNBOUND OPTIONS_GROUP= DEVELOPER FFR OPTIONS_GROUP_DEVELOPER= ALLSYMBOLS CODECOVERAGE DEBUG -OPTIONS_GROUP_FFR= ADSP_LISTS ATPS DB_HANDLE_POOLS DEFAULT_SENDER \ - DIFFHEADERS IDENTITY_HEADER LDAP_CACHING \ - LUA_ONLY_SIGNING POSTGRES_RECONNECT_HACK \ - RATE_LIMIT RBL REPLACE_RULES REPRRD REPUTATION \ - RESIGN SENDER_MACRO SOCKETDB STATS STATSEXT VBR +OPTIONS_GROUP_FFR= ATPS DB_HANDLE_POOLS DEFAULT_SENDER DIFFHEADERS \ + IDENTITY_HEADER LDAP_CACHING \ + POSTGRES_RECONNECT_HACK RATE_LIMIT RBL \ + REPLACE_RULES REPRRD REPUTATION RESIGN \ + SENDER_MACRO SOCKETDB STATS STATSEXT VBR OPTIONS_SINGLE= RESOLV OPTIONS_SINGLE_RESOLV= STOCK_RESOLVER UNBOUND NO_OPTIONS_SORT= yes OPTIONS_SUB= yes -ADSP_LISTS_DESC= ADSP filtering for lists (experimental) ALLSYMBOLS_DESC= Export all internal symbols for better test coverage ATPS_DESC= Authorized Third Party Sign check BDB_BASE_DESC= Use Berkeley DB from base CODECOVERAGE_DESC= Enable internal code-coverage/profiling CURL_DESC= Use cURL for web queries DB_HANDLE_POOLS_DESC= Database handle pools (experimental) DEBUG_DESC= Build with debug symbols DEFAULT_SENDER_DESC= Default sender address DEVELOPER_DESC= Options useful for OpenDKIM development DIFFHEADERS_DESC= Compare signed and verified headers (experimental) FFR_DESC= Use features marked as For-Future-Releases FILTER_DESC= OpenDKIM filter, requires libmilter/Sendmail GNUTLS_DESC= Use GnuTLS instead of OpenSSL IDENTITY_HEADER_DESC= Special header to set identity JANSSON_DESC= Statistics and other output as JSON data LDAP_CACHING_DESC= LDAP query piggybacking and caching -LDNS_DESC= Use LDNS library for DNS queries LMDB_DESC= Use Lightning Memory-Mapped DB key-value store LUA_DESC= Describe filter policy with lua -LUA_ONLY_SIGNING_DESC= Message signing by Lua only MEMCACHED_DESC= Use memcached as a data set OPENDBX_DESC= Store filter policies via OpenDBX OPENLDAP_DESC= Store filter policies in LDAP POPAUTH_DESC= Use POP authentication DB POSTGRES_RECONNECT_HACK_DESC= PostgreSQL connection error detection bug hack QUERY_CACHE_DESC= Cache DNS query results locally RATE_LIMIT_DESC= DKIM based rate limiting support RBL_DESC= Realtime Blacklist query support REPLACE_RULES_DESC= String substition when signing REPRRD_DESC= Support for collaborative reputation that uses rrdtool (experimental) REPUTATION_DESC= Reputation check (experimental) RESIGN_DESC= One-step resigning SASL_DESC= Enable SASL authentication with LDAP SENDER_MACRO_DESC= Macro to determine sender SOCKETDB_DESC= Arbitrary socket data sets STATSEXT_DESC= Localized stats extensions STATS_DESC= Per-message and per-signature statistics STOCK_RESOLVER_DESC= Use the stock resolver library UNBOUND_DESC= Use unbound DNS library VBR_DESC= Vouch-By-Reference support -ADSP_LISTS_CONFIGURE_ENABLE= adsp_lists - ALLSYMBOLS_CONFIGURE_ENABLE= allsymbols ATPS_CONFIGURE_ENABLE= atps CODECOVERAGE_CONFIGURE_ENABLE= codecoverage CURL_LIB_DEPENDS= libcurl.so:ftp/curl CURL_CONFIGURE_WITH= libcurl DB_HANDLE_POOLS_CONFIGURE_ENABLE= db_handle_pools DEBUG_CONFIGURE_ENABLE= debug DEFAULT_SENDER_CONFIGURE_ENABLE= default_sender DIFFHEADERS_LIB_DEPENDS= libtre.so:textproc/libtre DIFFHEADERS_CONFIGURE_ENABLE= diffheaders DIFFHEADERS_CONFIGURE_WITH= tre=${LOCALBASE} FILTER_USE= RC_SUBR=milter-opendkim GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls GNUTLS_CONFIGURE_OFF= --with-openssl=${OPENSSLBASE} GNUTLS_CONFIGURE_WITH= gnutls IDENTITY_HEADER_CONFIGURE_ENABLE= identity_header JANSSON_LIB_DEPENDS= libjansson.so:devel/jansson JANSSON_CONFIGURE_WITH= libjansson LDAP_CACHING_USES= ldap LDAP_CACHING_CONFIGURE_ENABLE= ldap_caching -LDNS_LIB_DEPENDS= libldns.so:dns/ldns -LDNS_CONFIGURE_WITH= ldns - LMDB_LIB_DEPENDS= liblmdb.so:databases/lmdb LMDB_CONFIGURE_WITH= lmdb -LUA_USES= lua -LUA_CONFIGURE_WITH= lua - -LUA_ONLY_SIGNING_IMPLIES= LUA -LUA_ONLY_SIGNING_CONFIGURE_ENABLE= lua_only_signing +LUA_USES= lua:flavors +LUA_CONFIGURE_ENABLE= lua +LUA_CONFIGURE_ENV= LUA_CFLAGS=-I"${LUA_INCDIR}" \ + LUA_LIBS=-L"${LUA_LIBDIR} -llua-${LUA_VER} -lm" MEMCACHED_LIB_DEPENDS= libmemcached.so:databases/libmemcached MEMCACHED_CONFIGURE_WITH= libmemcached OPENDBX_LIB_DEPENDS= libopendbx.so:databases/opendbx OPENDBX_CONFIGURE_WITH= odbx OPENLDAP_USES= ldap OPENLDAP_CONFIGURE_WITH= openldap POPAUTH_CONFIGURE_ENABLE= popauth POSTGRES_RECONNECT_HACK_CONFIGURE_ENABLE= postgresql_reconnect_hack QUERY_CACHE_CONFIGURE_ENABLE= query_cache RATE_LIMIT_CONFIGURE_ENABLE= rate_limit RBL_IMPLIES= LUA RBL_CONFIGURE_ENABLE= rbl REPLACE_RULES_CONFIGURE_ENABLE= replace_rules REPRRD_LIB_DEPENDS= librrd.so:databases/rrdtool REPRRD_CONFIGURE_ENABLE= reprrd REPUTATION_IMPLIES= CURL JANSSON REPUTATION_CONFIGURE_ENABLE= reputation RESIGN_CONFIGURE_ENABLE= resign SASL_IMPLIES= OPENLDAP SASL_CONFIGURE_WITH= sasl SENDER_MACRO_CONFIGURE_ENABLE= sender_macro SOCKETDB_CONFIGURE_ENABLE= socketdb STATSEXT_IMPLIES= LUA STATS STATSEXT_CONFIGURE_ENABLE= statsext STATS_CONFIGURE_ENABLE= stats UNBOUND_LIB_DEPENDS= libunbound.so:dns/unbound UNBOUND_CONFIGURE_WITH= unbound VBR_CONFIGURE_ENABLE= vbr .include .if ${PORT_OPTIONS:MFILTER} SUB_FILES= pkg-message WITHOUT_MILTER_CFLAGS= yes WITHOUT_MILTER_LDFLAGS= yes .include "${PORTSDIR}/mail/sendmail/bsd.milter.mk" CONFIGURE_ARGS+= --with-milter=${MILTERBASE} .endif .if ${PORT_OPTIONS:MPOPAUTH} || ${PORT_OPTIONS:MQUERY_CACHE} || \ ${PORT_OPTIONS:MLDAP_CACHING} || ${PORT_OPTIONS:MREPUTATION} || \ ${PORT_OPTIONS:MSTATS} . if ${PORT_OPTIONS:MBDB_BASE} CONFIGURE_ARGS+= --with-db-lib=c . else CONFIGURE_ARGS+= --with-db-incdir=${BDB_INCLUDE_DIR} \ --with-db-lib=${BDB_LIB_NAME} \ --with-db-libdir=${BDB_LIB_DIR} USES+= bdb . endif .endif .if ${PORT_OPTIONS:MCODECOVERAGE} LDFLAGS+= -lpthread .endif -pre-configure: - ${REINPLACE_CMD} -e '/PKG_CHECK_MODULES/s/lua5\.[0-9]/lua-${LUA_VER}/' \ - -e '/PKG_CHECK_MODULES/s/cyrussasl/libsasl2/' \ - ${WRKSRC}/configure.ac - post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/etc/mail ${INSTALL_DATA} ${WRKSRC}/opendkim/opendkim.conf.sample \ ${STAGEDIR}${PREFIX}/etc/mail/ -.include +.include + +.if ${FLAVOR:Mlua*} +PKGNAMESUFFIX= -devel-${FLAVOR} +.endif + +.include diff --git a/mail/opendkim-devel/distinfo b/mail/opendkim-devel/distinfo index e18ae8bf8208..9f77087c7259 100644 --- a/mail/opendkim-devel/distinfo +++ b/mail/opendkim-devel/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1717994186 -SHA256 (trusteddomainproject-OpenDKIM-rel-opendkim-2.11.0-Beta2-48-g551ab382_GH0.tar.gz) = 216dd1dcd4cbcd68e6524c1cabe071b9a25356d3ea135c3509d689c2085f3678 -SIZE (trusteddomainproject-OpenDKIM-rel-opendkim-2.11.0-Beta2-48-g551ab382_GH0.tar.gz) = 803244 +TIMESTAMP = 1780398220 +SHA256 (trusteddomainproject-OpenDKIM-rel-opendkim-2.11.0-Beta2-49-g1c7a9f47c-1c7a9f47c658a2e2ff7f2211b9800c44f4ec046d_GH0.tar.gz) = 3caca6f24a81cb9cec4770f85a8576df71ead6366311d4e01cc4c375dde62543 +SIZE (trusteddomainproject-OpenDKIM-rel-opendkim-2.11.0-Beta2-49-g1c7a9f47c-1c7a9f47c658a2e2ff7f2211b9800c44f4ec046d_GH0.tar.gz) = 843392 diff --git a/mail/opendkim-devel/files/patch-lua_pop b/mail/opendkim-devel/files/patch-lua_pop deleted file mode 100644 index 129d05d62e6d..000000000000 --- a/mail/opendkim-devel/files/patch-lua_pop +++ /dev/null @@ -1,86 +0,0 @@ -From 57b86d35381ed9bfb7e4be4e6512fb64163dd725 Mon Sep 17 00:00:00 2001 -From: FUTATSUKI Yasuhito -Date: Tue, 27 Feb 2024 14:41:59 +0900 -Subject: [PATCH] Lua: Fix stack level after register odkim functions. - -When luaL_setfuncs() is replaced by luaL_newlib() + lua_setglobal() -in commit 74b3374feee34fba14a0e15f89f049cbe4a3dafd, the commit did -not take account that lua_setglobal() pops a value from the stack. - -Thus, following lua pop(l, 1) tries to pop from empty stack in -Lua >= 5.2, especially in Lua 5.4, it causes abort(). - -This fix it. - -* miltertest/miltertest.c (main): - Don't pop after lua_setglobal() in Lua >= 5.2 - -* opendkim/opendkim-lua.c - (dkimf_lua_setup_hook, dkimf_lua_screen_hook, - dkimf_lua_stats_hook, dkimf_lua_final_hook): As above. ---- - miltertest/miltertest.c | 2 +- - opendkim/opendkim-lua.c | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git miltertest/miltertest.c miltertest/miltertest.c -index b4a345f7..339cfa91 100644 ---- miltertest/miltertest.c -+++ miltertest/miltertest.c -@@ -4014,8 +4014,8 @@ main(int argc, char **argv) - lua_setglobal(l, "mt"); - #else /* LUA_VERSION_NUM >= 502 */ - luaL_register(l, "mt", mt_library); --#endif /* LUA_VERSION_NUM >= 502 */ - lua_pop(l, 1); -+#endif /* LUA_VERSION_NUM >= 502 */ - - /* register constants */ - lua_pushnumber(l, MT_HDRINSERT); -diff --git opendkim/opendkim-lua.c opendkim/opendkim-lua.c -index 3786aa4b..c1a67f90 100644 ---- opendkim/opendkim-lua.c -+++ opendkim/opendkim-lua.c -@@ -490,8 +490,8 @@ dkimf_lua_setup_hook(void *ctx, const char *script, size_t scriptlen, - lua_setglobal(l, "odkim"); - # else /* LUA_VERSION_NUM >= 502 */ - luaL_register(l, "odkim", dkimf_lua_lib_setup); --# endif /* LUA_VERSION_NUM >= 502 */ - lua_pop(l, 1); -+# endif /* LUA_VERSION_NUM >= 502 */ - - /* - ** Register constants. -@@ -649,8 +649,8 @@ dkimf_lua_screen_hook(void *ctx, const char *script, size_t scriptlen, - lua_setglobal(l, "odkim"); - # else /* LUA_VERSION_NUM >= 502 */ - luaL_register(l, "odkim", dkimf_lua_lib_screen); --# endif /* LUA_VERSION_NUM >= 502 */ - lua_pop(l, 1); -+# endif /* LUA_VERSION_NUM >= 502 */ - - /* - ** Register constants. -@@ -798,8 +798,8 @@ dkimf_lua_stats_hook(void *ctx, const char *script, size_t scriptlen, - lua_setglobal(l, "odkim"); - # else /* LUA_VERSION_NUM >= 502 */ - luaL_register(l, "odkim", dkimf_lua_lib_stats); --# endif /* LUA_VERSION_NUM >= 502 */ - lua_pop(l, 1); -+# endif /* LUA_VERSION_NUM >= 502 */ - - /* - ** Register constants. -@@ -1039,8 +1039,8 @@ dkimf_lua_final_hook(void *ctx, const char *script, size_t scriptlen, - lua_setglobal(l, "odkim"); - # else /* LUA_VERSION_NUM >= 502 */ - luaL_register(l, "odkim", dkimf_lua_lib_final); --# endif /* LUA_VERSION_NUM >= 502 */ - lua_pop(l, 1); -+# endif /* LUA_VERSION_NUM >= 502 */ - - /* - ** Register constants. --- -2.45.2 - diff --git a/mail/opendkim-devel/files/patch-opendkim_opendkim-crypto.c b/mail/opendkim-devel/files/patch-opendkim_opendkim-crypto.c deleted file mode 100644 index b0c9326a78a5..000000000000 --- a/mail/opendkim-devel/files/patch-opendkim_opendkim-crypto.c +++ /dev/null @@ -1,20 +0,0 @@ ---- opendkim/opendkim-crypto.c.orig 2022-12-30 01:52:49 UTC -+++ opendkim/opendkim-crypto.c -@@ -221,7 +221,7 @@ dkimf_crypto_free_id(void *ptr) - { - assert(pthread_setspecific(id_key, ptr) == 0); - --#if OPENSSL_VERSION_NUMBER >= 0x10100000 -+#if (OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)) - OPENSSL_thread_stop(); - #else - ERR_remove_state(0); -@@ -399,7 +399,7 @@ dkimf_crypto_free(void) - { - if (crypto_init_done) - { --#if OPENSSL_VERSION_NUMBER >= 0x10100000 -+#if (OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)) - OPENSSL_thread_stop(); - #else - CRYPTO_cleanup_all_ex_data(); diff --git a/mail/opendkim-devel/files/patch-opendkim_opendkim.c b/mail/opendkim-devel/files/patch-opendkim_opendkim.c deleted file mode 100644 index 8ec336794477..000000000000 --- a/mail/opendkim-devel/files/patch-opendkim_opendkim.c +++ /dev/null @@ -1,36 +0,0 @@ -commit 7c70ee7c86da1cecc621182355cc950d3b193314 -Author: David Bürgin -Date: Sat Oct 14 09:19:37 2023 +0200 - - Delete Authentication-Results headers in reverse - -diff --git opendkim/opendkim.c opendkim/opendkim.c -index 803f37b0..cfa5f018 100644 ---- opendkim/opendkim.c -+++ opendkim/opendkim.c -@@ -13653,8 +13653,15 @@ mlfi_eom(SMFICTX *ctx) - return SMFIS_TEMPFAIL; - } - -- c = 0; -+ c = 1; -+ - for (hdr = dfc->mctx_hqhead; hdr != NULL; hdr = hdr->hdr_next) -+ { -+ if (strcasecmp(hdr->hdr_hdr, AUTHRESULTSHDR) == 0) -+ c++; -+ } -+ -+ for (hdr = dfc->mctx_hqtail; hdr != NULL; hdr = hdr->hdr_prev) - { - memset(ares, '\0', sizeof(struct authres)); - -@@ -13666,7 +13673,7 @@ mlfi_eom(SMFICTX *ctx) - char *slash; - - /* remember index */ -- c++; -+ c--; - - /* parse the header */ - arstat = ares_parse((u_char *) hdr->hdr_val,