From d6992c27ca680689b0dc746c498bdf8ada274d78 Mon Sep 17 00:00:00 2001 From: "Konstantin V. Arkhipov" Date: Fri, 2 Mar 2007 09:21:09 +0000 Subject: + /dev/urandom support; also closing bug #168888 Package-Manager: portage-2.1.2-r12 --- net-dns/bind/ChangeLog | 10 +- net-dns/bind/Manifest | 36 +-- net-dns/bind/bind-9.4.0-r1.ebuild | 275 +++++++++++++++++++++ net-dns/bind/bind-9.4.0.ebuild | 269 -------------------- .../files/bind-9.4.0-dlzbdb-close_cursor.patch | 11 + .../files/bind-9.4.0_rc2-missing_odbc_test.patch | 20 -- net-dns/bind/files/digest-bind-9.4.0 | 6 - net-dns/bind/files/digest-bind-9.4.0-r1 | 6 + 8 files changed, 319 insertions(+), 314 deletions(-) create mode 100644 net-dns/bind/bind-9.4.0-r1.ebuild delete mode 100644 net-dns/bind/bind-9.4.0.ebuild create mode 100644 net-dns/bind/files/bind-9.4.0-dlzbdb-close_cursor.patch delete mode 100644 net-dns/bind/files/bind-9.4.0_rc2-missing_odbc_test.patch delete mode 100644 net-dns/bind/files/digest-bind-9.4.0 create mode 100644 net-dns/bind/files/digest-bind-9.4.0-r1 (limited to 'net-dns/bind') diff --git a/net-dns/bind/ChangeLog b/net-dns/bind/ChangeLog index f6bd27dc6b40..f1f84c5a33ef 100644 --- a/net-dns/bind/ChangeLog +++ b/net-dns/bind/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-dns/bind # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.149 2007/02/28 15:02:18 voxus Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.150 2007/03/02 09:21:09 voxus Exp $ + +*bind-9.4.0-r1 (02 Mar 2007) + + 02 Mar 2007; Konstantin V. Arkhipov + +files/bind-9.4.0-dlzbdb-close_cursor.patch, + -files/bind-9.4.0_rc2-missing_odbc_test.patch, -bind-9.4.0.ebuild, + +bind-9.4.0-r1.ebuild: + Support for /dev/urandom added, patch by Aurélien Requiem . *bind-9.4.0 (28 Feb 2007) diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest index d5a8a4e7d106..44b85535e052 100644 --- a/net-dns/bind/Manifest +++ b/net-dns/bind/Manifest @@ -33,10 +33,10 @@ AUX bind-9.3.4-missing_odbc_test.patch 613 RMD160 ec141cef65e470dfc8df4c641ec96b MD5 cb5a05fb75f7a95ec8167efc19089a54 files/bind-9.3.4-missing_odbc_test.patch 613 RMD160 ec141cef65e470dfc8df4c641ec96bfbd5d8cdd1 files/bind-9.3.4-missing_odbc_test.patch 613 SHA256 5e6465bdb01cbb662333cc2b0a00ad51905a0cda2eb6b7abc3a0b2dd3e701f4e files/bind-9.3.4-missing_odbc_test.patch 613 -AUX bind-9.4.0_rc2-missing_odbc_test.patch 613 RMD160 ec141cef65e470dfc8df4c641ec96bfbd5d8cdd1 SHA1 dbc3a933cac7e474fa62fb2f71e50be91825b963 SHA256 5e6465bdb01cbb662333cc2b0a00ad51905a0cda2eb6b7abc3a0b2dd3e701f4e -MD5 cb5a05fb75f7a95ec8167efc19089a54 files/bind-9.4.0_rc2-missing_odbc_test.patch 613 -RMD160 ec141cef65e470dfc8df4c641ec96bfbd5d8cdd1 files/bind-9.4.0_rc2-missing_odbc_test.patch 613 -SHA256 5e6465bdb01cbb662333cc2b0a00ad51905a0cda2eb6b7abc3a0b2dd3e701f4e files/bind-9.4.0_rc2-missing_odbc_test.patch 613 +AUX bind-9.4.0-dlzbdb-close_cursor.patch 338 RMD160 3c92206a6c77ac8e9ea854dfc22fda5753b653a9 SHA1 903383e2b142d76a73030c27f2cdab8d100df150 SHA256 4a004d72565d6db683b879851ae8dfaddcf1b39fd0f97a995d9c5d22d72c6395 +MD5 623e6576b78fc810c8ef698d522aeaf8 files/bind-9.4.0-dlzbdb-close_cursor.patch 338 +RMD160 3c92206a6c77ac8e9ea854dfc22fda5753b653a9 files/bind-9.4.0-dlzbdb-close_cursor.patch 338 +SHA256 4a004d72565d6db683b879851ae8dfaddcf1b39fd0f97a995d9c5d22d72c6395 files/bind-9.4.0-dlzbdb-close_cursor.patch 338 AUX bind-dlzbdb-close_cursor.patch 307 RMD160 1bbf09d393b5db40b483a952db5f39fe60efda7c SHA1 4214a98ca49b6b85366f85d40dd9d5bbfd008151 SHA256 e18fb5668ffaa540d8ec3e01fe40b1f0d1c562a094c06fa902ef67953daed9f5 MD5 448a6410601bd8ac83e7ac6bc7ba4544 files/bind-dlzbdb-close_cursor.patch 307 RMD160 1bbf09d393b5db40b483a952db5f39fe60efda7c files/bind-dlzbdb-close_cursor.patch 307 @@ -179,14 +179,14 @@ EBUILD bind-9.3.4.ebuild 8383 RMD160 dd9cc4295f7e46e8035c482ec359f912b989f88c SH MD5 e3cb180c8885c49dd194836783921fc6 bind-9.3.4.ebuild 8383 RMD160 dd9cc4295f7e46e8035c482ec359f912b989f88c bind-9.3.4.ebuild 8383 SHA256 c328559d719129fdc46e5371decd721e64868ac520f364d6e076daad3b37a6c9 bind-9.3.4.ebuild 8383 -EBUILD bind-9.4.0.ebuild 8201 RMD160 8d15d1463b5805980a762070da2d0f1d171e5e71 SHA1 4d3cfc22660b8e6ea70c14cba137afdfe0a2e572 SHA256 184357860be477274dd85640c2b97355bce023044c6b192ff0bae232d4b6dc2b -MD5 57a6913b734e7d118f5d6e0f3e0a9583 bind-9.4.0.ebuild 8201 -RMD160 8d15d1463b5805980a762070da2d0f1d171e5e71 bind-9.4.0.ebuild 8201 -SHA256 184357860be477274dd85640c2b97355bce023044c6b192ff0bae232d4b6dc2b bind-9.4.0.ebuild 8201 -MISC ChangeLog 24496 RMD160 cc430a70e80079f8385cce2ad2534412db288089 SHA1 fbc03076049df70514a1451527c8bf8aebbf23cc SHA256 83eea4901906a32f93f998d440e92647c70e78395fa272d27db81bc651bf22b0 -MD5 904b13d262f8210eb3ea8b10119aef79 ChangeLog 24496 -RMD160 cc430a70e80079f8385cce2ad2534412db288089 ChangeLog 24496 -SHA256 83eea4901906a32f93f998d440e92647c70e78395fa272d27db81bc651bf22b0 ChangeLog 24496 +EBUILD bind-9.4.0-r1.ebuild 8346 RMD160 7799ffdfe745ca8e6af37f24db8ca68bc61fafec SHA1 2d7a547f478e1bfb09054bc79631bf3f97ceac73 SHA256 f4fe466b47cbf8eab82afd47028b3d9679a0acd05ff6ee4b922fbd02b295faff +MD5 55f74138a14927cc5540accc03e46f07 bind-9.4.0-r1.ebuild 8346 +RMD160 7799ffdfe745ca8e6af37f24db8ca68bc61fafec bind-9.4.0-r1.ebuild 8346 +SHA256 f4fe466b47cbf8eab82afd47028b3d9679a0acd05ff6ee4b922fbd02b295faff bind-9.4.0-r1.ebuild 8346 +MISC ChangeLog 24805 RMD160 53022866e498bf1009d07b7ecbb84ad2a4f06033 SHA1 b1e9ca59d025e8babcd6e1db7a27c1bfcd8e66bd SHA256 9a925aece38f704654e22080be8d5d779510cfcb031ddeb9e0c642d96baf72e6 +MD5 4d9f7965049c2ac2ea209016db752e6e ChangeLog 24805 +RMD160 53022866e498bf1009d07b7ecbb84ad2a4f06033 ChangeLog 24805 +SHA256 9a925aece38f704654e22080be8d5d779510cfcb031ddeb9e0c642d96baf72e6 ChangeLog 24805 MISC metadata.xml 352 RMD160 0c1a848023a0dd76c5173c0a2135beed46e90263 SHA1 24f998969c955accd1fd4f3719bdf83d4e9d432b SHA256 f6f6ae15da16a20d5e0ce76563e3e27901e25787131b8784ffe872ffe3ddd034 MD5 bf7284c3e31bd3292a01fa046b3220bb metadata.xml 352 RMD160 0c1a848023a0dd76c5173c0a2135beed46e90263 metadata.xml 352 @@ -233,13 +233,13 @@ SHA256 34a9746ac50c14de6bc2e6383676681b87b0dde42379e8fa8cad2fc5d56b4fd1 files/di MD5 e90002b0ea49566f01d00de55bab0a27 files/digest-bind-9.3.4-r1 723 RMD160 2a25d4a9f6f7e0688054a0da4ada926df2f189dc files/digest-bind-9.3.4-r1 723 SHA256 34a9746ac50c14de6bc2e6383676681b87b0dde42379e8fa8cad2fc5d56b4fd1 files/digest-bind-9.3.4-r1 723 -MD5 a7601db3e24eedf4c3108e1c7df587ff files/digest-bind-9.4.0 470 -RMD160 f8084be93974d89d44f6410f3bae57c8f34d0189 files/digest-bind-9.4.0 470 -SHA256 0729d99d566d077c321e7ec4100c1d4c5b0e0e37e380c2cfb035bb85da6351c4 files/digest-bind-9.4.0 470 +MD5 a7601db3e24eedf4c3108e1c7df587ff files/digest-bind-9.4.0-r1 470 +RMD160 f8084be93974d89d44f6410f3bae57c8f34d0189 files/digest-bind-9.4.0-r1 470 +SHA256 0729d99d566d077c321e7ec4100c1d4c5b0e0e37e380c2cfb035bb85da6351c4 files/digest-bind-9.4.0-r1 470 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.2 (GNU/Linux) -iD8DBQFF5ZlCbwxeDFj+ScoRAmYcAKCZV9SaNxyfLt6AsHVh2j7tvlYuwACfS0FF -PZmvEUbAwJFPlQaDdbAieo4= -=K0hM +iD8DBQFF5+xBbwxeDFj+ScoRAmrxAJ4rnXN/CdO+Yocet4VXt++E4kcDJwCfZ8pP +BKuwGINb5znSZQEteW9TyHE= +=s8yh -----END PGP SIGNATURE----- diff --git a/net-dns/bind/bind-9.4.0-r1.ebuild b/net-dns/bind/bind-9.4.0-r1.ebuild new file mode 100644 index 000000000000..54797119020c --- /dev/null +++ b/net-dns/bind/bind-9.4.0-r1.ebuild @@ -0,0 +1,275 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.4.0-r1.ebuild,v 1.1 2007/03/02 09:21:09 voxus Exp $ + +inherit eutils libtool autotools + +DLZ_VERSION="9.3.3" + +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 + doc? ( mirror://gentoo/dyndns-samples.tbz2 )" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads resolvconf urandom" + +DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g ) + mysql? ( >=virtual/mysql-4.0 ) + odbc? ( >=dev-db/unixODBC-2.2.6 ) + ldap? ( net-nds/openldap ) + idn? ( net-dns/idnkit ) + resolvconf? ( net-dns/resolvconf-gentoo )" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-bind )" + +S="${WORKDIR}/${P/_/}" + +pkg_setup() { + use threads && { + echo + ewarn "If you're in vserver enviroment, you're probably want to" + ewarn "disable threads support because of linux capabilities dependency" + echo + } + + ebegin "Creating named group and user" + enewgroup named 40 + enewuser named 40 -1 /etc/bind named + eend ${?} +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Adjusting PATHs in manpages + for i in 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 + + use dlz && epatch ${FILESDIR}/${P}-dlzbdb-close_cursor.patch + + # should be installed by bind-tools + sed -e "s:nsupdate ::g" -i ${S}/bin/Makefile.in + + WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf || die "eautoreconf failed" + + # bug #151839 + sed \ + -e 's::\n\n#undef SO_BSDCOMPAT:' \ + -i lib/isc/unix/socket.c +} + +src_compile() { + local myconf="" + + use ssl && myconf="${myconf} --with-openssl" + use idn && myconf="${myconf} --with-idn" + + 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" + einfo "the DLZ API." + ewarn "Because of this BIND MUST only run with a single thread when" + ewarn "using the MySQL driver." + echo + myconf="${myconf} --disable-linux-caps --disable-threads" + einfo "Threading support disabled" + epause 10 + else + myconf="${myconf} --enable-linux-caps --enable-threads" + einfo "Threading support enabled" + fi + else + myconf="${myconf} --disable-linux-caps --disable-threads" + fi + + if use urandom; then + myconf="${myconf} --with-randomdev=/dev/urandom" + else + myconf="${myconf} --with-randomdev=/dev/random" + fi + + econf \ + --sysconfdir=/etc/bind \ + --localstatedir=/var \ + --with-libtool \ + `use_enable ipv6` \ + ${myconf} || die "econf failed" + + emake -j1 || die "failed to compile bind" +} + +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 + + # some handy-dandy dynamic dns examples + cd ${D}/usr/share/doc/${PF} + tar pjxf ${DISTFILES}/dyndns-samples.tbz2 + } + + insinto /etc/env.d + newins ${FILESDIR}/10bind.env 10bind + + dodir /etc/bind /var/bind/{pri,sec} + keepdir /var/bind/sec + + insinto /etc/bind ; newins ${FILESDIR}/named.conf-r3 named.conf + + # ftp://ftp.rs.internic.net/domain/named.ca: + insinto /var/bind ; doins ${FILESDIR}/named.ca + + insinto /var/bind/pri + doins ${FILESDIR}/127.zone + newins ${FILESDIR}/localhost.zone-r2 localhost.zone + + cp ${FILESDIR}/named.init-r4 ${T}/named && doinitd ${T}/named + cp ${FILESDIR}/named.confd-r1 ${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 + + # 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} + + use resolvconf && { + exeinto /etc/resolvconf/update.d + newexe ${FILESDIR}/resolvconf.bind bind + } +} + +pkg_postinst() { + if [ ! -f '/etc/bind/rndc.key' ]; then + if [ -c /dev/urandom ]; then + einfo "Using /dev/urandom for generating rndc.key" + /usr/sbin/rndc-confgen -r /dev/urandom -a -u named + echo + else + einfo "Using /dev/random for generating rndc.key" + /usr/sbin/rndc-confgen -a -u named + echo + fi + 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 "\`emerge --config '=${CATEGORY}/${PF}'\`" + 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 root:named ${CHROOT} + chmod 0750 ${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.4.0.ebuild b/net-dns/bind/bind-9.4.0.ebuild deleted file mode 100644 index 355d66283778..000000000000 --- a/net-dns/bind/bind-9.4.0.ebuild +++ /dev/null @@ -1,269 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.4.0.ebuild,v 1.1 2007/02/28 15:02:18 voxus Exp $ - -inherit eutils libtool autotools - -DLZ_VERSION="9.3.3" - -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 - doc? ( mirror://gentoo/dyndns-samples.tbz2 )" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" -IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads resolvconf" - -DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g ) - mysql? ( >=virtual/mysql-4.0 ) - odbc? ( >=dev-db/unixODBC-2.2.6 ) - ldap? ( net-nds/openldap ) - idn? ( net-dns/idnkit ) - resolvconf? ( net-dns/resolvconf-gentoo )" - -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-bind )" - -S="${WORKDIR}/${P/_/}" - -pkg_setup() { - use threads && { - echo - ewarn "If you're in vserver enviroment, you're probably want to" - ewarn "disable threads support because of linux capabilities dependency" - echo - } - - ebegin "Creating named group and user" - enewgroup named 40 - enewuser named 40 -1 /etc/bind named - eend ${?} -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # Adjusting PATHs in manpages - for i in 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 - - use dlz && epatch ${FILESDIR}/${P}-dlzbdb-close_cursor.patch - - # should be installed by bind-tools - sed -e "s:nsupdate ::g" -i ${S}/bin/Makefile.in - - WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf || die "eautoreconf failed" - - # bug #151839 - sed \ - -e 's::\n\n#undef SO_BSDCOMPAT:' \ - -i lib/isc/unix/socket.c -} - -src_compile() { - local myconf="" - - use ssl && myconf="${myconf} --with-openssl" - use idn && myconf="${myconf} --with-idn" - - 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" - einfo "the DLZ API." - ewarn "Because of this BIND MUST only run with a single thread when" - ewarn "using the MySQL driver." - echo - myconf="${myconf} --disable-linux-caps --disable-threads" - einfo "Threading support disabled" - epause 10 - else - myconf="${myconf} --enable-linux-caps --enable-threads" - einfo "Threading support enabled" - fi - else - myconf="${myconf} --disable-linux-caps --disable-threads" - fi - - econf \ - --sysconfdir=/etc/bind \ - --localstatedir=/var \ - --with-libtool \ - `use_enable ipv6` \ - ${myconf} || die "econf failed" - - emake -j1 || die "failed to compile bind" -} - -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 - - # some handy-dandy dynamic dns examples - cd ${D}/usr/share/doc/${PF} - tar pjxf ${DISTFILES}/dyndns-samples.tbz2 - } - - insinto /etc/env.d - newins ${FILESDIR}/10bind.env 10bind - - dodir /etc/bind /var/bind/{pri,sec} - keepdir /var/bind/sec - - insinto /etc/bind ; newins ${FILESDIR}/named.conf-r3 named.conf - - # ftp://ftp.rs.internic.net/domain/named.ca: - insinto /var/bind ; doins ${FILESDIR}/named.ca - - insinto /var/bind/pri - doins ${FILESDIR}/127.zone - newins ${FILESDIR}/localhost.zone-r2 localhost.zone - - cp ${FILESDIR}/named.init-r4 ${T}/named && doinitd ${T}/named - cp ${FILESDIR}/named.confd-r1 ${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 - - # 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} - - use resolvconf && { - exeinto /etc/resolvconf/update.d - newexe ${FILESDIR}/resolvconf.bind bind - } -} - -pkg_postinst() { - if [ ! -f '/etc/bind/rndc.key' ]; then - if [ -c /dev/urandom ]; then - einfo "Using /dev/urandom for generating rndc.key" - /usr/sbin/rndc-confgen -r /dev/urandom -a -u named - echo - else - einfo "Using /dev/random for generating rndc.key" - /usr/sbin/rndc-confgen -a -u named - echo - fi - 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 "\`emerge --config '=${CATEGORY}/${PF}'\`" - 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 root:named ${CHROOT} - chmod 0750 ${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/files/bind-9.4.0-dlzbdb-close_cursor.patch b/net-dns/bind/files/bind-9.4.0-dlzbdb-close_cursor.patch new file mode 100644 index 000000000000..ed71e16db188 --- /dev/null +++ b/net-dns/bind/files/bind-9.4.0-dlzbdb-close_cursor.patch @@ -0,0 +1,11 @@ +--- contrib/dlz/drivers/dlz_bdbhpt_driver.c 2007-03-02 12:02:12.000000000 +0300 ++++ contrib/dlz/drivers/dlz_bdbhpt_driver.c 2007-03-02 12:02:18.000000000 +0300 +@@ -442,7 +442,7 @@ + xfr_cursor->c_close(xfr_cursor); + + if (dns_cursor != NULL) +- dns_cursor->c_close(xfr_cursor); ++ dns_cursor->c_close(dns_cursor); + + return result; + } diff --git a/net-dns/bind/files/bind-9.4.0_rc2-missing_odbc_test.patch b/net-dns/bind/files/bind-9.4.0_rc2-missing_odbc_test.patch deleted file mode 100644 index ead47527451a..000000000000 --- a/net-dns/bind/files/bind-9.4.0_rc2-missing_odbc_test.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- configure.in 2006-07-09 22:00:54.000000000 +0000 -+++ configure.in 2006-07-09 22:01:05.000000000 +0000 -@@ -686,17 +686,7 @@ - fi - done - -- if test -z "`${CC} contrib/sdb/test//test.c -lodbc -o contrib/sdb/test/test.ok 2>&1`"; then - DLZ_ODBC_LIB="-lodbc" -- elif test -z "`${CC} contrib/sdb/test//test.c -liodbc -o contrib/sdb/test/test.ok 2>&1`"; then -- DLZ_ODBC_LIB="-liodbc" -- else -- DLZ_ODBC_LIB="" -- use_dlz_odbc="no" -- AC_MSG_RESULT("no ODBC libraries found") -- fi -- rm -f contrib/sdb/test/test.ok -- - - if test "$use_dlz_odbc" = "yes" - then diff --git a/net-dns/bind/files/digest-bind-9.4.0 b/net-dns/bind/files/digest-bind-9.4.0 deleted file mode 100644 index 5dce4389cdd3..000000000000 --- a/net-dns/bind/files/digest-bind-9.4.0 +++ /dev/null @@ -1,6 +0,0 @@ -MD5 e85347f03f0d841b596422d5252a0869 bind-9.4.0.tar.gz 6333767 -RMD160 09d97d645cfc82e3ec72cf72d041274271b6669a bind-9.4.0.tar.gz 6333767 -SHA256 66f5caf815582fa8c8476bba1663ec9a0f923ea9cfa34bb563371be4ffd14788 bind-9.4.0.tar.gz 6333767 -MD5 2bb12cfcd70284e72fbf9e70e5e2974d dyndns-samples.tbz2 22866 -RMD160 27d5b2d0edb8e1ff16b3f980c38d7af33ccf0c7d dyndns-samples.tbz2 22866 -SHA256 92fb06a92ca99cbbe96b90bcca229ef9c12397db57ae17e199dad9f1218fdbe8 dyndns-samples.tbz2 22866 diff --git a/net-dns/bind/files/digest-bind-9.4.0-r1 b/net-dns/bind/files/digest-bind-9.4.0-r1 new file mode 100644 index 000000000000..5dce4389cdd3 --- /dev/null +++ b/net-dns/bind/files/digest-bind-9.4.0-r1 @@ -0,0 +1,6 @@ +MD5 e85347f03f0d841b596422d5252a0869 bind-9.4.0.tar.gz 6333767 +RMD160 09d97d645cfc82e3ec72cf72d041274271b6669a bind-9.4.0.tar.gz 6333767 +SHA256 66f5caf815582fa8c8476bba1663ec9a0f923ea9cfa34bb563371be4ffd14788 bind-9.4.0.tar.gz 6333767 +MD5 2bb12cfcd70284e72fbf9e70e5e2974d dyndns-samples.tbz2 22866 +RMD160 27d5b2d0edb8e1ff16b3f980c38d7af33ccf0c7d dyndns-samples.tbz2 22866 +SHA256 92fb06a92ca99cbbe96b90bcca229ef9c12397db57ae17e199dad9f1218fdbe8 dyndns-samples.tbz2 22866 -- cgit v1.2.3-65-gdbad