Subject: [alpine-aports] [PATCH] main/bind: move dnssec to -tools subpackage

From: Sören Tempel <[email-masked]>
Date: Mon, 16 Nov 2015 13:53:11 +0100

---
 main/bind/APKBUILD      | 28 +++++++++++++++++++++-------
 main/unbound/APKBUILD   | 12 +++++++-----
 main/unbound/conf.patch | 19 ++++++-------------
 3 files changed, 34 insertions(+), 25 deletions(-)

diff --git a/main/bind/APKBUILD b/main/bind/APKBUILD
index d76d917..e2d2c08 100644
--- a/main/bind/APKBUILD
+++ b/main/bind/APKBUILD
@@ -1,3 +1,4 @@
+# Contributor: Sören Tempel <[email-masked]>
 # Contributor: Carlo Landmeter <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=bind
@@ -5,15 +6,15 @@ pkgver=9.10.3
 _ver=${pkgver%_p*}
 _p=${pkgver#*_p}
 [ "$_p" != "$pkgver" ] && _ver="${_ver}-P$_p"
-pkgrel=0
-pkgdesc="The Berkeley Internet Name Domain Name Server and tools"
+pkgrel=1
+pkgdesc="The ISC DNS server"
 url="http://www.isc.org"
 arch="all"
 license="MIT BSD"
 depends=""
 pkgusers="named"
 pkggroups="named"
-makedepends="openssl-dev libcap-dev perl linux-headers bsd-compat-headers"
+makedepends="bash openssl-dev libcap-dev perl linux-headers bsd-compat-headers"
 install="$pkgname.pre-install"
 subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-tools"
 source="http://ftp.isc.org/isc/bind9/${_ver}/bind-${_ver}.tar.gz
@@ -32,7 +33,7 @@ prepare() {
 	cd "$_builddir"
 
 	### http://bugs.gentoo.org/show_bug.cgi?id=227333
-	export CFLAGS="$CFLAGS -D_GNU_SOURCE" 
+	export CFLAGS="$CFLAGS -D_GNU_SOURCE"
 
 	# Adjusting PATHs in manpages
 	for i in bin/named/named.8 bin/check/named-checkconf.8 bin/rndc/rndc.8; do
@@ -85,6 +86,11 @@ package() {
 
 	make DESTDIR="$pkgdir" install || return 1
 
+	# FIXME: Workaround for broken symlink handling in abuild
+	rm -f "$pkgdir"/usr/share/man/man1/bind9-config.1
+	find "$pkgdir"/usr/share/man/man3 -name 'lwres_*' \
+		-type f -exec rm -f \{\} \;
+
 	install -Dm755 "$srcdir"/named.initd \
 		"$pkgdir"/etc/init.d/named || return 1
 	install -Dm644 "$srcdir"/named.confd \
@@ -99,17 +105,25 @@ package() {
 		"$pkgdir"/var/bind/pri/127.zone || return 1
 	install -Dm644 "$srcdir"/localhost.zone \
 		"$pkgdir"/var/bind/pri/localhost.zone || return 1
+
 	cd "$pkgdir"/var/bind
 	ln -s named.ca root.cache || return 1
 }
 
 tools() {
-	install=
-	depends=
+	pkgdesc="The ISC DNS tools"
+	install=""
+	depends=""
+
 	mkdir -p "$subpkgdir"/usr/bin
-	for i in dig host nslookup nsupdate; do
+	for i in dig host nslookup delv nsupdate; do
 		mv "$pkgdir"/usr/bin/${i} "$subpkgdir"/usr/bin/ || return 1
 	done
+
+	mkdir -p "$subpkgdir"/usr/sbin
+	for i in "$pkgdir"/usr/sbin/dnssec-*; do
+		mv "$i" "$subpkgdir"/usr/sbin || return 1
+	done
 }
 
 md5sums="d8cbf04a62a139a841d4bf878087a555  bind-9.10.3.tar.gz
diff --git a/main/unbound/APKBUILD b/main/unbound/APKBUILD
index be74419..2422dd4 100644
--- a/main/unbound/APKBUILD
+++ b/main/unbound/APKBUILD
@@ -1,8 +1,9 @@
+# Contributor: Sören Tempel <[email-masked]>
 # Contributor: Carlo Landmeter <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=unbound
 pkgver=1.5.6
-pkgrel=2
+pkgrel=3
 pkgdesc="Unbound is a validating, recursive, and caching DNS resolver"
 pkgusers="unbound"
 pkggroups="unbound"
@@ -45,13 +46,14 @@ build() {
 		--with-libevent \
 		--with-ldns \
 		--with-pthreads \
-		--with-rootkey-file=/usr/share/dnssec/root-anchors.txt \
+		--with-rootkey-file=/usr/share/dnssec-root/trusted-key.key \
 		--disable-static \
 		--disable-rpath \
 		--with-ssl \
 		--without-pythonmodule \
 		--with-pyunbound \
 		|| return 1
+
 	# do not link to libpython
 	sed -i -e '/^LIBS=/s/-lpython.*[[:space:]]/ /' Makefile
 
@@ -94,21 +96,21 @@ migrate() {
 }
 
 md5sums="691a34abd8e9257dd65b70f28326c1f0  unbound-1.5.6.tar.gz
-32fe2914a2723142d3eae9ea556872d3  conf.patch
+d354705e7a468b7fad5e19ff5bd1bceb  conf.patch
 deb0a18f2250caa53750ee2cecac71e9  swig.patch
 c1c71cd0e7f9630536a2abf2513c675d  update-unbound-root-hints
 5340681e5ec1a1fd47a0de27f5c03c21  migrate-dnscache-to-unbound
 b2afc34d106e104730b63876c9a07caf  root.hints
 b98eded68339fc605ec7e6cbb50e5aa3  unbound.initd"
 sha256sums="ad3823f5895f59da9e408ea273fcf81d8a76914c18864fba256d7f140b83e404  unbound-1.5.6.tar.gz
-48bedb743eda892f82adc8b4ce2e4f5ad216f1ab50d432aef768377edc98165c  conf.patch
+d95a6b37cce224ab37dadb6dae973992f718c229740bd72ab0edc72cc8e23d84  conf.patch
 d131e19129744f7014167d8701cb39c8358269a89b317b8a74dacfd267e1f516  swig.patch
 0db3ca197b62901fab984cb2559925adbf3307ccd1dca3e1dd69cd1642ff0a36  update-unbound-root-hints
 582851b4017044d8642c42c5df09b27494c963e1eebb8be3373b2dbd168d0ac0  migrate-dnscache-to-unbound
 9de827bda7ddb3b8d3fac2db56c0fe65a67772a12a874c75091ae8e3f2b31c73  root.hints
 d9997000449179dc16f5084bf061453faf09094f843acb1d163757f8000c0cd7  unbound.initd"
 sha512sums="2477e3f00b8f5a3a4661ff20b0bc0d1d56c8a65cc6ab9f1308ae86f41c67a998af68d3ac5ba6c9c22a25a251f0410eaf9fee82911bcb3a3e82ffb6383e28dcf7  unbound-1.5.6.tar.gz
-2214882954ed813c564a34cbf433240814f1cc03e62b7aa007d054406d17fa0359514400afe53b9cb0445d25a29ccf9bf27c5974901d30bbfb2bfaf5e755da2b  conf.patch
+3c611842fa022f2d3c68293d14a683d92d81d124b78561a27818d761684496d9d97551aeca5582709f5ff2cd717b626d6bf4864d58de10e23ce3a07d4129af6c  conf.patch
 7d2666363be7156b26fd857459492f6e78fbc24bd6923dd51477e09df938d8c617035e4aa8bf91ffcde384e2dff8225eced14d7aaa7690e3a95b34c5f21eaf7d  swig.patch
 0f80b507a8f71b0c00729501d861657ce91a57024cd1963c150d0630c71eccceba370d6e732ff39bb807713672550d87a8c8ecdb9fce6b8b4386c12689603700  update-unbound-root-hints
 b26a13c1c88da9611a65705dc59f7233c5e0f6aced0d7d66c18536a969a2de627ca5d4bb55eedd81f2f040fa11bde48eaaeca2850f376e72e7a531678a259131  migrate-dnscache-to-unbound
diff --git a/main/unbound/conf.patch b/main/unbound/conf.patch
index 69e5be7..5224e05 100644
--- a/main/unbound/conf.patch
+++ b/main/unbound/conf.patch
@@ -1,19 +1,12 @@
---- ./doc/example.conf.in.orig
-+++ ./doc/example.conf.in
-@@ -226,6 +226,7 @@
+diff -upr unbound-1.5.6.orig/doc/example.conf.in unbound-1.5.6/doc/example.conf.in
+--- unbound-1.5.6.orig/doc/example.conf.in	2015-11-16 12:39:39.031890692 +0100
++++ unbound-1.5.6/doc/example.conf.in	2015-11-16 12:40:05.452566815 +0100
+@@ -243,7 +243,7 @@ server:
+ 
  	# file to read root hints from.
  	# get one from ftp://FTP.INTERNIC.NET/domain/named.cache
- 	# root-hints: ""
+-	# root-hints: ""
 +	root-hints: /etc/unbound/root.hints
  
  	# enable to not answer id.server and hostname.bind queries.
  	# hide-identity: no
-@@ -338,7 +339,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.
-- 
2.6.3

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---