View | Details | Raw Unified | Return to bug 242125 | Differences between
and this patch

Collapse All | Expand All

(-)dns/dnsdist/Makefile (-20 / +21 lines)
Lines 2-14 Link Here
2
# $FreeBSD: head/dns/dnsdist/Makefile 509290 2019-08-19 15:35:27Z jbeich $
2
# $FreeBSD: head/dns/dnsdist/Makefile 509290 2019-08-19 15:35:27Z jbeich $
3
3
4
PORTNAME=	dnsdist
4
PORTNAME=	dnsdist
5
DISTVERSION=	1.3.3
5
DISTVERSION=	1.4.0
6
PORTREVISION=	11
7
CATEGORIES=	dns net
6
CATEGORIES=	dns net
8
MASTER_SITES=	https://downloads.powerdns.com/releases/ \
7
MASTER_SITES=	https://downloads.powerdns.com/releases/
9
		LOCAL/cpm
10
8
11
MAINTAINER=	cpm@FreeBSD.org
9
MAINTAINER=	tremere@cainites.net
12
COMMENT=	Highly DNS-, DoS- and abuse-aware loadbalancer
10
COMMENT=	Highly DNS-, DoS- and abuse-aware loadbalancer
13
11
14
LICENSE=	GPLv2 UNLICENSE
12
LICENSE=	GPLv2 UNLICENSE
Lines 18-65 Link Here
18
16
19
BUILD_DEPENDS=	${LOCALBASE}/lib/libatomic_ops.a:devel/libatomic_ops
17
BUILD_DEPENDS=	${LOCALBASE}/lib/libatomic_ops.a:devel/libatomic_ops
20
LIB_DEPENDS=	libboost_serialization.so:devel/boost-libs \
18
LIB_DEPENDS=	libboost_serialization.so:devel/boost-libs \
19
		libh2o-evloop.so:www/h2o \
21
		libprotobuf.so:devel/protobuf \
20
		libprotobuf.so:devel/protobuf \
22
		libre2.so:devel/re2 \
21
		libre2.so:devel/re2 \
23
		libsodium.so:security/libsodium
22
		libsodium.so:security/libsodium
24
23
25
GNU_CONFIGURE=	yes
26
USES=		bison compiler:c++14-lang cpe gmake libedit libtool localbase \
24
USES=		bison compiler:c++14-lang cpe gmake libedit libtool localbase \
27
		pkgconfig tar:bz2
25
		pkgconfig tar:bz2
26
USE_RC_SUBR=	dnsdist
27
28
GNU_CONFIGURE=	yes
28
CONFIGURE_ARGS=	--bindir=${PREFIX}/sbin \
29
CONFIGURE_ARGS=	--bindir=${PREFIX}/sbin \
30
		--enable-dns-over-https \
29
		--enable-dns-over-tls \
31
		--enable-dns-over-tls \
30
		--enable-dnscrypt \
32
		--enable-dnscrypt \
31
		--enable-libsodium \
33
		--with-libsodium \
32
		--enable-re2
34
		--with-re2
