Gentoo Archives: gentoo-commits

From: Christian Ruppert <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/bind/
Date: Mon, 19 Jun 2017 12:06:00
Message-Id: 1497873948.209955ce8dd4fa96dda7cc4d2652ccc5c0e5affa.idl0r@gentoo
1 commit: 209955ce8dd4fa96dda7cc4d2652ccc5c0e5affa
2 Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 19 12:01:51 2017 +0000
4 Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 19 12:05:48 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=209955ce
7
8 net-dns/bind: Remove old Versions
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 net-dns/bind/Manifest | 2 -
13 net-dns/bind/bind-9.10.5.ebuild | 415 ------------------------------------
14 net-dns/bind/bind-9.11.0_p3.ebuild | 423 -------------------------------------
15 net-dns/bind/metadata.xml | 2 -
16 4 files changed, 842 deletions(-)
17
18 diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest
19 index 2c6575af349..f0409efdc54 100644
20 --- a/net-dns/bind/Manifest
21 +++ b/net-dns/bind/Manifest
22 @@ -1,4 +1,2 @@
23 -DIST bind-9.10.5.tar.gz 9431916 SHA256 71688d2e134e42205075eef93cc1b78b42a140a2d61bf8263afc9c92fc872b0e SHA512 4050cffeecf5d4d2f34f202a7c4459671f882feaf4901d7d0be257e6beba36bcfe3e4d9428fd44c3e44141d368bd2a8380e1c517c322bc683e4b9563e340497f WHIRLPOOL 489178be5f88b7e36628aa2a17ff1992f0fd1e7aab0e9679d2607280e8de1509435346669d35f87189fab8be73d3ff6e3da5f2a0041d88549ee640fbdd3ab8a4
24 -DIST bind-9.11.0-P3.tar.gz 9691935 SHA256 0feee0374bcbdee73a9d4277f3c5007622279572d520d7c27a4b64015d8ca9e9 SHA512 fd5818ea36d7d4aa754a69ced675485cdb80b82f871b3f175c24715c0bd57fc78d4566657996f86ab32cb4158a974e97bb941ff9920cc3718b3484c161164b45 WHIRLPOOL 34db478ddd0841f8be244835c1d4b4149b4bda37707d56f697c544e836000aba0b0fa33c12ba8b86ebf9ca358cf7706db546570fe6371d94f93dca277dae1069
25 DIST bind-9.11.0-P5.tar.gz 9698446 SHA256 1e283f0567b484687dfd7b936e26c9af4f64043daf73cbd8f3eb1122c9fb71f5 SHA512 142407db35a7bba6e676f2b3dc726a3a6ece9df8a27722f108ec309e24c4614da097b6cd31675c4925e68ff147896bc0a16dd71aa74dd73753ba86a2dbd7d3bd WHIRLPOOL a2aba3a52ad3610891733a3c8d93c0f5b263f706e36178a6f642b18e607a665ad0b15bdf679b9a5d149e9262eb5f718e23a09e989b63a418ee8fdfcb7f435186
26 DIST dyndns-samples.tbz2 22866 SHA256 92fb06a92ca99cbbe96b90bcca229ef9c12397db57ae17e199dad9f1218fdbe8 SHA512 83b0bf99f8e9ff709e8e9336d8c5231b98a4b5f0c60c10792f34931e32cc638d261967dfa5a83151ec3740977d94ddd6e21e9ce91267b3e279b88affdbc18cac WHIRLPOOL 08d4e6a817f1d02597631e18152dbd55ea1bc4c82174be150cc77efc9e1f0f03b6471d1cefbe4229cd3161de752ef232a43ca274a07b78e9c974ceb04cfe99a2
27
28 diff --git a/net-dns/bind/bind-9.10.5.ebuild b/net-dns/bind/bind-9.10.5.ebuild
29 deleted file mode 100644
30 index 32733225628..00000000000
31 --- a/net-dns/bind/bind-9.10.5.ebuild
32 +++ /dev/null
33 @@ -1,415 +0,0 @@
34 -# Copyright 1999-2017 Gentoo Foundation
35 -# Distributed under the terms of the GNU General Public License v2
36 -
37 -# Re dlz/mysql and threads, needs to be verified..
38 -# MySQL uses thread local storage in its C api. Thus MySQL
39 -# requires that each thread of an application execute a MySQL
40 -# thread initialization to setup the thread local storage.
41 -# This is impossible to do safely while staying within the DLZ
42 -# driver API. This is a limitation caused by MySQL, and not the DLZ API.
43 -# Because of this BIND MUST only run with a single thread when
44 -# using the MySQL driver.
45 -
46 -EAPI="5"
47 -
48 -PYTHON_COMPAT=( python2_7 python3_4 )
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 -NSLINT_DIR="contrib/nslint-3.0a2/"
61 -
62 -# SDB-LDAP: http://bind9-ldap.bayour.com/
63 -
64 -DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server"
65 -HOMEPAGE="http://www.isc.org/software/bind"
66 -SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz
67 - doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
68 -# sdb-ldap? (
69 -# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2
70 -# )"
71 -
72 -LICENSE="GPL-2 ISC BSD BSD-2 HPND JNIC openssl"
73 -SLOT="0"
74 -KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
75 -IUSE="berkdb +caps dlz doc fetchlimit filter-aaaa fixed-rrset geoip gost gssapi idn ipv6
76 -json ldap libressl mysql nslint odbc postgres python rpz seccomp selinux sit ssl static-libs
77 -+threads urandom xml"
78 -# sdb-ldap - patch broken
79 -# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
80 -
81 -REQUIRED_USE="postgres? ( dlz )
82 - berkdb? ( dlz )
83 - mysql? ( dlz !threads )
84 - odbc? ( dlz )
85 - ldap? ( dlz )
86 - gost? ( !libressl ssl )
87 - threads? ( caps )
88 - python? ( ${PYTHON_REQUIRED_USE} )"
89 -# sdb-ldap? ( dlz )
90 -
91 -DEPEND="
92 - ssl? (
93 - !libressl? ( dev-libs/openssl:0[-bindist] )
94 - libressl? ( dev-libs/libressl )
95 - )
96 - mysql? ( >=virtual/mysql-4.0 )
97 - odbc? ( >=dev-db/unixODBC-2.2.6 )
98 - ldap? ( net-nds/openldap )
99 - idn? ( net-dns/idnkit )
100 - postgres? ( dev-db/postgresql:= )
101 - caps? ( >=sys-libs/libcap-2.1.0 )
102 - xml? ( dev-libs/libxml2 )
103 - geoip? ( >=dev-libs/geoip-1.4.6 )
104 - gssapi? ( virtual/krb5 )
105 - gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
106 - seccomp? ( sys-libs/libseccomp )
107 - json? ( dev-libs/json-c )
108 - python? ( ${PYTHON_DEPS} )"
109 -# sdb-ldap? ( net-nds/openldap )
110 -
111 -RDEPEND="${DEPEND}
112 - selinux? ( sec-policy/selinux-bind )
113 - || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )"
114 -
115 -S="${WORKDIR}/${MY_P}"
116 -
117 -# bug 479092, requires networking
118 -RESTRICT="test"
119 -
120 -pkg_setup() {
121 - ebegin "Creating named group and user"
122 - enewgroup named 40
123 - enewuser named 40 -1 /etc/bind named
124 - eend ${?}
125 -}
126 -
127 -src_prepare() {
128 - # Adjusting PATHs in manpages
129 - for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
130 - sed -i \
131 - -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
132 - -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
133 - -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
134 - "${i}" || die "sed failed, ${i} doesn't exist"
135 - done
136 -
137 -# if use dlz; then
138 -# # sdb-ldap patch as per bug #160567
139 -# # Upstream URL: http://bind9-ldap.bayour.com/
140 -# # New patch take from bug 302735
141 -# if use sdb-ldap; then
142 -# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
143 -# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
144 -# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
145 -# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
146 -# fi
147 -# fi
148 -
149 - # should be installed by bind-tools
150 - sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
151 -
152 - # Disable tests for now, bug 406399
153 - sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
154 -
155 - if use nslint; then
156 - sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die
157 - fi
158 -
159 - # bug #220361
160 - rm aclocal.m4
161 - rm -rf libtool.m4/
162 - eautoreconf
163 -}
164 -
165 -src_configure() {
166 - local myconf=""
167 -
168 - if use urandom; then
169 - myconf="${myconf} --with-randomdev=/dev/urandom"
170 - else
171 - myconf="${myconf} --with-randomdev=/dev/random"
172 - fi
173 -
174 - use geoip && myconf="${myconf} --with-geoip"
175 -
176 - # bug #158664
177 -# gcc-specs-ssp && replace-flags -O[23s] -O
178 -
179 - # To include db.h from proper path
180 - use berkdb && append-flags "-I$(db_includedir)"
181 -
182 - export BUILD_CC=$(tc-getBUILD_CC)
183 - econf \
184 - --sysconfdir=/etc/bind \
185 - --localstatedir=/var \
186 - --with-libtool \
187 - --enable-full-report \
188 - --without-readline \
189 - $(use_enable caps linux-caps) \
190 - $(use_enable fetchlimit) \
191 - $(use_enable filter-aaaa) \
192 - $(use_enable fixed-rrset) \
193 - $(use_enable ipv6) \
194 - $(use_enable rpz rpz-nsdname) \
195 - $(use_enable rpz rpz-nsip) \
196 - $(use_enable seccomp) \
197 - $(use_enable sit) \
198 - $(use_enable threads) \
199 - $(use_with berkdb dlz-bdb) \
200 - $(use_with dlz dlopen) \
201 - $(use_with dlz dlz-filesystem) \
202 - $(use_with dlz dlz-stub) \
203 - $(use_with gost) \
204 - $(use_with gssapi) \
205 - $(use_with idn) \
206 - $(use_with json libjson) \
207 - $(use_with ldap dlz-ldap) \
208 - $(use_with mysql dlz-mysql) \
209 - $(use_with odbc dlz-odbc) \
210 - $(use_with postgres dlz-postgres) \
211 - $(use_with python) \
212 - $(use_with ssl ecdsa) \
213 - $(use_with ssl openssl "${EPREFIX}"/usr) \
214 - $(use_with xml libxml2) \
215 - ${myconf}
216 -
217 - # $(use_enable static-libs static) \
218 -
219 - # bug #151839
220 - echo '#undef SO_BSDCOMPAT' >> config.h
221 -
222 - if use nslint; then
223 - cd $NSLINT_DIR
224 - econf
225 - fi
226 -}
227 -
228 -src_compile() {
229 - emake
230 -
231 - if use nslint; then
232 - emake -C $NSLINT_DIR CCOPT="${CFLAGS}"
233 - fi
234 -}
235 -
236 -src_install() {
237 - emake DESTDIR="${D}" install
238 -
239 - if use nslint; then
240 - cd $NSLINT_DIR
241 - dobin nslint
242 - doman nslint.8
243 - cd "${S}"
244 - fi
245 -
246 - dodoc CHANGES FAQ README
247 -
248 - if use idn; then
249 - dodoc contrib/idn/README.idnkit
250 - fi
251 -
252 - if use doc; then
253 - dodoc doc/arm/Bv9ARM.pdf
254 -
255 - docinto misc
256 - dodoc doc/misc/*
257 -
258 - # might a 'html' useflag make sense?
259 - docinto html
260 - dohtml -r doc/arm/*
261 -
262 - docinto contrib
263 - dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
264 -
265 - # some handy-dandy dynamic dns examples
266 - pushd "${D}"/usr/share/doc/${PF} 1>/dev/null
267 - tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
268 - popd 1>/dev/null
269 - fi
270 -
271 - insinto /etc/bind
272 - newins "${FILESDIR}"/named.conf-r8 named.conf
273 -
274 - # ftp://ftp.rs.internic.net/domain/named.cache:
275 - insinto /var/bind
276 - newins "${FILESDIR}"/named.cache-r3 named.cache
277 -
278 - insinto /var/bind/pri
279 - newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
280 -
281 - newinitd "${FILESDIR}"/named.init-r13 named
282 - newconfd "${FILESDIR}"/named.confd-r7 named
283 -
284 - if use gost; then
285 - sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die
286 - else
287 - sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die
288 - fi
289 -
290 - newenvd "${FILESDIR}"/10bind.env 10bind
291 -
292 - # Let's get rid of those tools and their manpages since they're provided by bind-tools
293 - rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
294 - rm -f "${D}"/usr/share/man/man8/nsupdate.8*
295 - rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate}
296 - rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate}
297 - for tool in dsfromkey importkey keyfromlabel keygen \
298 - revoke settime signzone verify; do
299 - rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}"
300 - rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8*
301 - done
302 -
303 - # bug 405251, library archives aren't properly handled by --enable/disable-static
304 - if ! use static-libs; then
305 - find "${D}" -type f -name '*.a' -delete || die
306 - fi
307 -
308 - # bug 405251
309 - find "${D}" -type f -name '*.la' -delete || die
310 -
311 - if use python; then
312 - install_python_tools() {
313 - dosbin bin/python/dnssec-{checkds,coverage}
314 - }
315 - python_foreach_impl install_python_tools
316 -
317 - python_replicate_script "${D}usr/sbin/dnssec-checkds"
318 - python_replicate_script "${D}usr/sbin/dnssec-coverage"
319 - fi
320 -
321 - # bug 450406
322 - dosym named.cache /var/bind/root.cache
323 -
324 - dosym /var/bind/pri /etc/bind/pri
325 - dosym /var/bind/sec /etc/bind/sec
326 - dosym /var/bind/dyn /etc/bind/dyn
327 - keepdir /var/bind/{pri,sec,dyn}
328 -
329 - dodir /var/log/named
330 -
331 - fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
332 - fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
333 - fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
334 - fperms 0750 /etc/bind /var/bind/pri
335 - fperms 0770 /var/log/named /var/bind/{,sec,dyn}
336 -
337 - systemd_newunit "${FILESDIR}/named.service-r1" named.service
338 - systemd_dotmpfilesd "${FILESDIR}"/named.conf
339 - exeinto /usr/libexec
340 - doexe "${FILESDIR}/generate-rndc-key.sh"
341 -}
342 -
343 -pkg_postinst() {
344 - if [ ! -f '/etc/bind/rndc.key' ]; then
345 - if use urandom; then
346 - einfo "Using /dev/urandom for generating rndc.key"
347 - /usr/sbin/rndc-confgen -r /dev/urandom -a
348 - echo
349 - else
350 - einfo "Using /dev/random for generating rndc.key"
351 - /usr/sbin/rndc-confgen -a
352 - echo
353 - fi
354 - chown root:named /etc/bind/rndc.key
355 - chmod 0640 /etc/bind/rndc.key
356 - fi
357 -
358 - einfo
359 - einfo "You can edit /etc/conf.d/named to customize named settings"
360 - einfo
361 - use mysql || use postgres || use ldap && {
362 - elog "If your named depends on MySQL/PostgreSQL or LDAP,"
363 - elog "uncomment the specified rc_named_* lines in your"
364 - elog "/etc/conf.d/named config to ensure they'll start before bind"
365 - einfo
366 - }
367 - einfo "If you'd like to run bind in a chroot AND this is a new"
368 - einfo "install OR your bind doesn't already run in a chroot:"
369 - einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
370 - einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
371 - einfo
372 -
373 - CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
374 - if [[ -n ${CHROOT} ]]; then
375 - elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
376 - elog "To enable the old behaviour (without using mount) uncomment the"
377 - elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
378 - elog "If you decide to use the new/default method, ensure to make backup"
379 - elog "first and merge your existing configs/zones to /etc/bind and"
380 - elog "/var/bind because bind will now mount the needed directories into"
381 - elog "the chroot dir."
382 - fi
383 -}
384 -
385 -pkg_config() {
386 - CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
387 - CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
388 - CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
389 -
390 - if [[ -z "${CHROOT}" ]]; then
391 - eerror "This config script is designed to automate setting up"
392 - eerror "a chrooted bind/named. To do so, please first uncomment"
393 - eerror "and set the CHROOT variable in '/etc/conf.d/named'."
394 - die "Unset CHROOT"
395 - fi
396 - if [[ -d "${CHROOT}" ]]; then
397 - ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
398 - ewarn "To enable the old behaviour (without using mount) uncomment the"
399 - ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
400 - ewarn
401 - ewarn "${CHROOT} already exists... some things might become overridden"
402 - ewarn "press CTRL+C if you don't want to continue"
403 - sleep 10
404 - fi
405 -
406 - echo; einfo "Setting up the chroot directory..."
407 -
408 - mkdir -m 0750 -p ${CHROOT}
409 - mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run}
410 - mkdir -m 0750 -p ${CHROOT}/etc/bind
411 - mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/
412 - # As of bind 9.8.0
413 - if has_version net-dns/bind[gost]; then
414 - if [ "$(get_libdir)" = "lib64" ]; then
415 - mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines
416 - ln -s lib64 ${CHROOT}/usr/lib
417 - else
418 - mkdir -m 0755 -p ${CHROOT}/usr/lib/engines
419 - fi
420 - fi
421 - chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind
422 -
423 - mknod ${CHROOT}/dev/null c 1 3
424 - chmod 0666 ${CHROOT}/dev/null
425 -
426 - mknod ${CHROOT}/dev/zero c 1 5
427 - chmod 0666 ${CHROOT}/dev/zero
428 -
429 - if use urandom; then
430 - mknod ${CHROOT}/dev/urandom c 1 9
431 - chmod 0666 ${CHROOT}/dev/urandom
432 - else
433 - mknod ${CHROOT}/dev/random c 1 8
434 - chmod 0666 ${CHROOT}/dev/random
435 - fi
436 -
437 - if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
438 - cp -a /etc/bind ${CHROOT}/etc/
439 - cp -a /var/bind ${CHROOT}/var/
440 - fi
441 -
442 - if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
443 - mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP
444 - fi
445 -
446 - elog "You may need to add the following line to your syslog-ng.conf:"
447 - elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
448 -}
449
450 diff --git a/net-dns/bind/bind-9.11.0_p3.ebuild b/net-dns/bind/bind-9.11.0_p3.ebuild
451 deleted file mode 100644
452 index 01f489573ad..00000000000
453 --- a/net-dns/bind/bind-9.11.0_p3.ebuild
454 +++ /dev/null
455 @@ -1,423 +0,0 @@
456 -# Copyright 1999-2017 Gentoo Foundation
457 -# Distributed under the terms of the GNU General Public License v2
458 -
459 -# Re dlz/mysql and threads, needs to be verified..
460 -# MySQL uses thread local storage in its C api. Thus MySQL
461 -# requires that each thread of an application execute a MySQL
462 -# thread initialization to setup the thread local storage.
463 -# This is impossible to do safely while staying within the DLZ
464 -# driver API. This is a limitation caused by MySQL, and not the DLZ API.
465 -# Because of this BIND MUST only run with a single thread when
466 -# using the MySQL driver.
467 -
468 -EAPI="5"
469 -
470 -PYTHON_COMPAT=( python2_7 python3_4 )
471 -
472 -inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
473 -
474 -MY_PV="${PV/_p/-P}"
475 -MY_PV="${MY_PV/_rc/rc}"
476 -MY_P="${PN}-${MY_PV}"
477 -
478 -SDB_LDAP_VER="1.1.0-fc14"
479 -
480 -RRL_PV="${MY_PV}"
481 -
482 -NSLINT_DIR="contrib/nslint-3.0a2/"
483 -
484 -# SDB-LDAP: http://bind9-ldap.bayour.com/
485 -
486 -DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server"
487 -HOMEPAGE="http://www.isc.org/software/bind"
488 -SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz
489 - doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
490 -# sdb-ldap? (
491 -# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2
492 -# )"
493 -
494 -LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
495 -SLOT="0"
496 -KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
497 -# -berkdb by default re bug 602682
498 -IUSE="-berkdb +caps dlz dnstap doc filter-aaaa fixed-rrset geoip gost gssapi idn ipv6
499 -json ldap libressl lmdb mysql nslint odbc postgres python rpz seccomp selinux ssl static-libs
500 -+threads urandom xml +zlib"
501 -# sdb-ldap - patch broken
502 -# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
503 -
504 -REQUIRED_USE="postgres? ( dlz )
505 - berkdb? ( dlz )
506 - mysql? ( dlz !threads )
507 - odbc? ( dlz )
508 - ldap? ( dlz )
509 - gost? ( !libressl ssl )
510 - threads? ( caps )
511 - dnstap? ( threads )
512 - python? ( ${PYTHON_REQUIRED_USE} )"
513 -# sdb-ldap? ( dlz )
514 -
515 -DEPEND="
516 - ssl? (
517 - !libressl? ( dev-libs/openssl:0[-bindist] )
518 - libressl? ( dev-libs/libressl )
519 - )
520 - mysql? ( >=virtual/mysql-4.0 )
521 - odbc? ( >=dev-db/unixODBC-2.2.6 )
522 - ldap? ( net-nds/openldap )
523 - idn? ( net-dns/idnkit )
524 - postgres? ( dev-db/postgresql:= )
525 - caps? ( >=sys-libs/libcap-2.1.0 )
526 - xml? ( dev-libs/libxml2 )
527 - geoip? ( >=dev-libs/geoip-1.4.6 )
528 - gssapi? ( virtual/krb5 )
529 - gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
530 - seccomp? ( sys-libs/libseccomp )
531 - json? ( dev-libs/json-c )
532 - lmdb? ( dev-db/lmdb )
533 - zlib? ( sys-libs/zlib )
534 - dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
535 - python? (
536 - ${PYTHON_DEPS}
537 - dev-python/ply[${PYTHON_USEDEP}]
538 - )"
539 -# sdb-ldap? ( net-nds/openldap )
540 -
541 -RDEPEND="${DEPEND}
542 - selinux? ( sec-policy/selinux-bind )
543 - || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )"
544 -
545 -S="${WORKDIR}/${MY_P}"
546 -
547 -# bug 479092, requires networking
548 -RESTRICT="test"
549 -
550 -pkg_setup() {
551 - ebegin "Creating named group and user"
552 - enewgroup named 40
553 - enewuser named 40 -1 /etc/bind named
554 - eend ${?}
555 -}
556 -
557 -src_prepare() {
558 - # Adjusting PATHs in manpages
559 - for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
560 - sed -i \
561 - -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
562 - -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
563 - -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
564 - "${i}" || die "sed failed, ${i} doesn't exist"
565 - done
566 -
567 -# if use dlz; then
568 -# # sdb-ldap patch as per bug #160567
569 -# # Upstream URL: http://bind9-ldap.bayour.com/
570 -# # New patch take from bug 302735
571 -# if use sdb-ldap; then
572 -# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
573 -# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
574 -# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
575 -# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
576 -# fi
577 -# fi
578 -
579 - # should be installed by bind-tools
580 - sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
581 -
582 - # Disable tests for now, bug 406399
583 - sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
584 -
585 - if use nslint; then
586 - sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die
587 - fi
588 -
589 - # bug #220361
590 - rm aclocal.m4
591 - rm -rf libtool.m4/
592 - eautoreconf
593 -}
594 -
595 -src_configure() {
596 - local myconf=""
597 -
598 - if use urandom; then
599 - myconf="${myconf} --with-randomdev=/dev/urandom"
600 - else
601 - myconf="${myconf} --with-randomdev=/dev/random"
602 - fi
603 -
604 - use geoip && myconf="${myconf} --with-geoip"
605 -
606 - # bug #158664
607 -# gcc-specs-ssp && replace-flags -O[23s] -O
608 -
609 - # To include db.h from proper path
610 - use berkdb && append-flags "-I$(db_includedir)"
611 -
612 - export BUILD_CC=$(tc-getBUILD_CC)
613 - econf \
614 - --sysconfdir=/etc/bind \
615 - --localstatedir=/var \
616 - --with-libtool \
617 - --enable-full-report \
618 - --without-readline \
619 - $(use_enable caps linux-caps) \
620 - $(use_enable filter-aaaa) \
621 - $(use_enable fixed-rrset) \
622 - $(use_enable ipv6) \
623 - $(use_enable rpz rpz-nsdname) \
624 - $(use_enable rpz rpz-nsip) \
625 - $(use_enable seccomp) \
626 - $(use_enable threads) \
627 - $(use_with berkdb dlz-bdb) \
628 - $(use_with dlz dlopen) \
629 - $(use_with dlz dlz-filesystem) \
630 - $(use_with dlz dlz-stub) \
631 - $(use_with gost) \
632 - $(use_with gssapi) \
633 - $(use_with idn) \
634 - $(use_with json libjson) \
635 - $(use_with ldap dlz-ldap) \
636 - $(use_with mysql dlz-mysql) \
637 - $(use_with odbc dlz-odbc) \
638 - $(use_with postgres dlz-postgres) \
639 - $(use_with lmdb) \
640 - $(use_with python) \
641 - $(use_with ssl ecdsa) \
642 - $(use_with ssl openssl "${EPREFIX}"/usr) \
643 - $(use_with xml libxml2) \
644 - $(use_with zlib) \
645 - ${myconf}
646 -
647 - # $(use_enable static-libs static) \
648 -
649 - # bug #151839
650 - echo '#undef SO_BSDCOMPAT' >> config.h
651 -
652 - if use nslint; then
653 - cd $NSLINT_DIR
654 - econf
655 - fi
656 -}
657 -
658 -src_compile() {
659 - emake
660 -
661 - if use nslint; then
662 - emake -C $NSLINT_DIR CCOPT="${CFLAGS}"
663 - fi
664 -}
665 -
666 -src_install() {
667 - emake DESTDIR="${D}" install
668 -
669 - if use nslint; then
670 - cd $NSLINT_DIR
671 - dobin nslint
672 - doman nslint.8
673 - cd "${S}"
674 - fi
675 -
676 - dodoc CHANGES FAQ README
677 -
678 - if use idn; then
679 - dodoc contrib/idn/README.idnkit
680 - fi
681 -
682 - if use doc; then
683 - dodoc doc/arm/Bv9ARM.pdf
684 -
685 - docinto misc
686 - dodoc doc/misc/*
687 -
688 - # might a 'html' useflag make sense?
689 - docinto html
690 - dohtml -r doc/arm/*
691 -
692 - docinto contrib
693 - dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
694 -
695 - # some handy-dandy dynamic dns examples
696 - pushd "${D}"/usr/share/doc/${PF} 1>/dev/null
697 - tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
698 - popd 1>/dev/null
699 - fi
700 -
701 - insinto /etc/bind
702 - newins "${FILESDIR}"/named.conf-r8 named.conf
703 -
704 - # ftp://ftp.rs.internic.net/domain/named.cache:
705 - insinto /var/bind
706 - newins "${FILESDIR}"/named.cache-r3 named.cache
707 -
708 - insinto /var/bind/pri
709 - newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
710 -
711 - newinitd "${FILESDIR}"/named.init-r13 named
712 - newconfd "${FILESDIR}"/named.confd-r7 named
713 -
714 - if use gost; then
715 - sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die
716 - else
717 - sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die
718 - fi
719 -
720 - newenvd "${FILESDIR}"/10bind.env 10bind
721 -
722 - # Let's get rid of those tools and their manpages since they're provided by bind-tools
723 - rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
724 - rm -f "${D}"/usr/share/man/man8/nsupdate.8*
725 - rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate}
726 - rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate}
727 - for tool in dsfromkey importkey keyfromlabel keygen \
728 - revoke settime signzone verify; do
729 - rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}"
730 - rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8*
731 - done
732 -
733 - # bug 405251, library archives aren't properly handled by --enable/disable-static
734 - if ! use static-libs; then
735 - find "${D}" -type f -name '*.a' -delete || die
736 - fi
737 -
738 - # bug 405251
739 - find "${D}" -type f -name '*.la' -delete || die
740 -
741 - if use python; then
742 - install_python_tools() {
743 - dosbin bin/python/dnssec-{checkds,coverage}
744 - }
745 - python_foreach_impl install_python_tools
746 -
747 - python_replicate_script "${D}usr/sbin/dnssec-checkds"
748 - python_replicate_script "${D}usr/sbin/dnssec-coverage"
749 - fi
750 -
751 - # bug 450406
752 - dosym named.cache /var/bind/root.cache
753 -
754 - dosym /var/bind/pri /etc/bind/pri
755 - dosym /var/bind/sec /etc/bind/sec
756 - dosym /var/bind/dyn /etc/bind/dyn
757 - keepdir /var/bind/{pri,sec,dyn}
758 -
759 - dodir /var/log/named
760 -
761 - fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
762 - fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
763 - fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
764 - fperms 0750 /etc/bind /var/bind/pri
765 - fperms 0770 /var/log/named /var/bind/{,sec,dyn}
766 -
767 - systemd_newunit "${FILESDIR}/named.service-r1" named.service
768 - systemd_dotmpfilesd "${FILESDIR}"/named.conf
769 - exeinto /usr/libexec
770 - doexe "${FILESDIR}/generate-rndc-key.sh"
771 -}
772 -
773 -pkg_postinst() {
774 - if [ ! -f '/etc/bind/rndc.key' ]; then
775 - if use urandom; then
776 - einfo "Using /dev/urandom for generating rndc.key"
777 - /usr/sbin/rndc-confgen -r /dev/urandom -a
778 - echo
779 - else
780 - einfo "Using /dev/random for generating rndc.key"
781 - /usr/sbin/rndc-confgen -a
782 - echo
783 - fi
784 - chown root:named /etc/bind/rndc.key
785 - chmod 0640 /etc/bind/rndc.key
786 - fi
787 -
788 - einfo
789 - einfo "You can edit /etc/conf.d/named to customize named settings"
790 - einfo
791 - use mysql || use postgres || use ldap && {
792 - elog "If your named depends on MySQL/PostgreSQL or LDAP,"
793 - elog "uncomment the specified rc_named_* lines in your"
794 - elog "/etc/conf.d/named config to ensure they'll start before bind"
795 - einfo
796 - }
797 - einfo "If you'd like to run bind in a chroot AND this is a new"
798 - einfo "install OR your bind doesn't already run in a chroot:"
799 - einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
800 - einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
801 - einfo
802 -
803 - CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
804 - if [[ -n ${CHROOT} ]]; then
805 - elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
806 - elog "To enable the old behaviour (without using mount) uncomment the"
807 - elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
808 - elog "If you decide to use the new/default method, ensure to make backup"
809 - elog "first and merge your existing configs/zones to /etc/bind and"
810 - elog "/var/bind because bind will now mount the needed directories into"
811 - elog "the chroot dir."
812 - fi
813 -}
814 -
815 -pkg_config() {
816 - CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
817 - CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
818 - CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
819 -
820 - if [[ -z "${CHROOT}" ]]; then
821 - eerror "This config script is designed to automate setting up"
822 - eerror "a chrooted bind/named. To do so, please first uncomment"
823 - eerror "and set the CHROOT variable in '/etc/conf.d/named'."
824 - die "Unset CHROOT"
825 - fi
826 - if [[ -d "${CHROOT}" ]]; then
827 - ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
828 - ewarn "To enable the old behaviour (without using mount) uncomment the"
829 - ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
830 - ewarn
831 - ewarn "${CHROOT} already exists... some things might become overridden"
832 - ewarn "press CTRL+C if you don't want to continue"
833 - sleep 10
834 - fi
835 -
836 - echo; einfo "Setting up the chroot directory..."
837 -
838 - mkdir -m 0750 -p ${CHROOT}
839 - mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run}
840 - mkdir -m 0750 -p ${CHROOT}/etc/bind
841 - mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/
842 - # As of bind 9.8.0
843 - if has_version net-dns/bind[gost]; then
844 - if [ "$(get_libdir)" = "lib64" ]; then
845 - mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines
846 - ln -s lib64 ${CHROOT}/usr/lib
847 - else
848 - mkdir -m 0755 -p ${CHROOT}/usr/lib/engines
849 - fi
850 - fi
851 - chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind
852 -
853 - mknod ${CHROOT}/dev/null c 1 3
854 - chmod 0666 ${CHROOT}/dev/null
855 -
856 - mknod ${CHROOT}/dev/zero c 1 5
857 - chmod 0666 ${CHROOT}/dev/zero
858 -
859 - if use urandom; then
860 - mknod ${CHROOT}/dev/urandom c 1 9
861 - chmod 0666 ${CHROOT}/dev/urandom
862 - else
863 - mknod ${CHROOT}/dev/random c 1 8
864 - chmod 0666 ${CHROOT}/dev/random
865 - fi
866 -
867 - if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
868 - cp -a /etc/bind ${CHROOT}/etc/
869 - cp -a /var/bind ${CHROOT}/var/
870 - fi
871 -
872 - if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
873 - mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP
874 - fi
875 -
876 - elog "You may need to add the following line to your syslog-ng.conf:"
877 - elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
878 -}
879
880 diff --git a/net-dns/bind/metadata.xml b/net-dns/bind/metadata.xml
881 index f8bf546e259..ce5bde7aab6 100644
882 --- a/net-dns/bind/metadata.xml
883 +++ b/net-dns/bind/metadata.xml
884 @@ -9,7 +9,6 @@
885 <use>
886 <flag name="dnstap">Enables dnstap packet logging</flag>
887 <flag name="dlz">Enables dynamic loaded zones, 3rd party extension</flag>
888 - <flag name="fetchlimit">Recursive fetch limits for DoS attack mitigation</flag>
889 <flag name="filter-aaaa">Enable filtering of AAAA records over IPv4</flag>
890 <flag name="fixed-rrset">Enables fixed rrset-order option</flag>
891 <flag name="gost">Enables gost OpenSSL engine support</flag>
892 @@ -18,7 +17,6 @@
893 <flag name="lmdb">Enable LMDB support to store configuration for 'addzone' zones</flag>
894 <flag name="nslint">Build and install the nslint util</flag>
895 <flag name="rpz">Enable response policy rewriting (rpz)</flag>
896 - <flag name="sit">Source Identity Token support (sit)</flag>
897 <flag name="urandom">Use /dev/urandom instead of /dev/random</flag>
898 </use>
899 </pkgmetadata>