summaryrefslogtreecommitdiff
path: root/package/bind
diff options
context:
space:
mode:
Diffstat (limited to 'package/bind')
-rw-r--r--package/bind/bind-cross-fix.patch36
-rw-r--r--package/bind/bind-dlopen.patch89
-rw-r--r--package/bind/bind.mk15
-rw-r--r--package/bind/bind.sysvinit18
-rw-r--r--package/bind/bind957
5 files changed, 20 insertions, 195 deletions
diff --git a/package/bind/bind-cross-fix.patch b/package/bind/bind-cross-fix.patch
index 07a908467..deaf52747 100644
--- a/package/bind/bind-cross-fix.patch
+++ b/package/bind/bind-cross-fix.patch
@@ -1,37 +1,5 @@
-diff -Naur bind-9.3.1/configure bind/configure
---- bind-9.3.1/configure 2004-12-08 20:09:03.000000000 -0800
-+++ bind/configure 2005-09-09 16:06:50.000000000 -0700
-@@ -23678,11 +23678,9 @@
- echo "$as_me:$LINENO: checking for inet_ntop with IPv6 support" >&5
- echo $ECHO_N "checking for inet_ntop with IPv6 support... $ECHO_C" >&6
- if test "$cross_compiling" = yes; then
-- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&5
--echo "$as_me: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&2;}
-- { (exit 1); exit 1; }; }
-+ echo "$as_me:$LINENO: result: assuming target platform has working inet_ntop" >&5
-+echo "${ECHO_T}assuming target platform has working inet_ntop" >&6
-+ ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
-diff -Naur bind-9.3.1/configure.in bind/configure.in
---- bind-9.3.1/configure.in 2004-12-08 20:07:10.000000000 -0800
-+++ bind/configure.in 2005-09-09 16:06:39.000000000 -0700
-@@ -1414,7 +1414,9 @@
- [AC_MSG_RESULT(no)
- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
-- ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
-+ ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
-+ [AC_MSG_RESULT(assuming target platform has working inet_ntop)
-+ ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"])
-
-
- # On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
---- bind-9.3.1/lib/dns/Makefile.in 2005-09-09 16:21:34.000000000 -0700
-+++ bind/lib/dns/Makefile.in 2005-09-09 16:28:16.000000000 -0700
+--- bind-9.3.2/lib/dns/Makefile.in
++++ bind-9.3.2/lib/dns/Makefile.in
@@ -156,7 +156,7 @@
./gen -s ${srcdir} > code.h
diff --git a/package/bind/bind-dlopen.patch b/package/bind/bind-dlopen.patch
deleted file mode 100644
index b846d471b..000000000
--- a/package/bind/bind-dlopen.patch
+++ /dev/null
@@ -1,89 +0,0 @@
---- bind-9.3.1/bin/named/Makefile.in 2004-09-06 14:47:25.000000000 -0700
-+++ bind/bin/named/Makefile.in 2005-09-19 15:55:17.000000000 -0700
-@@ -29,7 +29,7 @@
- DBDRIVER_OBJS =
- DBDRIVER_SRCS =
- DBDRIVER_INCLUDES =
--DBDRIVER_LIBS =
-+DBDRIVER_LIBS = -ldl
-
- CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include \
- ${LWRES_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} \
-diff -aur bind-9.3.1/bin/named/main.c bind/bin/named/main.c
---- bind-9.3.1/bin/named/main.c 2004-10-24 17:42:54.000000000 -0700
-+++ bind/bin/named/main.c 2005-09-14 10:49:28.000000000 -0700
-@@ -22,6 +22,7 @@
- #include <ctype.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <dlfcn.h>
-
- #include <isc/app.h>
- #include <isc/commandline.h>
-@@ -540,6 +541,7 @@
- static void
- setup(void) {
- isc_result_t result;
-+ void *handle;
-
- /*
- * Get the user and group information before changing the root
-@@ -655,13 +657,33 @@
- /*
- * Add calls to register sdb drivers here.
- */
-- /* xxdb_init(); */
--
-+ handle = dlopen ("cadb.so", RTLD_NOW);
-+ if (!handle) {
-+ fprintf (stderr, "failed to load cadb driver: %s\n", dlerror());
-+ } else {
-+ isc_result_t (*cadbinit)(void);
-+ const char *error;
-+
-+ dlerror(); /* Clear any existing error */
-+ *(void **) (&cadbinit) = dlsym(handle, "cadb_init");
-+ if ((error = dlerror()) != NULL) {
-+ fprintf (stderr, "failing loading cadbinit symbol: %s\n", error);
-+ exit(1);
-+ }
-+
-+ if((*cadbinit)() != ISC_R_SUCCESS) {
-+ fprintf (stderr, "cadbinit failed");
-+ exit(1);
-+ }
-+ }
-+
- ns_server_create(ns_g_mctx, &ns_g_server);
- }
-
- static void
- cleanup(void) {
-+ void *handle;
-+
- destroy_managers();
-
- ns_server_destroy(&ns_g_server);
-@@ -671,7 +693,21 @@
- /*
- * Add calls to unregister sdb drivers here.
- */
-- /* xxdb_clear(); */
-+ handle = dlopen ("cadb.so", RTLD_NOW);
-+ if (!handle) {
-+ fprintf (stderr, "failed to load cadb driver: %s\n", dlerror());
-+ } else {
-+ isc_result_t (*cadbclear)(void);
-+ const char *error;
-+
-+ dlerror(); /* Clear any existing error */
-+ *(void **) (&cadbclear) = dlsym(handle, "cadb_clear");
-+ if ((error = dlerror()) != NULL) {
-+ fprintf (stderr, "failing loading cadbclear symbol: %s\n", error);
-+ } else {
-+ (*cadbclear)();
-+ }
-+ }
-
- isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
- ISC_LOG_NOTICE, "exiting");
diff --git a/package/bind/bind.mk b/package/bind/bind.mk
index c321cabec..8872da77e 100644
--- a/package/bind/bind.mk
+++ b/package/bind/bind.mk
@@ -3,7 +3,7 @@
# bind
#
#############################################################
-BIND_VER:=9.3.1
+BIND_VER:=9.3.2
BIND_SOURCE:=bind-$(BIND_VER).tar.gz
BIND_SITE:=ftp://ftp.isc.org/isc/bind9/$(BIND_VER)
BIND_DIR1:=$(TOOL_BUILD_DIR)/bind-$(BIND_VER)
@@ -44,8 +44,8 @@ $(BIND_DIR2)/Makefile: $(BIND_DIR2)/.unpacked
--without-openssl \
--with-randomdev=/dev/random \
--enable-ipv6 \
- --disable-static \
--with-libtool \
+ --with-pic \
);
$(BIND_DIR2)/$(BIND_BINARY): $(BIND_DIR2)/Makefile
@@ -73,18 +73,17 @@ bind-bin: $(TARGET_DIR)/$(BIND_TARGET_BINARY) bind-lib
$(STAGING_DIR)/lib/libdns.so: $(BIND_DIR2)/$(BIND_BINARY)
$(MAKE) $(TARGET_CONFIGURE_OPTS) -j1 DESTDIR=$(STAGING_DIR) -C $(BIND_DIR2)/lib install
-$(TARGET_DIR)/usr/lib/libdns.so: $(STAGING_DIR)/lib/libdns.so
- mkdir -p $(TARGET_DIR)/usr/lib
+$(TARGET_DIR)/lib/libdns.so: $(STAGING_DIR)/lib/libdns.so
+ mkdir -p $(TARGET_DIR)/lib
cd $(STAGING_DIR)/lib; \
- cp -a libdns.* libisc.* libisccc.* libbind9.* liblwres.* libisccfg.* \
- $(TARGET_DIR)/usr/lib
+ cp -a libdns*so* libisc*so* libbind9*so* \
+ liblwres*so* $(TARGET_DIR)/lib
-bind-lib: $(STAGING_DIR)/lib/libdns.so $(TARGET_DIR)/usr/lib/libdns.so
+bind-lib: $(STAGING_DIR)/lib/libdns.so $(TARGET_DIR)/lib/libdns.so
bind: uclibc bind-bin bind-lib
bind-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BIND_DIR2) uninstall
-$(MAKE) -C $(BIND_DIR2) clean
bind-dirclean:
diff --git a/package/bind/bind.sysvinit b/package/bind/bind.sysvinit
index a9babd215..171d3208a 100644
--- a/package/bind/bind.sysvinit
+++ b/package/bind/bind.sysvinit
@@ -18,10 +18,14 @@ case "$1" in
test -z "$CHROOT" || ARGS="$ARGS -t $CHROOT"
test -z "$SETUID" || ARGS="$ARGS -u $SETUID"
if [ ! -f $CHROOT/etc/rndc.key ]; then
- echo -n "Initializing $NAME control key: rndc-confgen"
- set +e
- touch $CHROOT/etc/rndc.key # handle symlinks
- rndc-confgen -a -r /dev/urandom $ARGS || echo "."
+ echo "Initializing $NAME control key: rndc-confgen"
+ set +e
+
+ # if rndc.key is a symlink, the target must exist
+ touch $CHROOT/etc/rndc.key
+ touch etc/rndc.key
+
+ rndc-confgen -a -r /dev/urandom $ARGS || true
set -e
fi
test -z "$CONF" || ARGS="$ARGS -c $CONF"
@@ -37,12 +41,12 @@ case "$1" in
echo "."
;;
restart)
- $0 stop
+ $0 stop || true
sleep 2
- $0 start && exit $?
+ $0 start
;;
reload|force-reload)
- rndc reload && exit $?
+ rndc reload || $0 restart
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}"
diff --git a/package/bind/bind9 b/package/bind/bind9
deleted file mode 100644
index aa07b41a9..000000000
--- a/package/bind/bind9
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-
-# for a chrooted server: "-u bind -t /var/lib/named"
-OPTIONS=""
-
-test -x /usr/sbin/rndc || exit 0
-
-case "$1" in
- start)
- echo -n "Starting domain name service: named"
-
- # dirs under /var/run can go away on reboots.
- mkdir -p /var/run/bind/run
- chmod 775 /var/run/bind/run
- chown root:bind /var/run/bind/run >/dev/null 2>&1 || true
-
- if [ ! -x /usr/sbin/named ]; then
- echo "named binary missing - not starting"
- exit 1
- fi
- if start-stop-daemon --start --quiet --exec /usr/sbin/named \
- --pidfile /var/run/bind/run/named.pid -- $OPTIONS; then
- if [ -x /sbin/resolvconf ] ; then
- echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo
- fi
- fi
- echo "."
- ;;
-
- stop)
- echo -n "Stopping domain name service: named"
- if [ -x /sbin/resolvconf ]; then
- /sbin/resolvconf -d lo
- fi
- /usr/sbin/rndc stop
- echo "."
- ;;
-
- reload)
- /usr/sbin/rndc reload
- ;;
-
- restart|force-reload)
- $0 stop
- sleep 2
- $0 start
- ;;
-
- *)
- echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0