diff options
-rw-r--r-- | testing/unbound/APKBUILD | 57 | ||||
-rw-r--r-- | testing/unbound/unbound-1.4.12-gentoo.patch | 12 | ||||
-rw-r--r-- | testing/unbound/unbound.confd | 4 | ||||
-rw-r--r-- | testing/unbound/unbound.initd | 36 | ||||
-rw-r--r-- | testing/unbound/unbound.pre-install | 3 |
5 files changed, 69 insertions, 43 deletions
diff --git a/testing/unbound/APKBUILD b/testing/unbound/APKBUILD index 9d9acd120f..db7d916885 100644 --- a/testing/unbound/APKBUILD +++ b/testing/unbound/APKBUILD @@ -1,22 +1,22 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> -# Maintainer: +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=unbound -pkgver=1.4.10 -pkgrel=3 +pkgver=1.4.13 +pkgrel=0 pkgdesc="Unbound is a validating, recursive, and caching DNS resolver" pkgusers="unbound" pkggroups="unbound" url="http://unbound.net/" arch="all" -license="Custom" -depends= +license="BSD" +depends="dnssec-root" depends_dev="openssl-dev expat-dev ldns-dev libevent-dev" -makedepends="$depends_dev" +makedepends="$depends_dev python-dev swig" install="$pkgname.pre-install" -subpackages="$pkgname-dev $pkgname-doc" +subpackages="$pkgname-dev $pkgname-doc $pkgname-libs py-unbound:py" source="http://unbound.net/downloads/unbound-$pkgver.tar.gz - unbound.initd - unbound.confd" + unbound-1.4.12-gentoo.patch + unbound.initd" _builddir="$srcdir"/unbound-$pkgver prepare() { @@ -32,15 +32,17 @@ prepare() { build() { cd "$_builddir" ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --localstatedir=/var \ --with-pidfile=/var/run/unbound/unbound.pid \ - --with-pic \ --with-username=unbound \ --with-libevent \ --with-ldns \ + --with-pthreads \ + --with-rootkey-file=/usr/share/dnssec/root-anchors.txt \ + --disable-static \ + --disable-rpath \ + --with-ssl \ + --with-pythonmodule \ + --with-pyunbound \ || return 1 make || return 1 } @@ -48,15 +50,28 @@ build() { package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 - rm "$pkgdir"/usr/lib/*.la || return 1 + rm "$pkgdir"/usr/lib/*.la \ + "$pkgdir"/usr/lib/python*/*/*.la || return 1 + install -D contrib/update-anchor.sh \ + "$pkgdir"/usr/share/$pkgname/update-anchor.sh \ + || return 1 install -m755 -D "$srcdir"/unbound.initd \ "$pkgdir"/etc/init.d/unbound || return 1 - install -m644 -D "$srcdir"/unbound.confd \ - "$pkgdir"/etc/conf.d/unbound || return 1 install -d -o unbound -g unbound "$pkgdir"/var/run/unbound - chown unbound:unbound -R "$pkgdir"/etc/unbound } -md5sums="6bbae378db76abfe0bd72c404e484597 unbound-1.4.10.tar.gz -455b7893a08e2f3e4ebce923e97c9724 unbound.initd -10f8a73d14160571acea41fc89d914e7 unbound.confd" +libs() { + pkgdesc="unbound shared libraries" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/ +} + +py() { + pkgdesc="Python bindings to libunbound" + mkdir -p "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ +} + +md5sums="7e3b27dee2b97640dd2e1783253317ab unbound-1.4.13.tar.gz +a6d84d596e40da79fcd52529b7fb5046 unbound-1.4.12-gentoo.patch +ebf2b5f8e1be2c4dbec9c5fad1e0e0de unbound.initd" diff --git a/testing/unbound/unbound-1.4.12-gentoo.patch b/testing/unbound/unbound-1.4.12-gentoo.patch new file mode 100644 index 0000000000..5792068978 --- /dev/null +++ b/testing/unbound/unbound-1.4.12-gentoo.patch @@ -0,0 +1,12 @@ +diff -Naur unbound-1.4.12.orig/doc/example.conf.in unbound-1.4.12/doc/example.conf.in +--- unbound-1.4.12.orig/doc/example.conf.in 2011-07-14 17:33:37.000000000 +0900 ++++ unbound-1.4.12/doc/example.conf.in 2011-07-16 10:01:06.644402341 +0900 +@@ -334,7 +334,7 @@ + # with several entries, one file per entry. + # Zone file format, with DS and DNSKEY entries. + # Note this gets out of date, use auto-trust-anchor-file please. +- # trust-anchor-file: "" ++ # trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@" + + # Trusted key for validation. DS or DNSKEY. specify the RR on a + # single line, surrounded by "". TTL is ignored. class is IN default. diff --git a/testing/unbound/unbound.confd b/testing/unbound/unbound.confd deleted file mode 100644 index b4de7cf114..0000000000 --- a/testing/unbound/unbound.confd +++ /dev/null @@ -1,4 +0,0 @@ -# Settings should normally not need any changes. - -# Location of the unbound configuration file. Leave empty for the default. -#UNBOUND_CONFFILE="/etc/unbound/unbound.conf" diff --git a/testing/unbound/unbound.initd b/testing/unbound/unbound.initd index 08944b60ef..90deb23e4a 100644 --- a/testing/unbound/unbound.initd +++ b/testing/unbound/unbound.initd @@ -1,13 +1,18 @@ #!/sbin/runscript -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/unbound/files/unbound.initd,v 1.1 2009/11/22 16:57:33 matsuu Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/unbound/files/unbound.initd,v 1.2 2011/09/13 15:14:49 matsuu Exp $ + +name="unbound daemon" +extra_commands="configtest" +extra_started_commands="reload" +description="unbound is a Domain Name Server (DNS) that is used to resolve host names to IP address." +description_configtest="Run syntax tests for configuration files only." +description_reload="Kills all children and reloads the configuration." -opts="${opts} checkconfig reload" UNBOUND_BINARY=${UNBOUND_BINARY:-/usr/sbin/unbound} UNBOUND_CHECKCONF=${UNBOUND_CHECKCONF:-/usr/sbin/unbound-checkconf} -UNBOUND_ANCHOR=${UNBOUND_ANCHOR:-/usr/sbin/unbound-anchor} UNBOUND_CONFFILE=${UNBOUND_CONFFILE:-/etc/unbound/${SVCNAME}.conf} depend() { @@ -19,14 +24,18 @@ depend() { checkconfig() { UNBOUND_PIDFILE=$("${UNBOUND_CHECKCONF}" -o pidfile "${UNBOUND_CONFFILE}") - UNBOUND_USER=$("${UNBOUND_CHECKCONF}" -o username "${UNBOUND_CONFFILE}") return $? } +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + start() { checkconfig || return $? - ebegin "Starting unbound" - su -c "${UNBOUND_ANCHOR}" -s /bin/sh ${UNBOUND_USER} + ebegin "Starting ${SVCNAME}" start-stop-daemon --start --pidfile "${UNBOUND_PIDFILE}" \ --exec "${UNBOUND_BINARY}" -- -c "${UNBOUND_CONFFILE}" eend $? @@ -34,21 +43,14 @@ start() { stop() { checkconfig || return $? - ebegin "Stopping unbound" + ebegin "Stopping ${SVCNAME}" start-stop-daemon --stop --pidfile "${UNBOUND_PIDFILE}" eend $? } -restart() { - checkconfig || return $? - svc_stop - svc_start -} - reload() { checkconfig || return $? - ebegin "Reloading unbound" - start-stop-daemon --stop --pidfile "${UNBOUND_PIDFILE}" \ - --signal HUP --oknodo + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${UNBOUND_PIDFILE}" eend $? } diff --git a/testing/unbound/unbound.pre-install b/testing/unbound/unbound.pre-install index 1cfc2eff4d..015ba3c52f 100644 --- a/testing/unbound/unbound.pre-install +++ b/testing/unbound/unbound.pre-install @@ -1,5 +1,6 @@ #!/bin/sh addgroup -S unbound 2>/dev/null -adduser -S -s /bin/false -D -H -h /etc/unbound -G unbound -g "Unbound user" unbound 2>/dev/null +adduser -S -s /bin/false -D -H -h /etc/unbound -G unbound \ + -g "Unbound user" unbound 2>/dev/null exit 0 |