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.10.2_p3.ebuild ChangeLog bind-9.9.5-r3.ebuild bind-9.10.1_p1.ebuild
Date: Thu, 30 Jul 2015 18:52:53
Message-Id: 20150730185247.CE768110@oystercatcher.gentoo.org
1 idl0r 15/07/30 18:52:47
2
3 Modified: ChangeLog
4 Added: bind-9.10.2_p3.ebuild
5 Removed: bind-9.9.5-r3.ebuild bind-9.10.1_p1.ebuild
6 Log:
7 Security bump, bug 556150. Cleanup
8
9 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key B427ABC8)
10
11 Revision Changes Path
12 1.540 net-dns/bind/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?rev=1.540&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?rev=1.540&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?r1=1.539&r2=1.540
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v
21 retrieving revision 1.539
22 retrieving revision 1.540
23 diff -u -r1.539 -r1.540
24 --- ChangeLog 23 Jul 2015 09:35:28 -0000 1.539
25 +++ ChangeLog 30 Jul 2015 18:52:47 -0000 1.540
26 @@ -1,6 +1,13 @@
27 # ChangeLog for net-dns/bind
28 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.539 2015/07/23 09:35:28 ago Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.540 2015/07/30 18:52:47 idl0r Exp $
31 +
32 +*bind-9.10.2_p3 (30 Jul 2015)
33 +
34 + 30 Jul 2015; Christian Ruppert <idl0r@g.o> -bind-9.9.5-r3.ebuild,
35 + -bind-9.10.1_p1.ebuild, +bind-9.10.2_p3.ebuild, -files/127.zone-r1,
36 + -files/named.conf-r7:
37 + Security bump, bug 556150. Cleanup
38
39 23 Jul 2015; Agostino Sarubbo <ago@g.o> bind-9.10.2_p2.ebuild:
40 Stable for sparc, wrt bug #553584
41
42
43
44 1.1 net-dns/bind/bind-9.10.2_p3.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.10.2_p3.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.10.2_p3.ebuild?rev=1.1&content-type=text/plain
48
49 Index: bind-9.10.2_p3.ebuild
50 ===================================================================
51 # Copyright 1999-2015 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.10.2_p3.ebuild,v 1.1 2015/07/30 18:52:47 idl0r Exp $
54
55 # Re dlz/mysql and threads, needs to be verified..
56 # MySQL uses thread local storage in its C api. Thus MySQL
57 # requires that each thread of an application execute a MySQL
58 # thread initialization to setup the thread local storage.
59 # This is impossible to do safely while staying within the DLZ
60 # driver API. This is a limitation caused by MySQL, and not the DLZ API.
61 # Because of this BIND MUST only run with a single thread when
62 # using the MySQL driver.
63
64 EAPI="5"
65
66 PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
67
68 inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
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 RRL_PV="${MY_PV}"
77
78 NSLINT_DIR="contrib/nslint-3.0a2/"
79
80 # SDB-LDAP: http://bind9-ldap.bayour.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 # sdb-ldap? (
87 # http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2
88 # )"
89
90 LICENSE="GPL-2 ISC BSD BSD-2 HPND JNIC openssl"
91 SLOT="0"
92 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"
93 IUSE="berkdb +caps dlz doc filter-aaaa fixed-rrset geoip gost gssapi idn ipv6
94 json ldap mysql nslint odbc postgres python rpz seccomp selinux ssl static-libs
95 +threads urandom xml"
96 # sdb-ldap - patch broken
97 # no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
98
99 REQUIRED_USE="postgres? ( dlz )
100 berkdb? ( dlz )
101 mysql? ( dlz !threads )
102 odbc? ( dlz )
103 ldap? ( dlz )
104 gost? ( ssl )
105 threads? ( caps )"
106 # sdb-ldap? ( dlz )
107
108 DEPEND="ssl? ( dev-libs/openssl:0[-bindist] )
109 mysql? ( >=virtual/mysql-4.0 )
110 odbc? ( >=dev-db/unixODBC-2.2.6 )
111 ldap? ( net-nds/openldap )
112 idn? ( net-dns/idnkit )
113 postgres? ( dev-db/postgresql:= )
114 caps? ( >=sys-libs/libcap-2.1.0 )
115 xml? ( dev-libs/libxml2 )
116 geoip? ( >=dev-libs/geoip-1.4.6 )
117 gssapi? ( virtual/krb5 )
118 gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
119 seccomp? ( sys-libs/libseccomp )
120 json? ( dev-libs/json-c )"
121 # sdb-ldap? ( net-nds/openldap )
122
123 RDEPEND="${DEPEND}
124 selinux? ( sec-policy/selinux-bind )
125 || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )"
126
127 S="${WORKDIR}/${MY_P}"
128
129 # bug 479092, requires networking
130 RESTRICT="test"
131
132 pkg_setup() {
133 ebegin "Creating named group and user"
134 enewgroup named 40
135 enewuser named 40 -1 /etc/bind named
136 eend ${?}
137 }
138
139 src_prepare() {
140 # Adjusting PATHs in manpages
141 for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
142 sed -i \
143 -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
144 -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
145 -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
146 "${i}" || die "sed failed, ${i} doesn't exist"
147 done
148
149 # if use dlz; then
150 # # sdb-ldap patch as per bug #160567
151 # # Upstream URL: http://bind9-ldap.bayour.com/
152 # # New patch take from bug 302735
153 # if use sdb-ldap; then
154 # epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
155 # cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
156 # cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
157 # cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
158 # fi
159 # fi
160
161 # should be installed by bind-tools
162 sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
163
164 # Disable tests for now, bug 406399
165 sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
166
167 if use nslint; then
168 sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die
169 fi
170
171 # bug #220361
172 rm aclocal.m4
173 rm -rf libtool.m4/
174 eautoreconf
175 }
176
177 src_configure() {
178 local myconf=""
179
180 if use urandom; then
181 myconf="${myconf} --with-randomdev=/dev/urandom"
182 else
183 myconf="${myconf} --with-randomdev=/dev/random"
184 fi
185
186 use geoip && myconf="${myconf} --with-geoip"
187
188 # bug #158664
189 # gcc-specs-ssp && replace-flags -O[23s] -O
190
191 # To include db.h from proper path
192 use berkdb && append-flags "-I$(db_includedir)"
193
194 export BUILD_CC=$(tc-getBUILD_CC)
195 econf \
196 --sysconfdir=/etc/bind \
197 --localstatedir=/var \
198 --with-libtool \
199 --enable-full-report \
200 $(use_enable threads) \
201 $(use_with dlz dlopen) \
202 $(use_with dlz dlz-filesystem) \
203 $(use_with dlz dlz-stub) \
204 $(use_with postgres dlz-postgres) \
205 $(use_with mysql dlz-mysql) \
206 $(use_with berkdb dlz-bdb) \
207 $(use_with ldap dlz-ldap) \
208 $(use_with odbc dlz-odbc) \
209 $(use_with ssl openssl "${EPREFIX}"/usr) \
210 $(use_with ssl ecdsa) \
211 $(use_with idn) \
212 $(use_enable ipv6) \
213 $(use_with xml libxml2) \
214 $(use_with gssapi) \
215 $(use_enable rpz rpz-nsip) \
216 $(use_enable rpz rpz-nsdname) \
217 $(use_enable caps linux-caps) \
218 $(use_with gost) \
219 $(use_enable filter-aaaa) \
220 $(use_enable fixed-rrset) \
221 $(use_with python) \
222 $(use_enable seccomp) \
223 $(use_with json libjson) \
224 --without-readline \
225 ${myconf}
226
227 # $(use_enable static-libs static) \
228
229 # bug #151839
230 echo '#undef SO_BSDCOMPAT' >> config.h
231
232 if use nslint; then
233 cd $NSLINT_DIR
234 econf
235 fi
236 }
237
238 src_compile() {
239 emake
240
241 if use nslint; then
242 emake -C $NSLINT_DIR CCOPT="${CFLAGS}"
243 fi
244 }
245
246 src_install() {
247 emake DESTDIR="${D}" install
248
249 if use nslint; then
250 cd $NSLINT_DIR
251 dobin nslint
252 doman nslint.8
253 cd "${S}"
254 fi
255
256 dodoc CHANGES FAQ README
257
258 if use idn; then
259 dodoc contrib/idn/README.idnkit
260 fi
261
262 if use doc; then
263 dodoc doc/arm/Bv9ARM.pdf
264
265 docinto misc
266 dodoc doc/misc/*
267
268 # might a 'html' useflag make sense?
269 docinto html
270 dohtml -r doc/arm/*
271
272 docinto contrib
273 dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
274
275 # some handy-dandy dynamic dns examples
276 pushd "${D}"/usr/share/doc/${PF} 1>/dev/null
277 tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
278 popd 1>/dev/null
279 fi
280
281 insinto /etc/bind
282 newins "${FILESDIR}"/named.conf-r8 named.conf
283
284 # ftp://ftp.rs.internic.net/domain/named.cache:
285 insinto /var/bind
286 doins "${FILESDIR}"/named.cache
287
288 insinto /var/bind/pri
289 newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
290
291 newinitd "${FILESDIR}"/named.init-r13 named
292 newconfd "${FILESDIR}"/named.confd-r7 named
293
294 if use gost; then
295 sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die
296 else
297 sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die
298 fi
299
300 newenvd "${FILESDIR}"/10bind.env 10bind
301
302 # Let's get rid of those tools and their manpages since they're provided by bind-tools
303 rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
304 rm -f "${D}"/usr/share/man/man8/nsupdate.8*
305 rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate}
306 rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate}
307 for tool in dsfromkey importkey keyfromlabel keygen \
308 revoke settime signzone verify; do
309 rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}"
310 rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8*
311 done
312
313 # bug 405251, library archives aren't properly handled by --enable/disable-static
314 if ! use static-libs; then
315 find "${D}" -type f -name '*.a' -delete || die
316 fi
317
318 # bug 405251
319 find "${D}" -type f -name '*.la' -delete || die
320
321 if use python; then
322 install_python_tools() {
323 dosbin bin/python/dnssec-{checkds,coverage}
324 }
325 python_foreach_impl install_python_tools
326
327 python_replicate_script "${D}usr/sbin/dnssec-checkds"
328 python_replicate_script "${D}usr/sbin/dnssec-coverage"
329 fi
330
331 # bug 450406
332 dosym named.cache /var/bind/root.cache
333
334 dosym /var/bind/pri /etc/bind/pri
335 dosym /var/bind/sec /etc/bind/sec
336 dosym /var/bind/dyn /etc/bind/dyn
337 keepdir /var/bind/{pri,sec,dyn}
338
339 dodir /var/log/named
340
341 fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
342 fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
343 fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
344 fperms 0750 /etc/bind /var/bind/pri
345 fperms 0770 /var/log/named /var/bind/{,sec,dyn}
346
347 systemd_newunit "${FILESDIR}/named.service-r1" named.service
348 exeinto /usr/libexec
349 doexe "${FILESDIR}/generate-rndc-key.sh"
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
394 pkg_config() {
395 CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
396 CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
397 CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
398
399 if [[ -z "${CHROOT}" ]]; then
400 eerror "This config script is designed to automate setting up"
401 eerror "a chrooted bind/named. To do so, please first uncomment"
402 eerror "and set the CHROOT variable in '/etc/conf.d/named'."
403 die "Unset CHROOT"
404 fi
405 if [[ -d "${CHROOT}" ]]; then
406 ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
407 ewarn "To enable the old behaviour (without using mount) uncomment the"
408 ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
409 ewarn
410 ewarn "${CHROOT} already exists... some things might become overridden"
411 ewarn "press CTRL+C if you don't want to continue"
412 sleep 10
413 fi
414
415 echo; einfo "Setting up the chroot directory..."
416
417 mkdir -m 0750 -p ${CHROOT}
418 mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run}
419 mkdir -m 0750 -p ${CHROOT}/etc/bind
420 mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/
421 # As of bind 9.8.0
422 if has_version net-dns/bind[gost]; then
423 if [ "$(get_libdir)" = "lib64" ]; then
424 mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines
425 ln -s lib64 ${CHROOT}/usr/lib
426 else
427 mkdir -m 0755 -p ${CHROOT}/usr/lib/engines
428 fi
429 fi
430 chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind
431
432 mknod ${CHROOT}/dev/null c 1 3
433 chmod 0666 ${CHROOT}/dev/null
434
435 mknod ${CHROOT}/dev/zero c 1 5
436 chmod 0666 ${CHROOT}/dev/zero
437
438 if use urandom; then
439 mknod ${CHROOT}/dev/urandom c 1 9
440 chmod 0666 ${CHROOT}/dev/urandom
441 else
442 mknod ${CHROOT}/dev/random c 1 8
443 chmod 0666 ${CHROOT}/dev/random
444 fi
445
446 if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
447 cp -a /etc/bind ${CHROOT}/etc/
448 cp -a /var/bind ${CHROOT}/var/
449 fi
450
451 if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
452 mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP
453 fi
454
455 elog "You may need to add the following line to your syslog-ng.conf:"
456 elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
457 }