diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-08-03 09:58:09 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-08-03 09:58:09 +0000 |
commit | 7c08058fac709df4e6f49184048501dc890de028 (patch) | |
tree | 292e485bdc50530d4da98fbeb33b760911a52a23 /main/unbound | |
parent | 9d1db9e42cf8bb4fe6a7fa5954e366d856991839 (diff) | |
download | aports-7c08058fac709df4e6f49184048501dc890de028.tar.bz2 aports-7c08058fac709df4e6f49184048501dc890de028.tar.xz |
main/unbound: upgrade to 1.4.18
Diffstat (limited to 'main/unbound')
-rw-r--r-- | main/unbound/APKBUILD | 6 | ||||
-rw-r--r-- | main/unbound/migrate-dnscache-to-unbound | 67 | ||||
-rw-r--r-- | main/unbound/swig.patch | 11 |
3 files changed, 82 insertions, 2 deletions
diff --git a/main/unbound/APKBUILD b/main/unbound/APKBUILD index 3d01cc59a..47662ba65 100644 --- a/main/unbound/APKBUILD +++ b/main/unbound/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=unbound -pkgver=1.4.17 +pkgver=1.4.18 pkgrel=0 pkgdesc="Unbound is a validating, recursive, and caching DNS resolver" pkgusers="unbound" @@ -16,6 +16,7 @@ install="$pkgname.pre-install" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs py-unbound:py" source="http://unbound.net/downloads/unbound-$pkgver.tar.gz conf.patch + swig.patch update-unbound-root-hints root.hints unbound.initd" @@ -82,8 +83,9 @@ py() { mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ } -md5sums="812d49064a78c92765970a1364736da7 unbound-1.4.17.tar.gz +md5sums="2cad65b6a2d08bb6e0210ea92156ca4b unbound-1.4.18.tar.gz 32fe2914a2723142d3eae9ea556872d3 conf.patch +cca28c13f9b835dfe94ea91012d76e2b swig.patch c1c71cd0e7f9630536a2abf2513c675d update-unbound-root-hints d7a1cb305b7b5b72df4e574777f76723 root.hints ebf2b5f8e1be2c4dbec9c5fad1e0e0de unbound.initd" diff --git a/main/unbound/migrate-dnscache-to-unbound b/main/unbound/migrate-dnscache-to-unbound new file mode 100644 index 000000000..a2ad99e4f --- /dev/null +++ b/main/unbound/migrate-dnscache-to-unbound @@ -0,0 +1,67 @@ +#!/bin/sh + + +to_subnet() { + pref=$1 + case "$pref" in + *.*.*.*) echo $pref/32;; + *.*.*) echo $pref.0/24;; + *.*) echo $pref.0.0/16;; + *) echo $pref.0.0.0/8;; + esac +} + +gen_stub_zones() { + local zonefile ip + local fwdtype="stub" + if [ -n "$FORWARDONLY" ]; then + fwdtype="forward" + fi + for zonefile in "$root"/etc/dnscache/servers/*; do + local zone=${zonefile##*/} + if [ "$zone" = "@" ] || [ "$zone" = '*' ]; then + continue + fi + + echo "${fwdtype}-zone:" + echo -e "\tname: ${zone}" + for ip in $(cat $zonefile); do + echo -e "\t${fwdtype}-addr: $ip" + done + echo "" + done +} + +root=${root:-/} +while getopts "r:" opt; do + case "$opt" in + 'r') root="$OPTARG";; + esac +done + +confd="$root"/etc/conf.d/dnscache +if [ -r "$confd" ]; then + . "$confd" +fi + +interface="$IP" +outgoing_interface="$IPSEND" + +echo $IPSEND +echo $IP +echo $FORWARDONLY + +for i in "$root"/etc/dnscache/ip/*; do + [ -f "$i" ] || continue + access_control="$access_control $(to_subnet ${i##*/})" +done + +echo -e "\tinterface: $IP\n" +echo -e "\toutgoing-interface: $IPSEND\n" +for i in $access_control; do + echo -e "\taccess-control: $i allow" +done +echo "" + +gen_stub_zones + diff --git a/main/unbound/swig.patch b/main/unbound/swig.patch new file mode 100644 index 000000000..176e06c56 --- /dev/null +++ b/main/unbound/swig.patch @@ -0,0 +1,11 @@ +--- ./Makefile.in.orig ++++ ./Makefile.in +@@ -370,7 +370,7 @@ + $(srcdir)/libunbound/unbound.h + libunbound/python/libunbound_wrap.c: $(srcdir)/libunbound/python/libunbound.i $(srcdir)/libunbound/unbound.h + @-if test ! -d libunbound/python; then $(INSTALL) -d libunbound/python; fi +- $(SWIG) -python -o $@ $(CPPFLAGS) $(srcdir)/libunbound/python/libunbound.i ++ $(SWIG) -python -o $@ "$(CPPFLAGS)" $(srcdir)/libunbound/python/libunbound.i + + # Pyunbound python unbound wrapper + _unbound.la: libunbound_wrap.lo libunbound.la |