Date: Sun, 25 Feb 2018 15:39:07 +0000 (UTC) From: Olli Hauer <ohauer@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r462961 - in head/mail/postfix-current: . files Message-ID: <201802251539.w1PFd7O9070982@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ohauer Date: Sun Feb 25 15:39:07 2018 New Revision: 462961 URL: https://svnweb.freebsd.org/changeset/ports/462961 Log: - update to 3.4-20180222 - add patch for MySQL 8.x [1} - add blacklistd support [2] additional: regenerate patch for src/util/sys_defs.h PR: 220224 [1], 225664 [2] Submitted by: Klaus Mayr [1], Koichiro IWAO [2] Added: head/mail/postfix-current/files/extra-patch-blacklistd (contents, props changed) head/mail/postfix-current/files/patch-src_global_dict__mysql.c (contents, props changed) head/mail/postfix-current/files/patch-src_util_sys__defs.h - copied, changed from r462960, head/mail/postfix-current/files/patch-src__util__sys_defs.h Deleted: head/mail/postfix-current/files/patch-src__util__sys_defs.h Modified: head/mail/postfix-current/Makefile head/mail/postfix-current/distinfo Modified: head/mail/postfix-current/Makefile ============================================================================== --- head/mail/postfix-current/Makefile Sun Feb 25 15:35:07 2018 (r462960) +++ head/mail/postfix-current/Makefile Sun Feb 25 15:39:07 2018 (r462961) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= postfix -DISTVERSION= 3.4-20180218 +DISTVERSION= 3.4-20180222 PORTREVISION?= 0 PORTEPOCH= 5 CATEGORIES= mail ipv6 @@ -40,19 +40,20 @@ USE_SUBMAKE= yes SCRIPTS_ENV+= POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}" OPTIONS_SUB= yes -OPTIONS_DEFINE= BDB CDB DOCS EAI INST_BASE LDAP LDAP_SASL LMDB MYSQL \ - NIS PCRE PGSQL SASL SQLITE TEST TLS +OPTIONS_DEFINE= BDB BLACKLISTD CDB DOCS EAI INST_BASE LDAP LDAP_SASL \ + LMDB MYSQL NIS PCRE PGSQL SASL SQLITE TEST TLS OPTIONS_RADIO= RG1 OPTIONS_RADIO_RG1= SASLKRB5 SASLKMIT OPTIONS_DEFAULT= EAI PCRE TLS BDB_USES= bdb +BLACKLISTD_EXTRA_PATCHES= ${FILESDIR}/extra-patch-blacklistd CDB_LIB_DEPENDS= libcdb.so:databases/tinycdb EAI_LIB_DEPENDS= libicuuc.so:devel/icu LDAP_USE= OPENLDAP=yes LMDB_LIB_DEPENDS= liblmdb.so:databases/lmdb -MYSQL_USE= MYSQL=yes +MYSQL_USES= mysql PCRE_LIB_DEPENDS= libpcre.so:devel/pcre PGSQL_USES= pgsql SASLKMIT_LIB_DEPENDS= libkrb5.so:security/krb5 @@ -60,6 +61,7 @@ SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 SQLITE_USES= sqlite TLS_USES= ssl +BLACKLISTD_DESC= Enable blacklistd support (FreeBSD 11.0 and later only) CDB_DESC= CDB maps lookups EAI_DESC= Email Address Internationalization (SMTPUTF8) support INST_BASE_DESC= Install into /usr and /etc/postfix @@ -193,6 +195,14 @@ POSTFIX_CCARGS+= -DNO_TLS .if ${PORT_OPTIONS:MBDB} POSTFIX_CCARGS+= -I${BDB_INCLUDE_DIR} POSTFIX_AUXLIBS+= -L${BDB_LIB_DIR} -l${BDB_LIB_NAME} +.endif + +.if ${PORT_OPTIONS:MBLACKLISTD} +. if ${OPSYS} == FreeBSD && (${OSVERSION} >= 1100122) +POSTFIX_AUXLIBS+= -lblacklist +. else +IGNORE= blacklistd is only supported on FreeBSD >= 11.0 +. endif .endif .if ${PORT_OPTIONS:MMYSQL} Modified: head/mail/postfix-current/distinfo ============================================================================== --- head/mail/postfix-current/distinfo Sun Feb 25 15:35:07 2018 (r462960) +++ head/mail/postfix-current/distinfo Sun Feb 25 15:39:07 2018 (r462961) @@ -1,3 +1,3 @@ -TIMESTAMP = 1519005319 -SHA256 (postfix/postfix-3.4-20180218.tar.gz) = d9ba2c204d68f2e8af4e43f75a4578f9bdd07f071d43ea96eed8ddb060aa9864 -SIZE (postfix/postfix-3.4-20180218.tar.gz) = 4422381 +TIMESTAMP = 1519345697 +SHA256 (postfix/postfix-3.4-20180222.tar.gz) = bd136d4542e7a9114d0afcb1d16421c116e7ad97f75fbf0abf6fa5be76d69881 +SIZE (postfix/postfix-3.4-20180222.tar.gz) = 4422765 Added: head/mail/postfix-current/files/extra-patch-blacklistd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/postfix-current/files/extra-patch-blacklistd Sun Feb 25 15:39:07 2018 (r462961) @@ -0,0 +1,69 @@ +# PR 225664: support blacklistd on FreeBSD >= 11.0 +# +--- src/smtpd/Makefile.in.orig 2017-02-05 23:36:32 UTC ++++ src/smtpd/Makefile.in +@@ -2,14 +2,14 @@ SHELL = /bin/sh + SRCS = smtpd.c smtpd_token.c smtpd_check.c smtpd_chat.c smtpd_state.c \ + smtpd_peer.c smtpd_sasl_proto.c smtpd_sasl_glue.c smtpd_proxy.c \ + smtpd_xforward.c smtpd_dsn_fix.c smtpd_milter.c smtpd_resolve.c \ +- smtpd_expand.c smtpd_haproxy.c ++ smtpd_expand.c smtpd_haproxy.c pfilter.c + OBJS = smtpd.o smtpd_token.o smtpd_check.o smtpd_chat.o smtpd_state.o \ + smtpd_peer.o smtpd_sasl_proto.o smtpd_sasl_glue.o smtpd_proxy.o \ + smtpd_xforward.o smtpd_dsn_fix.o smtpd_milter.o smtpd_resolve.o \ +- smtpd_expand.o smtpd_haproxy.o ++ smtpd_expand.o smtpd_haproxy.o pfilter.o + HDRS = smtpd_token.h smtpd_check.h smtpd_chat.h smtpd_sasl_proto.h \ + smtpd_sasl_glue.h smtpd_proxy.h smtpd_dsn_fix.h smtpd_milter.h \ +- smtpd_resolve.h smtpd_expand.h ++ smtpd_resolve.h smtpd_expand.h pfilter.h + TESTSRC = smtpd_token_test.c + DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE) + CFLAGS = $(DEBUG) $(OPT) $(DEFS) +--- src/smtpd/smtpd_sasl_glue.c.orig 2017-02-19 01:58:21 UTC ++++ src/smtpd/smtpd_sasl_glue.c +@@ -147,6 +147,7 @@ + #include "smtpd.h" + #include "smtpd_sasl_glue.h" + #include "smtpd_chat.h" ++#include "pfilter.h" /* for blacklistd(8) */ + + #ifdef USE_SASL_AUTH + +@@ -332,6 +333,10 @@ int smtpd_sasl_authenticate(SMTPD_ST + else + smtpd_chat_reply(state, "535 5.7.8 Error: authentication failed: %s", + STR(state->sasl_reply)); ++ ++ ++ /* notify blacklistd of SASL authentication failure */ ++ pfilter_notify(1, vstream_fileno(state->client)); + return (-1); + } + /* RFC 4954 Section 6. */ +--- src/smtpd/pfilter.h.orig 2018-02-04 15:36:49 UTC ++++ src/smtpd/pfilter.h +@@ -0,0 +1 @@ ++void pfilter_notify(int, int); +--- src/smtpd/pfilter.c.orig 2018-02-04 15:36:49 UTC ++++ src/smtpd/pfilter.c +@@ -0,0 +1,19 @@ ++#include "pfilter.h" ++#include <stdio.h> /* for NULL */ ++#include <blacklist.h> ++ ++static struct blacklist *blstate; ++ ++void ++pfilter_notify(int a, int fd) ++{ ++ if (blstate == NULL) ++ blstate = blacklist_open(); ++ if (blstate == NULL) ++ return; ++ (void)blacklist_r(blstate, a, fd, "smtpd"); ++ if (a == 0) { ++ blacklist_close(blstate); ++ blstate = NULL; ++ } ++} Added: head/mail/postfix-current/files/patch-src_global_dict__mysql.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/postfix-current/files/patch-src_global_dict__mysql.c Sun Feb 25 15:39:07 2018 (r462961) @@ -0,0 +1,22 @@ +# PR: 220224 fix build against mysql 8.x +# +# from https://dev.mysql.com/doc/refman/5.7/en/mysql-options.html +# o MYSQL_OPT_SSL_VERIFY_SERVER_CERT (argument type: my_bool *) +# This option is deprecated as of MySQL 5.7.11 and is removed in MySQL 8.0. +# Instead, use MYSQL_OPT_SSL_MODE with a value of SSL_MODE_VERIFY_IDENTITY. +# +--- src/global/dict_mysql.c.orig 2017-02-19 01:58:20 UTC ++++ src/global/dict_mysql.c +@@ -656,7 +656,11 @@ static void plmysql_connect_single(DICT_ + dict_mysql->tls_key_file, dict_mysql->tls_cert_file, + dict_mysql->tls_CAfile, dict_mysql->tls_CApath, + dict_mysql->tls_ciphers); +-#if MYSQL_VERSION_ID >= 50023 ++#if MYSQL_VERSION_ID >= 80000 && !defined(MARIADB_VERSION_ID) ++ if (dict_mysql->tls_verify_cert != -1) ++ mysql_options(host->db, MYSQL_OPT_SSL_MODE, ++ &dict_mysql->tls_verify_cert); ++#elif MYSQL_VERSION_ID >= 50023 + if (dict_mysql->tls_verify_cert != -1) + mysql_options(host->db, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, + &dict_mysql->tls_verify_cert); Copied and modified: head/mail/postfix-current/files/patch-src_util_sys__defs.h (from r462960, head/mail/postfix-current/files/patch-src__util__sys_defs.h) ============================================================================== --- head/mail/postfix-current/files/patch-src__util__sys_defs.h Sun Feb 25 15:35:07 2018 (r462960, copy source) +++ head/mail/postfix-current/files/patch-src_util_sys__defs.h Sun Feb 25 15:39:07 2018 (r462961) @@ -1,6 +1,6 @@ ---- src/util/sys_defs.h.orig 2016-07-09 20:09:34 UTC +--- src/util/sys_defs.h.orig 2017-06-18 19:30:20 UTC +++ src/util/sys_defs.h -@@ -27,6 +27,7 @@ +@@ -30,6 +30,7 @@ #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \ || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \ || defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802251539.w1PFd7O9070982>