Sun May 20 12:00:15 2012 UTC ()
PR#45780 net/bind99: Fix chroot operation

DNSSEC related, bind99 needs same fix as bind98


(marino)
diff -r1.2 -r1.3 pkgsrc/net/bind99/Makefile
diff -r1.1.1.1 -r1.2 pkgsrc/net/bind99/files/named9.sh

cvs diff -r1.2 -r1.3 pkgsrc/net/bind99/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/net/bind99/Attic/Makefile 2012/05/01 02:47:52 1.2
+++ pkgsrc/net/bind99/Attic/Makefile 2012/05/20 12:00:15 1.3
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.2 2012/05/01 02:47:52 taca Exp $ 1# $NetBSD: Makefile,v 1.3 2012/05/20 12:00:15 marino Exp $
2 2
3DISTNAME= bind-${BIND_VERSION} 3DISTNAME= bind-${BIND_VERSION}
4PKGNAME= ${DISTNAME:S/-P/pl/} 4PKGNAME= ${DISTNAME:S/-P/pl/}
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= net 6CATEGORIES= net
7MASTER_SITES= ftp://ftp.isc.org/isc/bind9/${BIND_VERSION}/ \ 7MASTER_SITES= ftp://ftp.isc.org/isc/bind9/${BIND_VERSION}/ \
8 http://ftp.belnet.be/pub/mirror/ftp.isc.org/isc/bind9/${BIND_VERSION}/ 8 http://ftp.belnet.be/pub/mirror/ftp.isc.org/isc/bind9/${BIND_VERSION}/
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= http://www.isc.org/software/bind 11HOMEPAGE= http://www.isc.org/software/bind
12COMMENT= Version 9.9 of the Berkeley Internet Name Daemon, implementation of DNS 12COMMENT= Version 9.9 of the Berkeley Internet Name Daemon, implementation of DNS
13 13
14CONFLICTS+= bind<9.9.0 14CONFLICTS+= bind<9.9.0
15 15
16PKG_DESTDIR_SUPPORT= user-destdir 16PKG_DESTDIR_SUPPORT= user-destdir
17 17
18MAKE_JOBS_SAFE= no 18MAKE_JOBS_SAFE= no

cvs diff -r1.1.1.1 -r1.2 pkgsrc/net/bind99/files/Attic/named9.sh (expand / switch to unified diff)

--- pkgsrc/net/bind99/files/Attic/named9.sh 2012/03/07 14:25:00 1.1.1.1
+++ pkgsrc/net/bind99/files/Attic/named9.sh 2012/05/20 12:00:15 1.2
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: named9.sh,v 1.1.1.1 2012/03/07 14:25:00 taca Exp $ 3# $NetBSD: named9.sh,v 1.2 2012/05/20 12:00:15 marino Exp $
4# 4#
5 5
6# PROVIDE: named 6# PROVIDE: named
7# REQUIRE: NETWORKING mountcritremote syslogd 7# REQUIRE: NETWORKING mountcritremote syslogd
8# BEFORE: DAEMON 8# BEFORE: DAEMON
9# KEYWORD: chrootdir 9# KEYWORD: chrootdir
10 10
11. /etc/rc.subr 11. /etc/rc.subr
12 12
13name="named" 13name="named"
14rcvar="${name}9" 14rcvar="${name}9"
15command="@PREFIX@/sbin/${name}" 15command="@PREFIX@/sbin/${name}"
16pidfile="@VARBASE@/run/named/${name}.pid" 16pidfile="@VARBASE@/run/named/${name}.pid"
@@ -39,26 +39,34 @@ named_precmd() @@ -39,26 +39,34 @@ named_precmd()
39 do 39 do
40 if [ ! -c "${named_chrootdir}/dev/$i" ]; then 40 if [ ! -c "${named_chrootdir}/dev/$i" ]; then
41 @RM@ -f "${named_chrootdir}/dev/$i" 41 @RM@ -f "${named_chrootdir}/dev/$i"
42 (cd /dev && 42 (cd /dev &&
43 @PAX@ -rw -pe "$i" "${named_chrootdir}/dev") 43 @PAX@ -rw -pe "$i" "${named_chrootdir}/dev")
44 fi 44 fi
45 done 45 done
46 46
47 if [ -f /etc/localtime ]; then 47 if [ -f /etc/localtime ]; then
48 @CMP@ -s /etc/localtime "${named_chrootdir}/etc/localtime" || \ 48 @CMP@ -s /etc/localtime "${named_chrootdir}/etc/localtime" || \
49 @CP@ -p /etc/localtime "${named_chrootdir}/etc/localtime" 49 @CP@ -p /etc/localtime "${named_chrootdir}/etc/localtime"
50 fi 50 fi
51 51
 52 if [ -f /usr/lib/engines/libgost.so ]; then
 53 if [ ! -d ${named_chrootdir}/usr/lib/engines ]; then
 54 @MKDIR@ ${named_chrootdir}/usr/lib/engines
 55 fi
 56 @CMP@ -s /usr/lib/engines/libgost.so "${named_chrootdir}/usr/lib/engines/libgost.so" || \
 57 @CP@ -p /usr/lib/engines/libgost.so "${named_chrootdir}/usr/lib/engines/libgost.so"
 58 fi
 59
52 if [ ! -d ${named_chrootdir}@VARBASE@/run/named ]; then  60 if [ ! -d ${named_chrootdir}@VARBASE@/run/named ]; then
53 @MKDIR@ ${named_chrootdir}@VARBASE@/run/named  61 @MKDIR@ ${named_chrootdir}@VARBASE@/run/named
54 @CHOWN@ @BIND_USER@ ${named_chrootdir}@VARBASE@/run/named 62 @CHOWN@ @BIND_USER@ ${named_chrootdir}@VARBASE@/run/named
55 fi  63 fi
56 64
57 @RM@ -f ${pidfile} 65 @RM@ -f ${pidfile}
58 @LN@ -s "${named_chrootdir}${pidfile}" ${pidfile} 66 @LN@ -s "${named_chrootdir}${pidfile}" ${pidfile}
59 67
60 # Change run_rc_commands()'s internal copy of $named_flags 68 # Change run_rc_commands()'s internal copy of $named_flags
61 # 69 #
62 rc_flags="-u @BIND_USER@ -t ${named_chrootdir} $rc_flags" 70 rc_flags="-u @BIND_USER@ -t ${named_chrootdir} $rc_flags"
63} 71}
64 72