diff options
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | coredns-sysusers.conf | 1 | ||||
-rw-r--r-- | coredns-tmpfiles.conf | 1 | ||||
-rw-r--r-- | coredns.service | 20 | ||||
-rw-r--r-- | corefile.example | 33 |
6 files changed, 130 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..aa60672298b7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = coredns-git + pkgdesc = CoreDNS is a DNS server that chains plugins + pkgver = 1.6.1.r19.ga64ff8cc0 + pkgrel = 1 + url = https://coredns.io + arch = i686 + arch = x86_64 + license = Apache + makedepends = go>=1.12 + makedepends = git + provides = coredns + conflicts = coredns-bin + conflicts = coredns + source = git+https://github.com/coredns/coredns.git + source = corefile.example + source = coredns.service + source = coredns-sysusers.conf + source = coredns-tmpfiles.conf + sha256sums = SKIP + sha256sums = 66689ad9160de3ba17431bbd38d2a438bc4f75151eff93f9ffb7bd2e48c298cc + sha256sums = 8a5689eeba6c48945fec84dd0163fdf3d7118aa98ad511992501637f411b1a5c + sha256sums = f4fd89dcb36f52466ebb1a2ae435dc960cdc828a071f3aaae1d83a39696bff30 + sha256sums = 20052dded9a02e05013a602e597002ee2a003ecfab3309d30969c28207fc5b72 + +pkgname = coredns-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ef1c063af26e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Contributor: skydrome <skydrome at- protonmail dotcom> +# Maintainer: skydrome <skydrome at- protonmail dotcom> + +pkgname=coredns-git +pkgver=1.6.1.r19.ga64ff8cc0 +pkgrel=1 +pkgdesc="CoreDNS is a DNS server that chains plugins" +url="https://coredns.io" +arch=('i686' 'x86_64') +license=('Apache') +conflicts=('coredns-bin' 'coredns') +provides=('coredns') +makedepends=('go>=1.12' 'git') + +source=("git+https://github.com/coredns/coredns.git" + 'corefile.example' + 'coredns.service' 'coredns-sysusers.conf' 'coredns-tmpfiles.conf') + +sha256sums=('SKIP' + '66689ad9160de3ba17431bbd38d2a438bc4f75151eff93f9ffb7bd2e48c298cc' + '8a5689eeba6c48945fec84dd0163fdf3d7118aa98ad511992501637f411b1a5c' + 'f4fd89dcb36f52466ebb1a2ae435dc960cdc828a071f3aaae1d83a39696bff30' + '20052dded9a02e05013a602e597002ee2a003ecfab3309d30969c28207fc5b72') + +pkgver() { + cd coredns + git describe --long --tags |sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd coredns + export GOPATH="$srcdir/build" + make CHECKS= all +} + +package() { + install -Dm755 coredns/coredns "$pkgdir/usr/bin/coredns" + install -Dm644 coredns/LICENSE "$pkgdir/usr/share/licenses/coredns/LICENSE" + install -Dm644 corefile.example "$pkgdir/etc/coredns/corefile.example" + + install -dm644 "$pkgdir/usr/share/man/man"{1,5,7} + install -Dm644 coredns/man/*.1 "$pkgdir/usr/share/man/man1" + install -Dm644 coredns/man/*.5 "$pkgdir/usr/share/man/man5" + install -Dm644 coredns/man/*.7 "$pkgdir/usr/share/man/man7" + + install -Dm644 coredns.service "$pkgdir/usr/lib/systemd/system/coredns.service" + install -Dm644 coredns-sysusers.conf "$pkgdir/usr/lib/sysusers.d/coredns.conf" + install -Dm644 coredns-tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/coredns.conf" +} diff --git a/coredns-sysusers.conf b/coredns-sysusers.conf new file mode 100644 index 000000000000..8bdc16c6d892 --- /dev/null +++ b/coredns-sysusers.conf @@ -0,0 +1 @@ +u coredns - "CoreDNS is a DNS server that chains plugins" /var/lib/coredns diff --git a/coredns-tmpfiles.conf b/coredns-tmpfiles.conf new file mode 100644 index 000000000000..9f7c82a18991 --- /dev/null +++ b/coredns-tmpfiles.conf @@ -0,0 +1 @@ +d /var/lib/coredns 0755 coredns coredns - diff --git a/coredns.service b/coredns.service new file mode 100644 index 000000000000..91b04dc715a5 --- /dev/null +++ b/coredns.service @@ -0,0 +1,20 @@ +[Unit] +Description=CoreDNS DNS server +Documentation=https://coredns.io +After=network.target + +[Service] +PermissionsStartOnly=true +LimitNOFILE=1048576 +LimitNPROC=512 +CapabilityBoundingSet=CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_BIND_SERVICE +NoNewPrivileges=true +User=coredns +WorkingDirectory=~ +ExecStart=/usr/bin/coredns -conf=/etc/coredns/corefile +ExecReload=/bin/kill -SIGUSR1 $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/corefile.example b/corefile.example new file mode 100644 index 000000000000..dd44a145ade9 --- /dev/null +++ b/corefile.example @@ -0,0 +1,33 @@ +## https://github.com/coredns/coredns.io/tree/master/content/manual + +# Start a server listening on port 1053 +.:1053 { + + # Forward all queries to Google OR Quad9 + forward . 8.8.8.8 9.9.9.9:53 + # Forward all requests to 9.9.9.9 using DNS-over-TLS + forward . tls://9.9.9.9 { + tls_servername dns.quad9.net + health_check 5s + } + + # Write query/errors logs to stdout + log + errors + + # Enable caching for all zones, keep a + # positive cache size of 5000 and a negative cache size of 2500 + cache { + success 5000 + denial 2500 + } + # Only cache responses for example.org + cache example.org +} + +# Forward all queries about example.org to a server from an environment variable +# or servers from a file +example.org { + forward . {$DNS_SERVER} /etc/resolv.conf + log +} |