From owner-svn-ports-all@freebsd.org Sun Apr 1 23:55:26 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E067F8476D; Sun, 1 Apr 2018 23:55:26 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40A4983EDD; Sun, 1 Apr 2018 23:55:26 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B3BA614A; Sun, 1 Apr 2018 23:55:26 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w31NtQsp054430; Sun, 1 Apr 2018 23:55:26 GMT (envelope-from cpm@FreeBSD.org) Received: (from cpm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w31NtPLC054427; Sun, 1 Apr 2018 23:55:25 GMT (envelope-from cpm@FreeBSD.org) Message-Id: <201804012355.w31NtPLC054427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cpm set sender to cpm@FreeBSD.org using -f From: "Carlos J. Puga Medina" Date: Sun, 1 Apr 2018 23:55:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r466191 - in branches/2018Q2/dns/dnsdist: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: cpm X-SVN-Commit-Paths: in branches/2018Q2/dns/dnsdist: . files X-SVN-Commit-Revision: 466191 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2018 23:55:26 -0000 Author: cpm Date: Sun Apr 1 23:55:25 2018 New Revision: 466191 URL: https://svnweb.freebsd.org/changeset/ports/466191 Log: MFH: r466166 dns/dnsdist: fix rc.d script, add support for LuaJIT and enable some new features - Really fix the rc.d script to start using daemon(8) and add the --supervised commandline argument (which suppresses opening up the console) - Enable DNS-over-TLS (upstream suggests enabling both GnuTLS and OpenSSL backends so you can switch in case of a serious security issue in .ie OpenSSL) - Add OpenSSL support (enabled by default) - Add GnuTLS support (enabled by default) - Add dnstap support (disabled by default) - Add SNMP support (disabled by default) - Add support for LuaJIT or whatever you set as your default version in make.conf (disabled by default) - Bump PORTREVISION PR: 227175 Submitted by: Ralf van der Enden Approved by: ports-secteam (riggs) Added: branches/2018Q2/dns/dnsdist/files/patch-ext_luawrapper_include_LuaContext.hpp - copied unchanged from r466166, head/dns/dnsdist/files/patch-ext_luawrapper_include_LuaContext.hpp Modified: branches/2018Q2/dns/dnsdist/Makefile branches/2018Q2/dns/dnsdist/files/dnsdist.in Directory Properties: branches/2018Q2/ (props changed) Modified: branches/2018Q2/dns/dnsdist/Makefile ============================================================================== --- branches/2018Q2/dns/dnsdist/Makefile Sun Apr 1 23:54:21 2018 (r466190) +++ branches/2018Q2/dns/dnsdist/Makefile Sun Apr 1 23:55:25 2018 (r466191) @@ -3,7 +3,7 @@ PORTNAME= dnsdist DISTVERSION= 1.3.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= dns net MASTER_SITES= https://downloads.powerdns.com/releases/ \ LOCAL/cpm @@ -22,9 +22,10 @@ LIB_DEPENDS= libboost_serialization.so:devel/boost-lib libsodium.so:security/libsodium GNU_CONFIGURE= yes -USES= bison compiler cpe gmake libedit libtool localbase lua:52 \ +USES= bison compiler cpe gmake libedit libtool localbase \ pkgconfig tar:bz2 CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \ + --enable-dns-over-tls \ --enable-dnscrypt \ --enable-libsodium \ --enable-re2 @@ -35,6 +36,30 @@ USERS= _dnsdist GROUPS= _dnsdist USE_RC_SUBR= dnsdist + +OPTIONS_DEFINE= FSTRM LUAJIT SNMP +OPTIONS_DEFAULT= GNUTLS OPENSSL +OPTIONS_MULTI= TLS +OPTIONS_MULTI_TLS= GNUTLS OPENSSL + +FSTRM_DESC= dnstap support (see dnstap.info) +LUAJIT_DESC= Use LuaJIT instead of Lua + +FSTRM_LIB_DEPENDS= libfstrm.so:devel/fstrm +FSTRM_CONFIGURE_ENABLE= fstrm + +GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls +GNUTLS_CONFIGURE_ENABLE=gnutls + +LUAJIT_LIB_DEPENDS= libluajit-5.1.so.2:lang/luajit +LUAJIT_USES_OFF= lua +LUAJIT_CONFIGURE_WITH= luajit + +OPENSSL_USES= ssl +OPENSSL_CONFIGURE_ENABLE=libssl + +SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp +SNMP_CONFIGURE_WITH= net-snmp .include Modified: branches/2018Q2/dns/dnsdist/files/dnsdist.in ============================================================================== --- branches/2018Q2/dns/dnsdist/files/dnsdist.in Sun Apr 1 23:54:21 2018 (r466190) +++ branches/2018Q2/dns/dnsdist/files/dnsdist.in Sun Apr 1 23:55:25 2018 (r466191) @@ -22,7 +22,10 @@ load_rc_config ${name} : ${dnsdist_priv_group:=_dnsdist} : ${dnsdist_enable:=NO} -command=/usr/local/sbin/${name} -command_args="-u ${dnsdist_priv_user} -g ${dnsdist_priv_group}" +pidfile=/var/run/${name}.pid + +command=/usr/sbin/daemon +actual_command=/usr/local/sbin/${name} +command_args="-c -f -r -P ${pidfile} ${actual_command} -u ${dnsdist_priv_user} -g ${dnsdist_priv_group} --supervised" run_rc_command "$1" Copied: branches/2018Q2/dns/dnsdist/files/patch-ext_luawrapper_include_LuaContext.hpp (from r466166, head/dns/dnsdist/files/patch-ext_luawrapper_include_LuaContext.hpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2018Q2/dns/dnsdist/files/patch-ext_luawrapper_include_LuaContext.hpp Sun Apr 1 23:55:25 2018 (r466191, copy of r466166, head/dns/dnsdist/files/patch-ext_luawrapper_include_LuaContext.hpp) @@ -0,0 +1,28 @@ +--- ext/luawrapper/include/LuaContext.hpp.orig 2018-03-29 15:25:58 UTC ++++ ext/luawrapper/include/LuaContext.hpp +@@ -2635,11 +2635,21 @@ struct LuaContext::Reader + static auto read(lua_State* state, int index) + -> boost::optional + { ++ std::string result; ++ ++ // lua_tolstring might convert the variable that would confuse lua_next, so we ++ // make a copy of the variable. ++ lua_pushvalue(state, index); ++ + size_t len; +- const auto val = lua_tolstring(state, index, &len); +- if (val == 0) +- return boost::none; +- return std::string(val, len); ++ const auto val = lua_tolstring(state, -1, &len); ++ ++ if (val != 0) ++ result.assign(val, len); ++ ++ lua_pop(state, 1); ++ ++ return val != 0 ? boost::optional{ std::move(result) } : boost::none; + } + }; +