diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-dns/dnsdist |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-dns/dnsdist')
-rw-r--r-- | net-dns/dnsdist/Manifest | 7 | ||||
-rw-r--r-- | net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild | 84 | ||||
-rw-r--r-- | net-dns/dnsdist/dnsdist-9999.ebuild | 86 | ||||
-rw-r--r-- | net-dns/dnsdist/files/dnsdist.conf.example | 19 | ||||
-rw-r--r-- | net-dns/dnsdist/files/dnsdist.confd | 13 | ||||
-rw-r--r-- | net-dns/dnsdist/files/dnsdist.initd | 55 | ||||
-rw-r--r-- | net-dns/dnsdist/metadata.xml | 22 |
7 files changed, 286 insertions, 0 deletions
diff --git a/net-dns/dnsdist/Manifest b/net-dns/dnsdist/Manifest new file mode 100644 index 000000000000..faeab3b657a7 --- /dev/null +++ b/net-dns/dnsdist/Manifest @@ -0,0 +1,7 @@ +AUX dnsdist.conf.example 524 SHA256 86afac1134df0d054940844e294ef7b673c82646f34ab3285279f82629c6166a SHA512 385bee5725d927feb50fc0f40cd48cd365a495e39c0d947aa53dc454d84b7fe3806cd1d206056c96d111e7251db2cda27570ff8154c70bed145d37bc7d1db01d WHIRLPOOL 61d55b320e214084d8cfbd4ddb507e4b5f9197abaeed0a51c36f95df35e9a19ec0ecfea6c89e2e78c390b5671debbf7bf21365d8f4ac7dc188d873cabbccf39e +AUX dnsdist.confd 266 SHA256 ead9dcb8204376886ed05a1df3b088088f9927f077ac14c72caf21e68d796fc4 SHA512 935afc768ae56d017f6dee8bed7a3e92615055a0d4d2ae9980afef1b8f353da0e8bd6e20b914602e50b116ad33ef17ba05535b225af8b8da9ad005694edc071f WHIRLPOOL 3a089c0af1cf95120e8ccc4de969311be26e085b92111720287866899d04be4e40bb1b5c5004b26e15b4e0a2d7187638c37e6c3cef94a44782c09629413b13a3 +AUX dnsdist.initd 1340 SHA256 59541ccd5d50469b23e0a557e872d4ead060178c205f940ebddd467766b62d1f SHA512 79b7c06adc469fed15b659aec4d674a50b64c80679c3474c87c03ae9b5b8ea63a493397822b8f4cb9e360745f38cc9f742aaa09c856618dd9f6c0f8978fa9616 WHIRLPOOL 22b6153bf8f654802dca246f70788226611997d2c84168628c34d35719da2e41b2b01e8874d84064dbba607a1442072ba9a6dc67ff2c0ebce44be968acdfdd28 +DIST dnsdist-1.1.0.tar.bz2 874837 SHA256 b4a1e8931b6d05a24494f54224211c0de0eeb1f5ff170f6b9f5665219bfeafc2 SHA512 91da716997c2440e153944f510a39dd86c9cf8ba8093a7f51a9a5d58ab0a1c230bd99ec57fe8ff0721279c8c4429ad576fe797c1fbe4cde2b9fb8f0405025320 WHIRLPOOL 6d88f4159b8155c9600af94e6e8401c426f183102a18b3f35fc066b8a19d781f5800a2aa64d306ab4ee0daadbaaab1d29b2df05c10058a9b99b9d9cf1abf071e +EBUILD dnsdist-1.1.0-r1.ebuild 1893 SHA256 51eeaeda5ce4bfae0fa4cbc774f2fa8c8034591c591df7f2a8c59aeb37bd181c SHA512 d23ebc47ac748623a4ad57a4a30dacddc27c3425e96f55dd126f376dda5a23f92a0eb437dfc5bcd13f2f83c22ea7184ef7a1b744304310789ea05a02267b0ea7 WHIRLPOOL b34302a37dc967bccb4bdbe1646b326184b1bc45ac423f6a67f36f7d2884da2d87151185380c69a3faea3660852fe6a6b0c0178caaae6028274bc66df05bbd6d +EBUILD dnsdist-9999.ebuild 1963 SHA256 fd6a88d5ccfde44f596e76ae289508bd489a81f8845d7826d0fd5e5cc148a545 SHA512 578263147111bb441842fe31fcd58b1cc92af228e8c86040bc28390a862dd3f083f4781dbcf8117b141f146ed36c0bc5f0bbf884270fc5116c436310c68cf006 WHIRLPOOL 7720a25cb0fcf5ff36d9bce8f212b6b7a75a44792f6bc69d83e9c1004b29be08f9451a7035f0e49a41ad1123ec9fd148e9a8d202af732e6799d40bd2908857dd +MISC metadata.xml 1138 SHA256 fb371d32f95840b9ef13fda151caba34e984ca14efd936637958ea6308e3a705 SHA512 28e685c390be1061fe1202174abc467223b7f0589648fcdbe3d6cbb93ead037501b33b4244687e66d431fc1d642d45e61be348ffed3086afd497516dd02d0e79 WHIRLPOOL 1d634e708d94420a2acadc2d2948c8e53e20d9bac9b3397afe245c9d0f16b5d994b6fff43a453a4abd448e923ab1db9081f6aa4f0498d72466084077b749a145 diff --git a/net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild b/net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild new file mode 100644 index 000000000000..765c8a196631 --- /dev/null +++ b/net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGIT_REPO_URI="https://github.com/PowerDNS/pdns.git" + +if [[ ${PV} = 9999 ]]; then + ADDITIONAL_ECLASSES="autotools git-r3" +fi + +inherit eutils flag-o-matic user ${ADDITIONAL_ECLASSES} + +DESCRIPTION="A highly DNS-, DoS- and abuse-aware loadbalancer" +HOMEPAGE="http://dnsdist.org" + +if [[ ${PV} == 9999 ]]; then + SRC_URI="" + S="${WORKDIR}/${P}/pdns/dnsdistdist" +else + SRC_URI="https://downloads.powerdns.com/releases/${P}.tar.bz2" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="dnscrypt luajit regex remote-logging +ssl test" +REQUIRED_USE="dnscrypt? ( ssl )" + +DEPEND=" + >=dev-libs/boost-1.35:= + dev-libs/libedit:= + luajit? ( dev-lang/luajit:= ) + !luajit? ( >=dev-lang/lua-5.1:= ) + remote-logging? ( dev-libs/protobuf:= ) + regex? ( dev-libs/re2:= ) + ssl? ( dev-libs/libsodium:= ) +" + +RDEPEND="${DEPEND}" + +[[ ${PV} == 9999 ]] && DEPEND+=" + app-text/pandoc + dev-util/ragel +" + +src_prepare() { + default + [[ ${PV} == 9999 ]] && eautoreconf +} + +src_configure() { + econf \ + --sysconfdir=/etc/dnsdist \ + $(use_enable ssl libsodium) \ + $(use_with remote-logging protobuf) \ + $(use_enable regex re2) \ + $(use_enable dnscrypt) \ + $(use_with luajit) \ + $(use_enable test unit-tests) +} + +src_install() { + default + + insinto /etc/dnsdist + doins "${FILESDIR}"/dnsdist.conf.example + + newconfd "${FILESDIR}"/dnsdist.confd ${PN} + newinitd "${FILESDIR}"/dnsdist.initd ${PN} +} + +pkg_preinst() { + enewgroup dnsdist + enewuser dnsdist -1 -1 -1 dnsdist +} + +pkg_postinst() { + elog "dnsdist provides multiple instances support. You can create more instances" + elog "by symlinking the dnsdist init script to another name." + elog + elog "The name must be in the format dnsdist.<suffix> and dnsdist will use the" + elog "/etc/dnsdist/dnsdist-<suffix>.conf configuration file instead of the default." +} diff --git a/net-dns/dnsdist/dnsdist-9999.ebuild b/net-dns/dnsdist/dnsdist-9999.ebuild new file mode 100644 index 000000000000..75b3d1113da0 --- /dev/null +++ b/net-dns/dnsdist/dnsdist-9999.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGIT_REPO_URI="https://github.com/PowerDNS/pdns.git" + +if [[ ${PV} = 9999 ]]; then + ADDITIONAL_ECLASSES="autotools git-r3" +fi + +inherit eutils flag-o-matic user ${ADDITIONAL_ECLASSES} + +DESCRIPTION="A highly DNS-, DoS- and abuse-aware loadbalancer" +HOMEPAGE="http://dnsdist.org" + +if [[ ${PV} == 9999 ]]; then + SRC_URI="" + S="${WORKDIR}/${P}/pdns/dnsdistdist" +else + SRC_URI="https://downloads.powerdns.com/releases/${P}.tar.bz2" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="dnscrypt luajit regex remote-logging snmp +ssl test" +REQUIRED_USE="dnscrypt? ( ssl )" + +DEPEND=" + >=dev-libs/boost-1.35:= + dev-libs/libedit:= + luajit? ( dev-lang/luajit:= ) + !luajit? ( >=dev-lang/lua-5.1:= ) + remote-logging? ( dev-libs/protobuf:= ) + regex? ( dev-libs/re2:= ) + snmp? ( net-analyzer/net-snmp:= ) + ssl? ( dev-libs/libsodium:= ) +" + +RDEPEND="${DEPEND}" + +[[ ${PV} == 9999 ]] && DEPEND+=" + app-text/pandoc + dev-util/ragel +" + +src_prepare() { + default + [[ ${PV} == 9999 ]] && eautoreconf +} + +src_configure() { + econf \ + --sysconfdir=/etc/dnsdist \ + $(use_enable ssl libsodium) \ + $(use_with remote-logging protobuf) \ + $(use_enable regex re2) \ + $(use_enable dnscrypt) \ + $(use_with luajit) \ + $(use_enable test unit-tests) \ + $(use_with snmp net-snmp) +} + +src_install() { + default + + insinto /etc/dnsdist + doins "${FILESDIR}"/dnsdist.conf.example + + newconfd "${FILESDIR}"/dnsdist.confd ${PN} + newinitd "${FILESDIR}"/dnsdist.initd ${PN} +} + +pkg_preinst() { + enewgroup dnsdist + enewuser dnsdist -1 -1 -1 dnsdist +} + +pkg_postinst() { + elog "dnsdist provides multiple instances support. You can create more instances" + elog "by symlinking the dnsdist init script to another name." + elog + elog "The name must be in the format dnsdist.<suffix> and dnsdist will use the" + elog "/etc/dnsdist/dnsdist-<suffix>.conf configuration file instead of the default." +} diff --git a/net-dns/dnsdist/files/dnsdist.conf.example b/net-dns/dnsdist/files/dnsdist.conf.example new file mode 100644 index 000000000000..ffcc6060ef0c --- /dev/null +++ b/net-dns/dnsdist/files/dnsdist.conf.example @@ -0,0 +1,19 @@ +--[[ +This is an example dnsdist configuration file. +Please refer to the dnsdist documentation +at http://dnsdist.org/README/ for more information. +]]-- + +-- Listen on 192.0.2.1 on port 53. +setLocal("192.0.2.1:53") + +-- Add 2001:db8::2:1 to the list of adresses dnsdist should listen on +addLocal("2001:db8::2:1") + +-- Add to the ACL set who can use this server +addACL("192.0.2.0/24") +addACL("2001:db8::/32") + +-- Instantiate two new downstram server with their default settings +newServer("198.51.100.1") +newServer("198.51.100.2") diff --git a/net-dns/dnsdist/files/dnsdist.confd b/net-dns/dnsdist/files/dnsdist.confd new file mode 100644 index 000000000000..7151fd0ad7bb --- /dev/null +++ b/net-dns/dnsdist/files/dnsdist.confd @@ -0,0 +1,13 @@ +# /etc/conf.d/dnsdist + +# Options to pass on to dnsdist during the start +DNSDIST_OPTIONS="" + +# Run dnsdist as this user +DNSDIST_USER="dnsdist" + +# Run dnsdist in this group +DNSDIST_GROUP="dnsdist" + +# Set the maximum number of open file descriptors +rc_ulimit="-n 2048" diff --git a/net-dns/dnsdist/files/dnsdist.initd b/net-dns/dnsdist/files/dnsdist.initd new file mode 100644 index 000000000000..bfeef82d46f1 --- /dev/null +++ b/net-dns/dnsdist/files/dnsdist.initd @@ -0,0 +1,55 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="configcheck" +#extra_started_commands="" + +DNSDIST_INSTANCE="${SVCNAME#dnsdist[.-]}" +DNSDIST_CONFFILE="/etc/dnsdist/${SVCNAME#dnsdist[.-]}.conf" +DNSDIST="/usr/bin/dnsdist" +PIDDIR=/run/dnsdist +PIDFILE=$PIDDIR/$SVCNAME.pid + + +if [ -n "${DNSDIST_INSTANCE}" ] && [ "${DNSDIST_INSTANCE}" != "dnsdist" ] +then + DNSDIST_INSTANCE="dnsdist-${SVCNAME#dnsdist[.-]}" + DNSDIST_CONFFILE="/etc/dnsdist/${DNSDIST_INSTANCE}.conf" +else + DNSDIST_INSTANCE="default" +fi + +depend() { + need net +} + +start() { + checkpath -q -d ${PIDDIR} -o ${DNSDIST_USER}:${DNSDIST_GROUP} + + configcheck || return 1 + + ebegin "Starting dnsdist (${DNSDIST_INSTANCE})" + start-stop-daemon --start --exec $DNSDIST --pidfile ${PIDFILE} \ + -- -d -p ${PIDFILE} -u ${DNSDIST_USER} -g ${DNSDIST_GROUP} \ + -C $DNSDIST_CONFFILE ${DNSDIST_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping dnsdist (${DNSDIST_INSTANCE})" + start-stop-daemon --stop --exec $DNSDIST --pidfile ${PIDFILE} + eend $? +} + +configcheck() { + ebegin "Checking configuration file (${DNSDIST_CONFFILE})" + $DNSDIST --check-config -C $DNSDIST_CONFFILE > /dev/null + + if [ $? -ne 0 ]; then + $DNSDIST --check-config -C $DNSDIST_CONFFILE + fi + + eend $? "failed, please correct errors above" +} + diff --git a/net-dns/dnsdist/metadata.xml b/net-dns/dnsdist/metadata.xml new file mode 100644 index 000000000000..a9231ab03330 --- /dev/null +++ b/net-dns/dnsdist/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>bgo@9dt.de</email> + <name>Vladimir Datsevich</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + 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. + </longdescription> + <use> + <flag name="dnscrypt">Enable the ability to act as a DNSCrypt server</flag> + <flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of <pkg>dev-lang/lua</pkg></flag> + <flag name="regex">Enable support for regular expression matching via <pkg>dev-libs/re2</pkg></flag> + <flag name="remote-logging">Enable support for remote logging via <pkg>dev-libs/protobuf</pkg></flag> + <flag name="ssl">Enable support for and encrypted client-server communication via <pkg>dev-libs/libsodium</pkg></flag> + </use> +</pkgmetadata> |