diff options
author | Konstantin V. Arkhipov <voxus@gentoo.org> | 2005-09-30 18:47:17 +0000 |
---|---|---|
committer | Konstantin V. Arkhipov <voxus@gentoo.org> | 2005-09-30 18:47:17 +0000 |
commit | 7dab3eaaaf19ec332882c8c5febc98a30c9dd96a (patch) | |
tree | 33cab12aa06dc71b4b3248d3d07d480be24b7f9b /net-dns/bind | |
parent | Removed INSTALL. (diff) | |
download | gentoo-2-7dab3eaaaf19ec332882c8c5febc98a30c9dd96a.tar.gz gentoo-2-7dab3eaaaf19ec332882c8c5febc98a30c9dd96a.tar.bz2 gentoo-2-7dab3eaaaf19ec332882c8c5febc98a30c9dd96a.zip |
* more voodoo to pid-file detection
(Portage version: 2.0.52-r1)
Diffstat (limited to 'net-dns/bind')
-rw-r--r-- | net-dns/bind/ChangeLog | 9 | ||||
-rw-r--r-- | net-dns/bind/Manifest | 39 | ||||
-rw-r--r-- | net-dns/bind/bind-9.2.5-r7.ebuild | 262 | ||||
-rw-r--r-- | net-dns/bind/bind-9.3.1-r5.ebuild (renamed from net-dns/bind/bind-9.3.1-r4.ebuild) | 6 | ||||
-rw-r--r-- | net-dns/bind/files/digest-bind-9.2.5-r7 | 2 | ||||
-rw-r--r-- | net-dns/bind/files/digest-bind-9.3.1-r5 (renamed from net-dns/bind/files/digest-bind-9.3.1-r4) | 0 | ||||
-rwxr-xr-x | net-dns/bind/files/named.init-r1 | 63 |
7 files changed, 359 insertions, 22 deletions
diff --git a/net-dns/bind/ChangeLog b/net-dns/bind/ChangeLog index e50716b45055..4e846149e4fd 100644 --- a/net-dns/bind/ChangeLog +++ b/net-dns/bind/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-dns/bind # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.89 2005/09/24 08:45:56 corsair Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.90 2005/09/30 18:47:17 voxus Exp $ + +*bind-9.2.5-r7 (30 Sep 2005) +*bind-9.3.1-r5 (30 Sep 2005) + + 30 Sep 2005; Konstantin Arkhipov <voxus@gentoo.org> +bind-9.2.5-r7.ebuild, + +bind-9.3.1-r5.ebuild, +files/named.init-r1, -bind-9.3.1-r4.ebuild: + Closing bugs regarding pid-file detecting: #107724 and #102135. 24 Sep 2005; Markus Rothe <corsair@gentoo.org> bind-9.2.5-r6.ebuild: Stable on ppc64 diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest index 9147e3e4133e..10e6ead97fcd 100644 --- a/net-dns/bind/Manifest +++ b/net-dns/bind/Manifest @@ -1,27 +1,30 @@ -MD5 c51c1ff638db04f7132d45aa50b68959 ChangeLog 14134 -MD5 59dbb3246bd5abb0459f7b1c1bbc553b bind-9.2.5-r4.ebuild 8189 -MD5 6f00b40ca2f6c222d0987d992f6c6351 bind-9.3.1-r4.ebuild 8035 -MD5 bf7284c3e31bd3292a01fa046b3220bb metadata.xml 352 MD5 ec4d3894133e0f89758ceb92e83f0b8d bind-9.2.5-r6.ebuild 8220 -MD5 42b5ed5adcee33cf40531d7955412b21 files/10bind.env 27 +MD5 d076332e65114484a817042fce8f01b1 bind-9.2.5-r7.ebuild 8237 +MD5 8889a0db3b791c255f320367fea23b2f bind-9.3.1-r5.ebuild 8042 +MD5 bd8a49d148db30fe26edc0de51869619 ChangeLog 14377 +MD5 bf7284c3e31bd3292a01fa046b3220bb metadata.xml 352 +MD5 59dbb3246bd5abb0459f7b1c1bbc553b bind-9.2.5-r4.ebuild 8189 MD5 51197afe8da37b1b453456de90ca4f25 files/127 227 -MD5 51197afe8da37b1b453456de90ca4f25 files/127.zone 227 -MD5 4346332cc9681502a3aedfd0a7a1ac41 files/bind-9.2.5-berkdb_fix.patch 537 MD5 75d14cac80e71b4ac0662775064c06e2 files/bind-9.2.5-dlz-mysql.patch 11296 -MD5 9a06b553558342585f8ba88bd5e4c569 files/bind-9.2.5-mysql.patch 11315 +MD5 620cf3c88d615f841884ee25bc8f8397 files/named.init 1641 MD5 d47c8a742a2645377ba4d783907700dd files/digest-bind-9.2.5-r4 127 -MD5 708e6dd2ce57583129d00b3d721bc3a4 files/digest-bind-9.3.1-r4 133 -MD5 33e3834bbd0adf80e570fc73aa5a7147 files/named.rc 1644 -MD5 2bb12cfcd70284e72fbf9e70e5e2974d files/dyndns-samples.tbz2 22866 +MD5 d47c8a742a2645377ba4d783907700dd files/digest-bind-9.2.5-r6 127 +MD5 d47c8a742a2645377ba4d783907700dd files/digest-bind-9.2.5-r7 127 +MD5 a8ffc671392ffacafb5c49ffc1c6a4c6 files/named.rc6-pid_fix 488 +MD5 708e6dd2ce57583129d00b3d721bc3a4 files/digest-bind-9.3.1-r5 133 +MD5 4346332cc9681502a3aedfd0a7a1ac41 files/bind-9.2.5-berkdb_fix.patch 537 +MD5 0eab8a4d5b98b79f76b136ab0dffabcf files/named.rc6-smart_pid_fix 1204 +MD5 23c8b6339e3196891fc071f79ec6f244 files/named.init-r1 1416 +MD5 9a06b553558342585f8ba88bd5e4c569 files/bind-9.2.5-mysql.patch 11315 +MD5 21e3efd21e18f4c660155978105f8ebe files/named.confd 351 +MD5 51197afe8da37b1b453456de90ca4f25 files/127.zone 227 MD5 ccfca63035b534556c3910270d40a4b9 files/localhost 412 -MD5 ccfca63035b534556c3910270d40a4b9 files/localhost.zone 412 -MD5 e83e7a76e253debfdd120311fda73fb6 files/named.ca 2518 MD5 b3af799ce2505e78a14bb16868cf0593 files/named.conf-r1 758 MD5 e9bb1e01cf0b7597e739e889499ddd7a files/named.conf-r2 768 MD5 be5fd752bdbd59385f2a559d603098d5 files/named.conf-r3 1314 -MD5 21e3efd21e18f4c660155978105f8ebe files/named.confd 351 -MD5 620cf3c88d615f841884ee25bc8f8397 files/named.init 1641 +MD5 ccfca63035b534556c3910270d40a4b9 files/localhost.zone 412 +MD5 2bb12cfcd70284e72fbf9e70e5e2974d files/dyndns-samples.tbz2 22866 MD5 412d666c947769b6015a65a42bb8ea00 files/named.rc6 1434 -MD5 a8ffc671392ffacafb5c49ffc1c6a4c6 files/named.rc6-pid_fix 488 -MD5 0eab8a4d5b98b79f76b136ab0dffabcf files/named.rc6-smart_pid_fix 1204 -MD5 d47c8a742a2645377ba4d783907700dd files/digest-bind-9.2.5-r6 127 +MD5 42b5ed5adcee33cf40531d7955412b21 files/10bind.env 27 +MD5 e83e7a76e253debfdd120311fda73fb6 files/named.ca 2518 +MD5 33e3834bbd0adf80e570fc73aa5a7147 files/named.rc 1644 diff --git a/net-dns/bind/bind-9.2.5-r7.ebuild b/net-dns/bind/bind-9.2.5-r7.ebuild new file mode 100644 index 000000000000..70f250617823 --- /dev/null +++ b/net-dns/bind/bind-9.2.5-r7.ebuild @@ -0,0 +1,262 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.2.5-r7.ebuild,v 1.1 2005/09/30 18:47:17 voxus Exp $ + +inherit eutils libtool + +DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" +HOMEPAGE="http://www.isc.org/products/BIND/bind9.html" +SRC_URI="ftp://ftp.isc.org/isc/bind9/${PV}/${P}.tar.gz + dlz? ( http://dev.gentoo.org/~voxus/dlz/dlz-${PV}.patch.bz2 )" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="ssl ipv6 doc dlz postgres berkdb bind-mysql mysql odbc ldap selinux idn threads" + +DEPEND="sys-apps/groff + sys-devel/autoconf + ssl? ( >=dev-libs/openssl-0.9.6g ) + mysql? ( >=dev-db/mysql-4 ) + bind-mysql? ( >=dev-db/mysql-4 ) + odbc? ( >=dev-db/unixODBC-2.2.6 ) + ldap? ( net-nds/openldap )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-bind )" + +src_unpack() { + unpack ${A} && cd ${S} + + # Adjusting PATHs in manpages + for i in `echo bin/{named/named.8,check/named-checkconf.8,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} + done + + if use dlz; then + epatch ${DISTDIR}/dlz-${PV}.patch.bz2 + epatch ${FILESDIR}/${P}-berkdb_fix.patch + fi + + if use bind-mysql; then + if use dlz; then + MP=${P}-dlz-mysql.patch + else + MP=${P}-mysql.patch + fi + + ebegin "Fixing mysql patch" + eindent + + cp ${FILESDIR}/${MP} ${T}/${MP} + + sed -e "s:-I/usr/local/include:`mysql_config --include`:" \ + -e "s:-L/usr/local/lib/mysql -lmysqlclient:`mysql_config --libs`:" \ + -i ${T}/${MP} + + epatch ${T}/${MP} + + eoutdent + eend $? + fi + + if use idn; then + epatch ${S}/contrib/idn/idnkit-1.0-src/patch/bind9/${P}-patch + fi + + # it should be installed by bind-tools + sed "s:nsupdate ::g" ${S}/bin/Makefile.in > ${T}/Makefile + mv ${T}/Makefile ${S}/bin/Makefile.in + + cd ${S} + WANT_AUTOCONF=2.5 autoconf || die "autoconf failed" +} + +src_compile() { + local myconf="" + + use ssl && myconf="${myconf} --with-openssl" + use dlz && { + myconf="${myconf} --with-dlz-filesystem --with-dlz-stub" + use postgres && myconf="${myconf} --with-dlz-postgres" + use mysql && myconf="${myconf} --with-dlz-mysql" + use berkdb && myconf="${myconf} --with-dlz-bdb" + use ldap && myconf="${myconf} --with-dlz-ldap" + use odbc && myconf="${myconf} --with-dlz-odbc" + } + + if use threads; then + if use dlz && use mysql; then + echo + ewarn "" + einfo "MySQL uses thread local storage in its C api. Thus MySQL" + einfo "requires that each thread of an application execute a MySQL" + einfo "\"thread initialization\" to setup the thread local storage." + einfo "This is impossible to do safely while staying within the DLZ" + einfo "driver API. This is a limitation caused by MySQL, and not the" + einfo "DLZ API." + ewarn "Because of this BIND MUST only run with a single thread when" + ewarn "using the MySQL driver." + echo + myconf="${myconf} --disable-threads" + einfo "Threading support disabled" + epause 10 + else + myconf="${myconf} --enable-linux-caps --enable-threads" + einfo "Threading support enabled" + fi + fi + + econf \ + --sysconfdir=/etc/bind \ + --localstatedir=/var \ + `use_enable ipv6` \ + --with-libtool \ + ${myconf} || die "econf failed" + + emake -j1 || die "failed to compile bind" + + if use idn; then + cd ${S}/contrib/idn/idnkit-1.0-src + econf || die "idn econf failed" + emake || die "idn emake failed" + fi +} + +src_install() { + einstall || die "failed to install bind" + + dodoc CHANGES COPYRIGHT FAQ README + + use doc && { + docinto misc ; dodoc doc/misc/* + docinto html ; dohtml doc/arm/* + docinto draft ; dodoc doc/draft/* + docinto rfc ; dodoc doc/rfc/* + docinto contrib ; dodoc contrib/named-bootconf/named-bootconf.sh \ + contrib/nanny/nanny.pl + } + + insinto /etc/env.d + newins ${FILESDIR}/10bind.env 10bind + + # some handy-dandy dynamic dns examples + cd ${D}/usr/share/doc/${PF} + tar pjxf ${FILESDIR}/dyndns-samples.tbz2 + + dodir /etc/bind /var/bind/{pri,sec} + keepdir /var/bind/sec + + insinto /etc/bind ; newins ${FILESDIR}/named.conf-r2 named.conf + # ftp://ftp.rs.internic.net/domain/named.ca: + insinto /var/bind ; doins ${FILESDIR}/named.ca + insinto /var/bind/pri ; doins ${FILESDIR}/{127,localhost}.zone + + cp ${FILESDIR}/named.init-r1 ${T}/named && doinitd ${T}/named + cp ${FILESDIR}/named.confd ${T}/named && doconfd ${T}/named + + dosym ../../var/bind/named.ca /var/bind/root.cache + dosym ../../var/bind/pri /etc/bind/pri + dosym ../../var/bind/sec /etc/bind/sec + + if use idn; then + cd ${S}/contrib/idn/idnkit-1.0-src + einstall || die "failed to install idn kit" + docinto idn + dodoc ChangeLog INSTALL{,.ja} README{,.ja} NEWS + fi + + # Let's get rid of those tools and their manpages since they're provided by bind-tools + rm -f ${D}/usr/share/man/man1/{dig.1,host.1,nslookup.1} + rm -f ${D}/usr/bin/{dig,host,nslookup} + + ebegin "Creating named group and user" + enewgroup named 40 + enewuser named 40 -1 /etc/bind named + eend ${?} +} + +pkg_postinst() { + if [ ! -f '/etc/bind/rndc.key' ]; then + /usr/sbin/rndc-confgen -a -u named + fi + + install -d -o named -g named ${ROOT}/var/run/named \ + ${ROOT}/var/bind/pri ${ROOT}/var/bind/sec + chown -R named:named ${ROOT}/var/bind + + einfo "The default zone files are now installed as *.zone," + einfo "be careful merging config files if you have modified" + einfo "/var/bind/pri/127 or /var/bind/pri/localhost" + einfo + einfo "You can edit /etc/conf.d/named to customize named settings" + einfo + einfo "The BIND ebuild now includes chroot support." + einfo "If you like to run bind in chroot AND this is a new install OR" + einfo "your bind doesn't already run in chroot, simply run:" + einfo "\`ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\`" + einfo "Before running the above command you might want to change the chroot" + einfo "dir in /etc/conf.d/named. Otherwise /chroot/dns will be used." + echo + einfo "Recently verisign added a wildcard A record to the .COM and .NET TLD" + einfo "zones making all .com and .net domains appear to be registered" + einfo "This causes many problems such as breaking important anti-spam checks" + einfo "which verify source domains exist. ISC released a patch for BIND which" + einfo "adds 'delegation-only' zones to allow admins to return the .com and .net" + einfo "domain resolution to their normal function." + echo + einfo "There is no need to create a com or net data file. Just the" + einfo "entries to the named.conf file is enough." + echo + einfo " zone "com" IN { type delegation-only; };" + einfo " zone "net" IN { type delegation-only; };" + + echo + ewarn "BIND >=9.2.5 makes the priority argument to MX records mandatory" + ewarn "when it was previously optional. If the priority is missing, BIND" + ewarn "won't load the zone file at all." + echo +} + +pkg_config() { + CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/named 2>/dev/null` + EXISTS="no" + + if [ -z "${CHROOT}" -a ! -d "/chroot/dns" ]; then + CHROOT="/chroot/dns" + elif [ -d ${CHROOT} ]; then + eerror; eerror "${CHROOT:-/chroot/dns} already exists. Quitting."; eerror; EXISTS="yes" + fi + + if [ ! "$EXISTS" = yes ]; then + einfo ; einfon "Setting up the chroot directory..." + mkdir -m 700 -p ${CHROOT} + mkdir -p ${CHROOT}/{dev,etc,var/run/named} + chown -R named:named ${CHROOT}/var/run/named + cp -R /etc/bind ${CHROOT}/etc/ + cp /etc/localtime ${CHROOT}/etc/localtime + chown named:named ${CHROOT}/etc/bind/rndc.key + cp -R /var/bind ${CHROOT}/var/ + chown -R named:named ${CHROOT}/var/ + mknod ${CHROOT}/dev/zero c 1 5 + mknod ${CHROOT}/dev/random c 1 8 + chmod 666 ${CHROOT}/dev/{random,zero} + chown named:named ${CHROOT} + + grep -q "^#[[:blank:]]\?CHROOT" /etc/conf.d/named ; RETVAL=$? + if [ $RETVAL = 0 ]; then + sed 's/^# \?\(CHROOT.*\)$/\1/' /etc/conf.d/named > /etc/conf.d/named.orig 2>/dev/null + mv --force /etc/conf.d/named.orig /etc/conf.d/named + fi + + sleep 1; echo " Done."; sleep 1 + einfo + einfo "Add the following to your root .bashrc or .bash_profile: " + einfo " alias rndc='rndc -k ${CHROOT}/etc/bind/rndc.key'" + einfo "Then do the following: " + einfo " source /root/.bashrc or .bash_profile" + einfo + fi +} diff --git a/net-dns/bind/bind-9.3.1-r4.ebuild b/net-dns/bind/bind-9.3.1-r5.ebuild index 0df00be44bc0..23d16670332b 100644 --- a/net-dns/bind/bind-9.3.1-r4.ebuild +++ b/net-dns/bind/bind-9.3.1-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.3.1-r4.ebuild,v 1.1 2005/09/02 09:15:45 voxus Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.3.1-r5.ebuild,v 1.1 2005/09/30 18:47:17 voxus Exp $ inherit eutils libtool @@ -155,8 +155,8 @@ src_install() { insinto /var/bind ; doins ${FILESDIR}/named.ca insinto /var/bind/pri ; doins ${FILESDIR}/{127,localhost}.zone - exeinto /etc/init.d ; newexe ${FILESDIR}/named.rc named - insinto /etc/conf.d ; newins ${FILESDIR}/named.confd named + cp ${FILESDIR}/named.init-r1 ${T}/named && doinitd ${T}/named + cp ${FILESDIR}/named.confd ${T}/named && doconfd ${T}/named dosym ../../var/bind/named.ca /var/bind/root.cache dosym ../../var/bind/pri /etc/bind/pri diff --git a/net-dns/bind/files/digest-bind-9.2.5-r7 b/net-dns/bind/files/digest-bind-9.2.5-r7 new file mode 100644 index 000000000000..917f82e7d0d6 --- /dev/null +++ b/net-dns/bind/files/digest-bind-9.2.5-r7 @@ -0,0 +1,2 @@ +MD5 35a265fb97a068c066e22306ea32fd1f bind-9.2.5.tar.gz 4504389 +MD5 3bb820ced02fa2db7ae37e5288a73706 dlz-9.2.5.patch.bz2 135932 diff --git a/net-dns/bind/files/digest-bind-9.3.1-r4 b/net-dns/bind/files/digest-bind-9.3.1-r5 index 4307a2849697..4307a2849697 100644 --- a/net-dns/bind/files/digest-bind-9.3.1-r4 +++ b/net-dns/bind/files/digest-bind-9.3.1-r5 diff --git a/net-dns/bind/files/named.init-r1 b/net-dns/bind/files/named.init-r1 new file mode 100755 index 000000000000..e57158257e3d --- /dev/null +++ b/net-dns/bind/files/named.init-r1 @@ -0,0 +1,63 @@ +#!/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-r1,v 1.1 2005/09/30 18:47:17 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 + PIDFILE=$(\ + grep -Eo -m1 "^[^#\"]*pid\-file +\".+\" *;" \ + ${CHROOT}/etc/bind/named.conf | cut -d\" -f2\ + ) + + KEY="${CHROOT}/etc/bind/rndc.key" +} + +start() { + ebegin "Starting ${CHROOT:+chrooted }named" + checkconfig || return 1 + start-stop-daemon --start --quiet --pidfile ${PIDFILE} \ + --exec /usr/sbin/named \ + -- -u named -n ${CPU} ${OPTIONS} ${CHROOT:+-t $CHROOT} + eend $? +} + +stop() { + ebegin "Stopping ${CHROOT:+chrooted }named" + checkconfig || return 2 + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec /usr/sbin/named -- stop + 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 +} |