pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/postfix mail/postfix: add blocklist PKG_OPTIONS a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/95fe465af251
branches:  trunk
changeset: 457027:95fe465af251
user:      taca <taca%pkgsrc.org@localhost>
date:      Sat Aug 14 08:58:20 2021 +0000

description:
mail/postfix: add blocklist PKG_OPTIONS and fix build problem

* Add blocklist PKG_OPTIONS.
* Fix build problem on no blocklist/blacklist supported system.
  (Reported by Matthias Ferdinand on pkgsrc-users@.)

Bump PKGREVISION.

diffstat:

 mail/postfix/Makefile                        |   3 ++-
 mail/postfix/distinfo                        |   6 +++---
 mail/postfix/options.mk                      |  13 ++++++++++---
 mail/postfix/patches/patch-ai                |  22 +++++++++++++---------
 mail/postfix/patches/patch-src_smtpd_smtpd.c |   6 ++++--
 5 files changed, 32 insertions(+), 18 deletions(-)

diffs (125 lines):

diff -r d033fd1944d0 -r 95fe465af251 mail/postfix/Makefile
--- a/mail/postfix/Makefile     Sat Aug 14 08:44:04 2021 +0000
+++ b/mail/postfix/Makefile     Sat Aug 14 08:58:20 2021 +0000
@@ -1,5 +1,6 @@
-# $NetBSD: Makefile,v 1.328 2021/06/02 15:29:56 taca Exp $
+# $NetBSD: Makefile,v 1.329 2021/08/14 08:58:20 taca Exp $
 
+PKGREVISION= 1
 .include "../../mail/postfix/Makefile.common"
 
 COMMENT=       Fast, easy to administer, and secure mail transfer agent
diff -r d033fd1944d0 -r 95fe465af251 mail/postfix/distinfo
--- a/mail/postfix/distinfo     Sat Aug 14 08:44:04 2021 +0000
+++ b/mail/postfix/distinfo     Sat Aug 14 08:58:20 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.195 2021/07/26 15:38:10 taca Exp $
+$NetBSD: distinfo,v 1.196 2021/08/14 08:58:20 taca Exp $
 
 SHA1 (postfix-3.6.2.tar.gz) = 712230d7b0789d6610d84e8f03937f720fe3963d
 RMD160 (postfix-3.6.2.tar.gz) = 2ec2f96a7cafd853528646ef1e5c311a96fa8914
@@ -6,8 +6,8 @@
 Size (postfix-3.6.2.tar.gz) = 4749530 bytes
 SHA1 (patch-aa) = c8216f133e202a7bb37682b0dbc1448f021e7c1c
 SHA1 (patch-ag) = feccf4aba580f581953b32e6c3a2c453fcb9131c
-SHA1 (patch-ai) = 2d14b2bfe3d8f2b3bc80f31531285accd8eb84ac
+SHA1 (patch-ai) = b93d8b4e7a52e2c281cf0815ef2cf653c3cd7efa
 SHA1 (patch-src_smtpd_Makefile.in) = 8133f9cceb0c1c0250d6543cb060c66288571722
 SHA1 (patch-src_smtpd_pfilter.c) = c747d2f3584f694eb7b73b19118b4d8b450cfe7f
 SHA1 (patch-src_smtpd_pfilter.h) = 153b516da89d709d293c6086c2f126791bd945d6
-SHA1 (patch-src_smtpd_smtpd.c) = 7d709a727ca28efb2b07d3247feb7349576ae1f0
+SHA1 (patch-src_smtpd_smtpd.c) = 5f290ec55305702986beefdbbc194f5ce7987643
diff -r d033fd1944d0 -r 95fe465af251 mail/postfix/options.mk
--- a/mail/postfix/options.mk   Sat Aug 14 08:44:04 2021 +0000
+++ b/mail/postfix/options.mk   Sat Aug 14 08:58:20 2021 +0000
@@ -1,14 +1,21 @@
-# $NetBSD: options.mk,v 1.41 2019/07/16 15:18:28 triaxx Exp $
+# $NetBSD: options.mk,v 1.42 2021/08/14 08:58:20 taca Exp $
 
 # Global and legacy options
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.postfix
-PKG_SUPPORTED_OPTIONS= sasl tls eai
-PKG_SUGGESTED_OPTIONS= tls
+PKG_SUPPORTED_OPTIONS= blocklist sasl tls eai
+PKG_SUGGESTED_OPTIONS= blocklist tls
 
 .include "../../mk/bsd.options.mk"
 
 ###
