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