Add two patches for dlz/ldap in bind-9.6.1_p3-r1, bug 238681. Remove "dig" from make...
authorChristian Ruppert <idl0r@gentoo.org>
Wed, 12 May 2010 23:34:43 +0000 (23:34 +0000)
committerChristian Ruppert <idl0r@gentoo.org>
Wed, 12 May 2010 23:34:43 +0000 (23:34 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

net-dns/bind/ChangeLog
net-dns/bind/Manifest
net-dns/bind/bind-9.6.1_p3-r1.ebuild
net-dns/bind/bind-9.7.0_p1.ebuild [moved from net-dns/bind/bind-9.6.1_p3.ebuild with 74% similarity]
net-dns/bind/files/bind-9.6.1-dlz-patch-dollar2.patch [new file with mode: 0644]
net-dns/bind/files/bind-9.6.1-dlz-patch-ldap-url.patch [new file with mode: 0644]
net-dns/bind/files/named.conf-r4 [new file with mode: 0644]

index 0f5da096cad4533bde832f5f8df3ba388124e7ce..026447dcaa66b16b87a93de32eae5e84f55e1d4e 100644 (file)
@@ -1,6 +1,20 @@
 # ChangeLog for net-dns/bind
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.267 2010/05/11 18:28:33 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.268 2010/05/12 23:34:42 idl0r Exp $
+
+*bind-9.7.0_p1 (12 May 2010)
+
+  12 May 2010; Christian Ruppert <idl0r@gentoo.org> -bind-9.6.1_p3.ebuild,
+  bind-9.6.1_p3-r1.ebuild, +files/bind-9.6.1-dlz-patch-dollar2.patch,
+  +files/bind-9.6.1-dlz-patch-ldap-url.patch, +bind-9.7.0_p1.ebuild,
+  +files/named.conf-r4:
+  Add two patches for dlz/ldap in bind-9.6.1_p3-r1, bug 238681. Remove "dig"
+  from make, its installed by bind-tools. Remove bind-9.6.1_p3. Version bump
+  to 9.7.0_p1, bug 302361. Disable geoip support for now, since its not yet
+  ready for 9.7.x. Some clean up. Fix permissions bug 174084 and bug 301275.
+  Don't add a syslog rule automatically to the syslog-ng.conf, use elog now.
+  Add a new named.conf-r4 which contains a lot of new stuff and improvements
+  but see yourself.
 
   11 May 2010; Christian Ruppert <idl0r@gentoo.org> files/named.conf-r3:
   Fix named.ca in named.conf-r3 as well, thanks to cilly
index 15dc573946db45f3028f190af0b4e128b3e12d6c..cab411400aefbcdc99233ad7d656cf9b6f31ef19 100644 (file)
@@ -4,30 +4,34 @@ Hash: SHA1
 AUX 10bind.env 27 RMD160 872245707b4f72a212cda162c59495744d77a6e3 SHA1 7b8c1abd5910bb7a07c6b7c820c2b34a534b2593 SHA256 5ad6a4402372b43809618051873b63646746f400447bba30dc4dfecd028e3650
 AUX 127.zone-r1 533 RMD160 2795c6c27912a73ac45582f33de3182382db3a5d SHA1 87fcb2b96db4cef99d25fa87759dd32ea2ac5559 SHA256 0fa4c294640d4191710647d1b18a2099f22ff674b3a35e6e81ff929f921da626
 AUX bind-9.4.0-dlzbdb-close_cursor.patch 338 RMD160 3c92206a6c77ac8e9ea854dfc22fda5753b653a9 SHA1 903383e2b142d76a73030c27f2cdab8d100df150 SHA256 4a004d72565d6db683b879851ae8dfaddcf1b39fd0f97a995d9c5d22d72c6395
+AUX bind-9.6.1-dlz-patch-dollar2.patch 3563 RMD160 d51fc7711d18b323fe2dca647832ed2b1d73070b SHA1 8de64d8899103591cccc6b956708330ef9f41ac1 SHA256 92a8d51397306d000f4c234ef8b468e250be73113523f3f6aa272121d1a7efdf
+AUX bind-9.6.1-dlz-patch-ldap-url.patch 533 RMD160 b799e51cca0db1d34fff8bcb3efe6dc060cf74f4 SHA1 6a0a6e7bbad2fc4c9605b3e9bbec0ef7c65b79dc SHA256 e284125c4d288e76e4749177915d5a36b60219dbee87fc13fef981943b49bdfa
 AUX bind-9.6.1-parallel.patch 386 RMD160 a48bdcf7fe020e55c64a692852b6ca71849d6a1c SHA1 cfbf5b9b9bf24cb564eef60716cfa19a89c05c9a SHA256 bc4d39f01190e890590a9841ae682bc68062a1202f67e649a90712ab19f89428
 AUX bind-dlzmysql5-reconnect.patch 1842 RMD160 687f6128b6511dbeecdfc81b197520b1afd74005 SHA1 7b9b8e1b85f1344e4b5d8566ab868fcb1e87a049 SHA256 7376ac37c2d3fbcf5d8e886008639bdbe642f44c9021f435af370bddd3f03bd4
 AUX localhost.zone-r3 426 RMD160 b2dfe76923695e6eac49234b7e7f90fef4d1838e SHA1 b84babc535466cacc7001e4c6eb21e22ae11b22d SHA256 3f39e9b5be72435e961cd6f5acdfe396b05640bf370969acf918a939575122bc
 AUX named.cache 2941 RMD160 c29f47291496e67e72c129db488d07172fe244e6 SHA1 b1575428e8b5f513469a90a32cf163e8db46cab5 SHA256 35f7fcf2b177678cf362af7ac942f7f1a1c102c045dc3844991a411fc4c5d277
 AUX named.conf-r3 1317 RMD160 dace9861fb15a7ad415b23f2452fca5eb3ef2604 SHA1 02385c388d4ca99f68354c83f9e4cae2c2bcb034 SHA256 f431592c2441a27205e1112dcff7b9b07655007c460a309b7968c97688c8e7f4
+AUX named.conf-r4 4527 RMD160 3343dc00be06c04a5b8855ef041f140f64d4756f SHA1 23d07a195fd278fa6753c0ce768cb35e41bcdc23 SHA256 94211ebec3385ac1447db556e1386fdce3b54cfdb1d7105505e1233f63136a91
 AUX named.confd-r2 479 RMD160 0a0452bf9bb6f18d4628ee72abe82a52d484a2cb SHA1 d0b0e2f5d72d43862c5aaff9a226fd8599992323 SHA256 bae05257852ecbc7f66bd30e452162f15b6f6e8c3fc170fb6dfdfa7d22361915
 AUX named.confd-r3 648 RMD160 bb184a1f4d7476e874df37dd0b60638d6da608cb SHA1 21987e0fd4419276efb2d9551d2bde18eece6fb8 SHA256 6daf6f9eddc822eb434dcc651627f3dd8bdfbfa270b1b089724a87dc5fcc559a
 AUX named.init-r5 1620 RMD160 37279362e437241188a07e5f274730e68645827e SHA1 00a14819a322b391183084c79cc9a4dc04d0d484 SHA256 07fb9d653f086319680d04abde0218495ed09d3528087257788bf294252a0bad
 AUX named.init-r7 2731 RMD160 3c6c7ea44bcf355862fdd1afb3bdbd03a9c95c71 SHA1 3745627a36e0c0cabdc9f632a8a39d7694c1d210 SHA256 3ac9f6f8fef5e29e77eb9520f34472775683dfa0f809ff01b03a50d03fad38d9
 DIST bind-9.4.3-P5.tar.gz 6447497 RMD160 680146e4120aaa89f2899d4205c17fee5e9e4aa9 SHA1 9b7f0bd84be0f91fe1085cedc91c7c14f1e0f97a SHA256 7ca93553d1f488af1b21ab26f0297be5c7b7b5920d29ad9743382bf3623b2939
 DIST bind-9.6.1-P3.tar.gz 6508797 RMD160 ff444f39d7cf9673497e43c18c40dd77af121851 SHA1 9cb2bfb933083ab4e85aa884ca0dff7b0ae5cfb2 SHA256 869f5079a900b280c051d4c9cf7eefea000a0e70ccec9e6fcddd79e3caa10198
+DIST bind-9.7.0-P1.tar.gz 7125947 RMD160 200aa067596e09f6f06e8830d0a46f02d324db26 SHA1 6713d65c1455845a9ced6cb4bd705a2575986e42 SHA256 d84b63f71bfc249e5bf1a14ba34af37981b2ee6068d1224066062cfa5d086fcf
 DIST bind-geoip-1.3-readme.txt 10040 RMD160 073956324ed4780e0e0cdbf40ae259f85ebef9d2 SHA1 e13ea2f458adfed3f1a20f9fe3eb2bfd484fc0b0 SHA256 380ce89f1a614f46571ad59bddf0f268275691aa2d7a7a7bf1c2a3ef4d26e845
 DIST bind-geoip-1.3.patch 54070 RMD160 5d01a20104b572588507aea4b8f6cbf66f68a973 SHA1 8a465d04d5c2d9c7cb881c3331a64e61077e1e3a SHA256 126db2f6e603f0dbe102b3ddfda85e0243fae314b40bb16dce2fd7d4d4bb93b4
 DIST bind-sdb-ldap-1.1.0.tar.bz2 5883 RMD160 ec2f684f278e5fa72158486a14dfce3005a62602 SHA1 fae539a29615fda56a2dcb55a1e01d335835b980 SHA256 afe9cc6a99c20f1dc1929b0a30ff815b0aac509a6c12f8df432853c856d35754
 DIST dyndns-samples.tbz2 22866 RMD160 27d5b2d0edb8e1ff16b3f980c38d7af33ccf0c7d SHA1 0a62e9458d0e16b67a3a2f63ea485ce969f1fb4d SHA256 92fb06a92ca99cbbe96b90bcca229ef9c12397db57ae17e199dad9f1218fdbe8
 EBUILD bind-9.4.3_p5.ebuild 9208 RMD160 6e7ff13da934a07ba7973e886b0ac03aa7033fb0 SHA1 8320223ec6b82e8988ca23f994457175c25caef0 SHA256 ae0e300cc78a666ef49c7f84432c14f4238b7017e7b579054e54397c28946e3e
-EBUILD bind-9.6.1_p3-r1.ebuild 9616 RMD160 39b3213c366a378f5f62d8b6dca5b5ddcefc7fc1 SHA1 de99839c8dd8315deca115875f41f6b3ab7f823b SHA256 29ad94be149e79dbfe8265454da0ae1af73a018c8716b0f13767b6daab58e5d2
-EBUILD bind-9.6.1_p3.ebuild 9251 RMD160 ad5f969be171994e0702f553e376587228eea224 SHA1 6c5017947d6836a987a7bac0e2eab976432bf4b2 SHA256 b1b80db35d087dc977e7fcfa91dd41568fc89597f2cf78bfeee1796e744849d3
-MISC ChangeLog 43192 RMD160 89182c726d5992d017ca0583d1c1abe14be7f474 SHA1 1ac216170b8cf8856c7e879d8dc3906e72fecaef SHA256 279707c1aa73804df7b457aa49c859ef62445e45878a9f901ac989fc67551d28
+EBUILD bind-9.6.1_p3-r1.ebuild 9786 RMD160 93bc22fc3ff7e6e56547480792088ad1508616ab SHA1 c9290bb280e0ec4f714703d7f0423d0a3c5ab278 SHA256 40e5079f60ba90922354267324ba4be6c4e81d4ed6813ba61e6a715434c45696
+EBUILD bind-9.7.0_p1.ebuild 10266 RMD160 237584243580ef0d77aa40827c87d275e2b24cd6 SHA1 0f831547878c755b3e9baf717f1204f74bd19f77 SHA256 3b833c12768e6e85abfd7fc6b8aa6cb207b9166402dd3c10947b6efe0e664493
+MISC ChangeLog 43942 RMD160 9e9bfd27dee2c62418e63a80413cfe4306c49b88 SHA1 8ac72659d437f43eb30bc9372c9225c31d3a1072 SHA256 5d7ba0080607d0b07a66ddcb4936105c43714ed839972791e8d0c7253443166f
 MISC metadata.xml 647 RMD160 63aeb182631d45c774bdc08f11901147028f6d7c SHA1 9aff80992005daa758d373c4e3311ff8c3ae3ef9 SHA256 9417c62e0e5817e26d36ab5efd87f126781dbf445d9a1beb3abb899b8cb4806a
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.15 (GNU/Linux)
 
-iEYEARECAAYFAkvqMTgACgkQ/ejvha5XGaNvLwCfbulyb5lSVVy+7it/+r4xSHsH
-smAAn2nZ/eglt7HSd7ZcrbhEq7hz2VAU
-=akpo
+iEYEARECAAYFAkvrOxkACgkQixe2jn+ufTgG6ACdHuA8VPnXLMITwvWVTGqmpMov
+cjYAn0kZMkW0FV7eePPNDnVwxvQq/3HS
+=7pHC
 -----END PGP SIGNATURE-----
index 8ec83b6da03c1632be681b2c9978987f690ba849..647035e5d4d84291fb00509a18c90929b504142c 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.6.1_p3-r1.ebuild,v 1.2 2010/05/10 13:36:31 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.6.1_p3-r1.ebuild,v 1.3 2010/05/12 23:34:42 idl0r Exp $
 
 EAPI="2"
 
@@ -72,14 +72,22 @@ src_prepare() {
                        "${i}" || die "sed failed, ${i} doesn't exist"
        done
 
-       use dlz && epatch "${FILESDIR}"/${PN}-9.4.0-dlzbdb-close_cursor.patch
+       if use dlz; then
+               epatch "${FILESDIR}"/${PN}-9.4.0-dlzbdb-close_cursor.patch
 
-       # bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse
-       # (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/)
-       use dlz && use mysql && has_version ">=dev-db/mysql-5" && epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch
+               # bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse
+               # (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/)
+               use mysql && has_version ">=dev-db/mysql-5" && epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch
+
+               if use ldap; then
+                       # bug 238681
+                       epatch "${FILESDIR}/bind-9.6.1-dlz-patch-ldap-url.patch" \
+                               "${FILESDIR}/bind-9.6.1-dlz-patch-dollar2.patch"
+               fi
+       fi
 
        # should be installed by bind-tools
-       sed -i -e "s:nsupdate ::g" bin/Makefile.in || die
+       sed -i -r -e "s:(nsupdate|dig) ::g" bin/Makefile.in || die
 
        # sdb-ldap patch as per  bug #160567
        # Upstream URL: http://bind9-ldap.bayour.com/
similarity index 74%
rename from net-dns/bind/bind-9.6.1_p3.ebuild
rename to net-dns/bind/bind-9.7.0_p1.ebuild
index cc972ab3c0e413ba5db8a04ecb8a1989c3548f1d..e036fab028bfee4cda711566ffc9e97a1a8fee8c 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.6.1_p3.ebuild,v 1.2 2010/05/10 13:36:31 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.7.0_p1.ebuild,v 1.1 2010/05/12 23:34:42 idl0r Exp $
 
-EAPI="2"
+EAPI="3"
 
 inherit eutils autotools toolchain-funcs flag-o-matic
 
@@ -11,17 +11,23 @@ MY_P="${PN}-${MY_PV}"
 
 SDB_LDAP_VER="1.1.0"
 
+#GEOIP_PV=1.3
+#GEOIP_SRC_URI_BASE="http://bind-geoip.googlecode.com/"
+#GEOIP_P="bind-geoip-${GEOIP_PV}"
+
 DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server"
 HOMEPAGE="http://www.isc.org/software/bind"
 SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz
        sdb-ldap? ( mirror://gentoo/bind-sdb-ldap-${SDB_LDAP_VER}.tar.bz2 )
        doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
+#      geoip? ( ${GEOIP_SRC_URI_BASE}/files/${GEOIP_P}-readme.txt
+#                       ${GEOIP_SRC_URI_BASE}/files/${GEOIP_P}.patch )"
 
 LICENSE="as-is"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
 IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads
-       resolvconf urandom sdb-ldap xml"
+       resolvconf urandom sdb-ldap xml" # geoip"
 
 DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g )
        mysql? ( >=virtual/mysql-4.0 )
@@ -31,6 +37,7 @@ DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g )
        postgres? ( virtual/postgresql-base )
        threads? ( >=sys-libs/libcap-2.1.0 )
        xml? ( dev-libs/libxml2 )"
+#      geoip? ( >=dev-libs/geoip-1.4.6 )"
 
 RDEPEND="${DEPEND}
        selinux? ( sec-policy/selinux-bind )
@@ -65,19 +72,29 @@ src_prepare() {
                        "${i}" || die "sed failed, ${i} doesn't exist"
        done
 
-       use dlz && epatch "${FILESDIR}"/${PN}-9.4.0-dlzbdb-close_cursor.patch
+       if use dlz; then
+               epatch "${FILESDIR}"/${PN}-9.4.0-dlzbdb-close_cursor.patch
+
+               # bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse
+               # (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/)
+               use mysql && has_version ">=dev-db/mysql-5" && epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch
 
-       # bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse
-       # (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/)
-       use dlz && use mysql && has_version ">=dev-db/mysql-5" && epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch
+               if use ldap; then
+                       # bug 238681
+                       epatch "${FILESDIR}/bind-9.6.1-dlz-patch-ldap-url.patch" \
+                               "${FILESDIR}/bind-9.6.1-dlz-patch-dollar2.patch"
+               fi
+       fi
 
        # should be installed by bind-tools
-       sed -i -e "s:nsupdate ::g" bin/Makefile.in || die
+       sed -i -r -e "s:(nsupdate|dig) ::g" bin/Makefile.in || die
 
        # sdb-ldap patch as per  bug #160567
        # Upstream URL: http://bind9-ldap.bayour.com/
        use sdb-ldap && epatch "${WORKDIR}"/sdb-ldap/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
 
+#      use geoip && epatch "${DISTDIR}"/${GEOIP_P}.patch
+
        # bug #220361
        rm {aclocal,libtool}.m4
        WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf
@@ -85,7 +102,7 @@ src_prepare() {
        # bug #151839
        sed -i -e \
                's:struct isc_socket {:#undef SO_BSDCOMPAT\n\nstruct isc_socket {:' \
-               lib/isc/unix/socket.c || die
+               lib/isc/include/isc/socket.h || die
 
        # remove useless c++ checks
        epunt_cxx
@@ -99,8 +116,8 @@ src_configure() {
                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"
+               use ldap && myconf="${myconf} --with-dlz-ldap"
+               use odbc && myconf="${myconf} --with-dlz-odbc"
        }
 
        if use threads; then
@@ -134,7 +151,8 @@ src_configure() {
 
        # bug #158664
        gcc-specs-ssp && replace-flags -O[23s] -O
-       export BUILD_CC="${CBUILD}-gcc"
+
+       export BUILD_CC=$(tc-getBUILD_CC)
        econf \
                --sysconfdir=/etc/bind \
                --localstatedir=/var \
@@ -149,10 +167,10 @@ src_configure() {
 src_install() {
        emake DESTDIR="${D}" install || die
 
-       dodoc CHANGES FAQ KNOWN-DEFECTS README || die
+       dodoc CHANGES FAQ README || die
 
        if use idn; then
-               dodoc README.idnkit || die
+               dodoc contrib/idn/README.idnkit || die
        fi
 
        if use doc; then
@@ -180,12 +198,10 @@ src_install() {
                tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
        fi
 
-       newenvd "${FILESDIR}"/10bind.env 10bind || die
-
-       keepdir /var/bind/sec
+#      use geoip && dodoc "${DISTDIR}"/${GEOIP_P}-readme.txt
 
        insinto /etc/bind
-       newins "${FILESDIR}"/named.conf-r3 named.conf || die
+       newins "${FILESDIR}"/named.conf-r4 named.conf || die
 
        # ftp://ftp.rs.internic.net/domain/named.cache:
        insinto /var/bind
@@ -198,34 +214,43 @@ src_install() {
        newinitd "${FILESDIR}"/named.init-r7 named || die
        newconfd "${FILESDIR}"/named.confd-r3 named || die
 
-       dosym /var/bind/named.cache /var/bind/root.cache
-       dosym /var/bind/pri /etc/bind/pri
-       dosym /var/bind/sec /etc/bind/sec
+       newenvd "${FILESDIR}"/10bind.env 10bind || die
 
        # 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,host,nslookup}.1*
        rm -f "${D}"/usr/share/man/man8/{dnssec-keygen,nsupdate}.8*
        rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate}
        rm -f "${D}"/usr/sbin/{dig,host,nslookup,dnssec-keygen,nsupdate}
+
+       dosym /var/bind/named.cache /var/bind/root.cache || die
+       dosym /var/bind/pri /etc/bind/pri || die
+       dosym /var/bind/sec /etc/bind/sec || die
+       keepdir /var/bind/sec
+
+       dodir /var/{run,log}/named || die
+
+       fowners root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri}
+       fowners root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}
+       fperms 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}
+       fperms 0750 /etc/bind /var/bind/{pri,sec}
+       fperms 0770 /var/{run,log}/named /var/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
+                       /usr/sbin/rndc-confgen -r /dev/urandom -a
                        echo
                else
                        einfo "Using /dev/random for generating rndc.key"
-                       /usr/sbin/rndc-confgen -a -u named
+                       /usr/sbin/rndc-confgen -a
                        echo
                fi
+               chown root:named /etc/bind/rndc.key
+               chmod 0640 /etc/bind/rndc.key
        fi
 
-       install -d -o named -g named "${ROOT}"/var/run/named \
-               "${ROOT}"/var/bind/{pri,sec} "${ROOT}"/var/log/named
-       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"
@@ -266,28 +291,30 @@ pkg_config() {
        fi
 
        if [ ! "$EXISTS" = yes ]; then
-               einfo ; einfon "Setting up the chroot directory..."
+               echo; einfo "Setting up the chroot directory..."
 
-               mkdir -m 750 -p ${CHROOT}
-               mkdir -p ${CHROOT}/{dev,proc,etc/bind,var/{run,log}/named,var/bind}
-               chown -R named:named ${CHROOT}
-               chown root:named ${CHROOT}
+               mkdir -m 0750 -p ${CHROOT}
+               mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/{run,log}}
+               mkdir -m 0750 ${CHROOT}/etc/bind
+               mkdir -m 0770 ${CHROOT}/var/{bind,{run,log}/named}
+               chown root:named ${CHROOT} ${CHROOT}/var/{bind,{run,log}/named} ${CHROOT}/etc/bind
 
                cp /etc/localtime ${CHROOT}/etc/localtime
 
                mknod ${CHROOT}/dev/zero c 1 5
-               chmod 666 ${CHROOT}/dev/zero
+               chmod 0666 ${CHROOT}/dev/zero
 
                if use urandom; then
                        mknod ${CHROOT}/dev/urandom c 1 9
-                       chmod 666 ${CHROOT}/dev/urandom
+                       chmod 0666 ${CHROOT}/dev/urandom
                else
                        mknod ${CHROOT}/dev/random c 1 8
-                       chmod 666 ${CHROOT}/dev/random
+                       chmod 0666 ${CHROOT}/dev/random
                fi
 
                if [ -f '/etc/syslog-ng/syslog-ng.conf' ]; then
-                       echo "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" >>/etc/syslog-ng/syslog-ng.conf
+                       elog "You should add the following line to your syslog-ng.conf:"
+                       elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
                fi
 
                grep -q "^#[[:blank:]]\?CHROOT" /etc/conf.d/named ; RETVAL=$?
diff --git a/net-dns/bind/files/bind-9.6.1-dlz-patch-dollar2.patch b/net-dns/bind/files/bind-9.6.1-dlz-patch-dollar2.patch
new file mode 100644 (file)
index 0000000..94d294b
--- /dev/null
@@ -0,0 +1,104 @@
+*** bind-9.6.1/contrib/dlz/drivers/sdlz_helper.c.realorig      2008-01-27 15:46:49.000000000 +0100
+--- bind-9.6.1/contrib/dlz/drivers/sdlz_helper.c       2008-01-27 15:46:49.000000000 +0100
+***************
+*** 181,187 ****
+               tseg->direct = isc_boolean_true;
+               tseg->strlen = strlen(tseg->sql);
+  
+!              /* check if we encountered "%zone%" token */
+               if (strcasecmp(tseg->sql, "zone") == 0) {
+                       /*
+                        * we don't really need, or want the "zone"
+--- 181,187 ----
+               tseg->direct = isc_boolean_true;
+               tseg->strlen = strlen(tseg->sql);
+  
+!              /* check if we encountered "$zone$" token */
+               if (strcasecmp(tseg->sql, "zone") == 0) {
+                       /*
+                        * we don't really need, or want the "zone"
+***************
+*** 194,200 ****
+                       /* tseg->sql points in-directly to a string */
+                       tseg->direct = isc_boolean_false;
+                       foundzone = isc_boolean_true;
+!                      /* check if we encountered "%record%" token */
+               } else if (strcasecmp(tseg->sql, "record") == 0) {
+                       /*
+                        * we don't really need, or want the "record"
+--- 194,200 ----
+                       /* tseg->sql points in-directly to a string */
+                       tseg->direct = isc_boolean_false;
+                       foundzone = isc_boolean_true;
+!                      /* check if we encountered "$record$" token */
+               } else if (strcasecmp(tseg->sql, "record") == 0) {
+                       /*
+                        * we don't really need, or want the "record"
+***************
+*** 207,213 ****
+                       /* tseg->sql points in-directly poinsts to a string */
+                       tseg->direct = isc_boolean_false;
+                       foundrecord = isc_boolean_true;
+!                      /* check if we encountered "%client%" token */
+               } else if (strcasecmp(tseg->sql, "client") == 0) {
+                       /*
+                        * we don't really need, or want the "client"
+--- 207,213 ----
+                       /* tseg->sql points in-directly poinsts to a string */
+                       tseg->direct = isc_boolean_false;
+                       foundrecord = isc_boolean_true;
+!                      /* check if we encountered "$client$" token */
+               } else if (strcasecmp(tseg->sql, "client") == 0) {
+                       /*
+                        * we don't really need, or want the "client"
+***************
+*** 235,241 ****
+               /* Write error message to log */
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+!                            "Required token %%client%% not found.");
+               result = ISC_R_FAILURE;
+               goto flag_fail;
+       }
+--- 235,241 ----
+               /* Write error message to log */
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+!                            "Required token $client$ not found.");
+               result = ISC_R_FAILURE;
+               goto flag_fail;
+       }
+***************
+*** 245,251 ****
+               /* Write error message to log */
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+!                            "Required token %%record%% not found.");
+               result = ISC_R_FAILURE;
+               goto flag_fail;
+       }
+--- 245,251 ----
+               /* Write error message to log */
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+!                            "Required token $record$ not found.");
+               result = ISC_R_FAILURE;
+               goto flag_fail;
+       }
+***************
+*** 255,261 ****
+               /* Write error message to log */
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+!                            "Required token %%zone%% not found.");
+               result = ISC_R_FAILURE;
+               goto flag_fail;
+       }
+--- 255,261 ----
+               /* Write error message to log */
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+!                            "Required token $zone$ not found.");
+               result = ISC_R_FAILURE;
+               goto flag_fail;
+       }
diff --git a/net-dns/bind/files/bind-9.6.1-dlz-patch-ldap-url.patch b/net-dns/bind/files/bind-9.6.1-dlz-patch-ldap-url.patch
new file mode 100644 (file)
index 0000000..d67ca11
--- /dev/null
@@ -0,0 +1,17 @@
+--- bind-9.6.1/contrib/dlz/drivers/sdlz_helper.c.orig
++++ bind-9.6.1/contrib/dlz/drivers/sdlz_helper.c
+@@ -166,12 +166,12 @@
+               ISC_LIST_APPEND(*tql, tseg, link);
+ 
+               /*
+-               * split string at the first "%". set query segment to
++               * split string at the first "$". set query segment to
+                * left portion
+                */
+               tseg->sql = isc_mem_strdup(mctx,
+                                          isc_string_separate(&right_str,
+-                                                             "%"));
++                                                             "$"));
+               if (tseg->sql == NULL) {
+                       /* no memory, clean everything up. */
+                       result = ISC_R_NOMEMORY;
diff --git a/net-dns/bind/files/named.conf-r4 b/net-dns/bind/files/named.conf-r4
new file mode 100644 (file)
index 0000000..58df939
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+ * Refer to the named.conf(5) and named(8) man pages, and the documentation
+ * in /usr/share/doc/bind-9 for more details.
+ * Online versions of the documentation can be found here:
+ * http://www.isc.org/software/bind/documentation
+ *
+ * If you are going to set up an authoritative server, make sure you
+ * understand the hairy details of how DNS works. Even with simple mistakes,
+ * you can break connectivity for affected parties, or cause huge amounts of
+ * useless Internet traffic.
+ */
+
+acl "xfer" {
+       /* Allow no transfers. If we have other name servers, place them here. */
+       //127.0.0.1/32;
+       //::1/128;
+       "none";
+};
+
+/* 
+ * You might put in here some ips which are allowed to use the cache or
+ * recursive queries
+ */
+acl "trusted" {
+       127.0.0.0/8;
+       ::1/128;
+};
+
+options {
+       directory "/var/bind";
+       pid-file "/var/run/named/named.pid";
+
+       /* https://www.isc.org/solutions/dlv */
+       bindkeys-file "/etc/bind/bind.keys";
+
+       listen-on-v6 { none; };
+       listen-on { 127.0.0.1; };
+
+       allow-query {
+               /*
+                * Accept queries from our "trusted" ACL.  We will
+                * allow anyone to query our master zones below.
+                * This prevents us from becoming a free DNS server
+                * to the masses.
+                */
+               trusted;
+       };
+
+       allow-query-cache {
+               /* Use the cache for the "trusted" ACL. */
+               trusted;
+       };
+
+       allow-transfer {
+               /*
+                * Zone tranfers limited to members of the
+                * "xfer" ACL (e.g. secondary nameserver).
+                */
+               xfer;
+       };
+
+/*
+ * If you've got a DNS server around at your upstream provider, enter its
+ * IP address here, and enable the line below. This will make you benefit
+ * from its cache, thus reduce overall DNS traffic in the Internet.
+ * 
+ * Uncomment the following lines to turn on DNS forwarding, and change
+ *  and/or update the forwarding ip address(es):
+ */
+/*
+       forward first;
+       forwarders {
+       //      123.123.123.123;        // Your ISP NS
+       //      124.124.124.124;        // Your ISP NS
+               4.2.2.1;                // Level3 Public DNS
+               4.2.2.2;                // Level3 Public DNS
+               8.8.8.8;                // Google Open DNS
+               8.8.4.4;                // Google Open DNS
+       };
+
+*/
+
+       //dnssec-enable yes;
+
+       /* if you have problems and are behind a firewall: */
+       //query-source address * port 53;
+};
+
+logging {
+       channel default_log {
+               file "/var/log/named/named.log" versions 5 size 50M;
+               print-time yes;
+               print-severity yes;
+               print-category yes;
+       };
+
+       category default { default_log; };
+       category general { default_log; };
+};
+
+include "/etc/bind/rndc.key";
+controls {
+       inet 127.0.0.1 port 953 allow { 127.0.0.1/32; ::1/128; } keys { "rndc-key"; };
+};
+
+
+view "internal" in {
+       /*
+        * Our internal (trusted) view. We permit the internal networks
+        * to freely access this view. We perform recursion for our
+        * internal hosts, and retrieve data from the cache for them.
+        */
+
+       match-clients { trusted; };
+       recursion yes;
+       additional-from-auth yes;
+       additional-from-cache yes;
+
+       zone "." in {
+               type hint;
+               file "/var/bind/root.cache";
+       };
+
+       zone "localhost" IN {
+               type master;
+               file "pri/localhost.zone";
+               allow-update { none; };
+               notify no;
+       };
+
+       zone "127.in-addr.arpa" IN {
+               type master;
+               file "pri/127.zone";
+               allow-update { none; };
+               notify no;
+       };
+};
+
+view "public" in {
+       /*
+        * Our external (untrusted) view. We permit any client to access
+        * portions of this view. We do not perform recursion or cache
+        * access for hosts using this view.
+        */
+
+       match-clients { any; };
+       recursion no;
+       additional-from-auth no;
+       additional-from-cache no;
+
+       zone "." in {
+               type hint;
+               file "/var/bind/root.cache";
+       };
+
+       //zone "YOUR-DOMAIN.TLD" {
+       //      type master;
+       //      file "/var/bind/pri/YOUR-DOMAIN.TLD.zone";
+       //      allow-query { any; };
+       //};
+
+       //zone "YOUR-SLAVE.TLD" {
+       //      type slave;
+       //      file "/var/bind/sec/YOUR-SLAVE.TLD.zone";
+       //      masters { <MASTER>; };
+
+       //      /* Anybody is allowed to query but transfer should be controlled by the master. */
+       //      allow-query { any; };
+       //      allow-transfer { none; };
+
+       //      /* The master should be the only one who notifies the slaves, shouldn't it? */
+       //      allow-notify { <MASTER>; };
+       //      notify no;
+       //};
+
+       /*
+        * Briefly, a zone which has been declared delegation-only will be effectively
+        * limited to containing NS RRs for subdomains, but no actual data beyond its
+        * own apex (for example, its SOA RR and apex NS RRset). This can be used to
+        * filter out "wildcard" or "synthesized" data from NAT boxes or from
+        * authoritative name servers whose undelegated (in-zone) data is of no
+        * interest.
+        * See http://www.isc.org/products/BIND/delegation-only.html for more info
+        */
+
+       //zone "COM" { type delegation-only; };
+       //zone "NET" { type delegation-only; };
+};