pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/bind916



Module Name:    pkgsrc
Committed By:   christos
Date:           Sun Aug 30 19:26:46 UTC 2020

Modified Files:
        pkgsrc/net/bind916: distinfo options.mk
        pkgsrc/net/bind916/patches: patch-config.h.in patch-configure
            patch-lib_ns_pfilter.c

Log Message:
add support for both blacklist and blocklist


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/net/bind916/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/bind916/options.mk
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/bind916/patches/patch-config.h.in \
    pkgsrc/net/bind916/patches/patch-configure \
    pkgsrc/net/bind916/patches/patch-lib_ns_pfilter.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/bind916/distinfo
diff -u pkgsrc/net/bind916/distinfo:1.2 pkgsrc/net/bind916/distinfo:1.3
--- pkgsrc/net/bind916/distinfo:1.2     Sun Aug 23 06:03:00 2020
+++ pkgsrc/net/bind916/distinfo Sun Aug 30 15:26:45 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2020/08/23 10:03:00 taca Exp $
+$NetBSD: distinfo,v 1.3 2020/08/30 19:26:45 christos Exp $
 
 SHA1 (bind-9.16.6.tar.xz) = f8a4c1bd074cc0305a4c50971e71da5a3b810d78
 RMD160 (bind-9.16.6.tar.xz) = 3b296d967a6a5a709b599efbffc9697060c5f91b
