mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
main/unbound: upgrade to 1.4.18
This commit is contained in:
parent
9d1db9e42c
commit
7c08058fac
@ -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"
|
||||
|
||||
67
main/unbound/migrate-dnscache-to-unbound
Normal file
67
main/unbound/migrate-dnscache-to-unbound
Normal file
@ -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
|
||||
|
||||
11
main/unbound/swig.patch
Normal file
11
main/unbound/swig.patch
Normal file
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user