Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/bind/
Date: Sun, 01 Sep 2019 11:15:59
Message-Id: 1567336529.b6782fa9d6dc47d2606578dca4cbaa006cb8ae50.zlogene@gentoo
1 commit: b6782fa9d6dc47d2606578dca4cbaa006cb8ae50
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 1 11:15:29 2019 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 1 11:15:29 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6782fa9
7
8 net-dns/bind: Version bump (v9.14.5)
9
10 Package-Manager: Portage-2.3.69, Repoman-2.3.16
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12
13 net-dns/bind/Manifest | 1 +
14 net-dns/bind/bind-9.14.5.ebuild | 372 ++++++++++++++++++++++++++++++++++++++++
15 net-dns/bind/metadata.xml | 1 +
16 3 files changed, 374 insertions(+)
17
18 diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest
19 index fb84ed311b2..f41923f1ea0 100644
20 --- a/net-dns/bind/Manifest
21 +++ b/net-dns/bind/Manifest
22 @@ -1,3 +1,4 @@
23 DIST bind-9.14.4.tar.gz 6295768 BLAKE2B c433344d2b431ebb2e9920a6d0af1dc6cf65df1e347c2a77882a7dd2ea165f9a91324edbd7171e6bab7487e13049e38d23a514323f1b4cc74a6ce1f5377f1589 SHA512 f5f4dc9b6a1d60838b59ce57ad37dc1e51fa26719aa203405a73850780f06bdc6ecea71c762efd464f946bdcce5a7c324de98caea36d2fe2781cce116fcd4932
24 +DIST bind-9.14.5.tar.gz 6313555 BLAKE2B 46bde0f6f78ee15357bca0129022a6dd88941f633513a8d768b53d9c3bc0f4f7af4d8dc8cc4b1d6119d148700703b2fa27b6834671dcb5df9b544e4a2025452b SHA512 1b18eda5dea639f9b34e1c41b534704b0d5f64c036b766c9cfccf9bbeb586ce4ea7f0d098a5b2747e88aa403e48ad8ae0b6e560e93348f0dc7616f914671d084
25 DIST bind-9.15.2.tar.gz 6303402 BLAKE2B c8a16a80c9f690adb61284b27a619b4dbe120eadad7b38138da099a1d5a1171443da6e1c717e876e2739ee4d543cb00665c07fac460a256b178bace96510f4a3 SHA512 df7499bc3eeabf39eebfe346efe15631929cd7287e12fc6b04baea90c332a02fc4b9a8d40f043e308ebd61a82baafb5cf9e69654511dc9a2dcb7415597d5a646
26 DIST dyndns-samples.tbz2 22866 BLAKE2B 409890653c6536cb9c0e3ba809d2bfde0e0ae73a2a101b4f229b46c01568466bc022bbbc37712171adbd08c572733e93630feab95a0fcd1ac50a7d37da1d1108 SHA512 83b0bf99f8e9ff709e8e9336d8c5231b98a4b5f0c60c10792f34931e32cc638d261967dfa5a83151ec3740977d94ddd6e21e9ce91267b3e279b88affdbc18cac
27
28 diff --git a/net-dns/bind/bind-9.14.5.ebuild b/net-dns/bind/bind-9.14.5.ebuild
29 new file mode 100644
30 index 00000000000..6f05b895942
31 --- /dev/null
32 +++ b/net-dns/bind/bind-9.14.5.ebuild
33 @@ -0,0 +1,372 @@
34 +# Copyright 1999-2019 Gentoo Authors
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=7
47 +
48 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
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="Berkeley Internet Name Domain - Name Server"
63 +HOMEPAGE="https://www.isc.org/software/bind"
64 +SRC_URI="https://downloads.isc.org/isc/bind9/${PV}/${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 ~arm64 ~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 geoip2 gssapi
75 +json ldap libressl lmdb mysql odbc postgres python selinux static-libs
76 +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="
81 + ?? ( geoip geoip2 )
82 + postgres? ( dlz )
83 + berkdb? ( dlz )
84 + mysql? ( dlz )
85 + odbc? ( dlz )
86 + ldap? ( dlz )
87 + python? ( ${PYTHON_REQUIRED_USE} )"
88 +# sdb-ldap? ( dlz )
89 +
90 +DEPEND="!libressl? ( dev-libs/openssl:0[-bindist] )
91 + libressl? ( dev-libs/libressl )
92 + mysql? ( dev-db/mysql-connector-c:0= )
93 + odbc? ( >=dev-db/unixODBC-2.2.6 )
94 + ldap? ( net-nds/openldap )
95 + postgres? ( dev-db/postgresql:= )
96 + caps? ( >=sys-libs/libcap-2.1.0 )
97 + xml? ( dev-libs/libxml2 )
98 + geoip? ( >=dev-libs/geoip-1.4.6 )
99 + geoip2? ( dev-libs/libmaxminddb )
100 + gssapi? ( virtual/krb5 )
101 + json? ( dev-libs/json-c:= )
102 + lmdb? ( dev-db/lmdb )
103 + zlib? ( sys-libs/zlib )
104 + dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
105 + python? (
106 + ${PYTHON_DEPS}
107 + dev-python/ply[${PYTHON_USEDEP}]
108 + )"
109 +# sdb-ldap? ( net-nds/openldap )
110 +
111 +RDEPEND="${DEPEND}
112 + selinux? ( sec-policy/selinux-bind )
113 + || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc )"
114 +
115 +S="${WORKDIR}/${MY_P}"
116 +
117 +# bug 479092, requires networking
118 +RESTRICT="test"
119 +
120 +pkg_setup() {
121 + ebegin "Creating named group and user"
122 + enewgroup named 40
123 + enewuser named 40 -1 /etc/bind named
124 + eend ${?}
125 +}
126 +
127 +src_prepare() {
128 + default
129 +
130 + export LDFLAGS="${LDFLAGS} -L${EPREFIX}/usr/$(get_libdir)"
131 +
132 + # Adjusting PATHs in manpages
133 + for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
134 + sed -i \
135 + -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
136 + -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
137 + -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
138 + "${i}" || die "sed failed, ${i} doesn't exist"
139 + done
140 +
141 +# if use dlz; then
142 +# # sdb-ldap patch as per bug #160567
143 +# # Upstream URL: http://bind9-ldap.bayour.com/
144 +# # New patch take from bug 302735
145 +# if use sdb-ldap; then
146 +# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
147 +# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
148 +# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
149 +# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
150 +# fi
151 +# fi
152 +
153 + # should be installed by bind-tools
154 + sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
155 +
156 + # Disable tests for now, bug 406399
157 + sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
158 +
159 + # bug #220361
160 + rm aclocal.m4 || die
161 + rm -rf libtool.m4/ || die
162 + eautoreconf
163 +}
164 +
165 +src_configure() {
166 + local myeconfargs=(
167 + --sysconfdir=/etc/bind
168 + --localstatedir=/var
169 + --with-libtool
170 + --enable-full-report
171 + --without-readline
172 + $(use_enable caps linux-caps)
173 + $(use_enable dnsrps)
174 + $(use_enable dnstap)
175 + $(use_enable fixed-rrset)
176 + # $(use_enable static-libs static)
177 + $(use_with berkdb dlz-bdb)
178 + $(use_with dlz dlopen)
179 + $(use_with dlz dlz-filesystem)
180 + $(use_with dlz dlz-stub)
181 + $(use_with gssapi)
182 + $(use_with json libjson)
183 + $(use_with ldap dlz-ldap)
184 + $(use_with mysql dlz-mysql)
185 + $(use_with odbc dlz-odbc)
186 + $(use_with postgres dlz-postgres)
187 + $(use_with lmdb)
188 + $(use_with python)
189 + $(use_with xml libxml2)
190 + $(use_with zlib)
191 + )
192 +
193 + use geoip && myeconfargs+=( --with-geoip )
194 + use geoip2 && myeconfargs+=( --with-geoip2 )
195 +
196 + # bug #158664
197 +# gcc-specs-ssp && replace-flags -O[23s] -O
198 +
199 + # To include db.h from proper path
200 + use berkdb && append-flags "-I$(db_includedir)"
201 +
202 + export BUILD_CC=$(tc-getBUILD_CC)
203 + econf "${myeconfargs[@]}"
204 +
205 + # bug #151839
206 + echo '#undef SO_BSDCOMPAT' >> config.h
207 +}
208 +
209 +src_install() {
210 + default
211 +
212 + dodoc CHANGES README
213 +
214 + if use doc; then
215 + dodoc doc/arm/Bv9ARM.pdf
216 +
217 + docinto misc
218 + dodoc -r doc/misc/
219 +
220 + # might a 'html' useflag make sense?
221 + docinto html
222 + dodoc -r doc/arm/
223 +
224 + docinto contrib
225 + dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
226 +
227 + # some handy-dandy dynamic dns examples
228 + pushd "${ED%/}"/usr/share/doc/${PF} 1>/dev/null || die
229 + tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
230 + popd 1>/dev/null || die
231 + fi
232 +
233 + insinto /etc/bind
234 + newins "${FILESDIR}"/named.conf-r8 named.conf
235 +
236 + # ftp://ftp.rs.internic.net/domain/named.cache:
237 + insinto /var/bind
238 + newins "${FILESDIR}"/named.cache-r3 named.cache
239 +
240 + insinto /var/bind/pri
241 + newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
242 +
243 + newinitd "${FILESDIR}"/named.init-r13 named
244 + newconfd "${FILESDIR}"/named.confd-r7 named
245 +
246 + newenvd "${FILESDIR}"/10bind.env 10bind
247 +
248 + # Let's get rid of those tools and their manpages since they're provided by bind-tools
249 + rm -f "${ED}"/usr/share/man/man1/{dig,host,nslookup}.1* || die
250 + rm -f "${ED}"/usr/share/man/man8/nsupdate.8* || die
251 + rm -f "${ED}"/usr/bin/{dig,host,nslookup,nsupdate} || die
252 + rm -f "${ED}"/usr/sbin/{dig,host,nslookup,nsupdate} || die
253 + for tool in dsfromkey importkey keyfromlabel keygen \
254 + revoke settime signzone verify; do
255 + rm -f "${ED}"/usr/{,s}bin/dnssec-"${tool}" || die
256 + rm -f "${ED}"/usr/share/man/man8/dnssec-"${tool}".8* || die
257 + done
258 +
259 + # bug 405251, library archives aren't properly handled by --enable/disable-static
260 + if ! use static-libs; then
261 + find "${ED}" -type f -name '*.a' -delete || die
262 + fi
263 +
264 + # bug 405251
265 + find "${ED}" -type f -name '*.la' -delete || die
266 +
267 + if use python; then
268 + install_python_tools() {
269 + dosbin bin/python/dnssec-{checkds,coverage}
270 + }
271 + python_foreach_impl install_python_tools
272 +
273 + python_replicate_script "${ED}/usr/sbin/dnssec-checkds"
274 + python_replicate_script "${ED}/usr/sbin/dnssec-coverage"
275 + fi
276 +
277 + # bug 450406
278 + dosym named.cache /var/bind/root.cache
279 +
280 + dosym "${ED}"/var/bind/pri /etc/bind/pri
281 + dosym "${ED}"/var/bind/sec /etc/bind/sec
282 + dosym "${ED}"/var/bind/dyn /etc/bind/dyn
283 + keepdir /var/bind/{pri,sec,dyn}
284 +
285 + dodir /var/log/named
286 +
287 + fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
288 + fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
289 + fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
290 + fperms 0750 /etc/bind /var/bind/pri
291 + fperms 0770 /var/log/named /var/bind/{,sec,dyn}
292 +
293 + systemd_newunit "${FILESDIR}/named.service-r1" named.service
294 + systemd_dotmpfilesd "${FILESDIR}"/named.conf
295 + exeinto /usr/libexec
296 + doexe "${FILESDIR}/generate-rndc-key.sh"
297 +}
298 +
299 +pkg_postinst() {
300 + if [ ! -f '/etc/bind/rndc.key' ]; then
301 + if use urandom; then
302 + einfo "Using /dev/urandom for generating rndc.key"
303 + /usr/sbin/rndc-confgen -r /dev/urandom -a
304 + echo
305 + else
306 + einfo "Using /dev/random for generating rndc.key"
307 + /usr/sbin/rndc-confgen -a
308 + echo
309 + fi
310 + chown root:named /etc/bind/rndc.key || die
311 + chmod 0640 /etc/bind/rndc.key || die
312 + fi
313 +
314 + einfo
315 + einfo "You can edit /etc/conf.d/named to customize named settings"
316 + einfo
317 + use mysql || use postgres || use ldap && {
318 + elog "If your named depends on MySQL/PostgreSQL or LDAP,"
319 + elog "uncomment the specified rc_named_* lines in your"
320 + elog "/etc/conf.d/named config to ensure they'll start before bind"
321 + einfo
322 + }
323 + einfo "If you'd like to run bind in a chroot AND this is a new"
324 + einfo "install OR your bind doesn't already run in a chroot:"
325 + einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
326 + einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
327 + einfo
328 +
329 + CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
330 + if [[ -n ${CHROOT} ]]; then
331 + elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
332 + elog "To enable the old behaviour (without using mount) uncomment the"
333 + elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
334 + elog "If you decide to use the new/default method, ensure to make backup"
335 + elog "first and merge your existing configs/zones to /etc/bind and"
336 + elog "/var/bind because bind will now mount the needed directories into"
337 + elog "the chroot dir."
338 + fi
339 +}
340 +
341 +pkg_config() {
342 + CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
343 + CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
344 + CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
345 +
346 + if [[ -z "${CHROOT}" ]]; then
347 + eerror "This config script is designed to automate setting up"
348 + eerror "a chrooted bind/named. To do so, please first uncomment"
349 + eerror "and set the CHROOT variable in '/etc/conf.d/named'."
350 + die "Unset CHROOT"
351 + fi
352 + if [[ -d "${CHROOT}" ]]; then
353 + ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
354 + ewarn "To enable the old behaviour (without using mount) uncomment the"
355 + ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
356 + ewarn
357 + ewarn "${CHROOT} already exists... some things might become overridden"
358 + ewarn "press CTRL+C if you don't want to continue"
359 + sleep 10
360 + fi
361 +
362 + echo; einfo "Setting up the chroot directory..."
363 +
364 + mkdir -m 0750 -p ${CHROOT} || die
365 + mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} || die
366 + mkdir -m 0750 -p ${CHROOT}/etc/bind || die
367 + mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ || die
368 +
369 + chown root:named \
370 + ${CHROOT} \
371 + ${CHROOT}/var/{bind,log/named} \
372 + ${CHROOT}/run/named/ \
373 + ${CHROOT}/etc/bind \
374 + || die
375 +
376 + mknod ${CHROOT}/dev/null c 1 3 || die
377 + chmod 0666 ${CHROOT}/dev/null || die
378 +
379 + mknod ${CHROOT}/dev/zero c 1 5 || die
380 + chmod 0666 ${CHROOT}/dev/zero || die
381 +
382 + if use urandom; then
383 + mknod ${CHROOT}/dev/urandom c 1 9 || die
384 + chmod 0666 ${CHROOT}/dev/urandom || die
385 + else
386 + mknod ${CHROOT}/dev/random c 1 8 || die
387 + chmod 0666 ${CHROOT}/dev/random || die
388 + fi
389 +
390 + if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
391 + cp -a /etc/bind ${CHROOT}/etc/ || die
392 + cp -a /var/bind ${CHROOT}/var/ || die
393 + fi
394 +
395 + if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
396 + if use geoip; then
397 + mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP || die
398 + elif use geoip2; then
399 + mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP2 || die
400 + fi
401 + fi
402 +
403 + elog "You may need to add the following line to your syslog-ng.conf:"
404 + elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
405 +}
406
407 diff --git a/net-dns/bind/metadata.xml b/net-dns/bind/metadata.xml
408 index 5c09dd2e774..f9a219809fa 100644
409 --- a/net-dns/bind/metadata.xml
410 +++ b/net-dns/bind/metadata.xml
411 @@ -15,6 +15,7 @@
412 <flag name="dnsrps">Enable the DNS Response Policy Service (DNSRPS) API, a mechanism to allow an external response policy provider</flag>
413 <flag name="dlz">Enables dynamic loaded zones, 3rd party extension</flag>
414 <flag name="fixed-rrset">Enables fixed rrset-order option</flag>
415 + <flag name="geoip2">Enable GeoIP2 API from MaxMind</flag>
416 <flag name="gost">Enables gost OpenSSL engine support</flag>
417 <flag name="gssapi">Enable gssapi support</flag>
418 <flag name="json">Enable JSON statistics channel</flag>