aboutsummaryrefslogtreecommitdiffstats
path: root/main/bind
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
commitb70981b68efcce5256eb11c6cd26ae123b10b6ea (patch)
treea38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/bind
parent2b4df81538b8398442d5296650905c70341dd8d3 (diff)
downloadaports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2
aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/bind')
-rw-r--r--main/bind/APKBUILD95
-rw-r--r--main/bind/bind.127.zone11
-rw-r--r--main/bind/bind.conf53
-rw-r--r--main/bind/bind.confd14
-rw-r--r--main/bind/bind.initd24
-rw-r--r--main/bind/bind.localhost.zone11
-rw-r--r--main/bind/bind.named.ca85
-rw-r--r--main/bind/bind.post-install5
-rw-r--r--main/bind/bind.pre-install5
-rw-r--r--main/bind/bind.so_bsdcompat.patch11
10 files changed, 314 insertions, 0 deletions
diff --git a/main/bind/APKBUILD b/main/bind/APKBUILD
new file mode 100644
index 0000000000..533bfa7177
--- /dev/null
+++ b/main/bind/APKBUILD
@@ -0,0 +1,95 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=bind
+pkgver=9.6.0_p1
+pkgrel=1
+pkgdesc="BIND - Berkeley Internet Name Domain - Name Server and tools"
+url="http://www.isc.org"
+license="as-is"
+depends=uclibc
+makedepends="openssl-dev"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-tools"
+source="http://ftp.isc.org/isc/bind9/9.6.0-P1/bind-9.6.0-P1.tar.gz
+ bind.so_bsdcompat.patch
+ $pkgname.initd
+ $pkgname.confd
+ $pkgname.conf
+ $pkgname.127.zone
+ $pkgname.localhost.zone
+ $pkgname.named.ca
+ $install"
+
+build() {
+ cd "$srcdir/bind-9.6.0-P1"
+
+ ### http://bugs.gentoo.org/show_bug.cgi?id=227333
+ 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
+ sed -i \
+ -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
+ -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
+ -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
+ "${i}" || return 1
+ done
+
+ patch -p0 -i "$srcdir"/bind.so_bsdcompat.patch || return 1
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/bind \
+ --localstatedir=/var \
+ --with-openssl=/usr \
+ --disable-linux-caps \
+ --without-libxml2 \
+ --disable-threads \
+ --enable-ipv6 \
+ --enable-shared \
+ --enable-static \
+ --with-libtool \
+ --with-randomdev=/dev/random \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+
+ make || return 1
+ make DESTDIR="$pkgdir" install
+
+ depends="$depends $pkgname-libs"
+
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/named || return 1
+ install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/named || return 1
+ install -Dm644 "$srcdir"/$pkgname.conf "$pkgdir"/etc/bind/named.conf || return 1
+ install -Dm644 "$srcdir"/$pkgname.named.ca "$pkgdir"/var/bind/named.ca || return 1
+ install -Dm644 "$srcdir"/$pkgname.127.zone "$pkgdir"/var/bind/pri/127.zone || return 1
+ install -Dm644 "$srcdir"/$pkgname.localhost.zone "$pkgdir"/var/bind/pri/localhost.zone || return 1
+ mkdir -p "$pkgdir"/var/bind/sec || return 1
+ cd "$pkgdir"/var/bind
+ ln -s named.ca root.cache || return 1
+}
+
+libs() {
+ install=""
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
+}
+
+tools() {
+ install=""
+ depends="$pkgname-libs"
+ mkdir -p "$subpkgdir"/usr/bin
+ for i in dig host nslookup nsupdate; do
+ mv "$pkgdir"/usr/bin/${i} "$subpkgdir"/usr/bin/ || return 1
+ done
+}
+
+md5sums="886b7eae55cfdc8cd8d2ca74a2f99c6e bind-9.6.0-P1.tar.gz
+f270a5b0a28ab6e818840c5c368ddbcc bind.so_bsdcompat.patch
+3adc904c1c12f81839d9369f7241022b bind.initd
+8b05a287976d66d51c18b73ee7523671 bind.confd
+be5fd752bdbd59385f2a559d603098d5 bind.conf
+a7455b009b7fccd74ac6f6eaa6902a00 bind.127.zone
+c3220168fabfb31a25e8c3a545545e34 bind.localhost.zone
+a94e29ac677846f3d4d618c50b7d34f1 bind.named.ca
+d3137e2de6f82acfc914d4916999cf2a bind.pre-install
+695c957be18ec4f8ea46d0b1ff50b09b bind.post-install"
diff --git a/main/bind/bind.127.zone b/main/bind/bind.127.zone
new file mode 100644
index 0000000000..2ad28de52c
--- /dev/null
+++ b/main/bind/bind.127.zone
@@ -0,0 +1,11 @@
+$ORIGIN 127.in-addr.arpa.
+$TTL 1W
+@ 1D IN SOA localhost. root.localhost. (
+ 2002081601 ; serial
+ 3H ; refresh
+ 15M ; retry
+ 1W ; expiry
+ 1D ) ; minimum
+
+ 1D IN NS localhost.
+1 1D IN PTR localhost.
diff --git a/main/bind/bind.conf b/main/bind/bind.conf
new file mode 100644
index 0000000000..d58c61bde0
--- /dev/null
+++ b/main/bind/bind.conf
@@ -0,0 +1,53 @@
+options {
+ directory "/var/bind";
+
+ // uncomment the following lines to turn on DNS forwarding,
+ // and change the forwarding ip address(es) :
+ //forward first;
+ //forwarders {
+ // 123.123.123.123;
+ // 123.123.123.123;
+ //};
+
+ listen-on-v6 { none; };
+ listen-on { 127.0.0.1; };
+
+ // to allow only specific hosts to use the DNS server:
+ //allow-query {
+ // 127.0.0.1;
+ //};
+
+ // if you have problems and are behind a firewall:
+ //query-source address * port 53;
+ pid-file "/var/run/named/named.pid";
+};
+
+// Briefly, a zone which has been declared delegation-only will be effectively
+// limited to containing NS RRs for subdomains, but no actual data beyond its
+// own apex (for example, its SOA RR and apex NS RRset). This can be used to
+// filter out "wildcard" or "synthesized" data from NAT boxes or from
+// authoritative name servers whose undelegated (in-zone) data is of no
+// interest.
+// See http://www.isc.org/products/BIND/delegation-only.html for more info
+
+//zone "COM" { type delegation-only; };
+//zone "NET" { type delegation-only; };
+
+zone "." IN {
+ type hint;
+ file "named.ca";
+};
+
+zone "localhost" IN {
+ type master;
+ file "pri/localhost.zone";
+ allow-update { none; };
+ notify no;
+};
+
+zone "127.in-addr.arpa" IN {
+ type master;
+ file "pri/127.zone";
+ allow-update { none; };
+ notify no;
+};
diff --git a/main/bind/bind.confd b/main/bind/bind.confd
new file mode 100644
index 0000000000..82d3763509
--- /dev/null
+++ b/main/bind/bind.confd
@@ -0,0 +1,14 @@
+# Set various named options here.
+OPTS=""
+
+# Set this to the number of processors you have.
+CPU="1"
+
+# User which named should run as
+USER="named"
+
+# Default pid file location
+PIDFILE="/var/run/named/named.pid"
+
+# Scheduling priority: 19 is the lowest and -20 is the highest.
+NICELEVEL="0"
diff --git a/main/bind/bind.initd b/main/bind/bind.initd
new file mode 100644
index 0000000000..6469ee79ac
--- /dev/null
+++ b/main/bind/bind.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+
+NAME=named
+DAEMON=/usr/sbin/$NAME
+
+depend() {
+ need net
+ use logger
+ provide dns
+}
+
+start() {
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --quiet --background \
+ --exec ${DAEMON} --nicelevel ${NICELEVEL} \
+ -- -u ${USER} -n ${CPU} ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ eend $?
+}
diff --git a/main/bind/bind.localhost.zone b/main/bind/bind.localhost.zone
new file mode 100644
index 0000000000..338d7050ca
--- /dev/null
+++ b/main/bind/bind.localhost.zone
@@ -0,0 +1,11 @@
+$TTL 1W
+@ IN SOA ns.localhost. root.localhost. (
+ 2002081601 ; Serial
+ 28800 ; Refresh
+ 14400 ; Retry
+ 604800 ; Expire - 1 week
+ 86400 ) ; Minimum
+@ IN NS ns
+ns IN A 127.0.0.1
+
+ns IN AAAA ::1
diff --git a/main/bind/bind.named.ca b/main/bind/bind.named.ca
new file mode 100644
index 0000000000..902a7047f9
--- /dev/null
+++ b/main/bind/bind.named.ca
@@ -0,0 +1,85 @@
+; This file holds the information on root name servers needed to
+; initialize cache of Internet domain name servers
+; (e.g. reference this file in the "cache . <file>"
+; configuration file of BIND domain name servers).
+;
+; This file is made available by InterNIC
+; under anonymous FTP as
+; file /domain/named.root
+; on server FTP.INTERNIC.NET
+; -OR- RS.INTERNIC.NET
+;
+; last update: Feb 04, 2008
+; related version of root zone: 2008020400
+;
+; formerly NS.INTERNIC.NET
+;
+. 3600000 IN NS A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
+A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30
+;
+; formerly NS1.ISI.EDU
+;
+. 3600000 NS B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
+;
+; formerly C.PSI.NET
+;
+. 3600000 NS C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
+;
+; formerly TERP.UMD.EDU
+;
+. 3600000 NS D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
+;
+; formerly NS.NASA.GOV
+;
+. 3600000 NS E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
+;
+; formerly NS.ISC.ORG
+;
+. 3600000 NS F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
+F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
+;
+; formerly NS.NIC.DDN.MIL
+;
+. 3600000 NS G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
+;
+; formerly AOS.ARL.ARMY.MIL
+;
+. 3600000 NS H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
+H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803f:235
+;
+; formerly NIC.NORDU.NET
+;
+. 3600000 NS I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
+;
+; operated by VeriSign, Inc.
+;
+. 3600000 NS J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
+J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30
+;
+; operated by RIPE NCC
+;
+. 3600000 NS K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
+K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
+;
+; operated by ICANN
+;
+. 3600000 NS L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
+;
+; operated by WIDE
+;
+. 3600000 NS M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
+M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
+; End of File
diff --git a/main/bind/bind.post-install b/main/bind/bind.post-install
new file mode 100644
index 0000000000..7e091c097c
--- /dev/null
+++ b/main/bind/bind.post-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+install -dD -o named -g named /var/run/named
+chown -R named:named /var/bind
+
diff --git a/main/bind/bind.pre-install b/main/bind/bind.pre-install
new file mode 100644
index 0000000000..c799634502
--- /dev/null
+++ b/main/bind/bind.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+adduser -h /etc/bind -s /bin/false -D named 2>/dev/null
+exit 0
+
diff --git a/main/bind/bind.so_bsdcompat.patch b/main/bind/bind.so_bsdcompat.patch
new file mode 100644
index 0000000000..83120f77de
--- /dev/null
+++ b/main/bind/bind.so_bsdcompat.patch
@@ -0,0 +1,11 @@
+--- lib/isc/unix/socket.c.orig 2005-11-03 17:08:42.000000000 -0600
++++ lib/isc/unix/socket.c 2006-02-18 13:09:15.000000000 -0600
+@@ -245,6 +245,8 @@
+
+ #define SOCK_DEAD(s) ((s)->references == 0)
+
++#undef SO_BSDCOMPAT
++
+ static void
+ manager_log(isc_socketmgr_t *sockmgr,
+ isc_logcategory_t *category, isc_logmodule_t *module, int level,