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