Gentoo Archives: gentoo-commits

From: Christian Ruppert <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/bind/
Date: Mon, 16 Jul 2018 11:54:24
Message-Id: 1531742052.37644ed056895446bf393c4bdf51010b7d98912c.idl0r@gentoo
1 commit: 37644ed056895446bf393c4bdf51010b7d98912c
2 Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 16 11:33:06 2018 +0000
4 Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 16 11:54:12 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37644ed0
7
8 net-dns/bind: Version bump
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 net-dns/bind/Manifest | 1 +
13 net-dns/bind/bind-9.12.2.ebuild | 401 ++++++++++++++++++++++++++++++++++++++++
14 net-dns/bind/metadata.xml | 1 +
15 3 files changed, 403 insertions(+)
16
17 diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest
18 index e355c6a9f1e..f282267adac 100644
19 --- a/net-dns/bind/Manifest
20 +++ b/net-dns/bind/Manifest
21 @@ -1,4 +1,5 @@
22 DIST bind-9.11.2_p1.tar.gz 9783329 BLAKE2B 5a3bbd87112064231bd5e6b09ebb4014f9d5cf65cb601c03555ff540a22d87aec3990cd8e37ce5ff09e9a149bdf122d20ecb01f87731e6c79d80379a6926014f SHA512 168f27f580e3be2f7ada27afa2f72e715e750eec76831cf01bd32fabc1fa65dc29dab0eb7ed1682b076d3be99269897ddbc2c10551631a3911d9e5ae1aa40597
23 DIST bind-9.11.3.tar.gz 9523375 BLAKE2B 978986e02767b8ac9f015b52e87b3bc161a7ea72f59f343dcb23f50fbe8474528c4b27ee4fd54bdbe6bd825ce6e8b164e8ad145260b2cdcd004e8892bacd313b SHA512 1f0da13165d1ee872800fe10bb8b0f69c6c76515f9861c1528fb6005213bb71b21a1270906d2ea9ded3eaf6df1a1bac0f2c80aa511683b8d57dcff4f278d8c35
24 DIST bind-9.12.1_p2.tar.gz 9305005 BLAKE2B 6be328e9e14a26d17c2f789aafc1f83a4690db0b0ae2aeac7dcc4b54a0e5d228692475a39160599fc5c6fd7ed8733d2f0bbac65a20c513f5fa7b6b49ad4b09ae SHA512 de47eef272c437316444c4f585a2f98ae9169fc118fd057464a5cd064bb9079ffc07145dabf388cd240f56a5ad6d3ad78cf8d98fc37609681eba5d87e18a4f9a
25 +DIST bind-9.12.2.tar.gz 9424960 BLAKE2B 85bb95568de0204da5bcf97555d659f3e2acd4b6f1c255586f1ca8552cdf734aa644406f7dabf64a8f2ce98980a5fbe011746011be7a8f4edf47ce2555cf2f55 SHA512 17b641138e4e9a878fe1c5843363eff090a8d2b056eb1f10eb4ff34e0e3f457990a4ab9e7136aca850641b6d92601088971d40b6976d105e57f61fcd5537dcbe
26 DIST dyndns-samples.tbz2 22866 BLAKE2B 409890653c6536cb9c0e3ba809d2bfde0e0ae73a2a101b4f229b46c01568466bc022bbbc37712171adbd08c572733e93630feab95a0fcd1ac50a7d37da1d1108 SHA512 83b0bf99f8e9ff709e8e9336d8c5231b98a4b5f0c60c10792f34931e32cc638d261967dfa5a83151ec3740977d94ddd6e21e9ce91267b3e279b88affdbc18cac
27
28 diff --git a/net-dns/bind/bind-9.12.2.ebuild b/net-dns/bind/bind-9.12.2.ebuild
29 new file mode 100644
30 index 00000000000..1d4cd915c43
31 --- /dev/null
32 +++ b/net-dns/bind/bind-9.12.2.ebuild
33 @@ -0,0 +1,401 @@
34 +# Copyright 1999-2018 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +# Re dlz/mysql and threads, needs to be verified..
38 +# MySQL uses thread local storage in its C api. Thus MySQL
39 +# requires that each thread of an application execute a MySQL
40 +# thread initialization to setup the thread local storage.
41 +# This is impossible to do safely while staying within the DLZ
42 +# driver API. This is a limitation caused by MySQL, and not the DLZ API.
43 +# Because of this BIND MUST only run with a single thread when
44 +# using the MySQL driver.
45 +
46 +EAPI="5"
47 +
48 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
49 +
50 +inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
51 +
52 +MY_PV="${PV/_p/-P}"
53 +MY_PV="${MY_PV/_rc/rc}"
54 +MY_P="${PN}-${MY_PV}"
55 +
56 +SDB_LDAP_VER="1.1.0-fc14"
57 +
58 +RRL_PV="${MY_PV}"
59 +
60 +# SDB-LDAP: http://bind9-ldap.bayour.com/
61 +
62 +DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server"
63 +HOMEPAGE="http://www.isc.org/software/bind"
64 +SRC_URI="https://www.isc.org/downloads/file/${MY_P}/?version=tar-gz -> ${P}.tar.gz
65 + doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
66 +# sdb-ldap? (
67 +# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2
68 +# )"
69 +
70 +LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
71 +SLOT="0"
72 +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"
73 +# -berkdb by default re bug 602682
74 +IUSE="-berkdb +caps dlz dnstap doc dnsrps fixed-rrset geoip gost gssapi idn ipv6
75 +json ldap libidn2 libressl lmdb mysql odbc postgres python rpz seccomp selinux ssl static-libs
76 ++threads urandom xml +zlib"
77 +# sdb-ldap - patch broken
78 +# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
79 +
80 +REQUIRED_USE="idn? ( !libidn2 )
81 + libidn2? ( !idn )
82 + postgres? ( dlz )
83 + berkdb? ( dlz )
84 + mysql? ( dlz !threads )
85 + odbc? ( dlz )
86 + ldap? ( dlz )
87 + gost? ( !libressl ssl )
88 + threads? ( caps )
89 + dnstap? ( threads )
90 + python? ( ${PYTHON_REQUIRED_USE} )"
91 +# sdb-ldap? ( dlz )
92 +
93 +DEPEND="
94 + ssl? (
95 + !libressl? ( dev-libs/openssl:0[-bindist] )
96 + libressl? ( dev-libs/libressl )
97 + )
98 + mysql? ( >=virtual/mysql-4.0 )
99 + odbc? ( >=dev-db/unixODBC-2.2.6 )
100 + ldap? ( net-nds/openldap )
101 + idn? ( <net-dns/idnkit-2:= )
102 + libidn2? ( net-dns/libidn2 )
103 + postgres? ( dev-db/postgresql:= )
104 + caps? ( >=sys-libs/libcap-2.1.0 )
105 + xml? ( dev-libs/libxml2 )
106 + geoip? ( >=dev-libs/geoip-1.4.6 )
107 + gssapi? ( virtual/krb5 )
108 + gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
109 + seccomp? ( sys-libs/libseccomp )
110 + json? ( dev-libs/json-c:= )
111 + lmdb? ( dev-db/lmdb )
112 + zlib? ( sys-libs/zlib )
113 + dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
114 + python? (
115 + ${PYTHON_DEPS}
116 + dev-python/ply[${PYTHON_USEDEP}]
117 + )"
118 +# sdb-ldap? ( net-nds/openldap )
119 +
120 +RDEPEND="${DEPEND}
121 + selinux? ( sec-policy/selinux-bind )
122 + || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )"
123 +
124 +S="${WORKDIR}/${MY_P}"
125 +
126 +# bug 479092, requires networking
127 +RESTRICT="test"
128 +
129 +pkg_setup() {
130 + ebegin "Creating named group and user"
131 + enewgroup named 40
132 + enewuser named 40 -1 /etc/bind named
133 + eend ${?}
134 +}
135 +
136 +src_prepare() {
137 + # Adjusting PATHs in manpages
138 + for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
139 + sed -i \
140 + -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
141 + -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
142 + -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
143 + "${i}" || die "sed failed, ${i} doesn't exist"
144 + done
145 +
146 +# if use dlz; then
147 +# # sdb-ldap patch as per bug #160567
148 +# # Upstream URL: http://bind9-ldap.bayour.com/
149 +# # New patch take from bug 302735
150 +# if use sdb-ldap; then
151 +# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
152 +# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
153 +# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
154 +# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
155 +# fi
156 +# fi
157 +
158 + # should be installed by bind-tools
159 + sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
160 +
161 + # Disable tests for now, bug 406399
162 + sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
163 +
164 + # bug #220361
165 + rm aclocal.m4
166 + rm -rf libtool.m4/
167 + eautoreconf
168 +}
169 +
170 +src_configure() {
171 + local myconf=""
172 +
173 + if use urandom; then
174 + myconf="${myconf} --with-randomdev=/dev/urandom"
175 + else
176 + myconf="${myconf} --with-randomdev=/dev/random"
177 + fi
178 +
179 + use geoip && myconf="${myconf} --with-geoip"
180 +
181 + # bug #158664
182 +# gcc-specs-ssp && replace-flags -O[23s] -O
183 +
184 + # To include db.h from proper path
185 + use berkdb && append-flags "-I$(db_includedir)"
186 +
187 + export BUILD_CC=$(tc-getBUILD_CC)
188 + econf \
189 + --sysconfdir=/etc/bind \
190 + --localstatedir=/var \
191 + --with-libtool \
192 + --enable-full-report \
193 + --without-readline \
194 + $(use_enable caps linux-caps) \
195 + $(use_enable dnsrps) \
196 + $(use_enable fixed-rrset) \
197 + $(use_enable ipv6) \
198 + $(use_enable rpz rpz-nsdname) \
199 + $(use_enable rpz rpz-nsip) \
200 + $(use_enable seccomp) \
201 + $(use_enable threads) \
202 + $(use_with berkdb dlz-bdb) \
203 + $(use_with dlz dlopen) \
204 + $(use_with dlz dlz-filesystem) \
205 + $(use_with dlz dlz-stub) \
206 + $(use_with gost) \
207 + $(use_with gssapi) \
208 + $(use_with idn idnkit) \
209 + $(use_with libidn2) \
210 + $(use_with json libjson) \
211 + $(use_with ldap dlz-ldap) \
212 + $(use_with mysql dlz-mysql) \
213 + $(use_with odbc dlz-odbc) \
214 + $(use_with postgres dlz-postgres) \
215 + $(use_with lmdb) \
216 + $(use_with python) \
217 + $(use_with ssl ecdsa) \
218 + $(use_with ssl openssl "${EPREFIX}"/usr) \
219 + $(use_with xml libxml2) \
220 + $(use_with zlib) \
221 + ${myconf}
222 +
223 + # $(use_enable static-libs static) \
224 +
225 + # bug #151839
226 + echo '#undef SO_BSDCOMPAT' >> config.h
227 +}
228 +
229 +src_install() {
230 + emake DESTDIR="${D}" install
231 +
232 + dodoc CHANGES README
233 +
234 + if use idn; then
235 + dodoc contrib/idn/README.idnkit
236 + fi
237 +
238 + if use doc; then
239 + dodoc doc/arm/Bv9ARM.pdf
240 +
241 + docinto misc
242 + dodoc doc/misc/*
243 +
244 + # might a 'html' useflag make sense?
245 + docinto html
246 + dohtml -r doc/arm/*
247 +
248 + docinto contrib
249 + dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
250 +
251 + # some handy-dandy dynamic dns examples
252 + pushd "${D}"/usr/share/doc/${PF} 1>/dev/null
253 + tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
254 + popd 1>/dev/null
255 + fi
256 +
257 + insinto /etc/bind
258 + newins "${FILESDIR}"/named.conf-r8 named.conf
259 +
260 + # ftp://ftp.rs.internic.net/domain/named.cache:
261 + insinto /var/bind
262 + newins "${FILESDIR}"/named.cache-r3 named.cache
263 +
264 + insinto /var/bind/pri
265 + newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
266 +
267 + newinitd "${FILESDIR}"/named.init-r13 named
268 + newconfd "${FILESDIR}"/named.confd-r7 named
269 +
270 + if use gost; then
271 + sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die
272 + else
273 + sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die
274 + fi
275 +
276 + newenvd "${FILESDIR}"/10bind.env 10bind
277 +
278 + # Let's get rid of those tools and their manpages since they're provided by bind-tools
279 + rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
280 + rm -f "${D}"/usr/share/man/man8/nsupdate.8*
281 + rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate}
282 + rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate}
283 + for tool in dsfromkey importkey keyfromlabel keygen \
284 + revoke settime signzone verify; do
285 + rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}"
286 + rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8*
287 + done
288 +
289 + # bug 405251, library archives aren't properly handled by --enable/disable-static
290 + if ! use static-libs; then
291 + find "${D}" -type f -name '*.a' -delete || die
292 + fi
293 +
294 + # bug 405251
295 + find "${D}" -type f -name '*.la' -delete || die
296 +
297 + if use python; then
298 + install_python_tools() {
299 + dosbin bin/python/dnssec-{checkds,coverage}
300 + }
301 + python_foreach_impl install_python_tools
302 +
303 + python_replicate_script "${D}usr/sbin/dnssec-checkds"
304 + python_replicate_script "${D}usr/sbin/dnssec-coverage"
305 + fi
306 +
307 + # bug 450406
308 + dosym named.cache /var/bind/root.cache
309 +
310 + dosym /var/bind/pri /etc/bind/pri
311 + dosym /var/bind/sec /etc/bind/sec
312 + dosym /var/bind/dyn /etc/bind/dyn
313 + keepdir /var/bind/{pri,sec,dyn}
314 +
315 + dodir /var/log/named
316 +
317 + fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
318 + fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
319 + fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
320 + fperms 0750 /etc/bind /var/bind/pri
321 + fperms 0770 /var/log/named /var/bind/{,sec,dyn}
322 +
323 + systemd_newunit "${FILESDIR}/named.service-r1" named.service
324 + systemd_dotmpfilesd "${FILESDIR}"/named.conf
325 + exeinto /usr/libexec
326 + doexe "${FILESDIR}/generate-rndc-key.sh"
327 +}
328 +
329 +pkg_postinst() {
330 + if [ ! -f '/etc/bind/rndc.key' ]; then
331 + if use urandom; then
332 + einfo "Using /dev/urandom for generating rndc.key"
333 + /usr/sbin/rndc-confgen -r /dev/urandom -a
334 + echo
335 + else
336 + einfo "Using /dev/random for generating rndc.key"
337 + /usr/sbin/rndc-confgen -a
338 + echo
339 + fi
340 + chown root:named /etc/bind/rndc.key
341 + chmod 0640 /etc/bind/rndc.key
342 + fi
343 +
344 + einfo
345 + einfo "You can edit /etc/conf.d/named to customize named settings"
346 + einfo
347 + use mysql || use postgres || use ldap && {
348 + elog "If your named depends on MySQL/PostgreSQL or LDAP,"
349 + elog "uncomment the specified rc_named_* lines in your"
350 + elog "/etc/conf.d/named config to ensure they'll start before bind"
351 + einfo
352 + }
353 + einfo "If you'd like to run bind in a chroot AND this is a new"
354 + einfo "install OR your bind doesn't already run in a chroot:"
355 + einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
356 + einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
357 + einfo
358 +
359 + CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
360 + if [[ -n ${CHROOT} ]]; then
361 + elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
362 + elog "To enable the old behaviour (without using mount) uncomment the"
363 + elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
364 + elog "If you decide to use the new/default method, ensure to make backup"
365 + elog "first and merge your existing configs/zones to /etc/bind and"
366 + elog "/var/bind because bind will now mount the needed directories into"
367 + elog "the chroot dir."
368 + fi
369 +}
370 +
371 +pkg_config() {
372 + CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
373 + CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
374 + CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
375 +
376 + if [[ -z "${CHROOT}" ]]; then
377 + eerror "This config script is designed to automate setting up"
378 + eerror "a chrooted bind/named. To do so, please first uncomment"
379 + eerror "and set the CHROOT variable in '/etc/conf.d/named'."
380 + die "Unset CHROOT"
381 + fi
382 + if [[ -d "${CHROOT}" ]]; then
383 + ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
384 + ewarn "To enable the old behaviour (without using mount) uncomment the"
385 + ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
386 + ewarn
387 + ewarn "${CHROOT} already exists... some things might become overridden"
388 + ewarn "press CTRL+C if you don't want to continue"
389 + sleep 10
390 + fi
391 +
392 + echo; einfo "Setting up the chroot directory..."
393 +
394 + mkdir -m 0750 -p ${CHROOT}
395 + mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run}
396 + mkdir -m 0750 -p ${CHROOT}/etc/bind
397 + mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/
398 + # As of bind 9.8.0
399 + if has_version net-dns/bind[gost]; then
400 + if [ "$(get_libdir)" = "lib64" ]; then
401 + mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines
402 + ln -s lib64 ${CHROOT}/usr/lib
403 + else
404 + mkdir -m 0755 -p ${CHROOT}/usr/lib/engines
405 + fi
406 + fi
407 + chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind
408 +
409 + mknod ${CHROOT}/dev/null c 1 3
410 + chmod 0666 ${CHROOT}/dev/null
411 +
412 + mknod ${CHROOT}/dev/zero c 1 5
413 + chmod 0666 ${CHROOT}/dev/zero
414 +
415 + if use urandom; then
416 + mknod ${CHROOT}/dev/urandom c 1 9
417 + chmod 0666 ${CHROOT}/dev/urandom
418 + else
419 + mknod ${CHROOT}/dev/random c 1 8
420 + chmod 0666 ${CHROOT}/dev/random
421 + fi
422 +
423 + if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
424 + cp -a /etc/bind ${CHROOT}/etc/
425 + cp -a /var/bind ${CHROOT}/var/
426 + fi
427 +
428 + if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
429 + mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP
430 + fi
431 +
432 + elog "You may need to add the following line to your syslog-ng.conf:"
433 + elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
434 +}
435
436 diff --git a/net-dns/bind/metadata.xml b/net-dns/bind/metadata.xml
437 index 3ebfa6b1119..8ccec0f9e0a 100644
438 --- a/net-dns/bind/metadata.xml
439 +++ b/net-dns/bind/metadata.xml
440 @@ -15,6 +15,7 @@
441 <flag name="gost">Enables gost OpenSSL engine support</flag>
442 <flag name="gssapi">Enable gssapi support</flag>
443 <flag name="json">Enable JSON statistics channel</flag>
444 + <flag name="libidn2">Enables IDN support using <pkg>net-dns/libidn2</pkg> rather than using <pkg>net-dns/idnkit</pkg></flag>
445 <flag name="lmdb">Enable LMDB support to store configuration for 'addzone' zones</flag>
446 <flag name="nslint">Build and install the nslint util</flag>
447 <flag name="rpz">Enable response policy rewriting (rpz)</flag>