From owner-svn-ports-head@freebsd.org Tue Feb 4 10:38:45 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF87C24273B; Tue, 4 Feb 2020 10:38:45 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Bh4j4Kmgz3F6R; Tue, 4 Feb 2020 10:38:45 +0000 (UTC) (envelope-from 0mp@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 8FD3B1864F; Tue, 4 Feb 2020 10:38:45 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 014AcjDX024478; Tue, 4 Feb 2020 10:38:45 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 014AciGI024474; Tue, 4 Feb 2020 10:38:44 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202002041038.014AciGI024474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 4 Feb 2020 10:38:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r525141 - in head/dns/dnsdist: . files X-SVN-Group: ports-head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in head/dns/dnsdist: . files X-SVN-Commit-Revision: 525141 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2020 10:38:45 -0000 Author: 0mp Date: Tue Feb 4 10:38:44 2020 New Revision: 525141 URL: https://svnweb.freebsd.org/changeset/ports/525141 Log: dns/dnsdist: Update to 1.4.0 - Lint Makefile - Some configure switches changed from --enable to --with - Rename FSTRM to DNSTAP - Add DoH support - Switch to LuaJIT-Openresty (when LUAJIT is selected instead of LUA) - Remove unnecessary patch (files/patch-dnsdist-lua-vars.cc) - Major improvement in the rc script: allowing multiple daemons - Start using -C and %%ETCDIR%% causing the default path for dnsdist.conf changes to usually /usr/local/etc/dnsdist/ in which you can store single or multiple config files, includes, key-files for DNSCrypt, key/certs for DoH, etc. Also, change maintainer to Ralf van der Enden. Changelog: https://dnsdist.org/changelog.html PR: 242125 Submitted by: Jørn Åne de Jong, Ralf van der Enden, Leo Vandewoestijne Reviewed by: cpm@, Sascha Biberhofer, Yann Kerherve Approved by: maintainer Deleted: head/dns/dnsdist/files/patch-dnsdist-lua-vars.cc Modified: head/dns/dnsdist/Makefile head/dns/dnsdist/distinfo head/dns/dnsdist/files/dnsdist.in head/dns/dnsdist/pkg-plist Modified: head/dns/dnsdist/Makefile ============================================================================== --- head/dns/dnsdist/Makefile Tue Feb 4 10:28:59 2020 (r525140) +++ head/dns/dnsdist/Makefile Tue Feb 4 10:38:44 2020 (r525141) @@ -2,13 +2,11 @@ # $FreeBSD$ PORTNAME= dnsdist -DISTVERSION= 1.3.3 -PORTREVISION= 13 +DISTVERSION= 1.4.0 CATEGORIES= dns net -MASTER_SITES= https://downloads.powerdns.com/releases/ \ - LOCAL/cpm +MASTER_SITES= https://downloads.powerdns.com/releases/ -MAINTAINER= cpm@FreeBSD.org +MAINTAINER= tremere@cainites.net COMMENT= Highly DNS-, DoS- and abuse-aware loadbalancer LICENSE= GPLv2 UNLICENSE @@ -18,54 +16,58 @@ LICENSE_FILE_UNLICENSE= ${WRKSRC}/ext/incbin/UNLICENSE BUILD_DEPENDS= ${LOCALBASE}/lib/libatomic_ops.a:devel/libatomic_ops LIB_DEPENDS= libboost_serialization.so:devel/boost-libs \ + libh2o-evloop.so:www/h2o \ libprotobuf.so:devel/protobuf \ libre2.so:devel/re2 \ libsodium.so:security/libsodium -GNU_CONFIGURE= yes USES= bison compiler:c++14-lang cpe gmake libedit libtool localbase \ pkgconfig tar:bz2 +USE_RC_SUBR= dnsdist + +GNU_CONFIGURE= yes CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \ + --enable-dns-over-https \ --enable-dns-over-tls \ --enable-dnscrypt \ - --enable-libsodium \ - --enable-re2 + --sysconfdir=${ETCDIR} \ + --with-libsodium \ + --with-re2 INSTALL_TARGET= install-strip USERS= _dnsdist GROUPS= _dnsdist -USE_RC_SUBR= dnsdist - -OPTIONS_DEFINE= FSTRM LUAJIT SNMP +OPTIONS_DEFINE= DNSTAP 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 +DNSTAP_DESC= dnstap support (see dnstap.info) +LUAJIT_DESC= Use LuaJIT instead of Lua -FSTRM_LIB_DEPENDS= libfstrm.so:devel/fstrm -FSTRM_CONFIGURE_ENABLE= fstrm +DNSTAP_LIB_DEPENDS= libfstrm.so:devel/fstrm +DNSTAP_CONFIGURE_ENABLE= fstrm -GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls -GNUTLS_CONFIGURE_ENABLE=gnutls +GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls +GNUTLS_CONFIGURE_ENABLE= gnutls -LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit +LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit-openresty LUAJIT_USES_OFF= lua -LUAJIT_CONFIGURE_ON= --with-lua=luajit LUAJIT_CONFIGURE_OFF= --with-lua=lua-${LUA_VER} +LUAJIT_CONFIGURE_ON= --with-lua=luajit OPENSSL_USES= ssl -OPENSSL_CONFIGURE_ENABLE=libssl -OPENSSL_CONFIGURE_ON= LIBSSL_CFLAGS=-I${OPENSSLINC} LIBSSL_LIBS="-L${OPENSSLLIB} -lssl" +OPENSSL_CONFIGURE_ON= LIBSSL_CFLAGS=-I${OPENSSLINC} \ + LIBSSL_LIBS="-L${OPENSSLLIB} -lssl" +OPENSSL_CONFIGURE_WITH= libssl SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp SNMP_CONFIGURE_WITH= net-snmp post-install: - ${INSTALL_DATA} ${FILESDIR}/dnsdist.conf.sample \ - ${STAGEDIR}${PREFIX}/etc + @${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${FILESDIR}/dnsdist.conf.sample ${STAGEDIR}${ETCDIR} .include Modified: head/dns/dnsdist/distinfo ============================================================================== --- head/dns/dnsdist/distinfo Tue Feb 4 10:28:59 2020 (r525140) +++ head/dns/dnsdist/distinfo Tue Feb 4 10:38:44 2020 (r525141) @@ -1,3 +1,3 @@ -TIMESTAMP = 1541860683 -SHA256 (dnsdist-1.3.3.tar.bz2) = 9fb24f9032025955169f3c6e9b0a05b6aa9d6441ec47da08d22de1c1aa23e8cf -SIZE (dnsdist-1.3.3.tar.bz2) = 971253 +TIMESTAMP = 1579127277 +SHA256 (dnsdist-1.4.0.tar.bz2) = a336fa2c3eb381c2464d9d9790014fd6d4505029ed2c1b73ee1dc9115a2f1dc0 +SIZE (dnsdist-1.4.0.tar.bz2) = 1044479 Modified: head/dns/dnsdist/files/dnsdist.in ============================================================================== --- head/dns/dnsdist/files/dnsdist.in Tue Feb 4 10:28:59 2020 (r525140) +++ head/dns/dnsdist/files/dnsdist.in Tue Feb 4 10:38:44 2020 (r525141) @@ -3,12 +3,25 @@ # $FreeBSD$ # # PROVIDE: dnsdist -# REQUIRE: NETWORKING DAEMON +# REQUIRE: DAEMON NETWORKING # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable dnsdist: # # dnsdist_enable="YES" +# +# Multiple profiles are supported with +# +# dnsdist_profiles="name1 name2" +# dnsdist_name1_enable="YES" +# dnsdist_name1_config="/path/to/config1" +# dnsdist_name2_enable="YES" +# dnsdist_name2_config="/path/to/config2" +# +# This script does't validate uid/gid per profile (yet) +# It still uses the default or definition of +# dnsdist_priv_user and/or dnsdist_priv_group +# . /etc/rc.subr @@ -18,14 +31,67 @@ rcvar=dnsdist_enable load_rc_config ${name} +: ${dnsdist_enable:=NO} +: ${dnsdist_config:=%%ETCDIR%%/dnsdist.conf} : ${dnsdist_priv_user:=_dnsdist} : ${dnsdist_priv_group:=_dnsdist} -: ${dnsdist_enable:=NO} -pidfile=/var/run/${name}.pid - +pidfile="/var/run/${name}.pid" +required_files=${dnsdist_config} +actual_command="%%PREFIX%%/sbin/${name} -C ${dnsdist_config} -u ${dnsdist_priv_user} -g ${dnsdist_priv_group} --supervised" 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" +command_args="-c -f -r -P ${pidfile} -- ${actual_command}" + +if [ -n "$2" ]; then + profile="$2" + if [ "x${dnsdist_profiles}" != "x" ]; then + eval dnsdist_config="\${dnsdist_${profile}_config:-%%ETCDIR%%/dnsdist-${profile}.conf}" + if [ "x${dnsdist_config}" = "x" ]; then + echo "You must define a configuration file (dnsdist_${profile}_config)" >&2 + exit 1 + fi + eval dnsdist_enable="\${dnsdist_${profile}_enable:-${dnsdist_enable}}" + pidfile="/var/run/${name}-${profile}.pid" + required_files="${dnsdist_config}" + actual_command="%%PREFIX%%/sbin/${name} -C ${dnsdist_config} -u ${dnsdist_priv_user} -g ${dnsdist_priv_group} --supervised" + command_args="-c -f -r -P ${pidfile} -- ${actual_command}" + else + echo "$0: extra argument ignored" >&2 + fi +else + if [ "x${dnsdist_profiles}" != "x" -a "x$1" != "x" ]; then + for profile in ${dnsdist_profiles}; do + eval _enable="\${dnsdist_${profile}_enable}" + case "x${_enable:-${dnsdist_enable}}" in + x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee]) + continue + ;; + x[Yy][Ee][Ss]) + ;; + *) + if test -z "$_enable"; then + _var=dnsdist_enable + else + _var=dnsdist_"${profile}"_enable + fi + echo "Bad value" \ + "'${_enable:-${dnsdist_enable}}'" \ + "for ${_var}. " \ + "Profile ${profile} skipped." >&2 + continue + ;; + esac + echo "===> dnsdist profile: ${profile}" >&2 + %%PREFIX%%/etc/rc.d/dnsdist $1 ${profile} + retcode="$?" + if [ "0${retcode}" -ne 0 ]; then + failed="${profile} (${retcode}) ${failed:-}" + else + success="${profile} ${success:-}" + fi + done + exit 0 + fi +fi run_rc_command "$1" Modified: head/dns/dnsdist/pkg-plist ============================================================================== --- head/dns/dnsdist/pkg-plist Tue Feb 4 10:28:59 2020 (r525140) +++ head/dns/dnsdist/pkg-plist Tue Feb 4 10:38:44 2020 (r525141) @@ -1,3 +1,3 @@ sbin/dnsdist man/man1/dnsdist.1.gz -@sample etc/dnsdist.conf.sample +@sample etc/dnsdist/dnsdist.conf.sample