summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2011-06-16 18:54:12 +0000
committerChristian Ruppert <idl0r@gentoo.org>2011-06-16 18:54:12 +0000
commit6702fe0ff1dc9d0a3182432b52a998772204e6e9 (patch)
tree3d5fb5291eb70b93d4a17a39768ad0d63c86abf5 /net-dns
parentAdd LibreOffice 3.3.3, another bugfix release (diff)
downloadhistorical-6702fe0ff1dc9d0a3182432b52a998772204e6e9.tar.gz
historical-6702fe0ff1dc9d0a3182432b52a998772204e6e9.tar.bz2
historical-6702fe0ff1dc9d0a3182432b52a998772204e6e9.zip
Revision bump. A timeout has been added to the fuser/mount check which can be configured through the MOUNT_CHECK_TIMEOUT variable. mounting/umounting has been improved.
Package-Manager: portage-2.2.0_alpha41/cvs/Linux x86_64
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/bind/ChangeLog10
-rw-r--r--net-dns/bind/Manifest17
-rw-r--r--net-dns/bind/bind-9.8.0_p2-r1.ebuild (renamed from net-dns/bind/bind-9.8.0_p2.ebuild)4
-rw-r--r--net-dns/bind/files/named.init-r11250
4 files changed, 272 insertions, 9 deletions
diff --git a/net-dns/bind/ChangeLog b/net-dns/bind/ChangeLog
index 49945aeced55..f16d91c4ef98 100644
--- a/net-dns/bind/ChangeLog
+++ b/net-dns/bind/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-dns/bind
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.339 2011/05/30 00:15:59 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.340 2011/06/16 18:54:12 idl0r Exp $
+
+*bind-9.8.0_p2-r1 (16 Jun 2011)
+
+ 16 Jun 2011; Christian Ruppert <idl0r@gentoo.org> -bind-9.8.0_p2.ebuild,
+ +bind-9.8.0_p2-r1.ebuild, +files/named.init-r11:
+ Revision bump. A timeout has been added to the fuser/mount check which can be
+ configured through the MOUNT_CHECK_TIMEOUT variable. mounting/umounting has
+ been improved.
30 May 2011; Jeroen Roovers <jer@gentoo.org> bind-9.7.3_p1.ebuild:
Stable for HPPA (bug #368863).
diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest
index e72872d2eb8a..4fddfd754ae1 100644
--- a/net-dns/bind/Manifest
+++ b/net-dns/bind/Manifest
@@ -1,5 +1,5 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
AUX 10bind.env 27 RMD160 872245707b4f72a212cda162c59495744d77a6e3 SHA1 7b8c1abd5910bb7a07c6b7c820c2b34a534b2593 SHA256 5ad6a4402372b43809618051873b63646746f400447bba30dc4dfecd028e3650
AUX 127.zone-r1 533 RMD160 2795c6c27912a73ac45582f33de3182382db3a5d SHA1 87fcb2b96db4cef99d25fa87759dd32ea2ac5559 SHA256 0fa4c294640d4191710647d1b18a2099f22ff674b3a35e6e81ff929f921da626
@@ -11,6 +11,7 @@ AUX named.conf-r5 3952 RMD160 e4554204786565b08eefb9d129c7b8e0b3a55454 SHA1 cd5c
AUX named.confd-r5 1224 RMD160 b353a2bd8c73cbc1f967d04339d4f07db840a5ee SHA1 181a57e1b2c0371ad2704bb61f621498e2bfddff SHA256 00f06f96dc0cc7855bd15d31449b492e3a2502938e8038081c9f09e0d0ce7a08
AUX named.confd-r6 1368 RMD160 8ea5c67af53a0986a09f1077a5dd722dd52c8b51 SHA1 64d5d6ead7fb5ba0ff8016b5fee2518fbde6f90c SHA256 704ac6954b2bad5d0bab19281dc703e86d9b4fe94d63dd00be1e525a3e64c492
AUX named.init-r10 5925 RMD160 acd84047fe945bb146c676a673eca9782362f4ad SHA1 bf91dabc72f693222c935eada9a21f7dc7dc2c2a SHA256 e7604579ed45cafdf121a65c5847b56aecb42356a213f7bac17474823431b24d
+AUX named.init-r11 6250 RMD160 9a03c4670a71fbf865507928b7a59f91fef0df3d SHA1 8e4647b87d9dc4cc79b4c87d2c68575085a7901a SHA256 f59025a8c22a95fb9af5955a96e7aa9562cc2d8cf6be725df69ead56ee93bacd
AUX named.init-r9 4946 RMD160 48cce5a99a8da1eff3492c4896fbae4c1343a675 SHA1 944ed08d22e70ba93625814695535f58feed2083 SHA256 77fd6b4ecb0f7f4baa872d1be1b18d2ea9a913a15f30f63ab904a62ad4325748
DIST bind-9.7.3-P1.tar.gz 7586464 RMD160 838d9089b4f761608c0358a2f897654a7383357b SHA1 4c61aa9ca83310c18e2260748e2f1a5296c83d78 SHA256 5ff684039fda0df27b75a771b66dbe77fd612fb4ade5f4c15960fbb8d62bbbf1
DIST bind-9.7.3.tar.gz 7653584 RMD160 9e53c9cefa2e8261bc52b5d6d7ed550891d9dce5 SHA1 78e14b3d3e653a8c21b098361b645dee5ed66238 SHA256 7c584ca838da4adb6e94e4507b97b180248ca2b1e6aec1513336b58b344a29f7
@@ -22,13 +23,17 @@ DIST dyndns-samples.tbz2 22866 RMD160 27d5b2d0edb8e1ff16b3f980c38d7af33ccf0c7d S
EBUILD bind-9.7.3-r1.ebuild 11624 RMD160 19690cfe501651256d1a2cc1901e93e317b79ce4 SHA1 6d85901298a213f6c4e5fec03b1fb222fa33a6b4 SHA256 b9b97ec7c2c869f51b1e64e3b87e8a63edd9f9dde6dae5f010189eac6b12f160
EBUILD bind-9.7.3.ebuild 11374 RMD160 9c65021dfb7b8a5e2d5d1efd202d71355ef695aa SHA1 2ef602dc663c0259310e054c771e576a5f1f0e25 SHA256 5da52eab6748d8a03ff41464f39069942fc6cfe39e1a4b575b125151f4e10b1f
EBUILD bind-9.7.3_p1.ebuild 11613 RMD160 bad58a3f45a5d909b4df04803d959e2c9affe0b4 SHA1 646d7a1fb10980e704fb8ed39f1acb3d70c2b55e SHA256 9aa8a6e64f914d8beeeb44dd1453ebe9dcbe2a7e7c7a913e651df7e2d3613e95
-EBUILD bind-9.8.0_p2.ebuild 12178 RMD160 1b686ed8188e6dbec55f1ffda09c6742b157aff0 SHA1 f0d1c58688bf6d199af7dfcbcbeb75a3947dae13 SHA256 873858e353bf7105d64714781bf09e84b7219ad428bb2b1a61757fdaf5b7f9fa
-MISC ChangeLog 57705 RMD160 1d2c43c528fbd1ff200155287c93888482c24c3f SHA1 2152fb7d39e248376e0cca6f391155e48ffd02bf SHA256 2137a5f2308ce793e929934c8f099d7e6e59bda5342c35ef1cd70a4c3064b48d
+EBUILD bind-9.8.0_p2-r1.ebuild 12181 RMD160 c4622d839bdb3799a6812777185c459f782cbe02 SHA1 8294dab01a089b4e8a5b542aed465cab45f62af5 SHA256 eeeb2f22e5591ba1e44b0266291ddd4a7c71bfc4e6cdcdd1fcef5675b97f5587
+MISC ChangeLog 58042 RMD160 8d6c939a5245d831dc39a01efd96dabe7d580364 SHA1 f2dc06342d5d07b9cea27614b5b87e1153181278 SHA256 47911a02714dfd52824b83322acd0778348ad4ed1cb0677e77a1b4fe99f35dd0
MISC metadata.xml 686 RMD160 04372d2e822125106bfbec86f7f754b2f8381250 SHA1 efe392ad948d348fb8c1a9a38558fb3cc3e892c8 SHA256 ac17c78fd6d997049a1b1e49be8142e78514bec66e85099c8e946b300fde7c4a
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk3i4ckACgkQVWmRsqeSphNhBACfQom4n8OLLuUTicl2hjT0ohSm
-ceYAnitY4qA6VAf2awryUzdlEn5PNrR1
-=QV0w
+iQEcBAEBCAAGBQJN+lFaAAoJEMOx0zmdw4Z14wMH/320T9D4uBULt4sAW+oMZQ0N
+1kAkCQAaRQ4DPreCNkRqDmjxBJx/uzi3qK+QhWZN7GeSn2fI/7gjU76ejH7qqlrI
+4Cc+fqsNXGaVcmb8Fs54zasmbNrOM0ww5ru4JReaayIJo5t8i31x88noxy4Bhcu7
+N3u48+c9SQjTtYu/3i+hxn46nB6cbDnVISqK5qvMEN+yPDO5tqAtksypu+hxBpSs
+bhjNe7pJhq0Gkv9L3qfWbnfFlJkqBwdA2aIFskNkDFxXxw4rqPlKYA0eS4Qfzrxj
+UvJBXIv962rTcuAd/DAb7erx8oQDyC5lEPtj6RvudJZ94bykwhUYLGTVapMtyE4=
+=h2qg
-----END PGP SIGNATURE-----
diff --git a/net-dns/bind/bind-9.8.0_p2.ebuild b/net-dns/bind/bind-9.8.0_p2-r1.ebuild
index 78d5fc2649a5..9c83947cf9ab 100644
--- a/net-dns/bind/bind-9.8.0_p2.ebuild
+++ b/net-dns/bind/bind-9.8.0_p2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.8.0_p2.ebuild,v 1.1 2011/05/27 18:53:03 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.8.0_p2-r1.ebuild,v 1.1 2011/06/16 18:54:12 idl0r Exp $
EAPI="3"
@@ -225,7 +225,7 @@ src_install() {
newins "${FILESDIR}"/127.zone-r1 127.zone || die
newins "${FILESDIR}"/localhost.zone-r3 localhost.zone || die
- newinitd "${FILESDIR}"/named.init-r10 named || die
+ newinitd "${FILESDIR}"/named.init-r11 named || die
newconfd "${FILESDIR}"/named.confd-r6 named || die
if use ssl && [ -e /usr/lib/engines/libgost.so ]; then
diff --git a/net-dns/bind/files/named.init-r11 b/net-dns/bind/files/named.init-r11
new file mode 100644
index 000000000000..23bf582645a6
--- /dev/null
+++ b/net-dns/bind/files/named.init-r11
@@ -0,0 +1,250 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r11,v 1.1 2011/06/16 18:54:12 idl0r Exp $
+
+opts="start stop reload restart checkconfig checkzones"
+
+depend() {
+ need net
+ use logger
+ provide dns
+}
+
+NAMED_CONF=${CHROOT}/etc/bind/named.conf
+
+OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}
+MOUNT_CHECK_TIMEOUT=${MOUNT_CHECK_TIMEOUT:-60}
+
+_mount() {
+ local from
+ local to
+ local opts
+ local ret=0
+
+ if [ "${#}" -lt 3 ]; then
+ eerror "_mount(): to few arguments"
+ return 1
+ fi
+
+ from=$1
+ to=$2
+ shift 2
+
+ opts="${*}"
+ shift $#
+
+ if [ -z "$(awk "\$2 == \"${to}\" { print \$2 }" /proc/mounts)" ]; then
+ einfo "mounting ${from} to ${to}"
+ mount ${from} ${to} ${opts}
+ ret=$?
+
+ eend $ret
+ return $ret
+ fi
+
+ return 0
+}
+
+_umount() {
+ local dir=$1
+ local ret=0
+
+ if [ -n "$(awk "\$2 == \"${dir}\" { print \$2 }" /proc/mounts)" ]; then
+ ebegin "umounting ${dir}"
+ umount ${dir}
+ ret=$?
+
+ eend $ret
+ return $ret
+ fi
+
+ return 0
+}
+
+_get_pidfile() {
+ # as suggested in bug #107724, bug 335398#c17
+ [ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\
+ /usr/sbin/named-checkconf -p ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF/${CHROOT}} | grep 'pid-file' | cut -d\" -f2)
+ [ -z "${PIDFILE}" ] && PIDFILE=${CHROOT}/var/run/named/named.pid
+}
+
+check_chroot() {
+ if [ -n "${CHROOT}" ]; then
+ [ ! -d "${CHROOT}" ] && return 1
+ [ ! -d "${CHROOT}/dev" ] || [ ! -d "${CHROOT}/etc" ] || [ ! -d "${CHROOT}/var" ] && return 1
+ [ ! -d "${CHROOT}/var/run" ] || [ ! -d "${CHROOT}/var/log" ] && return 1
+ [ ! -d "${CHROOT}/etc/bind" ] || [ ! -d "${CHROOT}/var/bind" ] && return 1
+ [ ! -d "${CHROOT}/var/log/named" ] && return 1
+ [ ! -c "${CHROOT}/dev/null" ] || [ ! -c "${CHROOT}/dev/zero" ] && return 1
+ [ ! -c "${CHROOT}/dev/random" ] && [ ! -c "${CHROOT}/dev/urandom" ] && return 1
+ [ "${CHROOT_GEOIP:-0}" -eq 1 ] && [ ! -d "${CHROOT}/usr/share/GeoIP" ] && return 1
+ if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then
+ if [ -d "/usr/lib64" ]; then
+ [ ! -d "${CHROOT}/usr/lib64/engines" ] && return 1
+ elif [ -d "/usr/lib" ]; then
+ [ ! -d "${CHROOT}/usr/lib/engines" ] && return 1
+ fi
+ fi
+ fi
+
+ return 0
+}
+
+checkconfig() {
+ ebegin "Checking named configuration"
+
+ if [ ! -f "${NAMED_CONF}" ] ; then
+ eerror "No ${NAMED_CONF} file exists!"
+ return 1
+ fi
+
+ /usr/sbin/named-checkconf ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF/${CHROOT}} || {
+ eerror "named-checkconf failed! Please fix your config first."
+ return 1
+ }
+
+ eend 0
+ return 0
+}
+
+checkzones() {
+ ebegin "Checking named configuration and zones"
+ /usr/sbin/named-checkconf -z -j ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF/${CHROOT}}
+ eend $?
+}
+
+start() {
+ local piddir
+
+ ebegin "Starting ${CHROOT:+chrooted }named"
+
+ if [ -n "${CHROOT}" ]; then
+ if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then
+ check_chroot || {
+ eend 1
+ eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first"
+ return 1
+ }
+ fi
+
+ if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then
+ if [ ! -e /usr/lib/engines/libgost.so ]; then
+ eend 1
+ eerror "Couldn't find /usr/lib/engines/libgost.so but bind has been built with openssl and libgost support"
+ return 1
+ fi
+ cp -Lp /usr/lib/engines/libgost.so "${CHROOT}/usr/lib/engines/libgost.so" || {
+ eend 1
+ eerror "Couldn't copy /usr/lib/engines/libgost.so into '${CHROOT}/usr/lib/engines/'"
+ return 1
+ }
+ fi
+ cp -Lp /etc/localtime "${CHROOT}/etc/localtime"
+
+ if [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then
+ einfo "Mounting chroot dirs"
+ _mount /etc/bind ${CHROOT}/etc/bind -o bind
+ _mount /var/bind ${CHROOT}/var/bind -o bind
+ _mount /var/log/named ${CHROOT}/var/log/named -o bind
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
+ _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind
+ fi
+ fi
+ fi
+
+ checkconfig || { eend 1; return 1; }
+
+ # create piddir (usually /var/run/named) if necessary, bug 334535
+ _get_pidfile
+ piddir="${PIDFILE%/*}"
+ if [ ! -d "${piddir}" ]; then
+ checkpath -q -d -o root:named -m 0770 "${piddir}" || {
+ eend 1
+ return 1
+ }
+ fi
+
+ # In case someone have $CPU set in /etc/conf.d/named
+ if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then
+ CPU="-n ${CPU}"
+ fi
+
+ start-stop-daemon --start --pidfile ${PIDFILE} \
+ --nicelevel ${NAMED_NICELEVEL:-0} \
+ --exec /usr/sbin/named \
+ -- -u named ${CPU} ${OPTIONS} ${CHROOT:+-t} ${CHROOT}
+ eend $?
+}
+
+stop() {
+ local reported=0
+
+ ebegin "Stopping ${CHROOT:+chrooted }named"
+
+ # Workaround for now, until openrc's restart has been fixed.
+ # openrc doesn't care about a restart() function in init scripts.
+ if [ "${RC_CMD}" = "restart" ]; then
+ if [ -n "${CHROOT}" -a ${CHROOT_NOCHECK:-0} -eq 0 ]; then
+ check_chroot || {
+ eend 1
+ eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first"
+ return 1
+ }
+ fi
+
+ checkconfig || { eend 1; return 1; }
+ fi
+
+ # -R 10, bug 335398
+ _get_pidfile
+ start-stop-daemon --stop --retry 10 --pidfile $PIDFILE \
+ --exec /usr/sbin/named
+
+ if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then
+ ebegin "Umounting chroot dirs"
+
+ # just to be sure everything gets clean
+ while fuser -s ${CHROOT} 2>/dev/null; do
+ if [ "${reported}" -eq 0 ]; then
+ einfo "Waiting until all named processes are stopped (max. ${MOUNT_CHECK_TIMEOUT} seconds)"
+ elif [ "${reported}" -eq "${MOUNT_CHECK_TIMEOUT}" ]; then
+ eerror "Waiting until all named processes are stopped failed!"
+ eend 1
+ break
+ fi
+ sleep 1
+ reported=$((reported+1))
+ done
+
+ [ "${CHROOT_GEOIP:-0}" -eq 1 ] && _umount ${CHROOT}/usr/share/GeoIP
+ _umount ${CHROOT}/etc/bind
+ _umount ${CHROOT}/var/log/named
+ _umount ${CHROOT}/var/bind
+ fi
+
+ eend $?
+}
+
+reload() {
+ local ret
+
+ ebegin "Reloading named.conf and zone files"
+
+ checkconfig || { eend 1; return 1; }
+
+ _get_pidfile
+ if [ -n "${PIDFILE}" ]; then
+ # FIXME: Remove --stop and --oknodo as soon as baselayout-1 has been removed... finally...
+ start-stop-daemon --stop --oknodo --pidfile $PIDFILE --signal HUP --exec /usr/sbin/named
+ ret=$?
+ else
+ ewarn "Unable to determine the pidfile... this is"
+ ewarn "a fallback mode. Please check your installation!"
+
+ $RC_SERVICE restart
+ ret=$?
+ fi
+
+ eend $ret
+}