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 | |
parent | df71701915a74ca7d02c942a27892e0072c84ac8 (diff) | |
download | alpine_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/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 @@ | |||
2 | # Maintainer: Francesco Colista <fcolista@alpinelinux.org> | 2 | # Maintainer: Francesco Colista <fcolista@alpinelinux.org> |
3 | pkgname=knot | 3 | pkgname=knot |
4 | pkgver=1.5.3 | 4 | pkgver=1.5.3 |
5 | pkgrel=0 | 5 | pkgrel=1 |
6 | pkgdesc="An high-performance authoritative-only DNS server" | 6 | pkgdesc="An high-performance authoritative-only DNS server" |
7 | url="https://www.knot-dns.cz" | 7 | url="https://www.knot-dns.cz" |
8 | arch="all" | 8 | arch="all" |
@@ -11,7 +11,9 @@ options="libtool" | |||
11 | depends="" | 11 | depends="" |
12 | depends_dev="autoconf flex bison zlib-dev openssl-dev userspace-rcu-dev" | 12 | depends_dev="autoconf flex bison zlib-dev openssl-dev userspace-rcu-dev" |
13 | makedepends="$depends_dev" | 13 | makedepends="$depends_dev" |
14 | install="" | 14 | install="$pkgname.pre-install $pkgname.post-install" |
15 | pkgusers="knot" | ||
16 | pkggroups="knot" | ||
15 | subpackages="$pkgname-dev $pkgname-doc" | 17 | subpackages="$pkgname-dev $pkgname-doc" |
16 | source="https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz | 18 | source="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 | |||
3 | echo "*" >&2 | ||
4 | echo "* Before running knot, you must create a knot.conf file." >&2 | ||
5 | echo "* There is an example into /etc/knot directory. " >&2 | ||
6 | echo "* You can rename the example file and make the necessary adjustment. >&2 | ||
7 | echo "*" >&2 | ||
8 | |||
9 | exit 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 | ||
2 | adduser -H -s /sbin/nologin -S -D knot -G knot 2>/dev/null | ||
3 | exit 0 | ||