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