Gentoo Archives: gentoo-commits

From: "Christian Ruppert (idl0r)" <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-dns/bind: ChangeLog bind-9.9.0.ebuild bind-9.8.1_p1.ebuild
Date: Wed, 29 Feb 2012 19:06:04
Message-Id: 20120229190551.9256C2004B@flycatcher.gentoo.org
1 idl0r 12/02/29 19:05:51
2
3 Modified: ChangeLog bind-9.8.1_p1.ebuild
4 Added: bind-9.9.0.ebuild
5 Log:
6 Version bump to 9.9.0, also fixes bug 405251.
7
8 (Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.371 net-dns/bind/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?rev=1.371&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?rev=1.371&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?r1=1.370&r2=1.371
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v
20 retrieving revision 1.370
21 retrieving revision 1.371
22 diff -u -r1.370 -r1.371
23 --- ChangeLog 23 Feb 2012 20:24:39 -0000 1.370
24 +++ ChangeLog 29 Feb 2012 19:05:51 -0000 1.371
25 @@ -1,6 +1,12 @@
26 # ChangeLog for net-dns/bind
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.370 2012/02/23 20:24:39 ranger Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.371 2012/02/29 19:05:51 idl0r Exp $
30 +
31 +*bind-9.9.0 (29 Feb 2012)
32 +
33 + 29 Feb 2012; Christian Ruppert <idl0r@g.o> bind-9.8.1_p1.ebuild,
34 + +bind-9.9.0.ebuild:
35 + Version bump to 9.9.0, also fixes bug 405251.
36
37 23 Feb 2012; Brent Baude <ranger@g.o> bind-9.8.1_p1.ebuild:
38 Marking bind-9.8.1_p1 ppc for bug 405149
39
40
41
42 1.8 net-dns/bind/bind-9.8.1_p1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.8.1_p1.ebuild?rev=1.8&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.8.1_p1.ebuild?rev=1.8&content-type=text/plain
46 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.8.1_p1.ebuild?r1=1.7&r2=1.8
47
48 Index: bind-9.8.1_p1.ebuild
49 ===================================================================
50 RCS file: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.8.1_p1.ebuild,v
51 retrieving revision 1.7
52 retrieving revision 1.8
53 diff -u -r1.7 -r1.8
54 --- bind-9.8.1_p1.ebuild 23 Feb 2012 20:24:39 -0000 1.7
55 +++ bind-9.8.1_p1.ebuild 29 Feb 2012 19:05:51 -0000 1.8
56 @@ -1,6 +1,6 @@
57 # Copyright 1999-2012 Gentoo Foundation
58 # Distributed under the terms of the GNU General Public License v2
59 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.8.1_p1.ebuild,v 1.7 2012/02/23 20:24:39 ranger Exp $
60 +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.8.1_p1.ebuild,v 1.8 2012/02/29 19:05:51 idl0r Exp $
61
62 # Re dlz/mysql and threads, needs to be verified..
63 # MySQL uses thread local storage in its C api. Thus MySQL
64 @@ -42,7 +42,7 @@
65 SLOT="0"
66 KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
67 IUSE="berkdb caps dlz doc geoip gost gssapi idn ipv6 ldap mysql odbc pkcs11 postgres rpz sdb-ldap
68 -selinux ssl threads urandom xml"
69 +selinux ssl static-libs threads urandom xml"
70
71 REQUIRED_USE="postgres? ( dlz )
72 berkdb? ( dlz )
73 @@ -168,6 +168,7 @@
74 $(use_with pkcs11) \
75 $(use_enable caps linux-caps) \
76 $(use_with gost) \
77 + $(use_enable static-libs static) \
78 ${myconf}
79
80 # bug #151839
81
82
83
84 1.1 net-dns/bind/bind-9.9.0.ebuild
85
86 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.9.0.ebuild?rev=1.1&view=markup
87 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.9.0.ebuild?rev=1.1&content-type=text/plain
88
89 Index: bind-9.9.0.ebuild
90 ===================================================================
91 # Copyright 1999-2012 Gentoo Foundation
92 # Distributed under the terms of the GNU General Public License v2
93 # $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.9.0.ebuild,v 1.1 2012/02/29 19:05:51 idl0r Exp $
94
95 # Re dlz/mysql and threads, needs to be verified..
96 # MySQL uses thread local storage in its C api. Thus MySQL
97 # requires that each thread of an application execute a MySQL
98 # thread initialization to setup the thread local storage.
99 # This is impossible to do safely while staying within the DLZ
100 # driver API. This is a limitation caused by MySQL, and not the DLZ API.
101 # Because of this BIND MUST only run with a single thread when
102 # using the MySQL driver.
103
104 EAPI="4"
105
106 inherit eutils autotools toolchain-funcs flag-o-matic multilib db-use
107
108 MY_PV="${PV/_p/-P}"
109 MY_PV="${MY_PV/_rc/rc}"
110 MY_P="${PN}-${MY_PV}"
111
112 SDB_LDAP_VER="1.1.0-fc14"
113
114 # bind-9.8.0-P1-geoip-1.3.patch
115 GEOIP_PV=1.3
116 #GEOIP_PV_AGAINST="${MY_PV}"
117 GEOIP_PV_AGAINST="9.8.0-P1"
118 GEOIP_P="bind-${GEOIP_PV_AGAINST}-geoip-${GEOIP_PV}"
119 GEOIP_PATCH_A="${GEOIP_P}.patch"
120 GEOIP_DOC_A="bind-geoip-1.3-readme.txt"
121 GEOIP_SRC_URI_BASE="http://bind-geoip.googlecode.com/"
122
123 DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server"
124 HOMEPAGE="http://www.isc.org/software/bind"
125 SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz
126 doc? ( mirror://gentoo/dyndns-samples.tbz2 )
127 geoip? ( ${GEOIP_SRC_URI_BASE}/files/${GEOIP_DOC_A}
128 ${GEOIP_SRC_URI_BASE}/files/${GEOIP_PATCH_A} )
129 sdb-ldap? ( http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2 )"
130
131 LICENSE="as-is"
132 SLOT="0"
133 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
134 IUSE="berkdb caps dlz doc geoip gost gssapi idn ipv6 ldap mysql odbc pkcs11 postgres rpz sdb-ldap
135 selinux ssl static-libs threads urandom xml"
136
137 REQUIRED_USE="postgres? ( dlz )
138 berkdb? ( dlz )
139 mysql? ( dlz !threads )
140 odbc? ( dlz )
141 ldap? ( dlz )
142 sdb-ldap? ( dlz )
143 gost? ( ssl )
144 threads? ( caps )"
145
146 DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g )
147 mysql? ( >=virtual/mysql-4.0 )
148 odbc? ( >=dev-db/unixODBC-2.2.6 )
149 ldap? ( net-nds/openldap )
150 idn? ( net-dns/idnkit )
151 postgres? ( dev-db/postgresql-base )
152 caps? ( >=sys-libs/libcap-2.1.0 )
153 xml? ( dev-libs/libxml2 )
154 geoip? ( >=dev-libs/geoip-1.4.6 )
155 gssapi? ( virtual/krb5 )
156 sdb-ldap? ( net-nds/openldap )
157 gost? ( >=dev-libs/openssl-1.0.0 )"
158
159 RDEPEND="${DEPEND}
160 selinux? ( sec-policy/selinux-bind )
161 || ( sys-process/psmisc sys-process/fuser-bsd )"
162
163 S="${WORKDIR}/${MY_P}"
164
165 pkg_setup() {
166 ebegin "Creating named group and user"
167 enewgroup named 40
168 enewuser named 40 -1 /etc/bind named
169 eend ${?}
170 }
171
172 src_prepare() {
173 # Adjusting PATHs in manpages
174 for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
175 sed -i \
176 -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
177 -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
178 -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
179 "${i}" || die "sed failed, ${i} doesn't exist"
180 done
181
182 if use dlz; then
183 # bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse
184 # (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/)
185 if use mysql && has_version ">=dev-db/mysql-5"; then
186 epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch
187 fi
188
189 if use odbc; then
190 epatch "${FILESDIR}/${PN}-9.7.3-odbc-dlz-detect.patch"
191 fi
192
193 # sdb-ldap patch as per bug #160567
194 # Upstream URL: http://bind9-ldap.bayour.com/
195 # New patch take from bug 302735
196 if use sdb-ldap; then
197 epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
198 cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
199 cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
200 cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
201 fi
202 fi
203
204 # should be installed by bind-tools
205 sed -i -r -e "s:(nsupdate|dig) ::g" bin/Makefile.in || die
206
207 if use geoip; then
208 cp "${DISTDIR}"/${GEOIP_PATCH_A} "${S}" || die
209 sed -i -e 's:^ RELEASETYPE=-P$: RELEASETYPE=:' \
210 -e 's:^\([+-]RELEASEVER=\)1:\1:' ${GEOIP_PATCH_A} || die
211 epatch ${GEOIP_PATCH_A}
212 fi
213
214 # bug #220361
215 rm {aclocal,libtool}.m4
216 eautoreconf
217 }
218
219 src_configure() {
220 local myconf=""
221
222 if use urandom; then
223 myconf="${myconf} --with-randomdev=/dev/urandom"
224 else
225 myconf="${myconf} --with-randomdev=/dev/random"
226 fi
227
228 use geoip && myconf="${myconf} --with-geoip"
229
230 # bug #158664
231 # gcc-specs-ssp && replace-flags -O[23s] -O
232
233 # To include db.h from proper path
234 use berkdb && append-flags "-I$(db_includedir)"
235
236 export BUILD_CC=$(tc-getBUILD_CC)
237 econf \
238 --sysconfdir=/etc/bind \
239 --localstatedir=/var \
240 --with-libtool \
241 $(use_enable threads) \
242 $(use_with dlz dlopen) \
243 $(use_with dlz dlz-filesystem) \
244 $(use_with dlz dlz-stub) \
245 $(use_with postgres dlz-postgres) \
246 $(use_with mysql dlz-mysql) \
247 $(use_with berkdb dlz-bdb) \
248 $(use_with ldap dlz-ldap) \
249 $(use_with odbc dlz-odbc) \
250 $(use_with ssl openssl) \
251 $(use_with idn) \
252 $(use_enable ipv6) \
253 $(use_with xml libxml2) \
254 $(use_with gssapi) \
255 $(use_enable rpz rpz-nsip) \
256 $(use_enable rpz rpz-nsdname) \
257 $(use_with pkcs11) \
258 $(use_enable caps linux-caps) \
259 $(use_with gost) \
260 $(use_enable static-libs static) \
261 --without-readline \
262 ${myconf}
263
264 # bug #151839
265 echo '#undef SO_BSDCOMPAT' >> config.h
266 }
267
268 src_install() {
269 emake DESTDIR="${D}" install || die
270
271 dodoc CHANGES FAQ README
272
273 if use idn; then
274 dodoc contrib/idn/README.idnkit || die
275 fi
276
277 if use doc; then
278 dodoc doc/arm/Bv9ARM.pdf || die
279
280 docinto misc
281 dodoc doc/misc/* || die
282
283 # might a 'html' useflag make sense?
284 docinto html
285 dohtml -r doc/arm/* || die
286
287 docinto draft
288 dodoc doc/draft/* || die
289
290 docinto rfc
291 dodoc doc/rfc/* || die
292
293 docinto contrib
294 dodoc contrib/named-bootconf/named-bootconf.sh \
295 contrib/nanny/nanny.pl || die
296
297 # some handy-dandy dynamic dns examples
298 cd "${D}"/usr/share/doc/${PF}
299 tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
300 fi
301
302 use geoip && dodoc "${DISTDIR}"/${GEOIP_DOC_A}
303
304 insinto /etc/bind
305 newins "${FILESDIR}"/named.conf-r5 named.conf || die
306
307 # ftp://ftp.rs.internic.net/domain/named.cache:
308 insinto /var/bind
309 doins "${FILESDIR}"/named.cache || die
310
311 insinto /var/bind/pri
312 newins "${FILESDIR}"/127.zone-r1 127.zone || die
313 newins "${FILESDIR}"/localhost.zone-r3 localhost.zone || die
314
315 newinitd "${FILESDIR}"/named.init-r11 named || die
316 newconfd "${FILESDIR}"/named.confd-r6 named || die
317
318 if use gost; then
319 sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die
320 else
321 sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die
322 fi
323
324 newenvd "${FILESDIR}"/10bind.env 10bind || die
325
326 # Let's get rid of those tools and their manpages since they're provided by bind-tools
327 rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
328 rm -f "${D}"/usr/share/man/man8/{dnssec-keygen,nsupdate}.8*
329 rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate}
330 rm -f "${D}"/usr/sbin/{dig,host,nslookup,dnssec-keygen,nsupdate}
331
332 # bug 405251, library archives aren't properly handled by --enable/disable-static
333 if ! use static-libs; then
334 find "${D}" -type f -name '*.la' -delete || die
335 fi
336
337 dosym /var/bind/named.cache /var/bind/root.cache || die
338 dosym /var/bind/pri /etc/bind/pri || die
339 dosym /var/bind/sec /etc/bind/sec || die
340 dosym /var/bind/dyn /etc/bind/dyn || die
341 keepdir /var/bind/{pri,sec,dyn}
342
343 dodir /var/{run,log}/named || die
344
345 fowners root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri,dyn}
346 fowners root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}
347 fperms 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}
348 fperms 0750 /etc/bind /var/bind/pri
349 fperms 0770 /var/{run,log}/named /var/bind/{,sec,dyn}
350 }
351
352 pkg_postinst() {
353 if [ ! -f '/etc/bind/rndc.key' ]; then
354 if use urandom; then
355 einfo "Using /dev/urandom for generating rndc.key"
356 /usr/sbin/rndc-confgen -r /dev/urandom -a
357 echo
358 else
359 einfo "Using /dev/random for generating rndc.key"
360 /usr/sbin/rndc-confgen -a
361 echo
362 fi
363 chown root:named /etc/bind/rndc.key
364 chmod 0640 /etc/bind/rndc.key
365 fi
366
367 einfo
368 einfo "You can edit /etc/conf.d/named to customize named settings"
369 einfo
370 use mysql || use postgres || use ldap && {
371 elog "If your named depends on MySQL/PostgreSQL or LDAP,"
372 elog "uncomment the specified rc_named_* lines in your"
373 elog "/etc/conf.d/named config to ensure they'll start before bind"
374 einfo
375 }
376 einfo "If you'd like to run bind in a chroot AND this is a new"
377 einfo "install OR your bind doesn't already run in a chroot:"
378 einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
379 einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
380 einfo
381
382 CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
383 if [[ -n ${CHROOT} ]]; then
384 elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
385 elog "To enable the old behaviour (without using mount) uncomment the"
386 elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
387 elog "If you decide to use the new/default method, ensure to make backup"
388 elog "first and merge your existing configs/zones to /etc/bind and"
389 elog "/var/bind because bind will now mount the needed directories into"
390 elog "the chroot dir."
391 fi
392
393 ewarn
394 ewarn "NOTE: /var/bind/named.ca has been renamed to /var/bind/named.cache"
395 ewarn "you may need to fix your named.conf!"
396 ewarn
397 ewarn "NOTE: If you upgrade from <net-dns/bind-9.4.3_p5-r1, you may encounter permission problems"
398 ewarn "To fix the permissions do:"
399 ewarn "chown root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri,dyn}"
400 ewarn "chown root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}"
401 ewarn "chmod 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}"
402 ewarn "chmod 0750 /etc/bind /var/bind/pri"
403 ewarn "chmod 0770 /var/{run,log}/named /var/bind/{,sec,dyn}"
404 ewarn
405 }
406
407 pkg_config() {
408 CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
409 CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
410 CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
411
412 if [[ -z "${CHROOT}" ]]; then
413 eerror "This config script is designed to automate setting up"
414 eerror "a chrooted bind/named. To do so, please first uncomment"
415 eerror "and set the CHROOT variable in '/etc/conf.d/named'."
416 die "Unset CHROOT"
417 fi
418 if [[ -d "${CHROOT}" ]]; then
419 ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
420 ewarn "To enable the old behaviour (without using mount) uncomment the"
421 ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
422 ewarn
423 ewarn "${CHROOT} already exists... some things might become overridden"
424 ewarn "press CTRL+C if you don't want to continue"
425 sleep 10
426 fi
427
428 echo; einfo "Setting up the chroot directory..."
429
430 mkdir -m 0750 -p ${CHROOT}
431 mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/{run,log}}
432 mkdir -m 0750 -p ${CHROOT}/etc/bind
433 mkdir -m 0770 -p ${CHROOT}/var/{bind,{run,log}/named}
434 # As of bind 9.8.0
435 if has_version net-dns/bind[gost]; then
436 if [ "$(get_libdir)" = "lib64" ]; then
437 mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines
438 ln -s lib64 ${CHROOT}/usr/lib
439 else
440 mkdir -m 0755 -p ${CHROOT}/usr/lib/engines
441 fi
442 fi
443 chown root:named ${CHROOT} ${CHROOT}/var/{bind,{run,log}/named} ${CHROOT}/etc/bind
444
445 mknod ${CHROOT}/dev/null c 1 3
446 chmod 0666 ${CHROOT}/dev/null
447
448 mknod ${CHROOT}/dev/zero c 1 5
449 chmod 0666 ${CHROOT}/dev/zero
450
451 if use urandom; then
452 mknod ${CHROOT}/dev/urandom c 1 9
453 chmod 0666 ${CHROOT}/dev/urandom
454 else
455 mknod ${CHROOT}/dev/random c 1 8
456 chmod 0666 ${CHROOT}/dev/random
457 fi
458
459 if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
460 cp -a /etc/bind ${CHROOT}/etc/
461 cp -a /var/bind ${CHROOT}/var/
462 fi
463
464 if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
465 mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP
466 fi
467
468 elog "You may need to add the following line to your syslog-ng.conf:"
469 elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
470 }