dnsdist 1.3.0 has been released, with interesting new features such as DNS-over-TLS. Changelog at https://dnsdist.org/changelog.html#change-1.3.0

Patch pasted below; in case it got mangled, you can also find it at https://github.com/openbsd/ports/compare/master...PowerDNS:dnsdist-1.3.0.diff

In addition to upgrading the port to 1.3.0, this patch enables DNS-over-TLS support (new in 1.3.0) and DNSCrypt support (which was present in earlier versions but not supported by the port). It also enables rc_bg because daemonisation support was dropped from dnsdist.

The dnsdist-lua.cc patch has been upstreamed as https://github.com/PowerDNS/pdns/pull/6429 for inclusion in the next dnsdist release.

There is one open problem (that was present in the 1.2.0 port as well): installation delivers an empty dir /etc/dnsdist/dnsdist, instead of copying share/examples/dnsdist/dnsdistconf.lua to /etc/dnsdist/dnsdist.conf. I have tried various edits to pkg/PLIST to resolve this, but without success. The patch below leaves pkg/PLIST untouched until I (or someone else) figures out what to do here.

ok?

Kind regards,
--
Peter van Dijk
PowerDNS.COM BV - https://www.powerdns.com/


diff --git a/net/dnsdist/Makefile b/net/dnsdist/Makefile
index 86ba5229556..2ab8bdf3703 100644
--- a/net/dnsdist/Makefile
+++ b/net/dnsdist/Makefile
@@ -2,9 +2,8 @@

 COMMENT=               highly DNS-, DoS- and abuse-aware loadbalancer

-DISTNAME=              dnsdist-1.2.0
+DISTNAME=              dnsdist-1.3.0
 EXTRACT_SUFX=          .tar.bz2
-REVISION=              0

 CATEGORIES=            net

@@ -15,7 +14,8 @@ MAINTAINER= Peter van Dijk <peter.van.d...@powerdns.com>
 # GPLv2 only
 PERMIT_PACKAGE_CDROM=  Yes

-WANTLIB += ${MODLUA_WANTLIB} c curses edit m protobuf pthread z ${COMPILER_LIBCXX}
+WANTLIB +=             ${MODLUA_WANTLIB} c curses edit m protobuf pthread \
+                       z crypto ssl sodium ${COMPILER_LIBCXX}

 MASTER_SITES=          https://downloads.powerdns.com/releases/

@@ -25,7 +25,9 @@ USE_GMAKE=            Yes

 CONFIGURE_ARGS+=       --disable-hardening \
                        --with-lua \
-                       --without-net-snmp
+                       --without-net-snmp \
+                       --enable-dns-over-tls \
+                       --enable-dnscrypt
 CONFIGURE_ENV+=                CPPFLAGS="-I${LOCALBASE}/include" \
                        LDFLAGS="-L${LOCALBASE}/lib" \
                        LIBEDIT_LIBS='-ledit -lcurses' \
@@ -39,6 +41,7 @@ MODLUA_VERSION=               5.3

 BUILD_DEPENDS=         devel/boost
 LIB_DEPENDS+=          ${MODLUA_LIB_DEPENDS} \
+                       security/libsodium \
                        devel/protobuf

 .if ${MACHINE_ARCH:Mi386}
diff --git a/net/dnsdist/distinfo b/net/dnsdist/distinfo
index 8d6706a4183..004167bb6d6 100644
--- a/net/dnsdist/distinfo
+++ b/net/dnsdist/distinfo
@@ -1,2 +1,2 @@
-SHA256 (dnsdist-1.2.0.tar.bz2) = mIXJ7orHB2rt5YbqWNRkLrh357LXbJAiVElOKlpfqng=
-SIZE (dnsdist-1.2.0.tar.bz2) = 876104
+SHA256 (dnsdist-1.3.0.tar.bz2) = qmfNTbhAShPtTtEJfdhQID2rijJzcvcrsUDfEe9+ugg=
+SIZE (dnsdist-1.3.0.tar.bz2) = 924183
diff --git a/net/dnsdist/patches/patch-dnsdist-lua_cc b/net/dnsdist/patches/patch-dnsdist-lua_cc
new file mode 100644
index 00000000000..9e6f0132e88
--- /dev/null
+++ b/net/dnsdist/patches/patch-dnsdist-lua_cc
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- dnsdist-lua.cc
++++ dnsdist-lua.cc
+@@ -22,9 +22,9 @@
+
+ #include <dirent.h>
+ #include <fstream>
++#include <sys/socket.h>
+ #include <net/if.h>
+ #include <sys/types.h>
+-#include <sys/socket.h>
+ #include <sys/stat.h>
+ #include <thread>
diff --git a/net/dnsdist/pkg/dnsdist.rc b/net/dnsdist/pkg/dnsdist.rc
index f21032ee0d1..68ab5853b72 100644
--- a/net/dnsdist/pkg/dnsdist.rc
+++ b/net/dnsdist/pkg/dnsdist.rc
@@ -2,10 +2,12 @@
 #
 # $OpenBSD: dnsdist.rc,v 1.2 2018/01/11 19:27:05 rpe Exp $

-daemon="${TRUEPREFIX}/bin/dnsdist -d -u _dnsdist"
+daemon="${TRUEPREFIX}/bin/dnsdist"
+daemon_flags="-u _dnsdist --supervised"

 . /etc/rc.d/rc.subr

+rc_bg=YES
 rc_reload=NO

 rc_cmd $1

Reply via email to