Browse Source

coredns-git: added to repo

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
master
Steven Noonan 2 years ago
parent
commit
86036d8336
  1. 49
      coredns-git/PKGBUILD
  2. 1
      coredns-git/coredns-sysusers.conf
  3. 1
      coredns-git/coredns-tmpfiles.conf
  4. 20
      coredns-git/coredns.service
  5. 33
      coredns-git/corefile.example

49
coredns-git/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"
}

1
coredns-git/coredns-sysusers.conf

@ -0,0 +1 @@
u coredns - "CoreDNS is a DNS server that chains plugins" /var/lib/coredns

1
coredns-git/coredns-tmpfiles.conf

@ -0,0 +1 @@
d /var/lib/coredns 0755 coredns coredns -

20
coredns-git/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

33
coredns-git/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
}
Loading…
Cancel
Save