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