pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/dnsdist Import dnsdist 1.1.0 as dns/dnsdist.
details: https://anonhg.NetBSD.org/pkgsrc/rev/0bf010bdda67
branches: trunk
changeset: 360525:0bf010bdda67
user: fhajny <fhajny%pkgsrc.org@localhost>
date: Fri Mar 31 20:49:51 2017 +0000
description:
Import dnsdist 1.1.0 as dns/dnsdist.
dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its
goal in life is to route traffic to the best server, delivering top
performance to legitimate users while shunting or blocking abusive
traffic.
diffstat:
net/dnsdist/DESCR | 4 ++
net/dnsdist/Makefile | 51 ++++++++++++++++++++++++++++
net/dnsdist/PLIST | 4 ++
net/dnsdist/distinfo | 11 ++++++
net/dnsdist/files/dnsdist.conf | 6 +++
net/dnsdist/files/dnsdist.sh | 24 +++++++++++++
net/dnsdist/files/smf/manifest.xml | 28 +++++++++++++++
net/dnsdist/patches/patch-dns.hh | 15 ++++++++
net/dnsdist/patches/patch-dnsdist-console.cc | 15 ++++++++
net/dnsdist/patches/patch-dnsdist.cc | 15 ++++++++
net/dnsdist/patches/patch-iputils.hh | 50 +++++++++++++++++++++++++++
net/dnsdist/patches/patch-qtype.hh | 17 +++++++++
12 files changed, 240 insertions(+), 0 deletions(-)
diffs (288 lines):
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/DESCR Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,4 @@
+dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its
+goal in life is to route traffic to the best server, delivering top
+performance to legitimate users while shunting or blocking abusive
+traffic.
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/Makefile Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,51 @@
+# $NetBSD: Makefile,v 1.1 2017/03/31 20:49:51 fhajny Exp $
+
+DISTNAME= dnsdist-1.1.0
+CATEGORIES= net
+MASTER_SITES= https://downloads.powerdns.com/releases/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= filip%joyent.com@localhost
+HOMEPAGE= http://dnsdist.org/
+COMMENT= Highly DNS-, DoS- and abuse-aware loadbalancer
+LICENSE= gnu-gpl-v2
+
+GNU_CONFIGURE= yes
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake pkg-config
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+= DNSDIST_USER DNSDIST_GROUP
+DNSDIST_USER?= dnsdist
+DNSDIST_GROUP?= dnsdist
+PKG_GROUPS+= ${DNSDIST_GROUP}
+PKG_USERS+= ${DNSDIST_USER}:${DNSDIST_GROUP}
+PKG_GECOS.${DNSDIST_USER}= dnsdist daemon user
+
+FILES_SUBST+= DNSDIST_USER=${DNSDIST_USER}
+FILES_SUBST+= DNSDIST_GROUP=${DNSDIST_GROUP}
+CONF_FILES+= share/examples/dnsdist/dnsdist.conf \
+ ${PKG_SYSCONFDIR}/dnsdist.conf
+
+CONFIGURE_ARGS+= --enable-dnscrypt
+CONFIGURE_ARGS+= --enable-libsodium
+CONFIGURE_ARGS+= --enable-protobuf
+CONFIGURE_ARGS+= --enable-re2
+CONFIGURE_ENV+= LIBEDIT_CFLAGS="-I${BUILDLINK_PREFIX.libedit}/include"
+CONFIGURE_ENV+= LIBEDIT_LIBS="-L${BUILDLINK_PREFIX.libedit}/lib -ledit"
+
+INSTALLATION_DIRS+= share/examples/dnsdist
+RCD_SCRIPTS+= dnsdist
+
+post-install:
+ ${INSTALL_DATA} ${.CURDIR}/files/dnsdist.conf \
+ ${DESTDIR}${PREFIX}/share/examples/dnsdist
+
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../devel/editline/buildlink3.mk"
+.include "../../devel/protobuf/buildlink3.mk"
+.include "../../devel/re2/buildlink3.mk"
+.include "../../lang/lua/buildlink3.mk"
+.include "../../security/libsodium/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/PLIST Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2017/03/31 20:49:51 fhajny Exp $
+bin/dnsdist
+man/man1/dnsdist.1
+share/examples/dnsdist/dnsdist.conf
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/distinfo Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1 2017/03/31 20:49:51 fhajny Exp $
+
+SHA1 (dnsdist-1.1.0.tar.bz2) = 9b6372fc5f606ee83dac465e1dc9c824242f5905
+RMD160 (dnsdist-1.1.0.tar.bz2) = 7724641b2be1c3611dd0b2c685cf6e8b7a365e67
+SHA512 (dnsdist-1.1.0.tar.bz2) = 91da716997c2440e153944f510a39dd86c9cf8ba8093a7f51a9a5d58ab0a1c230bd99ec57fe8ff0721279c8c4429ad576fe797c1fbe4cde2b9fb8f0405025320
+Size (dnsdist-1.1.0.tar.bz2) = 874837 bytes
+SHA1 (patch-dns.hh) = 13834e3d9f48b3095ce4912540c7d0d275c3a3a3
+SHA1 (patch-dnsdist-console.cc) = 51fee0e89b648e0f9c2e6c0d9a6859ef2991a1b7
+SHA1 (patch-dnsdist.cc) = 2b2bf569c134019dd8a5d4f3df104fdd16a47a31
+SHA1 (patch-iputils.hh) = 666fe81cc651b2c7e85164b8246283e301bcce1a
+SHA1 (patch-qtype.hh) = 4551be1e303a31d34030c363849398923f5ff987
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/files/dnsdist.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/files/dnsdist.conf Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,6 @@
+-- newServer({address="2001:4860:4860::8888", qps=1})
+-- newServer({address="2001:4860:4860::8844", qps=1})
+-- newServer({address="2620:0:ccc::2", qps=10})
+-- newServer({address="2620:0:ccd::2", name="dns1", qps=10})
+-- newServer("192.168.1.2")
+-- setServerPolicy(firstAvailable) -- first server within its QPS limit
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/files/dnsdist.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/files/dnsdist.sh Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,24 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: dnsdist.sh,v 1.1 2017/03/31 20:49:51 fhajny Exp $
+#
+# PROVIDE: dnsdist
+# REQUIRE: DAEMON network
+# KEYWORD: shutdown
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="dnsdist"
+rcvar=$name
+command="@PREFIX@/bin/dnsdist"
+dnsdist_flags="${dnsdist_flags:- -d -u @DNSDIST_USER@ -g @DNSDIST@ -C @PKG_SYSCONFDIR@/dnsdist.conf}"
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ echo -n "${name}"
+ ${command} ${dnsdist_flags}
+fi
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/files/smf/manifest.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/files/smf/manifest.xml Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="export">
+ <service name="@SMF_PREFIX@/dnsdist" type="service" version="1">
+ <create_default_instance enabled="false" />
+ <single_instance />
+ <dependency name="network" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/milestone/network:default" />
+ </dependency>
+ <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/system/filesystem/local" />
+ </dependency>
+ <exec_method type="method" name="start" exec="@PREFIX@/bin/dnsdist -d -u @DNSDIST_USER@ -g @DNSDIST_GROUP@ -C %{config_file}" timeout_seconds="60" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="contract" />
+ <propval name="ignore_error" type="astring" value="core,signal" />
+ </property_group>
+ <property_group name="dnsdist" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/dnsdist.conf" />
+ </property_group>
+ <template>
+ <common_name>
+ <loctext xml:lang="C">dnsdist daemon</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/patches/patch-dns.hh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/patches/patch-dns.hh Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-dns.hh,v 1.1 2017/03/31 20:49:51 fhajny Exp $
+
+Add NetBSD support.
+
+--- dns.hh.orig 2016-12-29 12:45:46.000000000 +0000
++++ dns.hh
+@@ -146,7 +146,7 @@ struct EDNS0Record
+
+ static_assert(sizeof(EDNS0Record) == 4, "EDNS0Record size must be 4");
+
+-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ #include <machine/endian.h>
+ #elif __linux__ || __GNU__
+ # include <endian.h>
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/patches/patch-dnsdist-console.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/patches/patch-dnsdist-console.cc Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-dnsdist-console.cc,v 1.1 2017/03/31 20:49:51 fhajny Exp $
+
+Add NetBSD support.
+
+--- dnsdist-console.cc.orig 2016-12-29 12:45:46.000000000 +0000
++++ dnsdist-console.cc
+@@ -22,7 +22,7 @@
+ #include "dnsdist.hh"
+ #include "sodcrypto.hh"
+
+-#if defined (__OpenBSD__)
++#if defined (__OpenBSD__) || defined (__NetBSD__)
+ #include <readline/readline.h>
+ #include <readline/history.h>
+ #else
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/patches/patch-dnsdist.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/patches/patch-dnsdist.cc Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-dnsdist.cc,v 1.1 2017/03/31 20:49:51 fhajny Exp $
+
+Add NetBSD support.
+
+--- dnsdist.cc.orig 2016-12-29 12:45:46.000000000 +0000
++++ dnsdist.cc
+@@ -27,7 +27,7 @@
+ #include <limits>
+ #include "dolog.hh"
+
+-#if defined (__OpenBSD__)
++#if defined (__OpenBSD__) || defined (__NetBSD__)
+ #include <readline/readline.h>
+ #else
+ #include <editline/readline.h>
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/patches/patch-iputils.hh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/patches/patch-iputils.hh Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,50 @@
+$NetBSD: patch-iputils.hh,v 1.1 2017/03/31 20:49:51 fhajny Exp $
+
+- Do not use IP_PKTINFO on NetBSD, the structure is not as expected.
+- Backport fix for SunOS segfault problem, see:
+ https://github.com/PowerDNS/pdns/pull/4877
+
+--- iputils.hh.orig 2017-01-17 08:43:49.000000000 +0000
++++ iputils.hh
+@@ -40,6 +40,10 @@
+
+ #include "namespaces.hh"
+
++#if defined(__NetBSD__) && defined(IP_PKTINFO)
++#undef IP_PKTINFO
++#endif
++
+ #ifdef __APPLE__
+ #include <libkern/OSByteOrder.h>
+
+@@ -59,23 +63,22 @@
+ #define le64toh(x) OSSwapLittleToHostInt64(x)
+ #endif
+
+-// for illumos
+-#ifdef BE_64
++#ifdef __sun
+
+ #define htobe16(x) BE_16(x)
+ #define htole16(x) LE_16(x)
+-#define be16toh(x) BE_IN16(x)
+-#define le16toh(x) LE_IN16(x)
++#define be16toh(x) BE_IN16(&(x))
++#define le16toh(x) LE_IN16(&(x))
+
+ #define htobe32(x) BE_32(x)
+ #define htole32(x) LE_32(x)
+-#define be32toh(x) BE_IN32(x)
+-#define le32toh(x) LE_IN32(x)
++#define be32toh(x) BE_IN32(&(x))
++#define le32toh(x) LE_IN32(&(x))
+
+ #define htobe64(x) BE_64(x)
+ #define htole64(x) LE_64(x)
+-#define be64toh(x) BE_IN64(x)
+-#define le64toh(x) LE_IN64(x)
++#define be64toh(x) BE_IN64(&(x))
++#define le64toh(x) LE_IN64(&(x))
+
+ #endif
+
diff -r 21b0615c1059 -r 0bf010bdda67 net/dnsdist/patches/patch-qtype.hh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/patches/patch-qtype.hh Fri Mar 31 20:49:51 2017 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-qtype.hh,v 1.1 2017/03/31 20:49:51 fhajny Exp $
+
+Avoid symbol pollution on SunOS.
+
+--- qtype.hh.orig 2017-01-17 08:43:49.000000000 +0000
++++ qtype.hh
+@@ -26,6 +26,10 @@
+ #include <vector>
+ #include "namespaces.hh"
+
++#if defined(__sun) && defined(DS)
++#undef DS
++#endif
++
+ /** The QType class is meant to deal easily with the different kind of resource types, like 'A', 'NS',
+ * 'CNAME' etcetera. These types have both a name and a number. This class can seamlessly move between
+ * them. Use it like this:
Home |
Main Index |
Thread Index |
Old Index