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/, net-dns/bind/files/
Date: Sat, 29 Aug 2020 08:30:24
Message-Id: 1598689817.e34a9205e956575cd2e4d15a6d6e1be569bd345c.zlogene@gentoo
1 commit: e34a9205e956575cd2e4d15a6d6e1be569bd345c
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 29 08:30:06 2020 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 29 08:30:17 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e34a9205
7
8 net-dns/bind: Drop old
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12
13 net-dns/bind/Manifest | 3 -
14 net-dns/bind/bind-9.14.12.ebuild | 376 -----------------------
15 net-dns/bind/bind-9.16.4.ebuild | 349 ---------------------
16 net-dns/bind/bind-9.16.5.ebuild | 349 ---------------------
17 net-dns/bind/files/bind-9.14.8-mysql8-bool.patch | 15 -
18 5 files changed, 1092 deletions(-)
19
20 diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest
21 index f949ca434af..fdb61a4a258 100644
22 --- a/net-dns/bind/Manifest
23 +++ b/net-dns/bind/Manifest
24 @@ -1,5 +1,2 @@
25 -DIST bind-9.14.12.tar.gz 6318913 BLAKE2B 38cad65923666afa5d83434c43a1b5577fe9555ca637489f780996a1b439955169c859c690f6fb96b003976eca482fe57c9226797cda5b124dc2073a90ef0515 SHA512 f4e6c50cbe8fdb44cdd8e30b4560b6fe2fccd0fd5bde527a897a66e85065265da0d0aceb95af42d5568dea95d59e68574e5a486bbb7e6c5d0af275538c353ddf
26 -DIST bind-9.16.4.tar.xz 3465172 BLAKE2B 0787920793798ecc5d3197e1e51d41c14170f25608077af8275fd60502e2a6f5365670ca9e611a94a53517b6a0bd55cbb37ac37a4f01063fc409def4e34c39a8 SHA512 b1cf0607b0d7569ea594e02848eed601b8faf31c527fc17d379cfff3cd45c0c8b849364af0312e9b65bc14875aad87de379281603c150a07bf021ec740e92860
27 -DIST bind-9.16.5.tar.xz 3474044 BLAKE2B 6908ba2d86049bc684b4876d09fe799313f0f44cc1f2ed89f0143523b9fd2a863fd8791b650f7001a5be14acde9306b70dee8c0d25b3d0676aea1a4d2878958f SHA512 789fc19f60e81f67ef13ebacd030ea5d8f8cc42cf5f06a01ee2eefe9b7c6d3b10603a3a6a3df85b0e5d770fcf462ce8dddc3a7e5f7f2dab27aa5879ee5380eb7
28 DIST bind-9.16.6.tar.xz 3228368 BLAKE2B 0c2265fe0e006679733a4f7610b0c33bb8e2bd32caf26dca8cfedbea0e08df9e7665cbbbf5321199bd2e30b97ad5b0146ae4e8a9a78abadbe6d067bbd1ad8a3a SHA512 37f57db6d1633cc85a4d954a69bbb3372c65ac43fef965df5aee8dcdd32153bb5b0c6d0d5f00f353dd4464c71d74dc8e801937b930e2b8f6799fa77af5f243e0
29 DIST dyndns-samples.tbz2 22866 BLAKE2B 409890653c6536cb9c0e3ba809d2bfde0e0ae73a2a101b4f229b46c01568466bc022bbbc37712171adbd08c572733e93630feab95a0fcd1ac50a7d37da1d1108 SHA512 83b0bf99f8e9ff709e8e9336d8c5231b98a4b5f0c60c10792f34931e32cc638d261967dfa5a83151ec3740977d94ddd6e21e9ce91267b3e279b88affdbc18cac
30
31 diff --git a/net-dns/bind/bind-9.14.12.ebuild b/net-dns/bind/bind-9.14.12.ebuild
32 deleted file mode 100644
33 index 1027fa4133c..00000000000
34 --- a/net-dns/bind/bind-9.14.12.ebuild
35 +++ /dev/null
36 @@ -1,376 +0,0 @@
37 -# Copyright 1999-2020 Gentoo Authors
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -# Re dlz/mysql and threads, needs to be verified..
41 -# MySQL uses thread local storage in its C api. Thus MySQL
42 -# requires that each thread of an application execute a MySQL
43 -# thread initialization to setup the thread local storage.
44 -# This is impossible to do safely while staying within the DLZ
45 -# driver API. This is a limitation caused by MySQL, and not the DLZ API.
46 -# Because of this BIND MUST only run with a single thread when
47 -# using the MySQL driver.
48 -
49 -EAPI=7
50 -
51 -PYTHON_COMPAT=( python3_7 )
52 -
53 -inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
54 -
55 -MY_PV="${PV/_p/-P}"
56 -MY_PV="${MY_PV/_rc/rc}"
57 -MY_P="${PN}-${MY_PV}"
58 -
59 -SDB_LDAP_VER="1.1.0-fc14"
60 -
61 -RRL_PV="${MY_PV}"
62 -
63 -# SDB-LDAP: http://bind9-ldap.bayour.com/
64 -
65 -DESCRIPTION="Berkeley Internet Name Domain - Name Server"
66 -HOMEPAGE="https://www.isc.org/software/bind"
67 -SRC_URI="https://downloads.isc.org/isc/bind9/${PV}/${P}.tar.gz
68 - doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
69 -# sdb-ldap? (
70 -# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2
71 -# )"
72 -
73 -LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
74 -SLOT="0"
75 -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
76 -# -berkdb by default re bug 602682
77 -IUSE="-berkdb +caps dlz dnstap doc dnsrps fixed-rrset geoip geoip2 gssapi
78 -json ldap libressl lmdb mysql odbc postgres python selinux static-libs
79 -urandom xml +zlib"
80 -# sdb-ldap - patch broken
81 -# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
82 -
83 -REQUIRED_USE="
84 - ?? ( geoip geoip2 )
85 - postgres? ( dlz )
86 - berkdb? ( dlz )
87 - mysql? ( dlz )
88 - odbc? ( dlz )
89 - ldap? ( dlz )
90 - dnsrps? ( dlz )
91 - python? ( ${PYTHON_REQUIRED_USE} )"
92 -# sdb-ldap? ( dlz )
93 -
94 -DEPEND="!libressl? ( dev-libs/openssl:=[-bindist] )
95 - libressl? ( dev-libs/libressl:= )
96 - mysql? ( dev-db/mysql-connector-c:0= )
97 - odbc? ( >=dev-db/unixODBC-2.2.6 )
98 - ldap? ( net-nds/openldap )
99 - postgres? ( dev-db/postgresql:= )
100 - caps? ( >=sys-libs/libcap-2.1.0 )
101 - xml? ( dev-libs/libxml2 )
102 - geoip? ( >=dev-libs/geoip-1.4.6 )
103 - geoip2? ( dev-libs/libmaxminddb )
104 - gssapi? ( virtual/krb5 )
105 - json? ( dev-libs/json-c:= )
106 - lmdb? ( dev-db/lmdb )
107 - zlib? ( sys-libs/zlib )
108 - dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
109 - python? (
110 - ${PYTHON_DEPS}
111 - dev-python/ply[${PYTHON_USEDEP}]
112 - )"
113 -# sdb-ldap? ( net-nds/openldap )
114 -
115 -RDEPEND="${DEPEND}
116 - selinux? ( sec-policy/selinux-bind )
117 - sys-process/psmisc"
118 -
119 -S="${WORKDIR}/${MY_P}"
120 -
121 -# bug 479092, requires networking
122 -RESTRICT="test"
123 -
124 -PATCHES=(
125 - "${FILESDIR}"/bind-9.14.8-mysql8-bool.patch
126 -)
127 -
128 -pkg_setup() {
129 - ebegin "Creating named group and user"
130 - enewgroup named 40
131 - enewuser named 40 -1 /etc/bind named
132 - eend ${?}
133 -}
134 -
135 -src_prepare() {
136 - default
137 -
138 - # Adjusting PATHs in manpages
139 - for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
140 - sed -i \
141 - -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
142 - -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
143 - -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
144 - "${i}" || die "sed failed, ${i} doesn't exist"
145 - done
146 -
147 -# if use dlz; then
148 -# # sdb-ldap patch as per bug #160567
149 -# # Upstream URL: http://bind9-ldap.bayour.com/
150 -# # New patch take from bug 302735
151 -# if use sdb-ldap; then
152 -# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
153 -# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
154 -# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
155 -# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
156 -# fi
157 -# fi
158 -
159 - # should be installed by bind-tools
160 - sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
161 -
162 - # Disable tests for now, bug 406399
163 - sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
164 -
165 - # bug #220361
166 - rm aclocal.m4 || die
167 - rm -rf libtool.m4/ || die
168 - eautoreconf
169 -}
170 -
171 -src_configure() {
172 - local myeconfargs=(
173 - --sysconfdir=/etc/bind
174 - --localstatedir=/var
175 - --with-libtool
176 - --enable-full-report
177 - --without-readline
178 - --with-openssl="${EPREFIX}"/usr
179 - $(use_enable caps linux-caps)
180 - $(use_enable dnsrps)
181 - $(use_enable dnstap)
182 - $(use_enable fixed-rrset)
183 - # $(use_enable static-libs static)
184 - $(use_with berkdb dlz-bdb)
185 - $(use_with dlz dlopen)
186 - $(use_with dlz dlz-filesystem)
187 - $(use_with dlz dlz-stub)
188 - $(use_with gssapi)
189 - $(use_with json libjson)
190 - $(use_with ldap dlz-ldap)
191 - $(use_with mysql dlz-mysql)
192 - $(use_with odbc dlz-odbc)
193 - $(use_with postgres dlz-postgres)
194 - $(use_with lmdb)
195 - $(use_with python)
196 - $(use_with xml libxml2)
197 - $(use_with zlib)
198 - )
199 -
200 - use geoip && myeconfargs+=( --with-geoip )
201 - use geoip2 && myeconfargs+=( --with-geoip2 )
202 -
203 - # bug #158664
204 -# gcc-specs-ssp && replace-flags -O[23s] -O
205 -
206 - # To include db.h from proper path
207 - use berkdb && append-flags "-I$(db_includedir)"
208 -
209 - export BUILD_CC=$(tc-getBUILD_CC)
210 - econf "${myeconfargs[@]}"
211 -
212 - # bug #151839
213 - echo '#undef SO_BSDCOMPAT' >> config.h
214 -}
215 -
216 -src_install() {
217 - default
218 -
219 - dodoc CHANGES README
220 -
221 - if use doc; then
222 - dodoc doc/arm/Bv9ARM.pdf
223 -
224 - docinto misc
225 - dodoc -r doc/misc/
226 -
227 - # might a 'html' useflag make sense?
228 - docinto html
229 - dodoc -r doc/arm/
230 -
231 - docinto contrib
232 - dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
233 -
234 - # some handy-dandy dynamic dns examples
235 - pushd "${ED}"/usr/share/doc/${PF} 1>/dev/null || die
236 - tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
237 - popd 1>/dev/null || die
238 - fi
239 -
240 - insinto /etc/bind
241 - newins "${FILESDIR}"/named.conf-r8 named.conf
242 -
243 - # ftp://ftp.rs.internic.net/domain/named.cache:
244 - insinto /var/bind
245 - newins "${FILESDIR}"/named.cache-r3 named.cache
246 -
247 - insinto /var/bind/pri
248 - newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
249 -
250 - newinitd "${FILESDIR}"/named.init-r13 named
251 - newconfd "${FILESDIR}"/named.confd-r7 named
252 -
253 - newenvd "${FILESDIR}"/10bind.env 10bind
254 -
255 - # Let's get rid of those tools and their manpages since they're provided by bind-tools
256 - rm -f "${ED}"/usr/share/man/man1/{dig,host,nslookup}.1* || die
257 - rm -f "${ED}"/usr/share/man/man8/nsupdate.8* || die
258 - rm -f "${ED}"/usr/bin/{dig,host,nslookup,nsupdate} || die
259 - rm -f "${ED}"/usr/sbin/{dig,host,nslookup,nsupdate} || die
260 - for tool in dsfromkey importkey keyfromlabel keygen \
261 - revoke settime signzone verify; do
262 - rm -f "${ED}"/usr/{,s}bin/dnssec-"${tool}" || die
263 - rm -f "${ED}"/usr/share/man/man8/dnssec-"${tool}".8* || die
264 - done
265 -
266 - # bug 405251, library archives aren't properly handled by --enable/disable-static
267 - if ! use static-libs; then
268 - find "${ED}" -type f -name '*.a' -delete || die
269 - fi
270 -
271 - # bug 405251
272 - find "${ED}" -type f -name '*.la' -delete || die
273 -
274 - if use python; then
275 - install_python_tools() {
276 - dosbin bin/python/dnssec-{checkds,coverage}
277 - }
278 - python_foreach_impl install_python_tools
279 -
280 - python_replicate_script "${ED}/usr/sbin/dnssec-checkds"
281 - python_replicate_script "${ED}/usr/sbin/dnssec-coverage"
282 - fi
283 -
284 - # bug 450406
285 - dosym named.cache /var/bind/root.cache
286 -
287 - dosym ../../var/bind/pri /etc/bind/pri
288 - dosym ../../var/bind/sec /etc/bind/sec
289 - dosym ../../var/bind/dyn /etc/bind/dyn
290 - keepdir /var/bind/{pri,sec,dyn}
291 -
292 - dodir /var/log/named
293 -
294 - fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
295 - fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
296 - fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
297 - fperms 0750 /etc/bind /var/bind/pri
298 - fperms 0770 /var/log/named /var/bind/{,sec,dyn}
299 -
300 - systemd_newunit "${FILESDIR}/named.service-r1" named.service
301 - systemd_dotmpfilesd "${FILESDIR}"/named.conf
302 - exeinto /usr/libexec
303 - doexe "${FILESDIR}/generate-rndc-key.sh"
304 -}
305 -
306 -pkg_postinst() {
307 - if [ ! -f '/etc/bind/rndc.key' ]; then
308 - if use urandom; then
309 - einfo "Using /dev/urandom for generating rndc.key"
310 - /usr/sbin/rndc-confgen -r /dev/urandom -a
311 - echo
312 - else
313 - einfo "Using /dev/random for generating rndc.key"
314 - /usr/sbin/rndc-confgen -a
315 - echo
316 - fi
317 - chown root:named /etc/bind/rndc.key || die
318 - chmod 0640 /etc/bind/rndc.key || die
319 - fi
320 -
321 - einfo
322 - einfo "You can edit /etc/conf.d/named to customize named settings"
323 - einfo
324 - use mysql || use postgres || use ldap && {
325 - elog "If your named depends on MySQL/PostgreSQL or LDAP,"
326 - elog "uncomment the specified rc_named_* lines in your"
327 - elog "/etc/conf.d/named config to ensure they'll start before bind"
328 - einfo
329 - }
330 - einfo "If you'd like to run bind in a chroot AND this is a new"
331 - einfo "install OR your bind doesn't already run in a chroot:"
332 - einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
333 - einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
334 - einfo
335 -
336 - CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
337 - if [[ -n ${CHROOT} ]]; then
338 - elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
339 - elog "To enable the old behaviour (without using mount) uncomment the"
340 - elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
341 - elog "If you decide to use the new/default method, ensure to make backup"
342 - elog "first and merge your existing configs/zones to /etc/bind and"
343 - elog "/var/bind because bind will now mount the needed directories into"
344 - elog "the chroot dir."
345 - fi
346 -}
347 -
348 -pkg_config() {
349 - CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
350 - CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
351 - CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
352 -
353 - if [[ -z "${CHROOT}" ]]; then
354 - eerror "This config script is designed to automate setting up"
355 - eerror "a chrooted bind/named. To do so, please first uncomment"
356 - eerror "and set the CHROOT variable in '/etc/conf.d/named'."
357 - die "Unset CHROOT"
358 - fi
359 - if [[ -d "${CHROOT}" ]]; then
360 - ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
361 - ewarn "To enable the old behaviour (without using mount) uncomment the"
362 - ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
363 - ewarn
364 - ewarn "${CHROOT} already exists... some things might become overridden"
365 - ewarn "press CTRL+C if you don't want to continue"
366 - sleep 10
367 - fi
368 -
369 - echo; einfo "Setting up the chroot directory..."
370 -
371 - mkdir -m 0750 -p ${CHROOT} || die
372 - mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} || die
373 - mkdir -m 0750 -p ${CHROOT}/etc/bind || die
374 - mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ || die
375 -
376 - chown root:named \
377 - ${CHROOT} \
378 - ${CHROOT}/var/{bind,log/named} \
379 - ${CHROOT}/run/named/ \
380 - ${CHROOT}/etc/bind \
381 - || die
382 -
383 - mknod ${CHROOT}/dev/null c 1 3 || die
384 - chmod 0666 ${CHROOT}/dev/null || die
385 -
386 - mknod ${CHROOT}/dev/zero c 1 5 || die
387 - chmod 0666 ${CHROOT}/dev/zero || die
388 -
389 - if use urandom; then
390 - mknod ${CHROOT}/dev/urandom c 1 9 || die
391 - chmod 0666 ${CHROOT}/dev/urandom || die
392 - else
393 - mknod ${CHROOT}/dev/random c 1 8 || die
394 - chmod 0666 ${CHROOT}/dev/random || die
395 - fi
396 -
397 - if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
398 - cp -a /etc/bind ${CHROOT}/etc/ || die
399 - cp -a /var/bind ${CHROOT}/var/ || die
400 - fi
401 -
402 - if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
403 - if use geoip; then
404 - mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP || die
405 - elif use geoip2; then
406 - mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP2 || die
407 - fi
408 - fi
409 -
410 - elog "You may need to add the following line to your syslog-ng.conf:"
411 - elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
412 -}
413
414 diff --git a/net-dns/bind/bind-9.16.4.ebuild b/net-dns/bind/bind-9.16.4.ebuild
415 deleted file mode 100644
416 index 4514f38987a..00000000000
417 --- a/net-dns/bind/bind-9.16.4.ebuild
418 +++ /dev/null
419 @@ -1,349 +0,0 @@
420 -# Copyright 1999-2020 Gentoo Authors
421 -# Distributed under the terms of the GNU General Public License v2
422 -
423 -# Re dlz/mysql and threads, needs to be verified..
424 -# MySQL uses thread local storage in its C api. Thus MySQL
425 -# requires that each thread of an application execute a MySQL
426 -# thread initialization to setup the thread local storage.
427 -# This is impossible to do safely while staying within the DLZ
428 -# driver API. This is a limitation caused by MySQL, and not the DLZ API.
429 -# Because of this BIND MUST only run with a single thread when
430 -# using the MySQL driver.
431 -
432 -EAPI=7
433 -
434 -PYTHON_COMPAT=( python3_7 )
435 -
436 -inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
437 -
438 -MY_PV="${PV/_p/-P}"
439 -MY_PV="${MY_PV/_rc/rc}"
440 -MY_P="${PN}-${MY_PV}"
441 -
442 -SDB_LDAP_VER="1.1.0-fc14"
443 -
444 -RRL_PV="${MY_PV}"
445 -
446 -# SDB-LDAP: http://bind9-ldap.bayour.com/
447 -
448 -DESCRIPTION="Berkeley Internet Name Domain - Name Server"
449 -HOMEPAGE="https://www.isc.org/software/bind"
450 -SRC_URI="https://downloads.isc.org/isc/bind9/${PV}/${P}.tar.xz
451 - doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
452 -
453 -LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
454 -SLOT="0"
455 -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
456 -# -berkdb by default re bug 602682
457 -IUSE="-berkdb +caps dlz dnstap doc dnsrps fixed-rrset geoip geoip2 gssapi
458 -json ldap libressl lmdb mysql odbc postgres python selinux static-libs
459 -urandom xml +zlib"
460 -# sdb-ldap - patch broken
461 -# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
462 -
463 -REQUIRED_USE="
464 - ?? ( geoip geoip2 )
465 - postgres? ( dlz )
466 - berkdb? ( dlz )
467 - mysql? ( dlz )
468 - odbc? ( dlz )
469 - ldap? ( dlz )
470 - dnsrps? ( dlz )
471 - python? ( ${PYTHON_REQUIRED_USE} )"
472 -
473 -DEPEND="!libressl? ( dev-libs/openssl:=[-bindist] )
474 - libressl? ( dev-libs/libressl:= )
475 - mysql? ( dev-db/mysql-connector-c:0= )
476 - odbc? ( >=dev-db/unixODBC-2.2.6 )
477 - ldap? ( net-nds/openldap )
478 - postgres? ( dev-db/postgresql:= )
479 - caps? ( >=sys-libs/libcap-2.1.0 )
480 - xml? ( dev-libs/libxml2 )
481 - geoip? ( >=dev-libs/geoip-1.4.6 )
482 - geoip2? ( dev-libs/libmaxminddb )
483 - gssapi? ( virtual/krb5 )
484 - json? ( dev-libs/json-c:= )
485 - lmdb? ( dev-db/lmdb )
486 - zlib? ( sys-libs/zlib )
487 - dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
488 - python? (
489 - ${PYTHON_DEPS}
490 - dev-python/ply[${PYTHON_USEDEP}]
491 - )
492 - dev-libs/libuv:="
493 -
494 -RDEPEND="${DEPEND}
495 - selinux? ( sec-policy/selinux-bind )
496 - sys-process/psmisc"
497 -
498 -S="${WORKDIR}/${MY_P}"
499 -
500 -# bug 479092, requires networking
501 -# bug 710840, cmocka fails LDFLAGS='-Wl,-O1'
502 -RESTRICT="test"
503 -
504 -pkg_setup() {
505 - ebegin "Creating named group and user"
506 - enewgroup named 40
507 - enewuser named 40 -1 /etc/bind named
508 - eend ${?}
509 -}
510 -
511 -src_prepare() {
512 - default
513 -
514 - # should be installed by bind-tools
515 - sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
516 -
517 - # Disable tests for now, bug 406399
518 - sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
519 -
520 - # bug #220361
521 - rm aclocal.m4 || die
522 - rm -rf libtool.m4/ || die
523 - eautoreconf
524 -}
525 -
526 -src_configure() {
527 - local myeconfargs=(
528 - AR="$(type -P $(tc-getAR))"
529 - --prefix="${EPREFIX}"/usr
530 - --sysconfdir=/etc/bind
531 - --localstatedir=/var
532 - --with-libtool
533 - --enable-full-report
534 - --without-readline
535 - --with-openssl="${EPREFIX}"/usr
536 - --without-cmocka
537 - $(use_enable caps linux-caps)
538 - $(use_enable dnsrps)
539 - $(use_enable dnstap)
540 - $(use_enable fixed-rrset)
541 - # $(use_enable static-libs static)
542 - $(use_with berkdb dlz-bdb)
543 - $(use_with dlz dlopen)
544 - $(use_with dlz dlz-filesystem)
545 - $(use_with dlz dlz-stub)
546 - $(use_with gssapi)
547 - $(use_with json json-c)
548 - $(use_with ldap dlz-ldap)
549 - $(use_with mysql dlz-mysql)
550 - $(use_with odbc dlz-odbc)
551 - $(use_with postgres dlz-postgres)
552 - $(use_with lmdb)
553 - $(use_with python)
554 - $(use_with xml libxml2)
555 - $(use_with zlib)
556 - )
557 -
558 - use geoip && myeconfargs+=( --enable-geoip )
559 - use geoip2 && myeconfargs+=( --with-maxminddb )
560 -
561 - # bug #158664
562 -# gcc-specs-ssp && replace-flags -O[23s] -O
563 -
564 - # To include db.h from proper path
565 - use berkdb && append-flags "-I$(db_includedir)"
566 -
567 - export BUILD_CC=$(tc-getBUILD_CC)
568 - econf "${myeconfargs[@]}"
569 -
570 - # bug #151839
571 - echo '#undef SO_BSDCOMPAT' >> config.h
572 -}
573 -
574 -src_install() {
575 - default
576 -
577 - dodoc CHANGES README
578 -
579 - if use doc; then
580 - docinto misc
581 - dodoc -r doc/misc/
582 -
583 - # might a 'html' useflag make sense?
584 - docinto html
585 - dodoc -r doc/arm/
586 -
587 - docinto contrib
588 - dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
589 -
590 - # some handy-dandy dynamic dns examples
591 - pushd "${ED}"/usr/share/doc/${PF} 1>/dev/null || die
592 - tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
593 - popd 1>/dev/null || die
594 - fi
595 -
596 - insinto /etc/bind
597 - newins "${FILESDIR}"/named.conf-r8 named.conf
598 -
599 - # ftp://ftp.rs.internic.net/domain/named.cache:
600 - insinto /var/bind
601 - newins "${FILESDIR}"/named.cache-r3 named.cache
602 -
603 - insinto /var/bind/pri
604 - newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
605 -
606 - newinitd "${FILESDIR}"/named.init-r13 named
607 - newconfd "${FILESDIR}"/named.confd-r7 named
608 -
609 - newenvd "${FILESDIR}"/10bind.env 10bind
610 -
611 - # Let's get rid of those tools and their manpages since they're provided by bind-tools
612 - rm -f "${ED}"/usr/share/man/man1/{dig,host,nslookup,delv,nsupdate}.1* || die
613 - rm -f "${ED}"/usr/share/man/man8/nsupdate.8* || die
614 - rm -f "${ED}"/usr/bin/{dig,host,nslookup,nsupdate} || die
615 - rm -f "${ED}"/usr/sbin/{dig,host,nslookup,nsupdate} || die
616 - for tool in dsfromkey importkey keyfromlabel keygen \
617 - revoke settime signzone verify; do
618 - rm -f "${ED}"/usr/{,s}bin/dnssec-"${tool}" || die
619 - rm -f "${ED}"/usr/share/man/man8/dnssec-"${tool}".8* || die
620 - done
621 -
622 - # bug 405251, library archives aren't properly handled by --enable/disable-static
623 - if ! use static-libs; then
624 - find "${ED}" -type f -name '*.a' -delete || die
625 - fi
626 -
627 - # bug 405251
628 - find "${ED}" -type f -name '*.la' -delete || die
629 -
630 - if use python; then
631 - install_python_tools() {
632 - dosbin bin/python/dnssec-{checkds,coverage}
633 - }
634 - python_foreach_impl install_python_tools
635 -
636 - python_replicate_script "${ED}/usr/sbin/dnssec-checkds"
637 - python_replicate_script "${ED}/usr/sbin/dnssec-coverage"
638 - fi
639 -
640 - # bug 450406
641 - dosym named.cache /var/bind/root.cache
642 -
643 - dosym ../../var/bind/pri /etc/bind/pri
644 - dosym ../../var/bind/sec /etc/bind/sec
645 - dosym ../../var/bind/dyn /etc/bind/dyn
646 - keepdir /var/bind/{pri,sec,dyn}
647 -
648 - dodir /var/log/named
649 -
650 - fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
651 - fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
652 - fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
653 - fperms 0750 /etc/bind /var/bind/pri
654 - fperms 0770 /var/log/named /var/bind/{,sec,dyn}
655 -
656 - systemd_newunit "${FILESDIR}/named.service-r1" named.service
657 - systemd_dotmpfilesd "${FILESDIR}"/named.conf
658 - exeinto /usr/libexec
659 - doexe "${FILESDIR}/generate-rndc-key.sh"
660 -}
661 -
662 -pkg_postinst() {
663 - if [ ! -f '/etc/bind/rndc.key' ]; then
664 - if use urandom; then
665 - einfo "Using /dev/urandom for generating rndc.key"
666 - /usr/sbin/rndc-confgen -r /dev/urandom -a
667 - echo
668 - else
669 - einfo "Using /dev/random for generating rndc.key"
670 - /usr/sbin/rndc-confgen -a
671 - echo
672 - fi
673 - chown root:named /etc/bind/rndc.key || die
674 - chmod 0640 /etc/bind/rndc.key || die
675 - fi
676 -
677 - einfo
678 - einfo "You can edit /etc/conf.d/named to customize named settings"
679 - einfo
680 - use mysql || use postgres || use ldap && {
681 - elog "If your named depends on MySQL/PostgreSQL or LDAP,"
682 - elog "uncomment the specified rc_named_* lines in your"
683 - elog "/etc/conf.d/named config to ensure they'll start before bind"
684 - einfo
685 - }
686 - einfo "If you'd like to run bind in a chroot AND this is a new"
687 - einfo "install OR your bind doesn't already run in a chroot:"
688 - einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
689 - einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
690 - einfo
691 -
692 - CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
693 - if [[ -n ${CHROOT} ]]; then
694 - elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
695 - elog "To enable the old behaviour (without using mount) uncomment the"
696 - elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
697 - elog "If you decide to use the new/default method, ensure to make backup"
698 - elog "first and merge your existing configs/zones to /etc/bind and"
699 - elog "/var/bind because bind will now mount the needed directories into"
700 - elog "the chroot dir."
701 - fi
702 -}
703 -
704 -pkg_config() {
705 - CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
706 - CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
707 - CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
708 -
709 - if [[ -z "${CHROOT}" ]]; then
710 - eerror "This config script is designed to automate setting up"
711 - eerror "a chrooted bind/named. To do so, please first uncomment"
712 - eerror "and set the CHROOT variable in '/etc/conf.d/named'."
713 - die "Unset CHROOT"
714 - fi
715 - if [[ -d "${CHROOT}" ]]; then
716 - ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
717 - ewarn "To enable the old behaviour (without using mount) uncomment the"
718 - ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
719 - ewarn
720 - ewarn "${CHROOT} already exists... some things might become overridden"
721 - ewarn "press CTRL+C if you don't want to continue"
722 - sleep 10
723 - fi
724 -
725 - echo; einfo "Setting up the chroot directory..."
726 -
727 - mkdir -m 0750 -p ${CHROOT} || die
728 - mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} || die
729 - mkdir -m 0750 -p ${CHROOT}/etc/bind || die
730 - mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ || die
731 -
732 - chown root:named \
733 - ${CHROOT} \
734 - ${CHROOT}/var/{bind,log/named} \
735 - ${CHROOT}/run/named/ \
736 - ${CHROOT}/etc/bind \
737 - || die
738 -
739 - mknod ${CHROOT}/dev/null c 1 3 || die
740 - chmod 0666 ${CHROOT}/dev/null || die
741 -
742 - mknod ${CHROOT}/dev/zero c 1 5 || die
743 - chmod 0666 ${CHROOT}/dev/zero || die
744 -
745 - if use urandom; then
746 - mknod ${CHROOT}/dev/urandom c 1 9 || die
747 - chmod 0666 ${CHROOT}/dev/urandom || die
748 - else
749 - mknod ${CHROOT}/dev/random c 1 8 || die
750 - chmod 0666 ${CHROOT}/dev/random || die
751 - fi
752 -
753 - if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
754 - cp -a /etc/bind ${CHROOT}/etc/ || die
755 - cp -a /var/bind ${CHROOT}/var/ || die
756 - fi
757 -
758 - if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
759 - if use geoip; then
760 - mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP || die
761 - elif use geoip2; then
762 - mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP2 || die
763 - fi
764 - fi
765 -
766 - elog "You may need to add the following line to your syslog-ng.conf:"
767 - elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
768 -}
769
770 diff --git a/net-dns/bind/bind-9.16.5.ebuild b/net-dns/bind/bind-9.16.5.ebuild
771 deleted file mode 100644
772 index 0399c16a154..00000000000
773 --- a/net-dns/bind/bind-9.16.5.ebuild
774 +++ /dev/null
775 @@ -1,349 +0,0 @@
776 -# Copyright 1999-2020 Gentoo Authors
777 -# Distributed under the terms of the GNU General Public License v2
778 -
779 -# Re dlz/mysql and threads, needs to be verified..
780 -# MySQL uses thread local storage in its C api. Thus MySQL
781 -# requires that each thread of an application execute a MySQL
782 -# thread initialization to setup the thread local storage.
783 -# This is impossible to do safely while staying within the DLZ
784 -# driver API. This is a limitation caused by MySQL, and not the DLZ API.
785 -# Because of this BIND MUST only run with a single thread when
786 -# using the MySQL driver.
787 -
788 -EAPI=7
789 -
790 -PYTHON_COMPAT=( python3_7 )
791 -
792 -inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
793 -
794 -MY_PV="${PV/_p/-P}"
795 -MY_PV="${MY_PV/_rc/rc}"
796 -MY_P="${PN}-${MY_PV}"
797 -
798 -SDB_LDAP_VER="1.1.0-fc14"
799 -
800 -RRL_PV="${MY_PV}"
801 -
802 -# SDB-LDAP: http://bind9-ldap.bayour.com/
803 -
804 -DESCRIPTION="Berkeley Internet Name Domain - Name Server"
805 -HOMEPAGE="https://www.isc.org/software/bind"
806 -SRC_URI="https://downloads.isc.org/isc/bind9/${PV}/${P}.tar.xz
807 - doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
808 -
809 -LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
810 -SLOT="0"
811 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
812 -# -berkdb by default re bug 602682
813 -IUSE="-berkdb +caps dlz dnstap doc dnsrps fixed-rrset geoip geoip2 gssapi
814 -json ldap libressl lmdb mysql odbc postgres python selinux static-libs
815 -urandom xml +zlib"
816 -# sdb-ldap - patch broken
817 -# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
818 -
819 -REQUIRED_USE="
820 - ?? ( geoip geoip2 )
821 - postgres? ( dlz )
822 - berkdb? ( dlz )
823 - mysql? ( dlz )
824 - odbc? ( dlz )
825 - ldap? ( dlz )
826 - dnsrps? ( dlz )
827 - python? ( ${PYTHON_REQUIRED_USE} )"
828 -
829 -DEPEND="!libressl? ( dev-libs/openssl:=[-bindist] )
830 - libressl? ( dev-libs/libressl:= )
831 - mysql? ( dev-db/mysql-connector-c:0= )
832 - odbc? ( >=dev-db/unixODBC-2.2.6 )
833 - ldap? ( net-nds/openldap )
834 - postgres? ( dev-db/postgresql:= )
835 - caps? ( >=sys-libs/libcap-2.1.0 )
836 - xml? ( dev-libs/libxml2 )
837 - geoip? ( >=dev-libs/geoip-1.4.6 )
838 - geoip2? ( dev-libs/libmaxminddb )
839 - gssapi? ( virtual/krb5 )
840 - json? ( dev-libs/json-c:= )
841 - lmdb? ( dev-db/lmdb )
842 - zlib? ( sys-libs/zlib )
843 - dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
844 - python? (
845 - ${PYTHON_DEPS}
846 - dev-python/ply[${PYTHON_USEDEP}]
847 - )
848 - dev-libs/libuv:="
849 -
850 -RDEPEND="${DEPEND}
851 - selinux? ( sec-policy/selinux-bind )
852 - sys-process/psmisc"
853 -
854 -S="${WORKDIR}/${MY_P}"
855 -
856 -# bug 479092, requires networking
857 -# bug 710840, cmocka fails LDFLAGS='-Wl,-O1'
858 -RESTRICT="test"
859 -
860 -pkg_setup() {
861 - ebegin "Creating named group and user"
862 - enewgroup named 40
863 - enewuser named 40 -1 /etc/bind named
864 - eend ${?}
865 -}
866 -
867 -src_prepare() {
868 - default
869 -
870 - # should be installed by bind-tools
871 - sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
872 -
873 - # Disable tests for now, bug 406399
874 - sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
875 -
876 - # bug #220361
877 - rm aclocal.m4 || die
878 - rm -rf libtool.m4/ || die
879 - eautoreconf
880 -}
881 -
882 -src_configure() {
883 - local myeconfargs=(
884 - AR="$(type -P $(tc-getAR))"
885 - --prefix="${EPREFIX}"/usr
886 - --sysconfdir=/etc/bind
887 - --localstatedir=/var
888 - --with-libtool
889 - --enable-full-report
890 - --without-readline
891 - --with-openssl="${EPREFIX}"/usr
892 - --without-cmocka
893 - $(use_enable caps linux-caps)
894 - $(use_enable dnsrps)
895 - $(use_enable dnstap)
896 - $(use_enable fixed-rrset)
897 - # $(use_enable static-libs static)
898 - $(use_with berkdb dlz-bdb)
899 - $(use_with dlz dlopen)
900 - $(use_with dlz dlz-filesystem)
901 - $(use_with dlz dlz-stub)
902 - $(use_with gssapi)
903 - $(use_with json json-c)
904 - $(use_with ldap dlz-ldap)
905 - $(use_with mysql dlz-mysql)
906 - $(use_with odbc dlz-odbc)
907 - $(use_with postgres dlz-postgres)
908 - $(use_with lmdb)
909 - $(use_with python)
910 - $(use_with xml libxml2)
911 - $(use_with zlib)
912 - )
913 -
914 - use geoip && myeconfargs+=( --enable-geoip )
915 - use geoip2 && myeconfargs+=( --with-maxminddb )
916 -
917 - # bug #158664
918 -# gcc-specs-ssp && replace-flags -O[23s] -O
919 -
920 - # To include db.h from proper path
921 - use berkdb && append-flags "-I$(db_includedir)"
922 -
923 - export BUILD_CC=$(tc-getBUILD_CC)
924 - econf "${myeconfargs[@]}"
925 -
926 - # bug #151839
927 - echo '#undef SO_BSDCOMPAT' >> config.h
928 -}
929 -
930 -src_install() {
931 - default
932 -
933 - dodoc CHANGES README
934 -
935 - if use doc; then
936 - docinto misc
937 - dodoc -r doc/misc/
938 -
939 - # might a 'html' useflag make sense?
940 - docinto html
941 - dodoc -r doc/arm/
942 -
943 - docinto contrib
944 - dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
945 -
946 - # some handy-dandy dynamic dns examples
947 - pushd "${ED}"/usr/share/doc/${PF} 1>/dev/null || die
948 - tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
949 - popd 1>/dev/null || die
950 - fi
951 -
952 - insinto /etc/bind
953 - newins "${FILESDIR}"/named.conf-r8 named.conf
954 -
955 - # ftp://ftp.rs.internic.net/domain/named.cache:
956 - insinto /var/bind
957 - newins "${FILESDIR}"/named.cache-r3 named.cache
958 -
959 - insinto /var/bind/pri
960 - newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
961 -
962 - newinitd "${FILESDIR}"/named.init-r13 named
963 - newconfd "${FILESDIR}"/named.confd-r7 named
964 -
965 - newenvd "${FILESDIR}"/10bind.env 10bind
966 -
967 - # Let's get rid of those tools and their manpages since they're provided by bind-tools
968 - rm -f "${ED}"/usr/share/man/man1/{dig,host,nslookup,delv,nsupdate}.1* || die
969 - rm -f "${ED}"/usr/share/man/man8/nsupdate.8* || die
970 - rm -f "${ED}"/usr/bin/{dig,host,nslookup,nsupdate} || die
971 - rm -f "${ED}"/usr/sbin/{dig,host,nslookup,nsupdate} || die
972 - for tool in dsfromkey importkey keyfromlabel keygen \
973 - revoke settime signzone verify; do
974 - rm -f "${ED}"/usr/{,s}bin/dnssec-"${tool}" || die
975 - rm -f "${ED}"/usr/share/man/man8/dnssec-"${tool}".8* || die
976 - done
977 -
978 - # bug 405251, library archives aren't properly handled by --enable/disable-static
979 - if ! use static-libs; then
980 - find "${ED}" -type f -name '*.a' -delete || die
981 - fi
982 -
983 - # bug 405251
984 - find "${ED}" -type f -name '*.la' -delete || die
985 -
986 - if use python; then
987 - install_python_tools() {
988 - dosbin bin/python/dnssec-{checkds,coverage}
989 - }
990 - python_foreach_impl install_python_tools
991 -
992 - python_replicate_script "${ED}/usr/sbin/dnssec-checkds"
993 - python_replicate_script "${ED}/usr/sbin/dnssec-coverage"
994 - fi
995 -
996 - # bug 450406
997 - dosym named.cache /var/bind/root.cache
998 -
999 - dosym ../../var/bind/pri /etc/bind/pri
1000 - dosym ../../var/bind/sec /etc/bind/sec
1001 - dosym ../../var/bind/dyn /etc/bind/dyn
1002 - keepdir /var/bind/{pri,sec,dyn}
1003 -
1004 - dodir /var/log/named
1005 -
1006 - fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
1007 - fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
1008 - fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
1009 - fperms 0750 /etc/bind /var/bind/pri
1010 - fperms 0770 /var/log/named /var/bind/{,sec,dyn}
1011 -
1012 - systemd_newunit "${FILESDIR}/named.service-r1" named.service
1013 - systemd_dotmpfilesd "${FILESDIR}"/named.conf
1014 - exeinto /usr/libexec
1015 - doexe "${FILESDIR}/generate-rndc-key.sh"
1016 -}
1017 -
1018 -pkg_postinst() {
1019 - if [ ! -f '/etc/bind/rndc.key' ]; then
1020 - if use urandom; then
1021 - einfo "Using /dev/urandom for generating rndc.key"
1022 - /usr/sbin/rndc-confgen -r /dev/urandom -a
1023 - echo
1024 - else
1025 - einfo "Using /dev/random for generating rndc.key"
1026 - /usr/sbin/rndc-confgen -a
1027 - echo
1028 - fi
1029 - chown root:named /etc/bind/rndc.key || die
1030 - chmod 0640 /etc/bind/rndc.key || die
1031 - fi
1032 -
1033 - einfo
1034 - einfo "You can edit /etc/conf.d/named to customize named settings"
1035 - einfo
1036 - use mysql || use postgres || use ldap && {
1037 - elog "If your named depends on MySQL/PostgreSQL or LDAP,"
1038 - elog "uncomment the specified rc_named_* lines in your"
1039 - elog "/etc/conf.d/named config to ensure they'll start before bind"
1040 - einfo
1041 - }
1042 - einfo "If you'd like to run bind in a chroot AND this is a new"
1043 - einfo "install OR your bind doesn't already run in a chroot:"
1044 - einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
1045 - einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
1046 - einfo
1047 -
1048 - CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
1049 - if [[ -n ${CHROOT} ]]; then
1050 - elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
1051 - elog "To enable the old behaviour (without using mount) uncomment the"
1052 - elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
1053 - elog "If you decide to use the new/default method, ensure to make backup"
1054 - elog "first and merge your existing configs/zones to /etc/bind and"
1055 - elog "/var/bind because bind will now mount the needed directories into"
1056 - elog "the chroot dir."
1057 - fi
1058 -}
1059 -
1060 -pkg_config() {
1061 - CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
1062 - CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
1063 - CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
1064 -
1065 - if [[ -z "${CHROOT}" ]]; then
1066 - eerror "This config script is designed to automate setting up"
1067 - eerror "a chrooted bind/named. To do so, please first uncomment"
1068 - eerror "and set the CHROOT variable in '/etc/conf.d/named'."
1069 - die "Unset CHROOT"
1070 - fi
1071 - if [[ -d "${CHROOT}" ]]; then
1072 - ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
1073 - ewarn "To enable the old behaviour (without using mount) uncomment the"
1074 - ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
1075 - ewarn
1076 - ewarn "${CHROOT} already exists... some things might become overridden"
1077 - ewarn "press CTRL+C if you don't want to continue"
1078 - sleep 10
1079 - fi
1080 -
1081 - echo; einfo "Setting up the chroot directory..."
1082 -
1083 - mkdir -m 0750 -p ${CHROOT} || die
1084 - mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} || die
1085 - mkdir -m 0750 -p ${CHROOT}/etc/bind || die
1086 - mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ || die
1087 -
1088 - chown root:named \
1089 - ${CHROOT} \
1090 - ${CHROOT}/var/{bind,log/named} \
1091 - ${CHROOT}/run/named/ \
1092 - ${CHROOT}/etc/bind \
1093 - || die
1094 -
1095 - mknod ${CHROOT}/dev/null c 1 3 || die
1096 - chmod 0666 ${CHROOT}/dev/null || die
1097 -
1098 - mknod ${CHROOT}/dev/zero c 1 5 || die
1099 - chmod 0666 ${CHROOT}/dev/zero || die
1100 -
1101 - if use urandom; then
1102 - mknod ${CHROOT}/dev/urandom c 1 9 || die
1103 - chmod 0666 ${CHROOT}/dev/urandom || die
1104 - else
1105 - mknod ${CHROOT}/dev/random c 1 8 || die
1106 - chmod 0666 ${CHROOT}/dev/random || die
1107 - fi
1108 -
1109 - if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
1110 - cp -a /etc/bind ${CHROOT}/etc/ || die
1111 - cp -a /var/bind ${CHROOT}/var/ || die
1112 - fi
1113 -
1114 - if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
1115 - if use geoip; then
1116 - mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP || die
1117 - elif use geoip2; then
1118 - mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP2 || die
1119 - fi
1120 - fi
1121 -
1122 - elog "You may need to add the following line to your syslog-ng.conf:"
1123 - elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
1124 -}
1125
1126 diff --git a/net-dns/bind/files/bind-9.14.8-mysql8-bool.patch b/net-dns/bind/files/bind-9.14.8-mysql8-bool.patch
1127 deleted file mode 100644
1128 index 8546edc1521..00000000000
1129 --- a/net-dns/bind/files/bind-9.14.8-mysql8-bool.patch
1130 +++ /dev/null
1131 @@ -1,15 +0,0 @@
1132 ---- a/contrib/dlz/drivers/dlz_mysql_driver.c
1133 -+++ b/contrib/dlz/drivers/dlz_mysql_driver.c
1134 -@@ -789,8 +789,11 @@ mysql_create(const char *dlzname, unsigned int argc, char *argv[],
1135 - char *endp;
1136 - int j;
1137 - unsigned int flags = 0;
1138 -+#if MYSQL_VERSION_ID >= 80000
1139 -+ typedef bool my_bool; // Workaround to make library work with MySQL client 8.0 as well as earlier versions
1140 -+#endif
1141 - #if MYSQL_VERSION_ID >= 50000
1142 -- my_bool auto_reconnect = 1;
1143 -+ my_bool auto_reconnect = 1;
1144 - #endif
1145 -
1146 - UNUSED(driverarg);