Package: bind9
Version: 1:9.7.3.dfsg-1~squeeze9
Severity: wishlist
Tags: patch ipv6
*** body.txt
Hello,
BIND9 version 9.7.3 and above allows to specify the '--enable-filter-aaaa'
configure/build option, which in turns enables the 'filter-aaaa-on-v4' and
'filter-aaaa' named configuration options.
Those options are very handy to achieve some IPv6 migration scenario.
Please find attach a patch in this respect.
Please also note that this patch slightly modifies /etc/init.d/bind9
and /etc/default/bind9 files in order to better handle BIND9 chroot-ed
instance(s).
This in particular:
- fixes '/etc/init.d/bind9 status' to fail because of wrong PIDFILE
(because it keeps using its non chroot-ed path)
- allows to specify 'rndc' options, allowing to handle multiple
chroot-ed instances gracefully
I hope this proposal meets your approval.
Best regards,
Cédric Dufour
-- System Information:
Debian Release: 6.0.7
APT prefers stable
APT policy: (990, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages bind9 depends on:
ii adduser 3.112+nmu2 add and remove users and groups
ii bind9utils 1:9.7.3.dfsg-1~squeeze9ced1 Utilities for BIND
ii debconf [deb 1.5.36.1 Debian configuration management sy
ii libbind9-60 1:9.7.3.dfsg-1~squeeze9ced1 BIND9 Shared Library used by BIND
ii libc6 2.11.3-4 Embedded GNU C Library: Shared lib
ii libcap2 1:2.19-3 support for getting/setting POSIX.
ii libdb4.6 4.6.21-16 Berkeley v4.6 Database Libraries [
ii libdns69 1:9.7.3.dfsg-1~squeeze9ced1 DNS Shared Library used by BIND
ii libgssapi-kr 1.8.3+dfsg-4squeeze6 MIT Kerberos runtime libraries - k
ii libisc62 1:9.7.3.dfsg-1~squeeze9ced1 ISC Shared Library used by BIND
ii libisccc60 1:9.7.3.dfsg-1~squeeze9ced1 Command Channel Library used by BI
ii libisccfg62 1:9.7.3.dfsg-1~squeeze9ced1 Config File Handling Library used
ii libldap-2.4- 2.4.23-7.3 OpenLDAP libraries
ii liblwres60 1:9.7.3.dfsg-1~squeeze9ced1 Lightweight Resolver Library used
ii libssl0.9.8 0.9.8o-4squeeze14 SSL shared libraries
ii libxml2 2.7.8.dfsg-2+squeeze6 GNOME XML library
ii lsb-base 3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip
ii net-tools 1.60-23 The NET-3 networking toolkit
ii netbase 4.45 Basic TCP/IP networking system
bind9 recommends no packages.
Versions of packages bind9 suggests:
pn bind9-doc <none> (no description available)
ii dnsutils 1:9.7.3.dfsg-1~squeeze9ced1 Clients provided with BIND
pn resolvconf <none> (no description available)
pn ufw <none> (no description available)
-- Configuration Files:
/etc/bind/named.conf.local changed [not included]
/etc/bind/named.conf.options changed [not included]
/etc/init.d/bind9 changed [not included]
-- debconf information excluded
diff -urN bind9-9.7.3.dfsg.orig//debian/bind9.init bind9-9.7.3.dfsg/debian/bind9.init
--- bind9-9.7.3.dfsg.orig//debian/bind9.init 2013-02-26 12:13:39.000000000 +0100
+++ bind9-9.7.3.dfsg/debian/bind9.init 2013-02-26 12:49:34.000000000 +0100
@@ -18,14 +18,15 @@
# for a chrooted server: "-u bind -t /var/lib/named"
# Don't modify this line, change or create /etc/default/bind9.
OPTIONS=""
+RNDCOPTIONS=""
RESOLVCONF=no
+PIDFILE=/var/run/named/named.pid
test -f /etc/default/bind9 && . /etc/default/bind9
test -x /usr/sbin/rndc || exit 0
. /lib/lsb/init-functions
-PIDFILE=/var/run/named/named.pid
check_network() {
if [ -x /usr/bin/uname ] && [ "X$(/usr/bin/uname -o)" = XSolaris ]; then
@@ -82,7 +83,7 @@
if [ "X$RESOLVCONF" != "Xno" ] && [ -x /sbin/resolvconf ] ; then
/sbin/resolvconf -d lo.named
fi
- pid=$(/usr/sbin/rndc stop -p | awk '/^pid:/ {print $2}') || true
+ pid=$(/usr/sbin/rndc ${RNDCOPTIONS} stop -p | awk '/^pid:/ {print $2}') || true
if [ -z "$pid" ]; then # no pid found, so either not running, or error
pid=$(pgrep -f ^/usr/sbin/named) || true
start-stop-daemon --stop --oknodo --quiet --exec /usr/sbin/named \
@@ -104,7 +105,7 @@
log_end_msg 1
fi
- /usr/sbin/rndc reload >/dev/null && log_end_msg 0 || log_end_msg 1
+ /usr/sbin/rndc ${RNDCOPTIONS} reload >/dev/null && log_end_msg 0 || log_end_msg 1
;;
restart)
diff -urN bind9-9.7.3.dfsg.orig//debian/bind9.postinst bind9-9.7.3.dfsg/debian/bind9.postinst
--- bind9-9.7.3.dfsg.orig//debian/bind9.postinst 2013-02-26 12:13:39.000000000 +0100
+++ bind9-9.7.3.dfsg/debian/bind9.postinst 2013-02-26 12:41:03.000000000 +0100
@@ -77,6 +77,14 @@
else
echo "OPTIONS=\"\"" >> $config
fi
+
+ echo '' >> $config
+ echo '# PID file (update for chrooted environment)' >> $config
+ echo '#PIDFILE=/var/run/named/named.pid' >> $config
+
+ echo '' >> $config
+ echo '# RNDC options (update for chrooted environment)' >> $config
+ echo '#RNDCOPTIONS=""' >> $config
else
db_get bind9/run-resolvconf
if [ ! -z "$RET" ] && [ "$RET" = "true" ]; then
diff -urN bind9-9.7.3.dfsg.orig//debian/rules bind9-9.7.3.dfsg/debian/rules
--- bind9-9.7.3.dfsg.orig//debian/rules 2013-02-26 12:13:39.000000000 +0100
+++ bind9-9.7.3.dfsg/debian/rules 2013-02-26 12:20:15.000000000 +0100
@@ -40,6 +40,7 @@
--with-libtool \
--enable-shared \
--enable-static \
+ --enable-filter-aaaa \
--with-openssl=/usr \
--with-gssapi=/usr \
--with-gnu-ld \