summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndřej Surý2017-03-01 15:42:29 +0100
committerOndřej Surý2017-03-01 16:13:18 +0100
commit9a46cace29233248aaa883da4f883eb133246cae (patch)
treebaea8460400f9dac589684937f082c9d0badb3c9
downloadaur-9a46cace29233248aaa883da4f883eb133246cae.tar.gz
Initial Knot Resolver 1.2.3 AUR package
-rw-r--r--.SRCINFO36
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD49
-rw-r--r--install14
-rw-r--r--kresd.conf7
-rw-r--r--kresd.default2
-rw-r--r--root.key1
7 files changed, 113 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d3ce3dbc7d9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,36 @@
+# Generated by mksrcinfo v8
+# Wed Mar 1 15:13:08 UTC 2017
+pkgbase = knot-resolver
+ pkgdesc = caching full resolver implementation
+ pkgver = 1.2.3
+ pkgrel = 1
+ url = https://www.knot-resolver.cz/
+ install = install
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ depends = libuv
+ depends = gnutls>=3.0
+ depends = knot>=2.4.1
+ depends = lmdb
+ depends = luajit
+ depends = cmocka
+ depends = jansson
+ depends = lua51-sec
+ depends = lua51-socket
+ depends = hiredis
+ depends = libmemcached
+ depends = python-sphinx
+ depends = python-breathe
+ depends = doxygen
+ source = https://secure.nic.cz/files/knot-resolver/knot-resolver-1.2.3.tar.xz
+ source = kresd.conf
+ source = kresd.default
+ source = root.key
+ sha256sums = 81a773f182112b4e11935223f900cfbcca8624f2c382b1e39a68d7c3db81c921
+ sha256sums = f078bc02f41d0eab5b1a0d27db088dbfbd121bd677ebe3fd0a86e2175562bbb0
+ sha256sums = 48f5d6e29447ad865b19003f9961f8fec17dce174e5aef0c1cac36464c7d98cf
+ sha256sums = 422105459af6851fbf55d876fab5069a7b772a1e2f561453165378ca07e6af1c
+
+pkgname = knot-resolver
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..c229a9c01fb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/knot-resolver*.tar.*
+/src/
+/pkg/
+*~
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d349a65d1e9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Ondřej Surý <ondrej@sury.org>
+
+srcname=knot-resolver
+pkgname=${srcname}
+pkgver=1.2.3
+pkgrel=1
+pkgdesc='caching full resolver implementation'
+url='https://www.knot-resolver.cz/'
+arch=('i686' 'x86_64')
+license=('GPL3')
+install=install
+depends=('libuv' 'gnutls>=3.0' 'knot>=2.4.1' 'lmdb' 'luajit' 'cmocka' 'jansson' 'lua51-sec' 'lua51-socket' 'hiredis' 'libmemcached' 'python-sphinx' 'python-breathe' 'doxygen')
+source=("https://secure.nic.cz/files/knot-resolver/${srcname}-${pkgver}.tar.xz"
+ "kresd.conf"
+ "kresd.default"
+ "root.key")
+
+makevars="PREFIX=/usr SBINDIR=/usr/bin MODULEDIR=/usr/lib/knot-resolver ETCDIR=/etc/knot-resolver V=1"
+
+sha256sums=('81a773f182112b4e11935223f900cfbcca8624f2c382b1e39a68d7c3db81c921'
+ 'f078bc02f41d0eab5b1a0d27db088dbfbd121bd677ebe3fd0a86e2175562bbb0'
+ '48f5d6e29447ad865b19003f9961f8fec17dce174e5aef0c1cac36464c7d98cf'
+ '422105459af6851fbf55d876fab5069a7b772a1e2f561453165378ca07e6af1c')
+
+build() {
+ cd "${srcdir}/${srcname}-${pkgver}"
+ make ${makevars}
+}
+
+check() {
+ cd "${srcdir}/${srcname}-${pkgver}"
+ make ${makevars}
+}
+
+package() {
+ cd "${srcdir}/${srcname}-${pkgver}"
+
+ make ${makevars} DESTDIR="${pkgdir}" install
+ install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/systemd/kresd.socket" "${pkgdir}/usr/lib/systemd/system/kresd.socket"
+ install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/systemd/kresd-control.socket" "${pkgdir}/usr/lib/systemd/system/kresd-control.socket"
+ install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/systemd/kresd-tls.socket" "${pkgdir}/usr/lib/systemd/system/kresd-tls.socket"
+ install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/systemd/kresd.service" "${pkgdir}/usr/lib/systemd/system/kresd.service"
+ install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/systemd/tmpfiles/kresd.conf" "${pkgdir}/usr/lib/tmpfiles.d/kresd.conf"
+ install -dm 0755 "${pkgdir}/etc/knot-resolver"
+ install -Dm 0644 "${srcdir}/kresd.conf" "${pkgdir}/etc/knot-resolver/kresd.conf"
+ install -Dm 0644 "${srcdir}/kresd.default" "${pkgdir}/etc/default/kresd"
+ install -dm 0755 "${pkgdir}/var/lib/knot-resolver"
+ install -Dm 0644 "${srcdir}/root.key" "${pkgdir}/var/lib/knot-resolver/root.key"
+}
diff --git a/install b/install
new file mode 100644
index 00000000000..7f245655312
--- /dev/null
+++ b/install
@@ -0,0 +1,14 @@
+post_install() {
+ getent group knot-resolver &>/dev/null || groupadd -r knot-resolver >/dev/null
+ getent passwd knot-resolver &>/dev/null || useradd -r -g knot-resolver -d /dev/null -s /bin/false -c knot-resolver knot-resolver >/dev/null
+ chown knot-resolver:knot-resolver /var/lib/knot-resolver
+ chmod 0755 /var/lib/knot-resolver
+ chown knot-resolver:knot-resolver /var/lib/knot-resolver/root.key
+ chmod 0644 /var/lib/knot-resolver/root.key
+}
+
+post_remove() {
+ getent passwd knot-resolver &>/dev/null && userdel knot-resolver >/dev/null
+ getent group knot-resolver &>/dev/null && groupdel knot-resolver >/dev/null
+ true
+}
diff --git a/kresd.conf b/kresd.conf
new file mode 100644
index 00000000000..638f381d9f9
--- /dev/null
+++ b/kresd.conf
@@ -0,0 +1,7 @@
+-- Default empty Knot DNS Resolver configuration in -*- lua -*-
+-- Bind ports as privileged user (root) --
+-- net = { '127.0.0.1', '::1' }
+-- Switch to unprivileged user --
+user('knot-resolver','knot-resolver')
+-- Unprivileged
+-- cache.size = 100*MB
diff --git a/kresd.default b/kresd.default
new file mode 100644
index 00000000000..dcc3d13117d
--- /dev/null
+++ b/kresd.default
@@ -0,0 +1,2 @@
+# Used for systemd socket activation
+KRESD_ARGS="--config=/etc/knot-resolver/kresd.conf --verbose --forks=1 --keyfile=/var/lib/knot-resolver/root.key /run/knot-resolver/cache"
diff --git a/root.key b/root.key
new file mode 100644
index 00000000000..6c7d3a15ac8
--- /dev/null
+++ b/root.key
@@ -0,0 +1 @@
+. 172800 IN DNSKEY 257 3 8 AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0O8gcCjFFVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0NfnfL2MTJRkxoXbfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL496M/QZxkjf5/Efucp2gaDX6RS6CXpoY68LsvPVjR0ZSwzz1apAzvN9dlzEheX7ICJBBtuA6G3LQpzW5hOA2hzCTMjJPJ8LbqF6dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relSQageu+ipAdTTJ25AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulqQxA+Uk1ihz0= ;{id = 19036 (ksk), size = 2048b} ;;state=2 [ VALID ] ;;count=0 ;;lastchange=1404118431 ;;Mon Jun 30 10:53:51 2014