diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2014-10-21 16:36:28 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2014-10-21 16:37:53 +0000 |
commit | 14d076e01af0e1590f9e0217c910f850feb8e94d (patch) | |
tree | 61e66ce65087c0a4e946ffe2f6b5a902ca4c36b8 /testing/knot | |
parent | df71701915a74ca7d02c942a27892e0072c84ac8 (diff) | |
download | aports-14d076e01af0e1590f9e0217c910f850feb8e94d.tar.bz2 aports-14d076e01af0e1590f9e0217c910f850feb8e94d.tar.xz |
testing/knot: fixed exec permission on init, added knot user and group
Diffstat (limited to 'testing/knot')
-rw-r--r-- | testing/knot/APKBUILD | 14 | ||||
-rw-r--r-- | testing/knot/knot.post-install | 10 | ||||
-rw-r--r-- | testing/knot/knot.pre-install | 3 |
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 @@ # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=knot pkgver=1.5.3 -pkgrel=0 +pkgrel=1 pkgdesc="An high-performance authoritative-only DNS server" url="https://www.knot-dns.cz" arch="all" @@ -11,7 +11,9 @@ options="libtool" depends="" depends_dev="autoconf flex bison zlib-dev openssl-dev userspace-rcu-dev" makedepends="$depends_dev" -install="" +install="$pkgname.pre-install $pkgname.post-install" +pkgusers="knot" +pkggroups="knot" subpackages="$pkgname-dev $pkgname-doc" source="https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz knot.confd @@ -35,13 +37,11 @@ build() { --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ - --localstatedir=/var/lib \ --libexecdir=/usr/lib/knot \ - --with-rundir=/run/knot \ + --with-rundir=/var/run/knot \ --with-storage=/var/lib/knot \ --enable-recvmmsg=yes \ --disable-silent-rules - make make check } @@ -50,7 +50,9 @@ package() { cd "$_builddir" make DESTDIR="${pkgdir}" install install -Dm 644 "${srcdir}/knot.confd" "${pkgdir}/etc/conf.d/knot" - install -Dm 644 "${srcdir}/knot.initd" "${pkgdir}/etc/init.d/knot" + install -Dm 755 "${srcdir}/knot.initd" "${pkgdir}/etc/init.d/knot" + chown $pkgusers:$pkggroups "${pkgdir}"/var/lib/$pkgname + chown $pkgusers:$pkggroups "${pkgdir}"/var/run/$pkgname rm -f "$pkgdir"/usr/lib/*.la } 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 @@ +#!/bin/sh + +echo "*" >&2 +echo "* Before running knot, you must create a knot.conf file." >&2 +echo "* There is an example into /etc/knot directory. " >&2 +echo "* You can rename the example file and make the necessary adjustment. >&2 +echo "*" >&2 + +exit 0 + 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 @@ +#!/bin/sh +adduser -H -s /sbin/nologin -S -D knot -G knot 2>/dev/null +exit 0 |