aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2014-10-21 16:36:28 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2014-10-21 16:37:53 +0000
commit14d076e01af0e1590f9e0217c910f850feb8e94d (patch)
tree61e66ce65087c0a4e946ffe2f6b5a902ca4c36b8
parentdf71701915a74ca7d02c942a27892e0072c84ac8 (diff)
downloadalpine_aports-14d076e01af0e1590f9e0217c910f850feb8e94d.tar.bz2
alpine_aports-14d076e01af0e1590f9e0217c910f850feb8e94d.tar.xz
alpine_aports-14d076e01af0e1590f9e0217c910f850feb8e94d.zip
testing/knot: fixed exec permission on init, added knot user and group
-rw-r--r--testing/knot/APKBUILD14
-rw-r--r--testing/knot/knot.post-install10
-rw-r--r--testing/knot/knot.pre-install3
3 files changed, 21 insertions, 6 deletions
diff --git a/testing/knot/APKBUILD b/testing/knot/APKBUILD
index 3a7030b555..3a652a5947 100644
--- a/testing/knot/APKBUILD
+++ b/testing/knot/APKBUILD
@@ -2,7 +2,7 @@
2# Maintainer: Francesco Colista <fcolista@alpinelinux.org> 2# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
3pkgname=knot 3pkgname=knot
4pkgver=1.5.3 4pkgver=1.5.3
5pkgrel=0 5pkgrel=1
6pkgdesc="An high-performance authoritative-only DNS server" 6pkgdesc="An high-performance authoritative-only DNS server"
7url="https://www.knot-dns.cz" 7url="https://www.knot-dns.cz"
8arch="all" 8arch="all"
@@ -11,7 +11,9 @@ options="libtool"
11depends="" 11depends=""
12depends_dev="autoconf flex bison zlib-dev openssl-dev userspace-rcu-dev" 12depends_dev="autoconf flex bison zlib-dev openssl-dev userspace-rcu-dev"
13makedepends="$depends_dev" 13makedepends="$depends_dev"
14install="" 14install="$pkgname.pre-install $pkgname.post-install"
15pkgusers="knot"
16pkggroups="knot"
15subpackages="$pkgname-dev $pkgname-doc" 17subpackages="$pkgname-dev $pkgname-doc"
16source="https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz 18source="https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz
17 knot.confd 19 knot.confd
@@ -35,13 +37,11 @@ build() {
35 --host=$CHOST \ 37 --host=$CHOST \
36 --prefix=/usr \ 38 --prefix=/usr \
37 --sysconfdir=/etc \ 39 --sysconfdir=/etc \
38 --localstatedir=/var/lib \
39 --libexecdir=/usr/lib/knot \ 40 --libexecdir=/usr/lib/knot \
40 --with-rundir=/run/knot \ 41 --with-rundir=/var/run/knot \
41 --with-storage=/var/lib/knot \ 42 --with-storage=/var/lib/knot \
42 --enable-recvmmsg=yes \ 43 --enable-recvmmsg=yes \
43 --disable-silent-rules 44 --disable-silent-rules
44
45 make 45 make
46 make check 46 make check
47} 47}
@@ -50,7 +50,9 @@ package() {
50 cd "$_builddir" 50 cd "$_builddir"
51 make DESTDIR="${pkgdir}" install 51 make DESTDIR="${pkgdir}" install
52 install -Dm 644 "${srcdir}/knot.confd" "${pkgdir}/etc/conf.d/knot" 52 install -Dm 644 "${srcdir}/knot.confd" "${pkgdir}/etc/conf.d/knot"
53 install -Dm 644 "${srcdir}/knot.initd" "${pkgdir}/etc/init.d/knot" 53 install -Dm 755 "${srcdir}/knot.initd" "${pkgdir}/etc/init.d/knot"
54 chown $pkgusers:$pkggroups "${pkgdir}"/var/lib/$pkgname
55 chown $pkgusers:$pkggroups "${pkgdir}"/var/run/$pkgname
54 rm -f "$pkgdir"/usr/lib/*.la 56 rm -f "$pkgdir"/usr/lib/*.la
55} 57}
56 58
diff --git a/testing/knot/knot.post-install b/testing/knot/knot.post-install
new file mode 100644
index 0000000000..74d367a035
--- /dev/null
+++ b/testing/knot/knot.post-install
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3echo "*" >&2
4echo "* Before running knot, you must create a knot.conf file." >&2
5echo "* There is an example into /etc/knot directory. " >&2
6echo "* You can rename the example file and make the necessary adjustment. >&2
7echo "*" >&2
8
9exit 0
10
diff --git a/testing/knot/knot.pre-install b/testing/knot/knot.pre-install
new file mode 100644
index 0000000000..bc93e098ec
--- /dev/null
+++ b/testing/knot/knot.pre-install
@@ -0,0 +1,3 @@
1#!/bin/sh
2adduser -H -s /sbin/nologin -S -D knot -G knot 2>/dev/null
3exit 0