summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Perez de Castro2016-10-25 05:31:31 +0300
committerAdrian Perez de Castro2016-10-25 05:31:31 +0300
commit14bbda88ee2c5840c4179b59d000f5c945fcc1cf (patch)
tree0dc894f80fd891cb5f454f1240df8f220f2f36a2
downloadaur-14bbda88ee2c5840c4179b59d000f5c945fcc1cf.tar.gz
Initial import
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD41
-rw-r--r--default.conf4
-rw-r--r--dq.install25
-rw-r--r--dqcache-sysusers.conf1
-rwxr-xr-xdqcache.sh9
-rw-r--r--dqcache@.service17
-rw-r--r--root-servers24
8 files changed, 148 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..923b64d8bdc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = dq
+ pkgdesc = Small recursive DNS server and tools with DNSCurve support
+ pkgver = 20160523
+ pkgrel = 1
+ url = https://mojzis.com/software/dq/
+ install = dq.install
+ arch = x86_64
+ arch = i686
+ license = Public Domain
+ makedepends = gcc
+ makedepends = make
+ depends = bash
+ source = dq-20160523.tar.gz::https://mojzis.com/software/dq/dq-20160523.tar.bz2
+ source = root-servers
+ source = dqcache@.service
+ source = default.conf
+ source = dqcache-sysusers.conf
+ source = dqcache.sh
+ sha512sums = 66857b54ea42329df9b583d40de00d1d3886bbb9e0f73679d12365df4a66cbadf1db73fd2bbc2bba4e1eff6af495993ceff23e8fe4897a116ad9b19e80a4dcd0
+ sha512sums = 1444d75a559769044cabca730a11846f14c8db0096a33464fbd90b8c1f363525088b55801ea29554b46906792097ce8a84f1f5e763f018270600408cc9404614
+ sha512sums = 0c19ce8d81bf2bed090e232c338dce466e7ff172f8698f7ecbff59a999a534bc37d2a194d3749a3fea5d3b0c26ff283526861beefd4bef810caa022beff58c5d
+ sha512sums = 1d374937af59ea43237fcdc5089f940c9b97240a22ccc9ad6ea9ece450550dddb82c0bba4f579cf1a89baa184698fa2d7d4f1eee7ce88e070521b55a72c49ec4
+ sha512sums = ab7fcf301cfcbc1fa70ec6ff914c8b33b8c868e305990351d0dac5d28832a60368af3a79bbd635742583801eb8bf4226aac0c9e478d40c3b180f1d68e946bf0a
+ sha512sums = 709ac3e2553a7a035b46622288857d6b2bcf249f3a568400a3d973ead759a65e286f7717b591dee0bef7374f34a61e1600610f8dc526377f666cdf8440e48462
+
+pkgname = dq
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1ec5b143d0a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Adrian Perez <aperez@igalia.com>
+pkgname='dq'
+pkgver='20160523'
+pkgrel='1'
+pkgdesc='Small recursive DNS server and tools with DNSCurve support'
+url='https://mojzis.com/software/dq/'
+arch=('x86_64' 'i686')
+license=('Public Domain')
+depends=('bash')
+makedepends=('gcc' 'make')
+install='dq.install'
+source=("${pkgname}-${pkgver}.tar.gz::https://mojzis.com/software/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+ root-servers dqcache@.service default.conf dqcache-sysusers.conf dqcache.sh)
+sha512sums=('66857b54ea42329df9b583d40de00d1d3886bbb9e0f73679d12365df4a66cbadf1db73fd2bbc2bba4e1eff6af495993ceff23e8fe4897a116ad9b19e80a4dcd0'
+ '1444d75a559769044cabca730a11846f14c8db0096a33464fbd90b8c1f363525088b55801ea29554b46906792097ce8a84f1f5e763f018270600408cc9404614'
+ '0c19ce8d81bf2bed090e232c338dce466e7ff172f8698f7ecbff59a999a534bc37d2a194d3749a3fea5d3b0c26ff283526861beefd4bef810caa022beff58c5d'
+ '1d374937af59ea43237fcdc5089f940c9b97240a22ccc9ad6ea9ece450550dddb82c0bba4f579cf1a89baa184698fa2d7d4f1eee7ce88e070521b55a72c49ec4'
+ 'ab7fcf301cfcbc1fa70ec6ff914c8b33b8c868e305990351d0dac5d28832a60368af3a79bbd635742583801eb8bf4226aac0c9e478d40c3b180f1d68e946bf0a'
+ '709ac3e2553a7a035b46622288857d6b2bcf249f3a568400a3d973ead759a65e286f7717b591dee0bef7374f34a61e1600610f8dc526377f666cdf8440e48462')
+
+build () {
+ cd "${srcdir}/${pkgname}-${pkgver//./}"
+ echo '/usr/lib/dq' > conf-sbin
+ echo '/usr/bin' > conf-bin
+ make
+}
+
+package () {
+ cd "${srcdir}/${pkgname}-${pkgver//./}"
+ make install DESTDIR="${pkgdir}"
+ install -m 755 -D "${srcdir}/dqcache.sh" \
+ "${pkgdir}/usr/bin/dqcache"
+ install -m 644 -D "${srcdir}/default.conf" \
+ "${pkgdir}/etc/dqcache/default.conf"
+ install -m 644 -D "${srcdir}/root-servers" \
+ "${pkgdir}/etc/dqcache/default/servers/@"
+ install -m 644 -D "${srcdir}/dqcache@.service" \
+ "${pkgdir}/usr/lib/systemd/system/dqcache@.service"
+ install -m 644 -D "${srcdir}/dqcache-sysusers.conf" \
+ "${pkgdir}/usr/lib/sysusers.d/dqcache.conf"
+}
diff --git a/default.conf b/default.conf
new file mode 100644
index 00000000000..3509d3b5a0d
--- /dev/null
+++ b/default.conf
@@ -0,0 +1,4 @@
+# Default configuration for the dqcache DNS server
+ROOT=/etc/dqcache/default
+CACHESIZE=10000000
+IP=127.0.0.1
diff --git a/dq.install b/dq.install
new file mode 100644
index 00000000000..17f8832bb9d
--- /dev/null
+++ b/dq.install
@@ -0,0 +1,25 @@
+show_mesage () {
+ cat <<-EOF
+ A systemd template unit has been installed, which can be used to make
+ dqcache read different configuration files. To use /etc/dqcache/default.conf
+ run:
+
+ systemctl enable dqcache@default.socket
+ systemctl start dqcache@default.socket
+
+ Make sure to check and edit the configuration file to suit your needs.
+
+ EOF
+}
+
+post_install () {
+ /usr/bin/systemd-sysusers /usr/lib/sysusers.d/dqcache.conf
+}
+
+post_upgrade () {
+ post_install
+}
+
+post_remove () {
+ post_install
+}
diff --git a/dqcache-sysusers.conf b/dqcache-sysusers.conf
new file mode 100644
index 00000000000..657950c9336
--- /dev/null
+++ b/dqcache-sysusers.conf
@@ -0,0 +1 @@
+u dqcache - "dqcache daemon"
diff --git a/dqcache.sh b/dqcache.sh
new file mode 100755
index 00000000000..e0640050aad
--- /dev/null
+++ b/dqcache.sh
@@ -0,0 +1,9 @@
+#! /bin/bash
+if [[ ${UID} -ne 0 && ${EUID} -ne 0 ]] ; then
+ echo "$0: Must run as root." 1>&2
+ exit 1
+fi
+exec /usr/bin/env \
+ UID=$(id -u "${USER:-dqcache}") \
+ GID=$(id -g "${GROUP:-dqcache}") \
+ /usr/lib/dq/dqcache
diff --git a/dqcache@.service b/dqcache@.service
new file mode 100644
index 00000000000..24f248afb11
--- /dev/null
+++ b/dqcache@.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=dqcache caching recursive DNS server
+Documentation=https://mojzis.com/software/dq
+After=network.target
+
+[Service]
+Type=simple
+Restart=always
+PrivateTmp=true
+PrivateDevices=true
+ProtectSystem=true
+WorkingDirectory=/etc/dqcache
+EnvironmentFile=/etc/dqcache/%i.conf
+ExecStart=/usr/bin/dqcache
+
+[Install]
+WantedBy=multi-user.target
diff --git a/root-servers b/root-servers
new file mode 100644
index 00000000000..26a7ed6b0a4
--- /dev/null
+++ b/root-servers
@@ -0,0 +1,24 @@
+198.41.0.4
+2001:503:ba3e::2:30
+192.228.79.201
+2001:500:84::b
+192.33.4.12
+2001:500:2::c
+199.7.91.13
+2001:500:2d::d
+192.203.230.10
+192.5.5.241
+2001:500:2f::f
+192.112.36.4
+198.97.190.53
+2001:500:1::53
+192.36.148.17
+2001:7fe::53
+192.58.128.30
+2001:503:c27::2:30
+193.0.14.129
+2001:7fd::1
+199.7.83.42
+2001:500:9f::42
+202.12.27.33
+2001:dc3::35