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