From 8b960c64b8cb914d95ea8763c47d2453b97ff124 Mon Sep 17 00:00:00 2001 From: JailBird Date: Fri, 22 Jan 2021 19:52:13 -0600 Subject: [PATCH 1/8] New package: dnsdist-1.5.1 --- srcpkgs/dnsdist/files/dnsdist.conf | 27 +++++++++++++++++++++ srcpkgs/dnsdist/files/dnsdist/run | 2 ++ srcpkgs/dnsdist/template | 39 ++++++++++++++++++++++++++++++ srcpkgs/dnsdist/update | 1 + 4 files changed, 69 insertions(+) create mode 100644 srcpkgs/dnsdist/files/dnsdist.conf create mode 100644 srcpkgs/dnsdist/files/dnsdist/run create mode 100644 srcpkgs/dnsdist/template create mode 100644 srcpkgs/dnsdist/update diff --git a/srcpkgs/dnsdist/files/dnsdist.conf b/srcpkgs/dnsdist/files/dnsdist.conf new file mode 100644 index 00000000000..d9c2dd7804a --- /dev/null +++ b/srcpkgs/dnsdist/files/dnsdist.conf @@ -0,0 +1,27 @@ +-- Example (simple) configuration + +--[[ By default, dnsdist binds to 127.0.0.1:53 and uses exactly one thread + To use more threads, we need to explicitly set the first thread listener + with setLocal() reusePort=true and then add one addLocal() for each + additional thread. Eg, for a 4-thread setup: --]] +-- setLocal("127.0.0.1:53", {reusePort=true, tcpFastOpenQueueSize=2048}) +-- addLocal("127.0.0.1:53", {reusePort=true, tcpFastOpenQueueSize=2048}) +-- addLocal("127.0.0.1:53", {reusePort=true, tcpFastOpenQueueSize=2048}) +-- addLocal("127.0.0.1:53", {reusePort=true, tcpFastOpenQueueSize=2048}) + +-- Throw requests to Cloudflare and Google and take the fastest answer + +-- newServer("2606:4700:4700::1111") -- Cloudflare, primary IPv6 +newServer("1.1.1.1") -- Cloudflare, primary IPv4 +-- newServer("2001:4860:4860::8888") -- Google, primary IPv6 +newServer("8.8.8.8") -- Google, primary IPv4 +-- newServer("2606:4700:4700::1001") -- Cloudflare, secondary IPv6 +newServer("1.0.0.1") -- Cloudflare, secondary IPv4 +-- newServer("2001:4860:4860::8844") -- Google, secondary IPv6 +newServer("8.8.4.4") -- Google, secondary IPv4 + +setServerPolicy(roundrobin) + +-- Basic caching of results, comment out to use less memory +pc = newPacketCache(10000, {maxTTL=86400, minTTL=0, temporaryFailureTTL=60, staleTTL=60, dontAge=false}) +getPool(""):setCache(pc) diff --git a/srcpkgs/dnsdist/files/dnsdist/run b/srcpkgs/dnsdist/files/dnsdist/run new file mode 100644 index 00000000000..8af24c5a744 --- /dev/null +++ b/srcpkgs/dnsdist/files/dnsdist/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -o 2048 dnsdist --uid _dnsdist --gid _dnsdist --supervised --disable-syslog diff --git a/srcpkgs/dnsdist/template b/srcpkgs/dnsdist/template new file mode 100644 index 00000000000..422dd74cded --- /dev/null +++ b/srcpkgs/dnsdist/template @@ -0,0 +1,39 @@ +# Template file for 'dnsdist' +pkgname=dnsdist +version=1.5.1 +revision=1 +build_style=gnu-configure +configure_args="--with-pic --with-gnu-ld --with-libsodium --with-protobuf + --with-re2 --with-net-snmp --with-libcap --with-libssl --enable-dnscrypt + --with-libcrypto=${XBPS_CROSS_BASE}/usr --with-service-user=_dnsdist + --with-service-group=_dnsdist --sbindir=/usr/bin --with-gnutls --with-lmdb + --enable-dns-over-tls --enable-dns-over-https --sysconfdir=/etc/dnsdist" +conf_files="/etc/dnsdist/dnsdist.conf" +makedepends="libsodium-devel protobuf25 protobuf25-devel boost-devel re2-devel + net-snmp-devel libcap-devel LuaJIT-devel libressl-devel lmdb-devel fstrm-devel + libedit-devel gnutls-devel tinycdb-devel h2o-devel" +depends="libsodium libprotobuf25-lite re2 libnet-snmp libcap LuaJIT libressl lmdb + fstrm libedit gnutls tinycdb" +hostmakedepends="autoconf automake pkgconf" +short_desc="Dynamic DNS loadbalancer" +maintainer="JailBird " +license="GPL-2.0-only" +homepage="https://dnsdist.org/" +distfiles="https://downloads.powerdns.com/releases/${pkgname}-${version}.tar.bz2" +checksum=cae759729a87703f4d09b0ed4227cb224aaaa252fa92f2432fd7116f560afbf1 + +system_accounts="_dnsdist" + +pre_configure() { + export CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include" + export LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib" + export PKG_CONFIG_PATH=${XBPS_CROSS_BASE}/usr/lib/pkgconfig + export LMDB_LIBS="-llmdb" +} + +post_install() { + vsconf dnsdistconf.lua dnsdist.conf + vinstall ${FILESDIR}/dnsdist.conf 644 etc/dnsdist + vsv dnsdist + vlicense COPYING +} diff --git a/srcpkgs/dnsdist/update b/srcpkgs/dnsdist/update new file mode 100644 index 00000000000..da8e072d218 --- /dev/null +++ b/srcpkgs/dnsdist/update @@ -0,0 +1 @@ +ignore="*alpha[0-9]* *rc[0-9]* *beta[0-9]*" From d9e1a2b0eaa8b74dc6fed6991e030024d3865c97 Mon Sep 17 00:00:00 2001 From: JailBird Date: Fri, 22 Jan 2021 19:59:31 -0600 Subject: [PATCH 2/8] Fix lint complaints --- srcpkgs/dnsdist/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dnsdist/template b/srcpkgs/dnsdist/template index 422dd74cded..0d96d03c001 100644 --- a/srcpkgs/dnsdist/template +++ b/srcpkgs/dnsdist/template @@ -12,12 +12,12 @@ conf_files="/etc/dnsdist/dnsdist.conf" makedepends="libsodium-devel protobuf25 protobuf25-devel boost-devel re2-devel net-snmp-devel libcap-devel LuaJIT-devel libressl-devel lmdb-devel fstrm-devel libedit-devel gnutls-devel tinycdb-devel h2o-devel" +hostmakedepends="autoconf automake pkgconf" depends="libsodium libprotobuf25-lite re2 libnet-snmp libcap LuaJIT libressl lmdb fstrm libedit gnutls tinycdb" -hostmakedepends="autoconf automake pkgconf" short_desc="Dynamic DNS loadbalancer" maintainer="JailBird " -license="GPL-2.0-only" +license="GPL-2" homepage="https://dnsdist.org/" distfiles="https://downloads.powerdns.com/releases/${pkgname}-${version}.tar.bz2" checksum=cae759729a87703f4d09b0ed4227cb224aaaa252fa92f2432fd7116f560afbf1 From 4ae3dc05527bfcbbf8179e7571296a497fc83caa Mon Sep 17 00:00:00 2001 From: JailBird Date: Fri, 22 Jan 2021 20:02:21 -0600 Subject: [PATCH 3/8] Lint fix #2 --- srcpkgs/dnsdist/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dnsdist/template b/srcpkgs/dnsdist/template index 0d96d03c001..6694f0dc063 100644 --- a/srcpkgs/dnsdist/template +++ b/srcpkgs/dnsdist/template @@ -9,15 +9,15 @@ configure_args="--with-pic --with-gnu-ld --with-libsodium --with-protobuf --with-service-group=_dnsdist --sbindir=/usr/bin --with-gnutls --with-lmdb --enable-dns-over-tls --enable-dns-over-https --sysconfdir=/etc/dnsdist" conf_files="/etc/dnsdist/dnsdist.conf" +hostmakedepends="autoconf automake pkgconf" makedepends="libsodium-devel protobuf25 protobuf25-devel boost-devel re2-devel net-snmp-devel libcap-devel LuaJIT-devel libressl-devel lmdb-devel fstrm-devel libedit-devel gnutls-devel tinycdb-devel h2o-devel" -hostmakedepends="autoconf automake pkgconf" depends="libsodium libprotobuf25-lite re2 libnet-snmp libcap LuaJIT libressl lmdb fstrm libedit gnutls tinycdb" short_desc="Dynamic DNS loadbalancer" maintainer="JailBird " -license="GPL-2" +license="GPL-2.0-only" homepage="https://dnsdist.org/" distfiles="https://downloads.powerdns.com/releases/${pkgname}-${version}.tar.bz2" checksum=cae759729a87703f4d09b0ed4227cb224aaaa252fa92f2432fd7116f560afbf1 From 8da2e61119e13ace3fe547bd4bac08a70dfdd7f5 Mon Sep 17 00:00:00 2001 From: JailBird Date: Fri, 22 Jan 2021 20:04:31 -0600 Subject: [PATCH 4/8] Okay, I'm dumb, removing the vlicense, sorry --- srcpkgs/dnsdist/template | 1 - 1 file changed, 1 deletion(-) diff --git a/srcpkgs/dnsdist/template b/srcpkgs/dnsdist/template index 6694f0dc063..f25ca3cf455 100644 --- a/srcpkgs/dnsdist/template +++ b/srcpkgs/dnsdist/template @@ -35,5 +35,4 @@ post_install() { vsconf dnsdistconf.lua dnsdist.conf vinstall ${FILESDIR}/dnsdist.conf 644 etc/dnsdist vsv dnsdist - vlicense COPYING } From ab442d7692495108ef490c03981bc19e111f8502 Mon Sep 17 00:00:00 2001 From: JailBird Date: Wed, 10 Mar 2021 01:51:47 -0600 Subject: [PATCH 5/8] Drop tinycdb, update example conf --- srcpkgs/dnsdist/files/dnsdist.conf | 18 +++++++++--------- srcpkgs/dnsdist/template | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/srcpkgs/dnsdist/files/dnsdist.conf b/srcpkgs/dnsdist/files/dnsdist.conf index d9c2dd7804a..1d94926b0ba 100644 --- a/srcpkgs/dnsdist/files/dnsdist.conf +++ b/srcpkgs/dnsdist/files/dnsdist.conf @@ -11,16 +11,16 @@ -- Throw requests to Cloudflare and Google and take the fastest answer --- newServer("2606:4700:4700::1111") -- Cloudflare, primary IPv6 -newServer("1.1.1.1") -- Cloudflare, primary IPv4 --- newServer("2001:4860:4860::8888") -- Google, primary IPv6 -newServer("8.8.8.8") -- Google, primary IPv4 --- newServer("2606:4700:4700::1001") -- Cloudflare, secondary IPv6 -newServer("1.0.0.1") -- Cloudflare, secondary IPv4 --- newServer("2001:4860:4860::8844") -- Google, secondary IPv6 -newServer("8.8.4.4") -- Google, secondary IPv4 +-- newServer({address="2606:4700:4700::1111", tcpFastOpen=true}) -- Cloudflare, primary IPv6 +newServer({address="1.1.1.1", tcpFastOpen=true}) -- Cloudflare, primary IPv4 +-- newServer({address="2001:4860:4860::8888", tcpFastOpen=true}) -- Google, primary IPv6 +newServer({address="8.8.8.8", tcpFastOpen=true}) -- Google, primary IPv4 +-- newServer({address="2606:4700:4700::1001", tcpFastOpen=true}) -- Cloudflare, secondary IPv6 +newServer({address="1.0.0.1", tcpFastOpen=true}) -- Cloudflare, secondary IPv4 +-- newServer({address="2001:4860:4860::8844", tcpFastOpen=true}) -- Google, secondary IPv6 +newServer({address="8.8.4.4", tcpFastOpen=true}) -- Google, secondary IPv4 -setServerPolicy(roundrobin) +setServerPolicy(firstAvailable) -- Basic caching of results, comment out to use less memory pc = newPacketCache(10000, {maxTTL=86400, minTTL=0, temporaryFailureTTL=60, staleTTL=60, dontAge=false}) diff --git a/srcpkgs/dnsdist/template b/srcpkgs/dnsdist/template index f25ca3cf455..97dccffa57e 100644 --- a/srcpkgs/dnsdist/template +++ b/srcpkgs/dnsdist/template @@ -12,9 +12,9 @@ conf_files="/etc/dnsdist/dnsdist.conf" hostmakedepends="autoconf automake pkgconf" makedepends="libsodium-devel protobuf25 protobuf25-devel boost-devel re2-devel net-snmp-devel libcap-devel LuaJIT-devel libressl-devel lmdb-devel fstrm-devel - libedit-devel gnutls-devel tinycdb-devel h2o-devel" + libedit-devel gnutls-devel h2o-devel" depends="libsodium libprotobuf25-lite re2 libnet-snmp libcap LuaJIT libressl lmdb - fstrm libedit gnutls tinycdb" + fstrm libedit gnutls" short_desc="Dynamic DNS loadbalancer" maintainer="JailBird " license="GPL-2.0-only" From 21979d357da622234d4d79f0cf825c39ffbffa2d Mon Sep 17 00:00:00 2001 From: JailBird Date: Wed, 10 Mar 2021 02:03:02 -0600 Subject: [PATCH 6/8] libressl -> openssl --- srcpkgs/dnsdist/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dnsdist/template b/srcpkgs/dnsdist/template index 97dccffa57e..bc8a2262828 100644 --- a/srcpkgs/dnsdist/template +++ b/srcpkgs/dnsdist/template @@ -11,9 +11,9 @@ configure_args="--with-pic --with-gnu-ld --with-libsodium --with-protobuf conf_files="/etc/dnsdist/dnsdist.conf" hostmakedepends="autoconf automake pkgconf" makedepends="libsodium-devel protobuf25 protobuf25-devel boost-devel re2-devel - net-snmp-devel libcap-devel LuaJIT-devel libressl-devel lmdb-devel fstrm-devel + net-snmp-devel libcap-devel LuaJIT-devel openssl-devel lmdb-devel fstrm-devel libedit-devel gnutls-devel h2o-devel" -depends="libsodium libprotobuf25-lite re2 libnet-snmp libcap LuaJIT libressl lmdb +depends="libsodium libprotobuf25-lite re2 libnet-snmp libcap LuaJIT openssl lmdb fstrm libedit gnutls" short_desc="Dynamic DNS loadbalancer" maintainer="JailBird " From 4a7b56bc746506f25c6873f8671c1b3e7cb004d6 Mon Sep 17 00:00:00 2001 From: JailBird Date: Wed, 10 Mar 2021 02:15:15 -0600 Subject: [PATCH 7/8] Bump protobuf :( --- srcpkgs/dnsdist/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dnsdist/template b/srcpkgs/dnsdist/template index bc8a2262828..b83fb020d36 100644 --- a/srcpkgs/dnsdist/template +++ b/srcpkgs/dnsdist/template @@ -10,10 +10,10 @@ configure_args="--with-pic --with-gnu-ld --with-libsodium --with-protobuf --enable-dns-over-tls --enable-dns-over-https --sysconfdir=/etc/dnsdist" conf_files="/etc/dnsdist/dnsdist.conf" hostmakedepends="autoconf automake pkgconf" -makedepends="libsodium-devel protobuf25 protobuf25-devel boost-devel re2-devel +makedepends="libsodium-devel protobuf26 protobuf26-devel boost-devel re2-devel net-snmp-devel libcap-devel LuaJIT-devel openssl-devel lmdb-devel fstrm-devel libedit-devel gnutls-devel h2o-devel" -depends="libsodium libprotobuf25-lite re2 libnet-snmp libcap LuaJIT openssl lmdb +depends="libsodium libprotobuf26-lite re2 libnet-snmp libcap LuaJIT openssl lmdb fstrm libedit gnutls" short_desc="Dynamic DNS loadbalancer" maintainer="JailBird " From ae035dceb8497d35ee7df8fd9b189f21331164bb Mon Sep 17 00:00:00 2001 From: JailBird Date: Wed, 10 Mar 2021 19:08:32 -0600 Subject: [PATCH 8/8] Use regular Lua instead of LuaJIT --- srcpkgs/dnsdist/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dnsdist/template b/srcpkgs/dnsdist/template index b83fb020d36..9b67e6e90ef 100644 --- a/srcpkgs/dnsdist/template +++ b/srcpkgs/dnsdist/template @@ -11,9 +11,9 @@ configure_args="--with-pic --with-gnu-ld --with-libsodium --with-protobuf conf_files="/etc/dnsdist/dnsdist.conf" hostmakedepends="autoconf automake pkgconf" makedepends="libsodium-devel protobuf26 protobuf26-devel boost-devel re2-devel - net-snmp-devel libcap-devel LuaJIT-devel openssl-devel lmdb-devel fstrm-devel + net-snmp-devel libcap-devel lua54-devel openssl-devel lmdb-devel fstrm-devel libedit-devel gnutls-devel h2o-devel" -depends="libsodium libprotobuf26-lite re2 libnet-snmp libcap LuaJIT openssl lmdb +depends="libsodium libprotobuf26-lite re2 libnet-snmp libcap lua54 openssl lmdb fstrm libedit gnutls" short_desc="Dynamic DNS loadbalancer" maintainer="JailBird "