Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/bind916 add support for both blacklist and blocklist



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9c0e68910287
branches:  trunk
changeset: 437727:9c0e68910287
user:      christos <christos%pkgsrc.org@localhost>
date:      Sun Aug 30 19:26:45 2020 +0000

description:
add support for both blacklist and blocklist

diffstat:

 net/bind916/distinfo                       |    8 +-
 net/bind916/options.mk                     |   14 +-
 net/bind916/patches/patch-config.h.in      |   11 +-
 net/bind916/patches/patch-configure        |  172 ++++++++++++++++++++++++++--
 net/bind916/patches/patch-lib_ns_pfilter.c |   25 +++-
 5 files changed, 198 insertions(+), 32 deletions(-)

diffs (truncated from 412 to 300 lines):

diff -r 2893a230c095 -r 9c0e68910287 net/bind916/distinfo
--- a/net/bind916/distinfo      Sun Aug 30 19:13:38 2020 +0000
+++ b/net/bind916/distinfo      Sun Aug 30 19:26:45 2020 +0000
@@ -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_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_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
diff -r 2893a230c095 -r 9c0e68910287 net/bind916/options.mk
--- a/net/bind916/options.mk    Sun Aug 30 19:13:38 2020 +0000
+++ b/net/bind916/options.mk    Sun Aug 30 19:26:45 2020 +0000
@@ -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 @@
 .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=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
diff -r 2893a230c095 -r 9c0e68910287 net/bind916/patches/patch-config.h.in
--- a/net/bind916/patches/patch-config.h.in     Sun Aug 30 19:13:38 2020 +0000
+++ b/net/bind916/patches/patch-config.h.in     Sun Aug 30 19:26:45 2020 +0000
@@ -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
  
diff -r 2893a230c095 -r 9c0e68910287 net/bind916/patches/patch-configure
--- a/net/bind916/patches/patch-configure       Sun Aug 30 19:13:38 2020 +0000
+++ b/net/bind916/patches/patch-configure       Sun Aug 30 19:26:45 2020 +0000
@@ -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 @@
  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 @@
 +      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 @@
  



Home | Main Index | Thread Index | Old Index