]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
packaging: add files for Arch builds
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 16 Feb 2018 11:55:56 +0000 (12:55 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 27 Feb 2018 16:50:21 +0000 (17:50 +0100)
distro/arch/PKGBUILD [new file with mode: 0644]
distro/arch/install [new file with mode: 0644]
distro/arch/kresd.conf [new symlink]
distro/arch/root.keys [new symlink]
distro/common/kresd.conf [new file with mode: 0644]
distro/common/root.keys [new file with mode: 0644]
distro/fedora/kresd.conf [changed from file to symlink]
distro/fedora/root.keys [changed from file to symlink]

diff --git a/distro/arch/PKGBUILD b/distro/arch/PKGBUILD
new file mode 100644 (file)
index 0000000..f818c89
--- /dev/null
@@ -0,0 +1,46 @@
+# Maintainer:  Tomas Krizek <tomas.krizek@mailbox.org>
+# Contributor: Ondřej Surý <ondrej@sury.org>
+
+pkgname=knot-resolver
+pkgver=VERSION
+pkgrel=1
+pkgdesc='full caching DNS resolver implementation'
+url='https://www.knot-resolver.cz/'
+arch=('x86_64')
+license=('GPL3')
+install=install
+depends=('libuv' 'knot>=2.6.4' 'luajit' 'cmocka' 'lua51-sec' 'lua51-socket' 'hiredis' 'libmemcached' 'libsystemd')
+source=("knot-resolver-${pkgver}.tar.xz"
+       "kresd.conf"
+       "root.keys")
+
+_makevars="PREFIX=/usr SBINDIR=/usr/bin LIBDIR=/usr/lib INCLUDEDIR=/usr/include ETCDIR=/etc/knot-resolver V=1"
+
+sha256sums=('SKIP'
+           'SKIP'
+           '06c74ef5ef53344c78c9af2b29dc458a2abe93f1bff429705955c033e7a0686f')
+
+build() {
+       cd "${srcdir}/${pkgname}-${pkgver}"
+       make ${_makevars}
+}
+
+check() {
+       cd "${srcdir}/${pkgname}-${pkgver}"
+       make check-unit ${_makevars}
+}
+
+package() {
+       cd "${srcdir}/${pkgname}-${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}/doc/kresd.systemd.7" "${pkgdir}/usr/share/man/man7/kresd.systemd.7"
+       install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/systemd/tmpfiles/knot-resolver.conf" "${pkgdir}/usr/lib/tmpfiles.d/knot-resolver.conf"
+       install -dm 0775 "${pkgdir}/etc/knot-resolver"
+       install -Dm 0644 "${srcdir}/kresd.conf" "${pkgdir}/etc/knot-resolver/kresd.conf"
+       install -Dm 0664 "${srcdir}/root.keys" "${pkgdir}/etc/knot-resolver/root.keys"
+}
diff --git a/distro/arch/install b/distro/arch/install
new file mode 100644 (file)
index 0000000..de23d59
--- /dev/null
@@ -0,0 +1,15 @@
+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 -R root:knot-resolver /etc/knot-resolver
+}
+
+post_upgrade() {
+  chown -R root:knot-resolver /etc/knot-resolver
+}
+
+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/distro/arch/kresd.conf b/distro/arch/kresd.conf
new file mode 120000 (symlink)
index 0000000..2fc64a4
--- /dev/null
@@ -0,0 +1 @@
+../common/kresd.conf
\ No newline at end of file
diff --git a/distro/arch/root.keys b/distro/arch/root.keys
new file mode 120000 (symlink)
index 0000000..2d4a6bd
--- /dev/null
@@ -0,0 +1 @@
+../common/root.keys
\ No newline at end of file
diff --git a/distro/common/kresd.conf b/distro/common/kresd.conf
new file mode 100644 (file)
index 0000000..81034c0
--- /dev/null
@@ -0,0 +1,20 @@
+-- vim:syntax=lua:
+-- Refer to manual: http://knot-resolver.readthedocs.org/en/latest/daemon.html#configuration
+
+-- Load useful modules
+modules = {
+       'policy',   -- Block queries to local zones/bad sites
+       'hints',    -- Load /etc/hosts and allow custom root hints
+       'stats',    -- Track internal statistics
+       'predict',  -- Prefetch expiring/frequent records
+}
+
+-- See kresd.systemd(7) about configuring network interfaces when using systemd
+-- Listen on localhost (default)
+-- net = { '127.0.0.1', '::1' }
+
+-- Enable DNSSEC validation
+trust_anchors.file = '/etc/knot-resolver/root.keys'
+
+-- Cache size
+cache.size = 100 * MB
diff --git a/distro/common/root.keys b/distro/common/root.keys
new file mode 100644 (file)
index 0000000..7578e04
--- /dev/null
@@ -0,0 +1,2 @@
+. IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5
+. IN DS 20326 8 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D
deleted file mode 100644 (file)
index 81034c07eadb6e80d30e6f779957a5271769e613..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,20 +0,0 @@
--- vim:syntax=lua:
--- Refer to manual: http://knot-resolver.readthedocs.org/en/latest/daemon.html#configuration
-
--- Load useful modules
-modules = {
-       'policy',   -- Block queries to local zones/bad sites
-       'hints',    -- Load /etc/hosts and allow custom root hints
-       'stats',    -- Track internal statistics
-       'predict',  -- Prefetch expiring/frequent records
-}
-
--- See kresd.systemd(7) about configuring network interfaces when using systemd
--- Listen on localhost (default)
--- net = { '127.0.0.1', '::1' }
-
--- Enable DNSSEC validation
-trust_anchors.file = '/etc/knot-resolver/root.keys'
-
--- Cache size
-cache.size = 100 * MB
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..2fc64a42a250aa7b4b310cc990d52eab5944411f
--- /dev/null
@@ -0,0 +1 @@
+../common/kresd.conf
\ No newline at end of file
deleted file mode 100644 (file)
index 7578e0405d9da2eb194af1f04200773f745d6630..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,2 +0,0 @@
-. IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5
-. IN DS 20326 8 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..2d4a6bdadc5d5808b9120de9ceb59927106bb366
--- /dev/null
@@ -0,0 +1 @@
+../common/root.keys
\ No newline at end of file