mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
extra/bind: new aport
This commit is contained in:
parent
c0881272b4
commit
c59bfb5f16
94
extra/bind/APKBUILD
Normal file
94
extra/bind/APKBUILD
Normal file
@ -0,0 +1,94 @@
|
||||
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
|
||||
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
|
||||
pkgname=bind
|
||||
pkgver=9.6.0_p1
|
||||
pkgrel=0
|
||||
pkgdesc="BIND - Berkeley Internet Name Domain - Name Server and tools"
|
||||
url="http://www.isc.org"
|
||||
license="as-is"
|
||||
depends=
|
||||
makedepends="openssl-dev"
|
||||
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.envd
|
||||
$pkgname.named.ca"
|
||||
|
||||
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/$pkgname || return 1
|
||||
install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname || return 1
|
||||
install -Dm644 "$srcdir"/$pkgname.conf "$pkgdir"/etc/bind/$pkgname.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
|
||||
install -Dm644 "$srcdir"/$pkgname.envd "$pkgdir"/etc/env.d/10bind || return 1
|
||||
mkdir -p "$pkgdir"/var/bind/sec || return 1
|
||||
cd "$pkgdir"/etc/bind
|
||||
ln -s ../../var/bind/pri pri || return 1
|
||||
ln -s ../../var/bind/sec sec || return 1
|
||||
cd "$pkgdir"/var/bind
|
||||
ln -s named.ca root.cache || return 1
|
||||
}
|
||||
|
||||
libs() {
|
||||
mkdir -p "$subpkgdir"/usr
|
||||
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
|
||||
}
|
||||
|
||||
tools() {
|
||||
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
|
||||
3aebea7be2340d971354bd9188a042dc bind.initd
|
||||
5b0a78ca9da95ad2d3504cc0ef2dc32e bind.confd
|
||||
be5fd752bdbd59385f2a559d603098d5 bind.conf
|
||||
a7455b009b7fccd74ac6f6eaa6902a00 bind.127.zone
|
||||
c3220168fabfb31a25e8c3a545545e34 bind.localhost.zone
|
||||
42b5ed5adcee33cf40531d7955412b21 bind.envd
|
||||
a94e29ac677846f3d4d618c50b7d34f1 bind.named.ca"
|
||||
11
extra/bind/bind.127.zone
Normal file
11
extra/bind/bind.127.zone
Normal file
@ -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.
|
||||
53
extra/bind/bind.conf
Normal file
53
extra/bind/bind.conf
Normal file
@ -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;
|
||||
};
|
||||
17
extra/bind/bind.confd
Normal file
17
extra/bind/bind.confd
Normal file
@ -0,0 +1,17 @@
|
||||
# Set various named options here.
|
||||
#
|
||||
OPTIONS=""
|
||||
|
||||
# Set this to the number of processors you have.
|
||||
#
|
||||
CPU="1"
|
||||
|
||||
# If you don't wish to run bind in a chroot, comment out the following line:
|
||||
CHROOT="/chroot/dns"
|
||||
|
||||
# Default pid file location
|
||||
PIDFILE="${CHROOT}/var/run/named/named.pid"
|
||||
|
||||
# Scheduling priority: 19 is the lowest and -20 is the highest.
|
||||
#
|
||||
NAMED_NICELEVEL="0"
|
||||
1
extra/bind/bind.envd
Normal file
1
extra/bind/bind.envd
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_PROTECT="/var/bind"
|
||||
83
extra/bind/bind.initd
Normal file
83
extra/bind/bind.initd
Normal file
@ -0,0 +1,83 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2004 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r5,v 1.1 2007/06/02 22:34:48 voxus Exp $
|
||||
|
||||
opts="start stop reload restart"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use logger
|
||||
provide dns
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ! -f ${CHROOT}/etc/bind/named.conf ] ; then
|
||||
eerror "No ${CHROOT}/etc/bind/named.conf file exists!"
|
||||
fi
|
||||
|
||||
# In case someone doesn't have $CPU set from /etc/conf.d/named
|
||||
if [ ! ${CPU} ] ; then
|
||||
CPU="1"
|
||||
fi
|
||||
|
||||
# as suggested in bug #107724
|
||||
[ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\
|
||||
egrep -v \
|
||||
"^([[:cntrl:] ]+(#|//|/\*)|(#|//|/\*))" \
|
||||
${CHROOT}/etc/bind/named.conf \
|
||||
| egrep -o -m1 "pid\-file +\".+\" *;" \
|
||||
| cut -d\" -f2
|
||||
)
|
||||
|
||||
KEY="${CHROOT}/etc/bind/rndc.key"
|
||||
}
|
||||
|
||||
init_rndc_key() {
|
||||
[ -f "$KEY" ] && return
|
||||
if [ -c /dev/urandom ]; then
|
||||
einfo "Using /dev/urandom for generating rndc.key"
|
||||
/usr/sbin/rndc-confgen -r /dev/urandom -a -u named -c "$KEY"
|
||||
else
|
||||
einfo "Using /dev/random for generating rndc.key"
|
||||
/usr/sbin/rndc-confgen -a -u named -c "$KEY"
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting ${CHROOT:+chrooted }named"
|
||||
checkconfig || return 1
|
||||
init_rndc_key
|
||||
start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
|
||||
--nicelevel ${NAMED_NICELEVEL:-0} \
|
||||
--exec /usr/sbin/named \
|
||||
-- -u named -n ${CPU} ${OPTIONS} ${CHROOT:+-t} ${CHROOT}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${CHROOT:+chrooted }named"
|
||||
checkconfig || return 2
|
||||
if [ -f $KEY ] ; then
|
||||
rndc -k $KEY stop &>/dev/null
|
||||
else
|
||||
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
|
||||
--exec /usr/sbin/named -- stop
|
||||
fi
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
checkconfig || return 3
|
||||
if [ ! -f $PIDFILE ] ; then
|
||||
/etc/init.d/named start &>/dev/null
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -f $KEY ] ; then
|
||||
ebegin "Reloading named.conf and zone files"
|
||||
rndc -k $KEY reload &>/dev/null
|
||||
eend $?
|
||||
else /etc/init.d/named restart &>/dev/null
|
||||
fi
|
||||
}
|
||||
11
extra/bind/bind.localhost.zone
Normal file
11
extra/bind/bind.localhost.zone
Normal file
@ -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
|
||||
85
extra/bind/bind.named.ca
Normal file
85
extra/bind/bind.named.ca
Normal file
@ -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
|
||||
11
extra/bind/bind.so_bsdcompat.patch
Normal file
11
extra/bind/bind.so_bsdcompat.patch
Normal file
@ -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,
|
||||
Loading…
x
Reference in New Issue
Block a user