+### blocklist support
+###
+.if !empty(PKG_OPTIONS:Mblocklist)
+CCARGS+=       -DUSE_BLOCKLIST
+.endif
+
+###
 ### STARTTLS support
 ###
 .if !empty(PKG_OPTIONS:Mtls)
diff -r d033fd1944d0 -r 95fe465af251 mail/postfix/patches/patch-ai
--- a/mail/postfix/patches/patch-ai     Sat Aug 14 08:44:04 2021 +0000
+++ b/mail/postfix/patches/patch-ai     Sat Aug 14 08:58:20 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ai,v 1.42 2021/07/26 15:38:10 taca Exp $
+$NetBSD: patch-ai,v 1.43 2021/08/14 08:58:20 taca Exp $
 
 1) Add shlib definitions for NetBSD 5; the build system must be
 hard-coded per OS per version.  Not yet reported upstream.
@@ -169,19 +169,23 @@
                ;;
      dcosx.1*) SYSTYPE=DCOSX1
                RANLIB=echo
-@@ -746,6 +675,17 @@ ReliantUNIX-?.5.43) SYSTYPE=ReliantUnix5
+@@ -746,6 +675,21 @@ ReliantUNIX-?.5.43) SYSTYPE=ReliantUnix5
  esac
  
  #
 +# Support for blocklist(3) or blacklist(3).
 +#
-+if test -f /usr/include/blocklist.h; then
-+   CCARGS="$CCARGS -DHAVE_BLOCKLIST"
-+   SYSLIBS="$SYSLIBS -lblocklist"
-+elif test -f /usr/include/blacklist.h; then
-+   CCARGS="$CCARGS -DHAVE_BLACKLIST"
-+   SYSLIBS="$SYSLIBS -lblacklist"
-+fi
++case "$CCARGS" in
++    *-DUSE_BLOCKLIST*)
++      if test -f /usr/include/blocklist.h; then
++          CCARGS="$CCARGS -DHAVE_BLOCKLIST"
++          SYSLIBS="$SYSLIBS -lblocklist"
++      elif test -f /usr/include/blacklist.h; then
++          CCARGS="$CCARGS -DHAVE_BLACKLIST"
++          SYSLIBS="$SYSLIBS -lblacklist"
++      fi
++      ;;
++esac
 +
 +#
  # sigsetjmp()/siglongjmp() can be "better" than setjmp()/longjmp()
diff -r d033fd1944d0 -r 95fe465af251 mail/postfix/patches/patch-src_smtpd_smtpd.c
--- a/mail/postfix/patches/patch-src_smtpd_smtpd.c      Sat Aug 14 08:44:04 2021 +0000
+++ b/mail/postfix/patches/patch-src_smtpd_smtpd.c      Sat Aug 14 08:58:20 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_smtpd_smtpd.c,v 1.1 2021/07/26 15:38:10 taca Exp $
+$NetBSD: patch-src_smtpd_smtpd.c,v 1.2 2021/08/14 08:58:20 taca Exp $
 
 Add blocklist(3) support.
 
@@ -13,12 +13,14 @@
   /*
    * Tunable parameters. Make sure that there is some bound on the length of
    * an SMTP command, so that the mail system stays in control even when a
-@@ -5804,6 +5806,8 @@ static void smtpd_proto(SMTPD_STATE *sta
+@@ -5804,6 +5806,10 @@ static void smtpd_proto(SMTPD_STATE *sta
                   || strcmp(state->reason, REASON_LOST_CONNECTION)) {
            msg_info("%s after %s from %s",
                     state->reason, state->where, state->namaddr);
++#if defined(HAVE_BLOCKLIST) || defined(HAVE_BLACKLIST)
 +          if (strcmp(state->where, SMTPD_CMD_AUTH) == 0)
 +              pfilter_notify(1, vstream_fileno(state->client));
++#endif
        }
      }
  



Home | Main Index | Thread Index | Old Index