33
35
34
INSTALL_TARGET=	install-strip
36
INSTALL_TARGET=	install-strip
35
37
36
USERS=		_dnsdist
38
USERS=		_dnsdist
37
GROUPS=		_dnsdist
39
GROUPS=		_dnsdist
38
40
39
USE_RC_SUBR=	dnsdist
41
OPTIONS_DEFINE=		DNSTAP LUAJIT SNMP
40
41
OPTIONS_DEFINE=		FSTRM LUAJIT SNMP
42
OPTIONS_DEFAULT=	GNUTLS OPENSSL
42
OPTIONS_DEFAULT=	GNUTLS OPENSSL
43
OPTIONS_MULTI=		TLS
43
OPTIONS_MULTI=		TLS
44
OPTIONS_MULTI_TLS=	GNUTLS OPENSSL
44
OPTIONS_MULTI_TLS=	GNUTLS OPENSSL
45
45
46
FSTRM_DESC=		dnstap support (see dnstap.info)
46
DNSTAP_DESC=	dnstap support (see dnstap.info)
47
LUAJIT_DESC=		Use LuaJIT instead of Lua
47
LUAJIT_DESC=	Use LuaJIT instead of Lua
48
48
49
FSTRM_LIB_DEPENDS=	libfstrm.so:devel/fstrm
49
DNSTAP_LIB_DEPENDS=		libfstrm.so:devel/fstrm
50
FSTRM_CONFIGURE_ENABLE=	fstrm
50
DNSTAP_CONFIGURE_ENABLE=	dnstap
51
51
52
GNUTLS_LIB_DEPENDS=	libgnutls.so:security/gnutls
52
GNUTLS_LIB_DEPENDS=	libgnutls.so:security/gnutls
53
GNUTLS_CONFIGURE_ENABLE=gnutls
53
GNUTLS_CONFIGURE_WITH=	gnutls
54
54
55
LUAJIT_LIB_DEPENDS=	libluajit-5.1.so:lang/luajit
55
LUAJIT_LIB_DEPENDS=	libluajit-5.1.so:lang/luajit-openresty
56
LUAJIT_USES_OFF=	lua
56
LUAJIT_USES_OFF=	lua
57
LUAJIT_CONFIGURE_ON=	--with-lua=luajit
58
LUAJIT_CONFIGURE_OFF=	--with-lua=lua-${LUA_VER}
57
LUAJIT_CONFIGURE_OFF=	--with-lua=lua-${LUA_VER}
58
LUAJIT_CONFIGURE_ON=	--with-lua=luajit
59
59
60
OPENSSL_USES=		ssl
60
OPENSSL_USES=		ssl
61
OPENSSL_CONFIGURE_ENABLE=libssl
61
OPENSSL_CONFIGURE_ON=	LIBSSL_CFLAGS=-I${OPENSSLINC} \
62
OPENSSL_CONFIGURE_ON=	LIBSSL_CFLAGS=-I${OPENSSLINC} LIBSSL_LIBS="-L${OPENSSLLIB} -lssl"
62
			LIBSSL_LIBS="-L${OPENSSLLIB} -lssl"
63
OPENSSL_CONFIGURE_WITH=	libssl
63
64
64
SNMP_LIB_DEPENDS=	libnetsnmp.so:net-mgmt/net-snmp
65
SNMP_LIB_DEPENDS=	libnetsnmp.so:net-mgmt/net-snmp
65
SNMP_CONFIGURE_WITH=	net-snmp
66
SNMP_CONFIGURE_WITH=	net-snmp
(-)dns/dnsdist/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1541860683
1
TIMESTAMP = 1574322989
2
SHA256 (dnsdist-1.3.3.tar.bz2) = 9fb24f9032025955169f3c6e9b0a05b6aa9d6441ec47da08d22de1c1aa23e8cf
2
SHA256 (dnsdist-1.4.0.tar.bz2) = a336fa2c3eb381c2464d9d9790014fd6d4505029ed2c1b73ee1dc9115a2f1dc0
3
SIZE (dnsdist-1.3.3.tar.bz2) = 971253
3
SIZE (dnsdist-1.4.0.tar.bz2) = 1044479
(-)dns/dnsdist/files/dnsdist.in (-7 / +72 lines)
Lines 3-14 Link Here
3
# $FreeBSD: head/dns/dnsdist/files/dnsdist.in 466166 2018-04-01 15:14:45Z cpm $
3
# $FreeBSD: head/dns/dnsdist/files/dnsdist.in 466166 2018-04-01 15:14:45Z cpm $
4
#
4
#
5
# PROVIDE: dnsdist
5
# PROVIDE: dnsdist
6
# REQUIRE: NETWORKING DAEMON
6
# REQUIRE: DAEMON LOGIN NETWORKING
7
# KEYWORD: shutdown
7
# KEYWORD: shutdown
8
#
8
#
9
# Add the following line to /etc/rc.conf to enable dnsdist:
9
# Add the following line to /etc/rc.conf to enable dnsdist:
10
#
10
#
11
# dnsdist_enable="YES"
11
# dnsdist_enable="YES"
12
#
13
# Multiple profiles are supported with
14
#
15
# dnsdist_profiles="name1 name2"
16
# dnsdist_name1_enable="YES"
17
# dnsdist_name1_config="/path/to/config1"
18
# dnsdist_name2_enable="YES"
19
# dnsdist_name2_config="/path/to/config2"
20
#
21
# This script does't validate uid/gid per profile (yet)
22
# It still uses the default or definition of
23
# dnsdist_priv_user and/or dnsdist_priv_group
24
#
12
25
13
. /etc/rc.subr
26
. /etc/rc.subr
14
27
Lines 17-31 Link Here
17
rcvar=dnsdist_enable
30
rcvar=dnsdist_enable
18
31
19
load_rc_config ${name}
32
load_rc_config ${name}
20
33
: ${dnsdist_enable:=NO}
34
: ${dnsdist_config:=%%ETCDIR%%/dnsdist.conf}
21
: ${dnsdist_priv_user:=_dnsdist}
35
: ${dnsdist_priv_user:=_dnsdist}
22
: ${dnsdist_priv_group:=_dnsdist}
36
: ${dnsdist_priv_group:=_dnsdist}
23
: ${dnsdist_enable:=NO}
24
37
25
pidfile=/var/run/${name}.pid
38
pidfile="/var/run/${name}.pid"
26
39
required_files=${dnsdist_config}
40
actual_command="%%PREFIX%%/sbin/${name} -C ${dnsdist_config} -u ${dnsdist_priv_user} -g ${dnsdist_priv_group} --supervised"
27
command=/usr/sbin/daemon
41
command=/usr/sbin/daemon
28
actual_command=/usr/local/sbin/${name}
42
command_args="-c -f -r -P {pidfile} -- ${actual_command}"
29
command_args="-c -f -r -P ${pidfile} ${actual_command} -u ${dnsdist_priv_user} -g ${dnsdist_priv_group} --supervised"
43
44
if [ -n "$2" ]; then
45
	profile="$2"
