1 |
commit: 0b43d8183d7187750257a958aca7fa374f312121 |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 29 17:57:42 2020 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 29 18:10:21 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b43d818 |
7 |
|
8 |
net-dns/bind: Version bump (v9.16.4) |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
12 |
|
13 |
net-dns/bind/Manifest | 1 + |
14 |
net-dns/bind/bind-9.16.4.ebuild | 352 ++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 353 insertions(+) |
16 |
|
17 |
diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest |
18 |
index db674b837c4..e16303da1b8 100644 |
19 |
--- a/net-dns/bind/Manifest |
20 |
+++ b/net-dns/bind/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST bind-9.14.12.tar.gz 6318913 BLAKE2B 38cad65923666afa5d83434c43a1b5577fe9555ca637489f780996a1b439955169c859c690f6fb96b003976eca482fe57c9226797cda5b124dc2073a90ef0515 SHA512 f4e6c50cbe8fdb44cdd8e30b4560b6fe2fccd0fd5bde527a897a66e85065265da0d0aceb95af42d5568dea95d59e68574e5a486bbb7e6c5d0af275538c353ddf |
23 |
DIST bind-9.16.3.tar.xz 4573044 BLAKE2B 0630c1225984dbe301ca3e4d768d402e3293eee0ae186257d05e9f9999cdfc9538baf015155471f8abe2e725fe8bdb08c0f45bb8619a4a35b781606ee09e708c SHA512 aded208ab8b10cac275512eb4cb19f4eabd654ef3c14ab0c635f7d09194df4f6dfa84d0b5d69ce93854ceb26a93e21d7122b01ce4f3996da807249ca41d877df |
24 |
+DIST bind-9.16.4.tar.xz 3465172 BLAKE2B 0787920793798ecc5d3197e1e51d41c14170f25608077af8275fd60502e2a6f5365670ca9e611a94a53517b6a0bd55cbb37ac37a4f01063fc409def4e34c39a8 SHA512 b1cf0607b0d7569ea594e02848eed601b8faf31c527fc17d379cfff3cd45c0c8b849364af0312e9b65bc14875aad87de379281603c150a07bf021ec740e92860 |
25 |
DIST dyndns-samples.tbz2 22866 BLAKE2B 409890653c6536cb9c0e3ba809d2bfde0e0ae73a2a101b4f229b46c01568466bc022bbbc37712171adbd08c572733e93630feab95a0fcd1ac50a7d37da1d1108 SHA512 83b0bf99f8e9ff709e8e9336d8c5231b98a4b5f0c60c10792f34931e32cc638d261967dfa5a83151ec3740977d94ddd6e21e9ce91267b3e279b88affdbc18cac |
26 |
|
27 |
diff --git a/net-dns/bind/bind-9.16.4.ebuild b/net-dns/bind/bind-9.16.4.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..b7801db811d |
30 |
--- /dev/null |
31 |
+++ b/net-dns/bind/bind-9.16.4.ebuild |
32 |
@@ -0,0 +1,352 @@ |
33 |
+# Copyright 1999-2020 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+# Re dlz/mysql and threads, needs to be verified.. |
37 |
+# MySQL uses thread local storage in its C api. Thus MySQL |
38 |
+# requires that each thread of an application execute a MySQL |
39 |
+# thread initialization to setup the thread local storage. |
40 |
+# This is impossible to do safely while staying within the DLZ |
41 |
+# driver API. This is a limitation caused by MySQL, and not the DLZ API. |
42 |
+# Because of this BIND MUST only run with a single thread when |
43 |
+# using the MySQL driver. |
44 |
+ |
45 |
+EAPI=7 |
46 |
+ |
47 |
+PYTHON_COMPAT=( python3_7 ) |
48 |
+ |
49 |
+inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd |
50 |
+ |
51 |
+MY_PV="${PV/_p/-P}" |
52 |
+MY_PV="${MY_PV/_rc/rc}" |
53 |
+MY_P="${PN}-${MY_PV}" |
54 |
+ |
55 |
+SDB_LDAP_VER="1.1.0-fc14" |
56 |
+ |
57 |
+RRL_PV="${MY_PV}" |
58 |
+ |
59 |
+# SDB-LDAP: http://bind9-ldap.bayour.com/ |
60 |
+ |
61 |
+DESCRIPTION="Berkeley Internet Name Domain - Name Server" |
62 |
+HOMEPAGE="https://www.isc.org/software/bind" |
63 |
+SRC_URI="https://downloads.isc.org/isc/bind9/${PV}/${P}.tar.xz |
64 |
+ doc? ( mirror://gentoo/dyndns-samples.tbz2 )" |
65 |
+ |
66 |
+LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0" |
67 |
+SLOT="0" |
68 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
69 |
+# -berkdb by default re bug 602682 |
70 |
+IUSE="-berkdb +caps dlz dnstap doc dnsrps fixed-rrset geoip geoip2 gssapi |
71 |
+json ldap libressl lmdb mysql odbc postgres python selinux static-libs |
72 |
+urandom xml +zlib" |
73 |
+# sdb-ldap - patch broken |
74 |
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687 |
75 |
+ |
76 |
+REQUIRED_USE=" |
77 |
+ ?? ( geoip geoip2 ) |
78 |
+ postgres? ( dlz ) |
79 |
+ berkdb? ( dlz ) |
80 |
+ mysql? ( dlz ) |
81 |
+ odbc? ( dlz ) |
82 |
+ ldap? ( dlz ) |
83 |
+ dnsrps? ( dlz ) |
84 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
85 |
+ |
86 |
+DEPEND="!libressl? ( dev-libs/openssl:=[-bindist] ) |
87 |
+ libressl? ( dev-libs/libressl:= ) |
88 |
+ mysql? ( dev-db/mysql-connector-c:0= ) |
89 |
+ odbc? ( >=dev-db/unixODBC-2.2.6 ) |
90 |
+ ldap? ( net-nds/openldap ) |
91 |
+ postgres? ( dev-db/postgresql:= ) |
92 |
+ caps? ( >=sys-libs/libcap-2.1.0 ) |
93 |
+ xml? ( dev-libs/libxml2 ) |
94 |
+ geoip? ( >=dev-libs/geoip-1.4.6 ) |
95 |
+ geoip2? ( dev-libs/libmaxminddb ) |
96 |
+ gssapi? ( virtual/krb5 ) |
97 |
+ json? ( dev-libs/json-c:= ) |
98 |
+ lmdb? ( dev-db/lmdb ) |
99 |
+ zlib? ( sys-libs/zlib ) |
100 |
+ dnstap? ( dev-libs/fstrm dev-libs/protobuf-c ) |
101 |
+ python? ( |
102 |
+ ${PYTHON_DEPS} |
103 |
+ dev-python/ply[${PYTHON_USEDEP}] |
104 |
+ ) |
105 |
+ dev-libs/libuv:=" |
106 |
+ |
107 |
+RDEPEND="${DEPEND} |
108 |
+ selinux? ( sec-policy/selinux-bind ) |
109 |
+ sys-process/psmisc" |
110 |
+ |
111 |
+S="${WORKDIR}/${MY_P}" |
112 |
+ |
113 |
+# bug 479092, requires networking |
114 |
+# bug 710840, cmocka fails LDFLAGS='-Wl,-O1' |
115 |
+RESTRICT="test" |
116 |
+ |
117 |
+pkg_setup() { |
118 |
+ ebegin "Creating named group and user" |
119 |
+ enewgroup named 40 |
120 |
+ enewuser named 40 -1 /etc/bind named |
121 |
+ eend ${?} |
122 |
+} |
123 |
+ |
124 |
+src_prepare() { |
125 |
+ default |
126 |
+ |
127 |
+ export LDFLAGS="${LDFLAGS} -L${EPREFIX}/usr/$(get_libdir) -ldl" |
128 |
+ |
129 |
+ # should be installed by bind-tools |
130 |
+ sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die |
131 |
+ |
132 |
+ # Disable tests for now, bug 406399 |
133 |
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die |
134 |
+ |
135 |
+ # bug #220361 |
136 |
+ rm aclocal.m4 || die |
137 |
+ rm -rf libtool.m4/ || die |
138 |
+ eautoreconf |
139 |
+} |
140 |
+ |
141 |
+src_configure() { |
142 |
+ local myeconfargs=( |
143 |
+ --prefix="${EPREFIX}"/usr |
144 |
+ --sysconfdir=/etc/bind |
145 |
+ --localstatedir=/var |
146 |
+ --with-libtool |
147 |
+ --enable-full-report |
148 |
+ --without-readline |
149 |
+ --with-openssl="${EPREFIX}"/usr |
150 |
+ --without-cmocka |
151 |
+ $(use_enable caps linux-caps) |
152 |
+ $(use_enable dnsrps) |
153 |
+ $(use_enable dnstap) |
154 |
+ $(use_enable fixed-rrset) |
155 |
+ # $(use_enable static-libs static) |
156 |
+ $(use_with berkdb dlz-bdb) |
157 |
+ $(use_with dlz dlopen) |
158 |
+ $(use_with dlz dlz-filesystem) |
159 |
+ $(use_with dlz dlz-stub) |
160 |
+ $(use_with gssapi) |
161 |
+ $(use_with json json-c) |
162 |
+ $(use_with ldap dlz-ldap) |
163 |
+ $(use_with mysql dlz-mysql) |
164 |
+ $(use_with odbc dlz-odbc) |
165 |
+ $(use_with postgres dlz-postgres) |
166 |
+ $(use_with lmdb) |
167 |
+ $(use_with python) |
168 |
+ $(use_with xml libxml2) |
169 |
+ $(use_with zlib) |
170 |
+ ) |
171 |
+ |
172 |
+ use geoip && myeconfargs+=( --enable-geoip ) |
173 |
+ use geoip2 && myeconfargs+=( --with-maxminddb ) |
174 |
+ |
175 |
+ # bug #158664 |
176 |
+# gcc-specs-ssp && replace-flags -O[23s] -O |
177 |
+ |
178 |
+ # To include db.h from proper path |
179 |
+ use berkdb && append-flags "-I$(db_includedir)" |
180 |
+ |
181 |
+ export BUILD_CC=$(tc-getBUILD_CC) |
182 |
+ econf "${myeconfargs[@]}" |
183 |
+ |
184 |
+ # bug #151839 |
185 |
+ echo '#undef SO_BSDCOMPAT' >> config.h |
186 |
+} |
187 |
+ |
188 |
+src_install() { |
189 |
+ default |
190 |
+ |
191 |
+ dodoc CHANGES README |
192 |
+ |
193 |
+ if use doc; then |
194 |
+ dodoc doc/arm/Bv9ARM.pdf |
195 |
+ |
196 |
+ docinto misc |
197 |
+ dodoc -r doc/misc/ |
198 |
+ |
199 |
+ # might a 'html' useflag make sense? |
200 |
+ docinto html |
201 |
+ dodoc -r doc/arm/ |
202 |
+ |
203 |
+ docinto contrib |
204 |
+ dodoc contrib/scripts/{nanny.pl,named-bootconf.sh} |
205 |
+ |
206 |
+ # some handy-dandy dynamic dns examples |
207 |
+ pushd "${ED}"/usr/share/doc/${PF} 1>/dev/null || die |
208 |
+ tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die |
209 |
+ popd 1>/dev/null || die |
210 |
+ fi |
211 |
+ |
212 |
+ insinto /etc/bind |
213 |
+ newins "${FILESDIR}"/named.conf-r8 named.conf |
214 |
+ |
215 |
+ # ftp://ftp.rs.internic.net/domain/named.cache: |
216 |
+ insinto /var/bind |
217 |
+ newins "${FILESDIR}"/named.cache-r3 named.cache |
218 |
+ |
219 |
+ insinto /var/bind/pri |
220 |
+ newins "${FILESDIR}"/localhost.zone-r3 localhost.zone |
221 |
+ |
222 |
+ newinitd "${FILESDIR}"/named.init-r13 named |
223 |
+ newconfd "${FILESDIR}"/named.confd-r7 named |
224 |
+ |
225 |
+ newenvd "${FILESDIR}"/10bind.env 10bind |
226 |
+ |
227 |
+ # Let's get rid of those tools and their manpages since they're provided by bind-tools |
228 |
+ rm -f "${ED}"/usr/share/man/man1/{dig,host,nslookup}.1* || die |
229 |
+ rm -f "${ED}"/usr/share/man/man8/nsupdate.8* || die |
230 |
+ rm -f "${ED}"/usr/bin/{dig,host,nslookup,nsupdate} || die |
231 |
+ rm -f "${ED}"/usr/sbin/{dig,host,nslookup,nsupdate} || die |
232 |
+ for tool in dsfromkey importkey keyfromlabel keygen \ |
233 |
+ revoke settime signzone verify; do |
234 |
+ rm -f "${ED}"/usr/{,s}bin/dnssec-"${tool}" || die |
235 |
+ rm -f "${ED}"/usr/share/man/man8/dnssec-"${tool}".8* || die |
236 |
+ done |
237 |
+ |
238 |
+ # bug 405251, library archives aren't properly handled by --enable/disable-static |
239 |
+ if ! use static-libs; then |
240 |
+ find "${ED}" -type f -name '*.a' -delete || die |
241 |
+ fi |
242 |
+ |
243 |
+ # bug 405251 |
244 |
+ find "${ED}" -type f -name '*.la' -delete || die |
245 |
+ |
246 |
+ if use python; then |
247 |
+ install_python_tools() { |
248 |
+ dosbin bin/python/dnssec-{checkds,coverage} |
249 |
+ } |
250 |
+ python_foreach_impl install_python_tools |
251 |
+ |
252 |
+ python_replicate_script "${ED}/usr/sbin/dnssec-checkds" |
253 |
+ python_replicate_script "${ED}/usr/sbin/dnssec-coverage" |
254 |
+ fi |
255 |
+ |
256 |
+ # bug 450406 |
257 |
+ dosym named.cache /var/bind/root.cache |
258 |
+ |
259 |
+ dosym ../../var/bind/pri /etc/bind/pri |
260 |
+ dosym ../../var/bind/sec /etc/bind/sec |
261 |
+ dosym ../../var/bind/dyn /etc/bind/dyn |
262 |
+ keepdir /var/bind/{pri,sec,dyn} |
263 |
+ |
264 |
+ dodir /var/log/named |
265 |
+ |
266 |
+ fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn} |
267 |
+ fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} |
268 |
+ fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} |
269 |
+ fperms 0750 /etc/bind /var/bind/pri |
270 |
+ fperms 0770 /var/log/named /var/bind/{,sec,dyn} |
271 |
+ |
272 |
+ systemd_newunit "${FILESDIR}/named.service-r1" named.service |
273 |
+ systemd_dotmpfilesd "${FILESDIR}"/named.conf |
274 |
+ exeinto /usr/libexec |
275 |
+ doexe "${FILESDIR}/generate-rndc-key.sh" |
276 |
+} |
277 |
+ |
278 |
+pkg_postinst() { |
279 |
+ if [ ! -f '/etc/bind/rndc.key' ]; then |
280 |
+ if use urandom; then |
281 |
+ einfo "Using /dev/urandom for generating rndc.key" |
282 |
+ /usr/sbin/rndc-confgen -r /dev/urandom -a |
283 |
+ echo |
284 |
+ else |
285 |
+ einfo "Using /dev/random for generating rndc.key" |
286 |
+ /usr/sbin/rndc-confgen -a |
287 |
+ echo |
288 |
+ fi |
289 |
+ chown root:named /etc/bind/rndc.key || die |
290 |
+ chmod 0640 /etc/bind/rndc.key || die |
291 |
+ fi |
292 |
+ |
293 |
+ einfo |
294 |
+ einfo "You can edit /etc/conf.d/named to customize named settings" |
295 |
+ einfo |
296 |
+ use mysql || use postgres || use ldap && { |
297 |
+ elog "If your named depends on MySQL/PostgreSQL or LDAP," |
298 |
+ elog "uncomment the specified rc_named_* lines in your" |
299 |
+ elog "/etc/conf.d/named config to ensure they'll start before bind" |
300 |
+ einfo |
301 |
+ } |
302 |
+ einfo "If you'd like to run bind in a chroot AND this is a new" |
303 |
+ einfo "install OR your bind doesn't already run in a chroot:" |
304 |
+ einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." |
305 |
+ einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" |
306 |
+ einfo |
307 |
+ |
308 |
+ CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) |
309 |
+ if [[ -n ${CHROOT} ]]; then |
310 |
+ elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
311 |
+ elog "To enable the old behaviour (without using mount) uncomment the" |
312 |
+ elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
313 |
+ elog "If you decide to use the new/default method, ensure to make backup" |
314 |
+ elog "first and merge your existing configs/zones to /etc/bind and" |
315 |
+ elog "/var/bind because bind will now mount the needed directories into" |
316 |
+ elog "the chroot dir." |
317 |
+ fi |
318 |
+} |
319 |
+ |
320 |
+pkg_config() { |
321 |
+ CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) |
322 |
+ CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) |
323 |
+ CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP}) |
324 |
+ |
325 |
+ if [[ -z "${CHROOT}" ]]; then |
326 |
+ eerror "This config script is designed to automate setting up" |
327 |
+ eerror "a chrooted bind/named. To do so, please first uncomment" |
328 |
+ eerror "and set the CHROOT variable in '/etc/conf.d/named'." |
329 |
+ die "Unset CHROOT" |
330 |
+ fi |
331 |
+ if [[ -d "${CHROOT}" ]]; then |
332 |
+ ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
333 |
+ ewarn "To enable the old behaviour (without using mount) uncomment the" |
334 |
+ ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
335 |
+ ewarn |
336 |
+ ewarn "${CHROOT} already exists... some things might become overridden" |
337 |
+ ewarn "press CTRL+C if you don't want to continue" |
338 |
+ sleep 10 |
339 |
+ fi |
340 |
+ |
341 |
+ echo; einfo "Setting up the chroot directory..." |
342 |
+ |
343 |
+ mkdir -m 0750 -p ${CHROOT} || die |
344 |
+ mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} || die |
345 |
+ mkdir -m 0750 -p ${CHROOT}/etc/bind || die |
346 |
+ mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ || die |
347 |
+ |
348 |
+ chown root:named \ |
349 |
+ ${CHROOT} \ |
350 |
+ ${CHROOT}/var/{bind,log/named} \ |
351 |
+ ${CHROOT}/run/named/ \ |
352 |
+ ${CHROOT}/etc/bind \ |
353 |
+ || die |
354 |
+ |
355 |
+ mknod ${CHROOT}/dev/null c 1 3 || die |
356 |
+ chmod 0666 ${CHROOT}/dev/null || die |
357 |
+ |
358 |
+ mknod ${CHROOT}/dev/zero c 1 5 || die |
359 |
+ chmod 0666 ${CHROOT}/dev/zero || die |
360 |
+ |
361 |
+ if use urandom; then |
362 |
+ mknod ${CHROOT}/dev/urandom c 1 9 || die |
363 |
+ chmod 0666 ${CHROOT}/dev/urandom || die |
364 |
+ else |
365 |
+ mknod ${CHROOT}/dev/random c 1 8 || die |
366 |
+ chmod 0666 ${CHROOT}/dev/random || die |
367 |
+ fi |
368 |
+ |
369 |
+ if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then |
370 |
+ cp -a /etc/bind ${CHROOT}/etc/ || die |
371 |
+ cp -a /var/bind ${CHROOT}/var/ || die |
372 |
+ fi |
373 |
+ |
374 |
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then |
375 |
+ if use geoip; then |
376 |
+ mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP || die |
377 |
+ elif use geoip2; then |
378 |
+ mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP2 || die |
379 |
+ fi |
380 |
+ fi |
381 |
+ |
382 |
+ elog "You may need to add the following line to your syslog-ng.conf:" |
383 |
+ elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" |
384 |
+} |