diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2014-10-22 13:07:17 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2014-10-22 13:07:25 +0000 |
commit | a97b99feceb836178d0a333f94699c94bcce1549 (patch) | |
tree | 289f1aebb821dcfdfd47e2e211eed9bfd6fa2756 | |
parent | 0072d1d51e0b6f7368da3b198d6ebdab29b94461 (diff) | |
download | alpine_aports-a97b99feceb836178d0a333f94699c94bcce1549.tar.bz2 alpine_aports-a97b99feceb836178d0a333f94699c94bcce1549.tar.xz alpine_aports-a97b99feceb836178d0a333f94699c94bcce1549.zip |
testing/yadifa: feature #3443
-rw-r--r-- | testing/yadifa/APKBUILD | 76 | ||||
-rw-r--r-- | testing/yadifa/poll-h.patch | 17 | ||||
-rw-r--r-- | testing/yadifa/yadifa.confd | 4 | ||||
-rw-r--r-- | testing/yadifa/yadifa.initd | 43 | ||||
-rwxr-xr-x | testing/yadifa/yadifa.post-install | 8 | ||||
-rwxr-xr-x | testing/yadifa/yadifa.pre-install | 4 |
6 files changed, 152 insertions, 0 deletions
diff --git a/testing/yadifa/APKBUILD b/testing/yadifa/APKBUILD new file mode 100644 index 0000000000..8f3dc1f0e3 --- /dev/null +++ b/testing/yadifa/APKBUILD | |||
@@ -0,0 +1,76 @@ | |||
1 | # Contributor: Francesco Colista <fcolista@alpinelinux.org> | ||
2 | # Maintainer: Francesco Colista <fcolista@alpinelinux.org> | ||
3 | pkgname=yadifa | ||
4 | pkgver=2.0.0 | ||
5 | _buildnr=4192 | ||
6 | pkgrel=0 | ||
7 | pkgdesc="Lightweight authoritative Name Server with DNSSEC capabilities" | ||
8 | url="http://www.yadifa.eu" | ||
9 | arch="all" | ||
10 | license="BSD-3" | ||
11 | depends="openssl" | ||
12 | depends_dev="openssl-dev" | ||
13 | makedepends="$depends_dev" | ||
14 | install="$pkgname.pre-install $pkgname.post-install" | ||
15 | options="libtool" | ||
16 | pkgusers="yadifa" | ||
17 | pkggroups="yadifa" | ||
18 | subpackages="$pkgname-dev $pkgname-doc" | ||
19 | source="http://cdn.yadifa.eu/sites/default/files/releases/$pkgname-$pkgver-$_buildnr.tgz | ||
20 | poll-h.patch | ||
21 | $pkgname.initd | ||
22 | $pkgname.confd" | ||
23 | |||
24 | _builddir="$srcdir"/$pkgname-$pkgver-$_buildnr | ||
25 | prepare() { | ||
26 | local i | ||
27 | cd "$_builddir" | ||
28 | for i in $source; do | ||
29 | case $i in | ||
30 | *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; | ||
31 | esac | ||
32 | done | ||
33 | sed -i -e "s/__linux__/__GLIBC__/g" lib/dnscore/src/tcp_io_stream.c | ||
34 | sed -i -e "s/__linux__/__GLIBC__/g" lib/dnscore/src/debug.c | ||
35 | sed -i -e "s/__linux__/__GLIBC__/g" lib/dnscore/src/format.c | ||
36 | sed -i -e "s/__linux__/__GLIBC__/g" sbin/yadifad/signals.c | ||
37 | } | ||
38 | |||
39 | build() { | ||
40 | cd "$_builddir" | ||
41 | automake | ||
42 | ./configure --prefix=/usr \ | ||
43 | --sysconfdir=/etc/$pkgname \ | ||
44 | --localstatedir=/var \ | ||
45 | --enable-dynamic-provisioning \ | ||
46 | --enable-rrl | ||
47 | |||
48 | make | ||
49 | } | ||
50 | |||
51 | package() { | ||
52 | cd "$_builddir" | ||
53 | make DESTDIR="$pkgdir" install | ||
54 | install -D -m 0755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname | ||
55 | install -D -m 0755 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname | ||
56 | install -D -m 0755 etc/*.example "$pkgdir"/etc/$pkgname | ||
57 | cp etc/yadifad.conf "$pkgdir"/etc/$pkgname | ||
58 | mkdir -p "$pkgdir"/var/$pkgname | ||
59 | mkdir -p "$pkgdir"/var/log/$pkgname | ||
60 | chown $pkgusers:$pkggroups "$pkgdir"/var/$pkgname | ||
61 | chown $pkgusers:$pkggroups "$pkgdir"/var/log/$pkgname | ||
62 | rm -f "$pkgdir"/usr/lib/*.la | ||
63 | } | ||
64 | |||
65 | md5sums="8bb0cd24c3bea7ea7f503ca523b8a13b yadifa-2.0.0-4192.tgz | ||
66 | bb9b9e01e8781949381bc1d6e24076ea poll-h.patch | ||
67 | a368b39c128dfea18d16b61df8b0f069 yadifa.initd | ||
68 | 054dc6c7d4e5c8d81610825c0875efd2 yadifa.confd" | ||
69 | sha256sums="ef98afcfa544474c6634a3177af402fc37453dd3244c084bc9e4b323997ef61c yadifa-2.0.0-4192.tgz | ||
70 | 250910b256cf0193ffa74fdae3a22d6cfc6834bd6f751ad9dcf331c43d5a6c0a poll-h.patch | ||
71 | 0e3a165692bd4ff2ea1104a3565c0cbd8ec8896b10e3aa6d6acd7c6a7b357ac1 yadifa.initd | ||
72 | c1a1b5535858ce569197196f94c5a2f13ed2f003d68be06475c765ff82e74c22 yadifa.confd" | ||
73 | sha512sums="a476ab13d25763bd5c53e140243eb6b1524c31ea6b6361196fd68d08d07683b009d9b76c579149815a9d7e887edc6e1edef90436330b37cad301ab3249728aba yadifa-2.0.0-4192.tgz | ||
74 | a72c0a296de2a0a8ab4b6836cbf364be0c2b2854d1f7c2a151d015902b55b0766c61466a18f4e904e82e40776ba88b8ce0b61f218799ad9d8d779f63aa9610d6 poll-h.patch | ||
75 | 905e3f9efc07864c6aa4ca09c41f253b87094d06cc98942f3cab2c3fd34de2795d8f358359a194e8f2913201387c5d8e6f1ceebf2f4ef98b043868c002e65ec3 yadifa.initd | ||
76 | 10c8e6e9cfcf8671de541fc2a8f56ea6756d8da1e96262efc26daa4be22aec5f51037d6cbbfa90b826521145f0b41dcc9e515e343ef1ff72a9bf213dc2f90f58 yadifa.confd" | ||
diff --git a/testing/yadifa/poll-h.patch b/testing/yadifa/poll-h.patch new file mode 100644 index 0000000000..2477708b90 --- /dev/null +++ b/testing/yadifa/poll-h.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | diff --git a/sbin/yadifad/poll-util.h b/sbin/yadifad/poll-util.h | ||
2 | index ef9a004..41d4d0c 100644 | ||
3 | --- a/sbin/yadifad/poll-util.h | ||
4 | +++ b/sbin/yadifad/poll-util.h | ||
5 | @@ -38,11 +38,10 @@ | ||
6 | * | ||
7 | ******************************************************************************************************************/ | ||
8 | |||
9 | +#include <poll.h> | ||
10 | #ifndef _POLL_H | ||
11 | #define _POLL_H | ||
12 | |||
13 | -#include <poll.h> | ||
14 | - | ||
15 | /** | ||
16 | * This code maintains the limit on the tcp sockets | ||
17 | * @todo Portability has to be tested. | ||
diff --git a/testing/yadifa/yadifa.confd b/testing/yadifa/yadifa.confd new file mode 100644 index 0000000000..6a48c831b6 --- /dev/null +++ b/testing/yadifa/yadifa.confd | |||
@@ -0,0 +1,4 @@ | |||
1 | SVCBIN=/usr/sbin/yadifad | ||
2 | CONFFILE=/etc/yadifa/yadifad.conf | ||
3 | PIDFILE=/var/run/yadifad.pid | ||
4 | YADIFA_OPTS="-u yadifa -g yadifa" | ||
diff --git a/testing/yadifa/yadifa.initd b/testing/yadifa/yadifa.initd new file mode 100644 index 0000000000..228e4af109 --- /dev/null +++ b/testing/yadifa/yadifa.initd | |||
@@ -0,0 +1,43 @@ | |||
1 | #!/sbin/runscript | ||
2 | # Copyright 2014 Francesco Colista (francesco.colista@gmail.com) | ||
3 | # Distributed under the terms of the GNU General Public License, v2 or later# | ||
4 | |||
5 | depend() { | ||
6 | need net | ||
7 | after firewall | ||
8 | provide dns | ||
9 | } | ||
10 | |||
11 | |||
12 | checkconfig() { | ||
13 | if [ ! -f "${CONFFILE}" ]; then | ||
14 | eerror "${CONFFILE} does not exist!" | ||
15 | return 1 | ||
16 | fi | ||
17 | } | ||
18 | |||
19 | start() { | ||
20 | ebegin "Starting ${SVCNAME}" | ||
21 | ulimit -c unlimited | ||
22 | start-stop-daemon --start --exec ${SVCBIN} \ | ||
23 | --pidfile ${PIDFILE} \ | ||
24 | -- -c ${CONFFILE} ${YADIFA_OPTS} | ||
25 | eend $? | ||
26 | } | ||
27 | |||
28 | |||
29 | stop() { | ||
30 | ebegin "Stopping ${SVCNAME}" | ||
31 | start-stop-daemon --start --exec ${SVCBIN} \ | ||
32 | --pidfile ${PIDFILE} \ | ||
33 | eend $? | ||
34 | } | ||
35 | |||
36 | |||
37 | |||
38 | reload() { | ||
39 | ebegin "Reloading ${SVCNAME}" | ||
40 | start-stop-daemon --stop --oknodo --signal HUP \ | ||
41 | --exec ${SVCBIN} --pidfile ${PIDFILE} | ||
42 | eend $? | ||
43 | } | ||
diff --git a/testing/yadifa/yadifa.post-install b/testing/yadifa/yadifa.post-install new file mode 100755 index 0000000000..7b614a60ae --- /dev/null +++ b/testing/yadifa/yadifa.post-install | |||
@@ -0,0 +1,8 @@ | |||
1 | #!/bin/sh | ||
2 | sed -i -e "s/daemon.*/daemon\ton/" /etc/yadifa/yadifad.conf >&2 | ||
3 | sed -i -e "s/logpath.*/logpath\t\t\"\/var\/log\/yadifa\"/" /etc/yadifa/yadifad.conf >&2 | ||
4 | sed -i -e "s/pidpath.*/pidpath\t\t\"\/var\/run\"/" /etc/yadifa/yadifad.conf >&2 | ||
5 | sed -i -e "s/chroot.*/chroot\ton/" /etc/yadifa/yadifad.conf >&2 | ||
6 | sed -i -e "s/uid.*/uid\tyadifa/" /etc/yadifa/yadifad.conf >&2 | ||
7 | sed -i -e "s/gid.*/gid\tyadifa/" /etc/yadifa/yadifad.conf >&2 | ||
8 | exit 0 | ||
diff --git a/testing/yadifa/yadifa.pre-install b/testing/yadifa/yadifa.pre-install new file mode 100755 index 0000000000..cecfe61aec --- /dev/null +++ b/testing/yadifa/yadifa.pre-install | |||
@@ -0,0 +1,4 @@ | |||
1 | #!/bin/sh | ||
2 | addgroup yadifa 2>/dev/null | ||
3 | adduser -h /var/yadifa -s /sbin/nologin -S -D yadifa -G yadifa 2>/dev/null | ||
4 | exit 0 | ||