@@ -17,10 +17,10 @@ SHA1 (patch-bin_tests_system_rpz_tests.s
 SHA1 (patch-bin_tools_arpaname.c) = 868da4454d06dc823680cf06a764fa40b8474708
 SHA1 (patch-bin_tools_nsec3hash.c) = 87c3891db62c45cd8ed2b484b17f7bf2e319bef3
 SHA1 (patch-config.guess) = b3edcb0b841ed7251f313af22ca21b5259ab0d04
-SHA1 (patch-config.h.in) = 1df3dd99685700144c05775b8594981fb9bb9bc0
+SHA1 (patch-config.h.in) = b03a56721762a96439237f7e1fcaa4275c52be49
 SHA1 (patch-config.sub) = 021f252966d9499f76fcbc6e0dd84eb9d5babf5e
 SHA1 (patch-config.threads.in) = fc5cc7097d87523a34c0e630cb8dd1d081d859e5
-SHA1 (patch-configure) = 619a7b81131e945361756e9d1971be2ff1a79851
+SHA1 (patch-configure) = 6467eaf143293852e9edf3bebe92413a1c083151
 SHA1 (patch-contrib_dlz_config.dlz.in) = 6c53d61aaaf1a952a867e4c4da0194db94f511d7
 SHA1 (patch-contrib_dlz_modules_wildcard_dlz__wildcard__dynamic.c) = 37ba5f06f4970abaae6d98c4305f6372537a313f
 SHA1 (patch-lib_dns_byaddr.c) = 647ddaaaf040233e18d1a87d83bc2bd63d2a20e3
@@ -58,7 +58,7 @@ SHA1 (patch-lib_ns_client.c) = e0453a748
 SHA1 (patch-lib_ns_include_ns_client.h) = 56009c601d54491ffd16f6438d55206705a5aa23
 SHA1 (patch-lib_ns_include_ns_pfilter.h) = cc86752971b4f9f7492283c4ad3ff29bc1bae237
 SHA1 (patch-lib_ns_interfacemgr.c) = fc31720734b02155acd7fa9b370a6ebb82022532
-SHA1 (patch-lib_ns_pfilter.c) = c2e7c747a7f1faf3c82871581b6eb561a5c31d77
+SHA1 (patch-lib_ns_pfilter.c) = 14d3d55768ee9abe444ed81ee0839cb9ac67af1f
 SHA1 (patch-lib_ns_query.c) = fb9ee13205a95a7fc52893406dbeaf3145640ea6
 SHA1 (patch-lib_ns_update.c) = 30468795b1d8ea5b81ad799a395a8a37ec7fa2d0
 SHA1 (patch-lib_ns_xfrout.c) = 82fe2dd10feaef58a042103b9d417bfeb49d12b7

Index: pkgsrc/net/bind916/options.mk
diff -u pkgsrc/net/bind916/options.mk:1.1 pkgsrc/net/bind916/options.mk:1.2
--- pkgsrc/net/bind916/options.mk:1.1   Sun Aug  9 11:20:21 2020
+++ pkgsrc/net/bind916/options.mk       Sun Aug 30 15:26:45 2020
@@ -1,8 +1,8 @@
-# $NetBSD: options.mk,v 1.1 2020/08/09 15:20:21 taca Exp $
+# $NetBSD: options.mk,v 1.2 2020/08/30 19:26:45 christos Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.bind916
 PKG_SUPPORTED_OPTIONS= bind-dig-sigchase bind-xml-statistics-server
-PKG_SUPPORTED_OPTIONS+=        bind-json-statistics-server blacklist
+PKG_SUPPORTED_OPTIONS+=        bind-json-statistics-server blacklist blocklist
 PKG_SUPPORTED_OPTIONS+=        threads readline lmdb mysql pgsql ldap dlz-filesystem
 PKG_SUPPORTED_OPTIONS+=        geoip tuning dnstap # pkcs11
 PKG_SUGGESTED_OPTIONS+=        readline
@@ -23,8 +23,10 @@ PKG_SUGGESTED_OPTIONS+=      threads
 .endif
 
 .if ${OPSYS} == "NetBSD"
-.  if !empty(OS_VERSION:M[8-9].*)
+.   if exists(/usr/include/blacklist.h)
 PKG_SUGGESTED_OPTIONS+=        blacklist
+.   elif exists(/usr/include/blocklist.h)
+PKG_SUGGESTED_OPTIONS+=        blocklist
 .  endif
 .endif
 
@@ -71,6 +73,12 @@ CONFIGURE_ARGS+=     --with-blacklist=yes
 CONFIGURE_ARGS+=       --with-blacklist=no
 .endif
 
+.if !empty(PKG_OPTIONS:Mblocklist)
+CONFIGURE_ARGS+=       --with-blocklist=yes
+.else
+CONFIGURE_ARGS+=       --with-blocklist=no
+.endif
+
 .if !empty(PKG_OPTIONS:Mgeoip)
 CONFIGURE_ARGS+=       --with-geoip=${PREFIX}
 LDFLAGS+=              -lGeoIP

Index: pkgsrc/net/bind916/patches/patch-config.h.in
diff -u pkgsrc/net/bind916/patches/patch-config.h.in:1.1 pkgsrc/net/bind916/patches/patch-config.h.in:1.2
--- pkgsrc/net/bind916/patches/patch-config.h.in:1.1    Sun Aug  9 11:20:22 2020
+++ pkgsrc/net/bind916/patches/patch-config.h.in        Sun Aug 30 15:26:45 2020
@@ -1,16 +1,19 @@
-$NetBSD: patch-config.h.in,v 1.1 2020/08/09 15:20:22 taca Exp $
+$NetBSD: patch-config.h.in,v 1.2 2020/08/30 19:26:45 christos Exp $
 
 * Take from NetBSD base, adding support for blacklistd.
 
---- config.h.in.orig   2019-06-04 15:20:04.000000000 +0000
-+++ config.h.in
-@@ -48,6 +48,9 @@
+--- config.h.in.orig   2020-07-03 06:44:14.000000000 -0400
++++ config.h.in        2020-08-30 15:04:46.317494639 -0400
+@@ -45,6 +45,12 @@
  /* define if the ARM yield instruction is available */
  #undef HAVE_ARM_YIELD
  
 +/* Define to 1 if blacklist is supported. */
 +#undef HAVE_BLACKLIST
 +
++/* Define to 1 if blocklist is supported. */
++#undef HAVE_BLOCKLIST
++
  /* Define to 1 if the compiler supports __builtin_clz. */
  #undef HAVE_BUILTIN_CLZ
  
Index: pkgsrc/net/bind916/patches/patch-configure
diff -u pkgsrc/net/bind916/patches/patch-configure:1.1 pkgsrc/net/bind916/patches/patch-configure:1.2
--- pkgsrc/net/bind916/patches/patch-configure:1.1      Sun Aug  9 11:20:22 2020
+++ pkgsrc/net/bind916/patches/patch-configure  Sun Aug 30 15:26:45 2020
@@ -1,22 +1,24 @@
-$NetBSD: patch-configure,v 1.1 2020/08/09 15:20:22 taca Exp $
+$NetBSD: patch-configure,v 1.2 2020/08/30 19:26:45 christos Exp $
 
 * Add DragonFly support.
 * Use proper link options for NetBSD.
 * Link proper postgresql library.
 * Take from NetBSD base, adding support for blacklistd.
 
---- configure.orig     2020-07-03 10:44:14.000000000 +0000
-+++ configure
-@@ -637,6 +637,8 @@ BUILD_LDFLAGS
+--- configure.orig     2020-07-03 06:44:14.000000000 -0400
++++ configure  2020-08-30 15:10:37.131653135 -0400
+@@ -637,6 +637,10 @@
  BUILD_CPPFLAGS
  BUILD_CFLAGS
  BUILD_CC
 +BLACKLISTLINKOBJS
 +BLACKLISTLINKSRCS
++BLOCKLISTLINKOBJS
++BLOCKLISTLINKSRCS
  DLZ_DRIVER_MYSQL_LIBS
  DLZ_DRIVER_MYSQL_INCLUDES
  DLZ_SYSTEM_TEST
-@@ -732,6 +734,8 @@ JSON_C_LIBS
+@@ -732,6 +736,8 @@
  JSON_C_CFLAGS
  LIBXML2_LIBS
  LIBXML2_CFLAGS
@@ -25,24 +27,25 @@ $NetBSD: patch-configure,v 1.1 2020/08/0
  NZD_MANS
  NZDTARGETS
  NZDSRCS
-@@ -1719,6 +1723,7 @@ Optional Packages:
+@@ -1719,6 +1725,8 @@
    --with-dlz-stub=ARG     Build with stub DLZ driver [yes|no]. (Required to
                            use stub driver with DLZ)
    --with-make-clean       run "make clean" at end of configure [yes|no]
 +  --with-blacklist      Build with blacklist
++  --with-blocklist      Build with blocklist
  
  Some influential environment variables:
    CC          C compiler command
-@@ -3917,7 +3922,7 @@ fi
+@@ -3917,7 +3925,7 @@
  
  # On IRIX 5.3, sys/types and inttypes.h are conflicting.
  for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
 -                inttypes.h stdint.h unistd.h
-+                inttypes.h stdint.h unistd.h blacklist.h
++                inttypes.h stdint.h unistd.h blacklist.h blocklist.h
  do :
    as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-@@ -18385,6 +18390,135 @@ esac
+@@ -18385,7 +18393,265 @@
  
  
  
@@ -175,10 +178,140 @@ $NetBSD: patch-configure,v 1.1 2020/08/0
 +      BLACKLISTLINKSRCS='${BLACKLISTLINKSRCS}'
 +      BLACKLISTLINKOBJS='${BLACKLISTLINKOBJS}'
 +fi
++
++#
++# was --with-blocklist specified?
++#
++BLOCKLISTLINKOBJS=
++BLOCKLISTLINKSRCS=
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for blocklist library" >&5
++$as_echo_n "checking for blocklist library... " >&6; }
++
++# Check whether --with-blocklist was given.
++if test "${with_blocklist+set}" = set; then :
++  withval=$with_blocklist; with_blocklist="$withval"
++else
++  with_blocklist="auto"
++fi
++
++
++have_blocklist=""
++case "$with_blocklist" in
++      no)
++              ;;
++      auto|yes)
++              for d in /usr /usr/local /opt/local
++              do
++                      if test -f "${d}/include/blocklist.h"
++                      then
++                              if test ${d} != /usr
++                              then
++                                      blocklist_cflags="-I ${d}/include"
++                                      LIBS="$LIBS -L${d}/lib"
++                              fi
++                              have_blocklist="yes"
++                      fi
++              done
++              ;;
++      *)
++              if test -f "${with_blocklist}/include/blocklist.h"
++              then
++                      blocklist_cflags="-I${with_blocklist}/include"
++                      LIBS="$LIBS -L${with_blocklist}/lib"
++                      have_blocklist="yes"
++              else
++                      as_fn_error $? "$with_blocklist/include/blocklist.h not found." "$LINENO" 5
++              fi
++              ;;
++esac
++
++if test "X${have_blocklist}" != "X"
++then
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing blocklist" >&5
++$as_echo_n "checking for library containing blocklist... " >&6; }
++if ${ac_cv_search_blocklist+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char blocklist_open(void);
++int
++main ()
++{
++return blocklist_open();
++  ;
++  return 0;
++}
++_ACEOF
++for ac_lib in '' blocklist; do
++  if test -z "$ac_lib"; then
++    ac_res="none required"
++  else
++    ac_res=-l$ac_lib
++    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++  fi
++  if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_blocklist=$ac_res
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext
++  if ${ac_cv_search_blocklist+:} false; then :
++  break
++fi
++done
++if ${ac_cv_search_blocklist+:} false; then :
++
++else
++  ac_cv_search_blocklist=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_blocklist" >&5
++$as_echo "$ac_cv_search_blocklist" >&6; }
++ac_res=$ac_cv_search_blocklist
++if test "$ac_res" != no; then :
++  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++else
++  as_fn_error $? "found blocklist include but not library." "$LINENO" 5
++                      have_blocklist=""
++fi
++
++elif test "X$with_blocklist" = Xyes
++then
++      as_fn_error $? "include/blocklist.h not found." "$LINENO" 5
++else
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++BLOCKLIST=
++if test "X${have_blocklist}" != "X"
++then
++      CFLAGS="$CFLAGS $blocklist_cflags"
++
++$as_echo "#define HAVE_BLOCKLIST 1" >>confdefs.h
  
