From 28ef9363638f920f977b628a3291c42c85aa4536 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 21 Mar 2018 18:22:06 +0000 Subject: [PATCH] Update rspamd port to 1.7.1 - fix plist (install config files using @sample, was broken in patch from PR 226646) - build only one neural net module: fann or torch - rspamd has https client - add ca_root_nss dependency PR: 226802 Submitted by: Anton Yuzhaninov --- mail/rspamd/Makefile | 18 +++++++++----- mail/rspamd/distinfo | 6 ++--- mail/rspamd/files/patch-CMakeLists.txt | 8 +++--- mail/rspamd/pkg-plist | 34 ++++++++++---------------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/mail/rspamd/Makefile b/mail/rspamd/Makefile index a980a50965b5..8ea358a6f50b 100644 --- a/mail/rspamd/Makefile +++ b/mail/rspamd/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= rspamd -PORTVERSION= 1.7.0 +PORTVERSION= 1.7.1 CATEGORIES= mail MAINTAINER= vsevolod@FreeBSD.org @@ -13,21 +13,25 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libpcre.so:devel/pcre \ libevent.so:devel/libevent \ libluajit-5.1.so:lang/luajit \ - libfann.so:math/fann \ libicui18n.so:devel/icu BUILD_DEPENDS= ragel:devel/ragel +RUN_DEPENDS= ca_root_nss>=3.*:security/ca_root_nss CONFLICTS_INSTALL= rspamd-devel -OPTIONS_DEFINE= GPERF GD CGP TORCH TORCH_BLAS +OPTIONS_DEFINE= GPERF GD CGP TORCH_BLAS OPTIONS_DEFINE_amd64= HYPERSCAN -OPTIONS_DEFAULT= TORCH +OPTIONS_DEFAULT_amd64= TORCH OPTIONS_SUB= yes +OPTIONS_RADIO= NEURAL_NETWORK +OPTIONS_RADIO_NEURAL_NETWORK= FANN TORCH + CGP_DESC= Install Communigate Pro(tm) helper GD_DESC= Enable libgd support for images fuzzy hashes GPERF_DESC= Google perf-tools profiling HYPERSCAN_DESC= Use hyperscan optimizations (amd64 only) +FANN_DESC= Use Fast Artificial Neural Network Library (FANN) TORCH_DESC= Machine learning support using torch TORCH_BLAS_DESC= Build torch with OpenBLAS TORCH_BLAS_IMPLIES= TORCH @@ -43,8 +47,7 @@ CMAKE_ARGS+= -DCONFDIR=${PREFIX}/etc/rspamd \ -DCMAKE_INSTALL_PREFIX=${PREFIX} \ -DBUILD_PORT=yes \ -DLIBDIR=${PREFIX}/lib/rspamd \ - -DNO_SHARED=ON \ - -DENABLE_FANN=ON + -DNO_SHARED=ON USES= cmake:outsource pkgconfig perl5 \ compiler:c11 sqlite ssl @@ -67,6 +70,9 @@ GPERF_LIB_DEPENDS= libprofiler.so:devel/google-perftools HYPERSCAN_CMAKE_ON= -DENABLE_HYPERSCAN=ON HYPERSCAN_LIB_DEPENDS= libhs.so:devel/hyperscan +FANN_CMAKE_ON= -DENABLE_FANN=ON +FANN_LIB_DEPENDS=libfann.so:math/fann + TORCH_CMAKE_ON= -DENABLE_TORCH=ON TORCH_CMAKE_OFF=-DENABLE_TORCH=OFF diff --git a/mail/rspamd/distinfo b/mail/rspamd/distinfo index bd3eb356ece0..5146928607ad 100644 --- a/mail/rspamd/distinfo +++ b/mail/rspamd/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1520893818 -SHA256 (vstakhov-rspamd-1.7.0_GH0.tar.gz) = cf8bd3cbe3e6e146dbb9c5d6c0098ccfe69dda5a672b9cf6af629e9fbbdba039 -SIZE (vstakhov-rspamd-1.7.0_GH0.tar.gz) = 4444320 +TIMESTAMP = 1521561252 +SHA256 (vstakhov-rspamd-1.7.1_GH0.tar.gz) = 3dd083e68edc800b3174563db41166734bebc6dff2df8d7d7a1ced4ba10b880d +SIZE (vstakhov-rspamd-1.7.1_GH0.tar.gz) = 4453460 diff --git a/mail/rspamd/files/patch-CMakeLists.txt b/mail/rspamd/files/patch-CMakeLists.txt index 740b2f5fbf61..d62b0825c3da 100644 --- a/mail/rspamd/files/patch-CMakeLists.txt +++ b/mail/rspamd/files/patch-CMakeLists.txt @@ -1,10 +1,12 @@ ---- CMakeLists.txt.orig 2017-06-06 15:07:59 UTC +--- CMakeLists.txt.orig 2018-03-12 16:46:32 UTC +++ CMakeLists.txt -@@ -1302,6 +1302,24 @@ ELSE(WANT_SYSTEMD_UNITS MATCHES "ON") - ENDIF(WANT_SYSTEMD_UNITS MATCHES "ON") +@@ -1307,6 +1307,26 @@ ENDFOREACH(CONF_FILE) + SET(MAIN_CONF "conf/rspamd.conf") IF(BUILD_PORT) INSTALL_IF_NOT_EXISTS(${MAIN_CONF} ${CONFDIR} "rspamd.conf" ".sample") ++ INSTALL_IF_NOT_EXISTS("conf/actions.conf" ${CONFDIR} "actions.conf" ".sample") + INSTALL_IF_NOT_EXISTS("conf/common.conf" ${CONFDIR} "common.conf" ".sample") ++ INSTALL_IF_NOT_EXISTS("conf/groups.conf" ${CONFDIR} "groups.conf" ".sample") + INSTALL_IF_NOT_EXISTS("conf/logging.inc" ${CONFDIR} "logging.inc" ".sample") + INSTALL_IF_NOT_EXISTS("conf/options.inc" ${CONFDIR} "options.inc" ".sample") + INSTALL_IF_NOT_EXISTS("conf/worker-controller.inc" ${CONFDIR} "worker-controller.inc" ".sample") diff --git a/mail/rspamd/pkg-plist b/mail/rspamd/pkg-plist index 5c9726aa504d..64f0a5c51f04 100644 --- a/mail/rspamd/pkg-plist +++ b/mail/rspamd/pkg-plist @@ -8,11 +8,11 @@ bin/rspamd_stats %%CGP%%bin/rspamd-cgp-helper etc/newsyslog.conf.d/rspamd.newsyslog.conf @sample %%ETCDIR%%/2tld.inc.sample -@sample %%ETCDIR%%/actions.conf +@sample %%ETCDIR%%/actions.conf.sample @sample %%ETCDIR%%/common.conf.sample @sample %%ETCDIR%%/composites.conf.sample @sample %%ETCDIR%%/dmarc_whitelist.inc.sample -@sample %%ETCDIR%%/groups.conf +@sample %%ETCDIR%%/groups.conf.sample @sample %%ETCDIR%%/logging.inc.sample @sample %%ETCDIR%%/maillist.inc.sample @sample %%ETCDIR%%/metrics.conf.sample @@ -63,12 +63,10 @@ etc/newsyslog.conf.d/rspamd.newsyslog.conf %%ETCDIR%%/modules.d/url_reputation.conf %%ETCDIR%%/modules.d/url_tags.conf %%ETCDIR%%/modules.d/whitelist.conf -%%ETCDIR%%/options.inc -%%ETCDIR%%/options.inc.sample +@sample %%ETCDIR%%/options.inc.sample %%ETCDIR%%/redirectors.inc -%%ETCDIR%%/rspamd.conf -%%ETCDIR%%/rspamd.conf.sample -%%ETCDIR%%/rspamd.newsyslog.conf.sample +@sample %%ETCDIR%%/rspamd.conf.sample +@sample %%ETCDIR%%/rspamd.newsyslog.conf.sample %%ETCDIR%%/scores.d/fuzzy_group.conf %%ETCDIR%%/scores.d/headers_group.conf %%ETCDIR%%/scores.d/hfilter_group.conf @@ -80,20 +78,13 @@ etc/newsyslog.conf.d/rspamd.newsyslog.conf %%ETCDIR%%/scores.d/statistics_group.conf %%ETCDIR%%/scores.d/subject_group.conf %%ETCDIR%%/scores.d/surbl_group.conf -%%ETCDIR%%/spf_dkim_whitelist.inc -%%ETCDIR%%/spf_dkim_whitelist.inc.sample -%%ETCDIR%%/statistic.conf -%%ETCDIR%%/statistic.conf.sample -%%ETCDIR%%/surbl-whitelist.inc -%%ETCDIR%%/surbl-whitelist.inc.sample -%%ETCDIR%%/worker-controller.inc -%%ETCDIR%%/worker-controller.inc.sample -%%ETCDIR%%/worker-fuzzy.inc -%%ETCDIR%%/worker-fuzzy.inc.sample -%%ETCDIR%%/worker-normal.inc -%%ETCDIR%%/worker-normal.inc.sample -%%ETCDIR%%/worker-proxy.inc -%%ETCDIR%%/worker-proxy.inc.sample +@sample %%ETCDIR%%/spf_dkim_whitelist.inc.sample +@sample %%ETCDIR%%/statistic.conf.sample +@sample %%ETCDIR%%/surbl-whitelist.inc.sample +@sample %%ETCDIR%%/worker-controller.inc.sample +@sample %%ETCDIR%%/worker-fuzzy.inc.sample +@sample %%ETCDIR%%/worker-normal.inc.sample +@sample %%ETCDIR%%/worker-proxy.inc.sample lib/rspamd/librspamd-actrie.so %%TORCH%%lib/rspamd/libTH.so %%TORCH%%lib/rspamd/libTHNN.so @@ -441,6 +432,7 @@ man/man8/rspamd.8.gz %%TORCH%%%%DATADIR%%/lib/torch/init.lua %%TORCH%%%%DATADIR%%/lib/torch/paths.lua %%TORCH%%%%DATADIR%%/lib/torch/test.lua +%%DATADIR%%/lib/lua_squeeze_rules.lua %%DATADIR%%/lua/antivirus.lua %%DATADIR%%/lua/arc.lua %%DATADIR%%/lua/asn.lua