1 |
commit: ff38f764e611285a2f052e18f29cd8777c98fccd |
2 |
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 25 14:29:25 2019 +0000 |
4 |
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 25 14:33:30 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff38f764 |
7 |
|
8 |
net-dns/bind: Version bump re bug 678544 |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org> |
12 |
|
13 |
net-dns/bind/Manifest | 1 + |
14 |
net-dns/bind/bind-9.12.3_p4.ebuild | 407 +++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 408 insertions(+) |
16 |
|
17 |
diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest |
18 |
index cc27a263920..93f9679e1ae 100644 |
19 |
--- a/net-dns/bind/Manifest |
20 |
+++ b/net-dns/bind/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST bind-9.12.2_p2.tar.gz 9422128 BLAKE2B c7d56f025f381a0136aa67ccd49a3254fcfe566d5e3601410e5cada26ccab32a901fe6e14bc14e6e287fa2b3904a4eee8e3ef63329f9bc4cb11f204590ff3623 SHA512 458adf6b3d0df286e7d345a21c40b639efcb275e76f9e0bf4e40a5d76dcac875016324393e129f29397be326d1017367c506ec9cbb35871c98fad4281bc4e05a |
23 |
DIST bind-9.12.3_p1.tar.gz 8625693 BLAKE2B 1899e04e409d3dafe63494fb7a0d8b813a6487754149bbfd01888cddc5e134ac675e9ac790684fb6fd8de4b1484e23ed7f1881c01234c9f16b27180c9a4594a9 SHA512 c1c91de88e4297e79b527775edd525c6fa948f169977563ab2e6ca93cac7317f8ca85863567f5cc151d4c6e3c081864ab1cf813bcfdd1165b52e9471b8317c28 |
24 |
+DIST bind-9.12.3_p4.tar.gz 8627833 BLAKE2B f7f8b88d8179f2df92b3105a49f30f7de5ccfe78a4a51f6bfa08e732968bf8e4c35f298c4209d8d05bea4d71b8669fd360d4c17193574eda471ba4d7ad742092 SHA512 42c41f47a0282dc08ee875fe098ce84b26384dba5efbaf99b557d34c4271e0d6aac70126f280a3ee157e8604cce16901c8cd51fab791dec82f4a3d00c054f363 |
25 |
DIST dyndns-samples.tbz2 22866 BLAKE2B 409890653c6536cb9c0e3ba809d2bfde0e0ae73a2a101b4f229b46c01568466bc022bbbc37712171adbd08c572733e93630feab95a0fcd1ac50a7d37da1d1108 SHA512 83b0bf99f8e9ff709e8e9336d8c5231b98a4b5f0c60c10792f34931e32cc638d261967dfa5a83151ec3740977d94ddd6e21e9ce91267b3e279b88affdbc18cac |
26 |
|
27 |
diff --git a/net-dns/bind/bind-9.12.3_p4.ebuild b/net-dns/bind/bind-9.12.3_p4.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..21445040753 |
30 |
--- /dev/null |
31 |
+++ b/net-dns/bind/bind-9.12.3_p4.ebuild |
32 |
@@ -0,0 +1,407 @@ |
33 |
+# Copyright 1999-2019 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=( python2_7 python3_{4,5,6,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="BIND - Berkeley Internet Name Domain - Name Server" |
62 |
+HOMEPAGE="http://www.isc.org/software/bind" |
63 |
+SRC_URI="https://www.isc.org/downloads/file/${MY_P}/?version=tar-gz -> ${P}.tar.gz |
64 |
+ doc? ( mirror://gentoo/dyndns-samples.tbz2 )" |
65 |
+# sdb-ldap? ( |
66 |
+# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2 |
67 |
+# )" |
68 |
+ |
69 |
+LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0" |
70 |
+SLOT="0" |
71 |
+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" |
72 |
+# -berkdb by default re bug 602682 |
73 |
+IUSE="-berkdb +caps dlz dnstap doc dnsrps fixed-rrset geoip gost gssapi ipv6 |
74 |
+json ldap libressl lmdb mysql odbc postgres python rpz seccomp selinux ssl static-libs |
75 |
++threads 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 |
+ postgres? ( dlz ) |
81 |
+ berkdb? ( dlz ) |
82 |
+ mysql? ( dlz !threads ) |
83 |
+ odbc? ( dlz ) |
84 |
+ ldap? ( dlz ) |
85 |
+ gost? ( !libressl ssl ) |
86 |
+ threads? ( caps ) |
87 |
+ dnstap? ( threads ) |
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? ( dev-db/mysql-connector-c:0= ) |
97 |
+ odbc? ( >=dev-db/unixODBC-2.2.6 ) |
98 |
+ ldap? ( net-nds/openldap ) |
99 |
+ postgres? ( dev-db/postgresql:= ) |
100 |
+ caps? ( >=sys-libs/libcap-2.1.0 ) |
101 |
+ xml? ( dev-libs/libxml2 ) |
102 |
+ geoip? ( >=dev-libs/geoip-1.4.6 ) |
103 |
+ gssapi? ( virtual/krb5 ) |
104 |
+ gost? ( |
105 |
+ || ( |
106 |
+ =dev-libs/openssl-1.0*[-bindist] |
107 |
+ ( |
108 |
+ >=dev-libs/openssl-1.1 |
109 |
+ dev-libs/gost-engine |
110 |
+ ) |
111 |
+ ) |
112 |
+ ) |
113 |
+ seccomp? ( sys-libs/libseccomp ) |
114 |
+ json? ( dev-libs/json-c:= ) |
115 |
+ lmdb? ( dev-db/lmdb ) |
116 |
+ zlib? ( sys-libs/zlib ) |
117 |
+ dnstap? ( dev-libs/fstrm dev-libs/protobuf-c ) |
118 |
+ python? ( |
119 |
+ ${PYTHON_DEPS} |
120 |
+ dev-python/ply[${PYTHON_USEDEP}] |
121 |
+ )" |
122 |
+# sdb-ldap? ( net-nds/openldap ) |
123 |
+ |
124 |
+RDEPEND="${DEPEND} |
125 |
+ selinux? ( sec-policy/selinux-bind ) |
126 |
+ || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )" |
127 |
+ |
128 |
+S="${WORKDIR}/${MY_P}" |
129 |
+ |
130 |
+# bug 479092, requires networking |
131 |
+RESTRICT="test" |
132 |
+ |
133 |
+pkg_setup() { |
134 |
+ ebegin "Creating named group and user" |
135 |
+ enewgroup named 40 |
136 |
+ enewuser named 40 -1 /etc/bind named |
137 |
+ eend ${?} |
138 |
+} |
139 |
+ |
140 |
+src_prepare() { |
141 |
+ default |
142 |
+ |
143 |
+ # Adjusting PATHs in manpages |
144 |
+ for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do |
145 |
+ sed -i \ |
146 |
+ -e 's:/etc/named.conf:/etc/bind/named.conf:g' \ |
147 |
+ -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ |
148 |
+ -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ |
149 |
+ "${i}" || die "sed failed, ${i} doesn't exist" |
150 |
+ done |
151 |
+ |
152 |
+# if use dlz; then |
153 |
+# # sdb-ldap patch as per bug #160567 |
154 |
+# # Upstream URL: http://bind9-ldap.bayour.com/ |
155 |
+# # New patch take from bug 302735 |
156 |
+# if use sdb-ldap; then |
157 |
+# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch |
158 |
+# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/ |
159 |
+# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/ |
160 |
+# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/ |
161 |
+# fi |
162 |
+# fi |
163 |
+ |
164 |
+ # should be installed by bind-tools |
165 |
+ sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die |
166 |
+ |
167 |
+ # Disable tests for now, bug 406399 |
168 |
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die |
169 |
+ |
170 |
+ # bug #220361 |
171 |
+ rm aclocal.m4 |
172 |
+ rm -rf libtool.m4/ |
173 |
+ eautoreconf |
174 |
+} |
175 |
+ |
176 |
+src_configure() { |
177 |
+ local myeconfargs=( |
178 |
+ --sysconfdir=/etc/bind |
179 |
+ --localstatedir=/var |
180 |
+ --with-libtool |
181 |
+ --enable-full-report |
182 |
+ --without-readline |
183 |
+ $(use_enable caps linux-caps) |
184 |
+ $(use_enable dnsrps) |
185 |
+ $(use_enable dnstap) |
186 |
+ $(use_enable fixed-rrset) |
187 |
+ $(use_enable ipv6) |
188 |
+ $(use_enable rpz rpz-nsdname) |
189 |
+ $(use_enable rpz rpz-nsip) |
190 |
+ $(use_enable seccomp) |
191 |
+ # $(use_enable static-libs static) |
192 |
+ $(use_enable threads) |
193 |
+ $(use_with berkdb dlz-bdb) |
194 |
+ $(use_with dlz dlopen) |
195 |
+ $(use_with dlz dlz-filesystem) |
196 |
+ $(use_with dlz dlz-stub) |
197 |
+ $(use_with gost) |
198 |
+ $(use_with gssapi) |
199 |
+ $(use_with json libjson) |
200 |
+ $(use_with ldap dlz-ldap) |
201 |
+ $(use_with mysql dlz-mysql) |
202 |
+ $(use_with odbc dlz-odbc) |
203 |
+ $(use_with postgres dlz-postgres) |
204 |
+ $(use_with lmdb) |
205 |
+ $(use_with python) |
206 |
+ $(use_with ssl ecdsa) |
207 |
+ $(use_with ssl openssl "${EPREFIX}"/usr) |
208 |
+ $(use_with xml libxml2) |
209 |
+ $(use_with zlib) |
210 |
+ ) |
211 |
+ |
212 |
+ if use urandom; then |
213 |
+ myeconfargs+=( --with-randomdev=/dev/urandom ) |
214 |
+ else |
215 |
+ myeconfargs+=( --with-randomdev=/dev/random ) |
216 |
+ fi |
217 |
+ |
218 |
+ use geoip && myeconfargs+=( --with-geoip ) |
219 |
+ |
220 |
+ # bug #158664 |
221 |
+# gcc-specs-ssp && replace-flags -O[23s] -O |
222 |
+ |
223 |
+ # To include db.h from proper path |
224 |
+ use berkdb && append-flags "-I$(db_includedir)" |
225 |
+ |
226 |
+ export BUILD_CC=$(tc-getBUILD_CC) |
227 |
+ econf "${myeconfargs[@]}" |
228 |
+ |
229 |
+ # bug #151839 |
230 |
+ echo '#undef SO_BSDCOMPAT' >> config.h |
231 |
+} |
232 |
+ |
233 |
+src_install() { |
234 |
+ emake DESTDIR="${D}" install |
235 |
+ |
236 |
+ dodoc CHANGES README |
237 |
+ |
238 |
+ if use doc; then |
239 |
+ dodoc doc/arm/Bv9ARM.pdf |
240 |
+ |
241 |
+ docinto misc |
242 |
+ dodoc doc/misc/* |
243 |
+ |
244 |
+ # might a 'html' useflag make sense? |
245 |
+ docinto html |
246 |
+ dodoc -r doc/arm/* |
247 |
+ |
248 |
+ docinto contrib |
249 |
+ dodoc contrib/scripts/{nanny.pl,named-bootconf.sh} |
250 |
+ |
251 |
+ # some handy-dandy dynamic dns examples |
252 |
+ pushd "${ED%/}"/usr/share/doc/${PF} 1>/dev/null || die |
253 |
+ tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die |
254 |
+ popd 1>/dev/null || die |
255 |
+ fi |
256 |
+ |
257 |
+ insinto /etc/bind |
258 |
+ newins "${FILESDIR}"/named.conf-r8 named.conf |
259 |
+ |
260 |
+ # ftp://ftp.rs.internic.net/domain/named.cache: |
261 |
+ insinto /var/bind |
262 |
+ newins "${FILESDIR}"/named.cache-r3 named.cache |
263 |
+ |
264 |
+ insinto /var/bind/pri |
265 |
+ newins "${FILESDIR}"/localhost.zone-r3 localhost.zone |
266 |
+ |
267 |
+ newinitd "${FILESDIR}"/named.init-r13 named |
268 |
+ newconfd "${FILESDIR}"/named.confd-r7 named |
269 |
+ |
270 |
+ if use gost; then |
271 |
+ sed -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' \ |
272 |
+ -i "${ED%/}/etc/init.d/named" || die |
273 |
+ else |
274 |
+ sed -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' \ |
275 |
+ -i "${ED%/}/etc/init.d/named" || die |
276 |
+ fi |
277 |
+ |
278 |
+ newenvd "${FILESDIR}"/10bind.env 10bind |
279 |
+ |
280 |
+ # Let's get rid of those tools and their manpages since they're provided by bind-tools |
281 |
+ rm -f "${ED%/}"/usr/share/man/man1/{dig,host,nslookup}.1* |
282 |
+ rm -f "${ED%/}"/usr/share/man/man8/nsupdate.8* |
283 |
+ rm -f "${ED%/}"/usr/bin/{dig,host,nslookup,nsupdate} |
284 |
+ rm -f "${ED%/}"/usr/sbin/{dig,host,nslookup,nsupdate} |
285 |
+ for tool in dsfromkey importkey keyfromlabel keygen \ |
286 |
+ revoke settime signzone verify; do |
287 |
+ rm -f "${ED%/}"/usr/{,s}bin/dnssec-"${tool}" |
288 |
+ rm -f "${ED%/}"/usr/share/man/man8/dnssec-"${tool}".8* |
289 |
+ done |
290 |
+ |
291 |
+ # bug 405251, library archives aren't properly handled by --enable/disable-static |
292 |
+ if ! use static-libs; then |
293 |
+ find "${ED}" -type f -name '*.a' -delete || die |
294 |
+ fi |
295 |
+ |
296 |
+ # bug 405251 |
297 |
+ find "${ED}" -type f -name '*.la' -delete || die |
298 |
+ |
299 |
+ if use python; then |
300 |
+ install_python_tools() { |
301 |
+ dosbin bin/python/dnssec-{checkds,coverage} |
302 |
+ } |
303 |
+ python_foreach_impl install_python_tools |
304 |
+ |
305 |
+ python_replicate_script "${ED%/}/usr/sbin/dnssec-checkds" |
306 |
+ python_replicate_script "${ED%/}/usr/sbin/dnssec-coverage" |
307 |
+ fi |
308 |
+ |
309 |
+ # bug 450406 |
310 |
+ dosym named.cache /var/bind/root.cache |
311 |
+ |
312 |
+ dosym /var/bind/pri /etc/bind/pri |
313 |
+ dosym /var/bind/sec /etc/bind/sec |
314 |
+ dosym /var/bind/dyn /etc/bind/dyn |
315 |
+ keepdir /var/bind/{pri,sec,dyn} |
316 |
+ |
317 |
+ dodir /var/log/named |
318 |
+ |
319 |
+ fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn} |
320 |
+ fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} |
321 |
+ fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} |
322 |
+ fperms 0750 /etc/bind /var/bind/pri |
323 |
+ fperms 0770 /var/log/named /var/bind/{,sec,dyn} |
324 |
+ |
325 |
+ systemd_newunit "${FILESDIR}/named.service-r1" named.service |
326 |
+ systemd_dotmpfilesd "${FILESDIR}"/named.conf |
327 |
+ exeinto /usr/libexec |
328 |
+ doexe "${FILESDIR}/generate-rndc-key.sh" |
329 |
+} |
330 |
+ |
331 |
+pkg_postinst() { |
332 |
+ if [ ! -f '/etc/bind/rndc.key' ]; then |
333 |
+ if use urandom; then |
334 |
+ einfo "Using /dev/urandom for generating rndc.key" |
335 |
+ /usr/sbin/rndc-confgen -r /dev/urandom -a |
336 |
+ echo |
337 |
+ else |
338 |
+ einfo "Using /dev/random for generating rndc.key" |
339 |
+ /usr/sbin/rndc-confgen -a |
340 |
+ echo |
341 |
+ fi |
342 |
+ chown root:named /etc/bind/rndc.key || die |
343 |
+ chmod 0640 /etc/bind/rndc.key || die |
344 |
+ fi |
345 |
+ |
346 |
+ einfo |
347 |
+ einfo "You can edit /etc/conf.d/named to customize named settings" |
348 |
+ einfo |
349 |
+ use mysql || use postgres || use ldap && { |
350 |
+ elog "If your named depends on MySQL/PostgreSQL or LDAP," |
351 |
+ elog "uncomment the specified rc_named_* lines in your" |
352 |
+ elog "/etc/conf.d/named config to ensure they'll start before bind" |
353 |
+ einfo |
354 |
+ } |
355 |
+ einfo "If you'd like to run bind in a chroot AND this is a new" |
356 |
+ einfo "install OR your bind doesn't already run in a chroot:" |
357 |
+ einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." |
358 |
+ einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" |
359 |
+ einfo |
360 |
+ |
361 |
+ CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) |
362 |
+ if [[ -n ${CHROOT} ]]; then |
363 |
+ elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
364 |
+ elog "To enable the old behaviour (without using mount) uncomment the" |
365 |
+ elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
366 |
+ elog "If you decide to use the new/default method, ensure to make backup" |
367 |
+ elog "first and merge your existing configs/zones to /etc/bind and" |
368 |
+ elog "/var/bind because bind will now mount the needed directories into" |
369 |
+ elog "the chroot dir." |
370 |
+ fi |
371 |
+} |
372 |
+ |
373 |
+pkg_config() { |
374 |
+ CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) |
375 |
+ CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) |
376 |
+ CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP}) |
377 |
+ |
378 |
+ if [[ -z "${CHROOT}" ]]; then |
379 |
+ eerror "This config script is designed to automate setting up" |
380 |
+ eerror "a chrooted bind/named. To do so, please first uncomment" |
381 |
+ eerror "and set the CHROOT variable in '/etc/conf.d/named'." |
382 |
+ die "Unset CHROOT" |
383 |
+ fi |
384 |
+ if [[ -d "${CHROOT}" ]]; then |
385 |
+ ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
386 |
+ ewarn "To enable the old behaviour (without using mount) uncomment the" |
387 |
+ ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
388 |
+ ewarn |
389 |
+ ewarn "${CHROOT} already exists... some things might become overridden" |
390 |
+ ewarn "press CTRL+C if you don't want to continue" |
391 |
+ sleep 10 |
392 |
+ fi |
393 |
+ |
394 |
+ echo; einfo "Setting up the chroot directory..." |
395 |
+ |
396 |
+ mkdir -m 0750 -p ${CHROOT} || die |
397 |
+ mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} || die |
398 |
+ mkdir -m 0750 -p ${CHROOT}/etc/bind || die |
399 |
+ mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ || die |
400 |
+ # As of bind 9.8.0 |
401 |
+ if has_version net-dns/bind[gost]; then |
402 |
+ mkdir -m 0755 -p ${CHROOT}/usr/$(get_libdir)/engines || die |
403 |
+ if [ "$(get_libdir)" = "lib64" ]; then |
404 |
+ ln -s lib64 ${CHROOT}/usr/lib || die |
405 |
+ fi |
406 |
+ fi |
407 |
+ chown root:named \ |
408 |
+ ${CHROOT} \ |
409 |
+ ${CHROOT}/var/{bind,log/named} \ |
410 |
+ ${CHROOT}/run/named/ \ |
411 |
+ ${CHROOT}/etc/bind \ |
412 |
+ || die |
413 |
+ |
414 |
+ mknod ${CHROOT}/dev/null c 1 3 || die |
415 |
+ chmod 0666 ${CHROOT}/dev/null || die |
416 |
+ |
417 |
+ mknod ${CHROOT}/dev/zero c 1 5 || die |
418 |
+ chmod 0666 ${CHROOT}/dev/zero || die |
419 |
+ |
420 |
+ if use urandom; then |
421 |
+ mknod ${CHROOT}/dev/urandom c 1 9 || die |
422 |
+ chmod 0666 ${CHROOT}/dev/urandom || die |
423 |
+ else |
424 |
+ mknod ${CHROOT}/dev/random c 1 8 || die |
425 |
+ chmod 0666 ${CHROOT}/dev/random || die |
426 |
+ fi |
427 |
+ |
428 |
+ if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then |
429 |
+ cp -a /etc/bind ${CHROOT}/etc/ || die |
430 |
+ cp -a /var/bind ${CHROOT}/var/ || die |
431 |
+ fi |
432 |
+ |
433 |
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then |
434 |
+ mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP || die |
435 |
+ fi |
436 |
+ |
437 |
+ elog "You may need to add the following line to your syslog-ng.conf:" |
438 |
+ elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" |
439 |
+} |