++      BLOCKLIST=1
++      BLOCKLISTLINKSRCS='${BLOCKLISTLINKSRCS}'
++      BLOCKLISTLINKOBJS='${BLOCKLISTLINKOBJS}'
++fi
  # Check whether --with-zlib was given.
  if test "${with_zlib+set}" = set; then :
-@@ -22517,7 +22651,7 @@ else
+   withval=$with_zlib;
+@@ -22517,7 +22783,7 @@
  
  fi
                ;; #(
@@ -187,7 +320,7 @@ $NetBSD: patch-configure,v 1.1 2020/08/0
  
                 LDFLAGS="${LDFLAGS} -Wl,-E"
                 SO_CFLAGS="-fpic"
-@@ -22549,9 +22683,9 @@ fi
+@@ -22549,9 +22815,9 @@
                ;; #(
    *-solaris*) :
  
@@ -200,7 +333,7 @@ $NetBSD: patch-configure,v 1.1 2020/08/0
                ;; #(
    ia64-hp-hpux*) :
  
-@@ -22980,8 +23114,8 @@ $as_echo "no" >&6; }
+@@ -22980,8 +23246,8 @@
        fi
        if test -n "-L$use_dlz_postgres_lib -lpq"
        then
@@ -211,19 +344,30 @@ $NetBSD: patch-configure,v 1.1 2020/08/0
        fi
  
  
