pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/dnsdist
Module Name: pkgsrc
Committed By: fhajny
Date: Fri Mar 31 20:49:51 UTC 2017
Added Files:
pkgsrc/net/dnsdist: DESCR Makefile PLIST distinfo
pkgsrc/net/dnsdist/files: dnsdist.conf dnsdist.sh
pkgsrc/net/dnsdist/files/smf: manifest.xml
pkgsrc/net/dnsdist/patches: patch-dns.hh patch-dnsdist-console.cc
patch-dnsdist.cc patch-iputils.hh patch-qtype.hh
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/net/dnsdist/DESCR pkgsrc/net/dnsdist/Makefile \
pkgsrc/net/dnsdist/PLIST pkgsrc/net/dnsdist/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/dnsdist/files/dnsdist.conf \
pkgsrc/net/dnsdist/files/dnsdist.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/net/dnsdist/files/smf/manifest.xml
cvs rdiff -u -r0 -r1.1 pkgsrc/net/dnsdist/patches/patch-dns.hh \
pkgsrc/net/dnsdist/patches/patch-dnsdist-console.cc \
pkgsrc/net/dnsdist/patches/patch-dnsdist.cc \
pkgsrc/net/dnsdist/patches/patch-iputils.hh \
pkgsrc/net/dnsdist/patches/patch-qtype.hh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/net/dnsdist/DESCR
diff -u /dev/null pkgsrc/net/dnsdist/DESCR:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/DESCR Fri Mar 31 20:49:51 2017
@@ -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.
Index: pkgsrc/net/dnsdist/Makefile
diff -u /dev/null pkgsrc/net/dnsdist/Makefile:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/Makefile Fri Mar 31 20:49:51 2017
@@ -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"
Index: pkgsrc/net/dnsdist/PLIST
diff -u /dev/null pkgsrc/net/dnsdist/PLIST:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/PLIST Fri Mar 31 20:49:51 2017
@@ -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
Index: pkgsrc/net/dnsdist/distinfo
diff -u /dev/null pkgsrc/net/dnsdist/distinfo:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/distinfo Fri Mar 31 20:49:51 2017
@@ -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
Index: pkgsrc/net/dnsdist/files/dnsdist.conf
diff -u /dev/null pkgsrc/net/dnsdist/files/dnsdist.conf:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/files/dnsdist.conf Fri Mar 31 20:49:51 2017
@@ -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
Index: pkgsrc/net/dnsdist/files/dnsdist.sh
diff -u /dev/null pkgsrc/net/dnsdist/files/dnsdist.sh:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/files/dnsdist.sh Fri Mar 31 20:49:51 2017
@@ -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
Index: pkgsrc/net/dnsdist/files/smf/manifest.xml
diff -u /dev/null pkgsrc/net/dnsdist/files/smf/manifest.xml:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/files/smf/manifest.xml Fri Mar 31 20:49:51 2017
@@ -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>
Index: pkgsrc/net/dnsdist/patches/patch-dns.hh
diff -u /dev/null pkgsrc/net/dnsdist/patches/patch-dns.hh:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/patches/patch-dns.hh Fri Mar 31 20:49:51 2017
@@ -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>
Index: pkgsrc/net/dnsdist/patches/patch-dnsdist-console.cc
diff -u /dev/null pkgsrc/net/dnsdist/patches/patch-dnsdist-console.cc:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/patches/patch-dnsdist-console.cc Fri Mar 31 20:49:51 2017
@@ -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
Index: pkgsrc/net/dnsdist/patches/patch-dnsdist.cc
diff -u /dev/null pkgsrc/net/dnsdist/patches/patch-dnsdist.cc:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/patches/patch-dnsdist.cc Fri Mar 31 20:49:51 2017
@@ -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>
Index: pkgsrc/net/dnsdist/patches/patch-iputils.hh
diff -u /dev/null pkgsrc/net/dnsdist/patches/patch-iputils.hh:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/patches/patch-iputils.hh Fri Mar 31 20:49:51 2017
@@ -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
+
Index: pkgsrc/net/dnsdist/patches/patch-qtype.hh
diff -u /dev/null pkgsrc/net/dnsdist/patches/patch-qtype.hh:1.1
--- /dev/null Fri Mar 31 20:49:51 2017
+++ pkgsrc/net/dnsdist/patches/patch-qtype.hh Fri Mar 31 20:49:51 2017
@@ -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