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