46
	if [ "x${dnsdist_profiles}" != "x" ]; then
47
		eval dnsdist_config="\${dnsdist_${profile}_config:-%%ETCDIR%%/dnsdist-${profile}.conf}"
48
		if [ "x${dnsdist_config}" = "x" ]; then
49
			echo "You must define a configuration file (dnsdist_${profile}_config)"
50
			exit 1
51
		fi
52
		eval dnsdist_enable="\${dnsdist_${profile}_enable:-${dnsdist_enable}}"
53
		pidfile="/var/run/${name}-${profile}.pid"
54
		required_files="${dnsdist_config}"
55
		actual_command="%%PREFIX%%/sbin/${name} -C ${dnsdist_config} -u ${dnsdist_priv_user} -g ${dnsdist_priv_group} --supervised"
56
		command_args="-c -f -r -P {pidfile} -- ${actual_command}"
57
	else
58
		echo "$0: extra argument ignored"
59
	fi
60
else
61
	if [ "x${dnsdist_profiles}" != "x" -a "x$1" != "x" ]; then
62
		for profile in ${dnsdist_profiles}; do
63
			eval _enable="\${dnsdist_${profile}_enable}"
64
			case "x${_enable:-${dnsdist_enable}}" in
65
			x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee])
66
				continue
67
				;;
68
			x[Yy][Ee][Ss])
69
				;;
70
			*)
71
				if test -z "$_enable"; then
72
					_var=dnsdist_enable
73
				else
74
					_var=dnsdist_"${profile}"_enable
75
				fi
76
				echo "Bad value" \
77
				    "'${_enable:-${dnsdist_enable}}'" \
78
				    "for ${_var}. " \
79
				    "Profile ${profile} skipped."
80
				continue
81
				;;
82
			esac
83
			echo "===> dnsdist profile: ${profile}"
84
			%%PREFIX%%/etc/rc.d/dnsdist $1 ${profile}
85
			retcode="$?"
86
			if [ "0${retcode}" -ne 0 ]; then
87
				failed="${profile} (${retcode}) ${failed:-}"
88
			else
89
				success="${profile} ${success:-}"
90
			fi
91
		done
92
		exit 0
93
	fi
94
fi
30
95
31
run_rc_command "$1"
96
run_rc_command "$1"
(-)dns/dnsdist/files/patch-dnsdist-lua-vars.cc (-11 lines)
Lines 1-11 Link Here
1
--- dnsdist-lua-vars.cc.orig	2018-10-03 09:48:10 UTC
2
+++ dnsdist-lua-vars.cc
3
@@ -22,6 +22,8 @@
4
 #include "dnsdist.hh"
5
 #include "ednsoptions.hh"
6
 
7
+#undef BADSIG // signal.h SIG_ERR
8
+
9
 void setupLuaVars()
10
 {
11
   g_lua.writeVariable("DNSAction", std::unordered_map<string,int>{

Return to bug 242125