-@@ -26186,6 +26320,7 @@ report() {
+@@ -24465,6 +24731,8 @@
+   case $ac_option in
+   # Handling of the options.
+   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
++      : Avoid regenerating within pkgsrc
++      exit 0
+     ac_cs_recheck=: ;;
+   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+     $as_echo "$ac_cs_version"; exit ;;
+@@ -26186,6 +26454,8 @@
        test "X$PYTHON" = "X" || echo "    Python tools (--with-python)"
        test "X$LIBXML2_LIBS" = "X" || echo "    XML statistics (--with-libxml2)"
        test "X$JSON_C_LIBS" = "X" || echo "    JSON statistics (--with-json-c): $JSON_C_CFLAGS $JSON_C_LIBS"
 +      test "X$BLACKLIST" = "X" || echo "    blacklist support (--with-blacklist)"
++      test "X$BLOCKLIST" = "X" || echo "    blocklist support (--with-blocklist)"
        test "X$ZLIB_LIBS" = "X" || echo "    HTTP zlib compression (--with-zlib)"
        test "X$NZD_TOOLS" = "X" || echo "    LMDB database to store configuration for 'addzone' zones (--with-lmdb)"
        test "no" = "$with_libidn2" || echo "    IDN support (--with-libidn2)"
-@@ -26264,6 +26399,7 @@ report() {
+@@ -26264,6 +26534,8 @@
      test "X$PYTHON" = "X" && echo "    Python tools (--with-python)"
      test "X$LIBXML2_LIBS" = "X" && echo "    XML statistics (--with-libxml2)"
      test "X$JSON_C_LIBS" = "X" && echo "    JSON statistics (--with-json-c)"
 +    test "X$BLACKLIST" = "X" && echo "    blacklist support (--with-blacklist)"
++    test "X$BLOCKLIST" = "X" && echo "    blocklist support (--with-blocklist)"
      test "X$ZLIB_LIBS" = "X" && echo "    HTTP zlib compression (--with-zlib)"
      test "X$NZD_TOOLS" = "X" && echo "    LMDB database to store configuration for 'addzone' zones (--with-lmdb)"
      test "no" = "$with_libidn2" && echo "    IDN support (--with-libidn2)"
Index: pkgsrc/net/bind916/patches/patch-lib_ns_pfilter.c
diff -u pkgsrc/net/bind916/patches/patch-lib_ns_pfilter.c:1.1 pkgsrc/net/bind916/patches/patch-lib_ns_pfilter.c:1.2
--- pkgsrc/net/bind916/patches/patch-lib_ns_pfilter.c:1.1       Sun Aug  9 11:20:22 2020
+++ pkgsrc/net/bind916/patches/patch-lib_ns_pfilter.c   Sun Aug 30 15:26:45 2020
@@ -1,21 +1,32 @@
-$NetBSD: patch-lib_ns_pfilter.c,v 1.1 2020/08/09 15:20:22 taca Exp $
+$NetBSD: patch-lib_ns_pfilter.c,v 1.2 2020/08/30 19:26:45 christos Exp $
 
 * Take from NetBSD base.
 
---- lib/ns/pfilter.c.orig      2020-05-27 15:17:34.821165296 +0000
-+++ lib/ns/pfilter.c
-@@ -0,0 +1,44 @@
+--- lib/ns/pfilter.c.orig      2020-08-30 14:56:09.038428676 -0400
++++ lib/ns/pfilter.c   2020-08-30 15:07:25.182798415 -0400
+@@ -0,0 +1,55 @@
++
++#include "config.h"
 +
 +#include <isc/platform.h>
 +#include <isc/util.h>
 +#include <ns/types.h>
 +#include <ns/client.h>
 +
++#ifdef HAVE_BLACKLIST
 +#include <blacklist.h>
++#define blocklist blacklist
++#define blocklist_open blacklist_open
++#define blocklist_sa_r blacklist_sa_r
++#endif
++
++#ifdef HAVE_BLOCKLIST
++#include <blocklist.h>
++#endif
 +
 +#include <ns/pfilter.h>
 +
-+static struct blacklist *blstate;
++static struct blocklist *blstate;
 +static int blenable;
 +
 +void
@@ -34,7 +45,7 @@ $NetBSD: patch-lib_ns_pfilter.c,v 1.1 20
 +              return;
 +
 +      if (blstate == NULL)
-+              blstate = blacklist_open();
++              blstate = blocklist_open();
 +
 +      if (blstate == NULL)
 +              return;
@@ -45,7 +56,7 @@ $NetBSD: patch-lib_ns_pfilter.c,v 1.1 20
 +      if ((fd = isc_nmhandle_getfd(client->handle)) == -1)
 +              return;
 +
-+      blacklist_sa_r(blstate, 
++      blocklist_sa_r(blstate, 
 +          res != ISC_R_SUCCESS, fd,
 +          &client->peeraddr.type.sa, client->peeraddr.length, msg);
 +}



Home | Main Index | Thread Index | Old Index