1 |
idl0r 13/12/23 17:02:40 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: bind-9.9.4_p1.ebuild |
5 |
Removed: bind-9.9.4.ebuild |
6 |
Log: |
7 |
Version bump. |
8 |
|
9 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key B427ABC8) |
10 |
|
11 |
Revision Changes Path |
12 |
1.474 net-dns/bind/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?rev=1.474&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?rev=1.474&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?r1=1.473&r2=1.474 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v |
21 |
retrieving revision 1.473 |
22 |
retrieving revision 1.474 |
23 |
diff -u -r1.473 -r1.474 |
24 |
--- ChangeLog 13 Oct 2013 15:07:21 -0000 1.473 |
25 |
+++ ChangeLog 23 Dec 2013 17:02:40 -0000 1.474 |
26 |
@@ -1,6 +1,12 @@ |
27 |
# ChangeLog for net-dns/bind |
28 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.473 2013/10/13 15:07:21 idl0r Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.474 2013/12/23 17:02:40 idl0r Exp $ |
31 |
+ |
32 |
+*bind-9.9.4_p1 (23 Dec 2013) |
33 |
+ |
34 |
+ 23 Dec 2013; Christian Ruppert <idl0r@g.o> -bind-9.9.4.ebuild, |
35 |
+ +bind-9.9.4_p1.ebuild: |
36 |
+ Version bump. |
37 |
|
38 |
*bind-9.9.4 (13 Oct 2013) |
39 |
*bind-9.8.6 (13 Oct 2013) |
40 |
|
41 |
|
42 |
|
43 |
1.1 net-dns/bind/bind-9.9.4_p1.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.9.4_p1.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.9.4_p1.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: bind-9.9.4_p1.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2013 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.9.4_p1.ebuild,v 1.1 2013/12/23 17:02:40 idl0r Exp $ |
53 |
|
54 |
# Re dlz/mysql and threads, needs to be verified.. |
55 |
# MySQL uses thread local storage in its C api. Thus MySQL |
56 |
# requires that each thread of an application execute a MySQL |
57 |
# thread initialization to setup the thread local storage. |
58 |
# This is impossible to do safely while staying within the DLZ |
59 |
# driver API. This is a limitation caused by MySQL, and not the DLZ API. |
60 |
# Because of this BIND MUST only run with a single thread when |
61 |
# using the MySQL driver. |
62 |
|
63 |
EAPI="5" |
64 |
|
65 |
PYTHON_DEPEND="python? 2:2.7 3" |
66 |
SUPPORT_PYTHON_ABIS="1" |
67 |
|
68 |
inherit python eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd |
69 |
|
70 |
MY_PV="${PV/_p/-P}" |
71 |
MY_PV="${MY_PV/_rc/rc}" |
72 |
MY_P="${PN}-${MY_PV}" |
73 |
|
74 |
SDB_LDAP_VER="1.1.0-fc14" |
75 |
|
76 |
# bind-9.8.0-P1-geoip-1.3.patch |
77 |
GEOIP_PV=1.3 |
78 |
#GEOIP_PV_AGAINST="${MY_PV}" |
79 |
GEOIP_PV_AGAINST="9.9.2" |
80 |
GEOIP_P="bind-${GEOIP_PV_AGAINST}-geoip-${GEOIP_PV}" |
81 |
GEOIP_PATCH_A="${GEOIP_P}.patch" |
82 |
GEOIP_DOC_A="bind-geoip-1.3-readme.txt" |
83 |
GEOIP_SRC_URI_BASE="http://bind-geoip.googlecode.com/" |
84 |
|
85 |
RRL_PV="${MY_PV}" |
86 |
|
87 |
# GeoIP: http://bind-geoip.googlecode.com/ |
88 |
# SDB-LDAP: http://bind9-ldap.bayour.com/ |
89 |
|
90 |
# geoip? ( ${GEOIP_SRC_URI_BASE}/files/${GEOIP_DOC_A} |
91 |
# ${GEOIP_SRC_URI_BASE}/files/${GEOIP_PATCH_A} ) |
92 |
|
93 |
DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" |
94 |
HOMEPAGE="http://www.isc.org/software/bind" |
95 |
SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz |
96 |
doc? ( mirror://gentoo/dyndns-samples.tbz2 ) |
97 |
geoip? ( ${GEOIP_SRC_URI_BASE}/files/${GEOIP_DOC_A} |
98 |
http://dev.gentoo.org/~idl0r/${P}-geoip.patch ) |
99 |
sdb-ldap? ( |
100 |
http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2 |
101 |
)" |
102 |
|
103 |
LICENSE="ISC BSD BSD-2 HPND JNIC openssl" |
104 |
SLOT="0" |
105 |
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" |
106 |
IUSE="berkdb caps dlz doc filter-aaaa fixed-rrset geoip gost gssapi idn ipv6 |
107 |
ldap mysql odbc postgres python rpz rrl sdb-ldap selinux ssl static-libs threads |
108 |
urandom xml" |
109 |
# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687 |
110 |
|
111 |
REQUIRED_USE="postgres? ( dlz ) |
112 |
berkdb? ( dlz ) |
113 |
mysql? ( dlz !threads ) |
114 |
odbc? ( dlz ) |
115 |
ldap? ( dlz ) |
116 |
sdb-ldap? ( dlz ) |
117 |
gost? ( ssl ) |
118 |
threads? ( caps )" |
119 |
|
120 |
DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g[-bindist] ) |
121 |
mysql? ( >=virtual/mysql-4.0 ) |
122 |
odbc? ( >=dev-db/unixODBC-2.2.6 ) |
123 |
ldap? ( net-nds/openldap ) |
124 |
idn? ( net-dns/idnkit ) |
125 |
postgres? ( dev-db/postgresql-base ) |
126 |
caps? ( >=sys-libs/libcap-2.1.0 ) |
127 |
xml? ( dev-libs/libxml2 ) |
128 |
geoip? ( >=dev-libs/geoip-1.4.6 ) |
129 |
gssapi? ( virtual/krb5 ) |
130 |
sdb-ldap? ( net-nds/openldap ) |
131 |
gost? ( >=dev-libs/openssl-1.0.0[-bindist] ) |
132 |
python? ( virtual/python-argparse )" |
133 |
|
134 |
RDEPEND="${DEPEND} |
135 |
selinux? ( sec-policy/selinux-bind ) |
136 |
|| ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )" |
137 |
|
138 |
S="${WORKDIR}/${MY_P}" |
139 |
|
140 |
pkg_setup() { |
141 |
ebegin "Creating named group and user" |
142 |
enewgroup named 40 |
143 |
enewuser named 40 -1 /etc/bind named |
144 |
eend ${?} |
145 |
|
146 |
if use python; then |
147 |
python_pkg_setup |
148 |
fi |
149 |
} |
150 |
|
151 |
src_prepare() { |
152 |
# Adjusting PATHs in manpages |
153 |
for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do |
154 |
sed -i \ |
155 |
-e 's:/etc/named.conf:/etc/bind/named.conf:g' \ |
156 |
-e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ |
157 |
-e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ |
158 |
"${i}" || die "sed failed, ${i} doesn't exist" |
159 |
done |
160 |
|
161 |
if use dlz; then |
162 |
# bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse |
163 |
# (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/) |
164 |
if use mysql && has_version ">=dev-db/mysql-5"; then |
165 |
epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch |
166 |
fi |
167 |
|
168 |
if use odbc; then |
169 |
epatch "${FILESDIR}/${PN}-9.7.3-odbc-dlz-detect.patch" |
170 |
fi |
171 |
|
172 |
# sdb-ldap patch as per bug #160567 |
173 |
# Upstream URL: http://bind9-ldap.bayour.com/ |
174 |
# New patch take from bug 302735 |
175 |
if use sdb-ldap; then |
176 |
epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch |
177 |
cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/ |
178 |
cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/ |
179 |
cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/ |
180 |
fi |
181 |
fi |
182 |
|
183 |
# should be installed by bind-tools |
184 |
sed -i -r -e "s:(nsupdate|dig) ::g" bin/Makefile.in || die |
185 |
|
186 |
if use geoip; then |
187 |
# cp "${DISTDIR}"/${GEOIP_PATCH_A} "${S}" || die |
188 |
# sed -i -e 's:^ RELEASETYPE=: RELEASETYPE=-P:' \ |
189 |
# -e 's:RELEASEVER=:RELEASEVER=2:' \ |
190 |
# ${GEOIP_PATCH_A} || die |
191 |
# sed -i -e 's:^ PATCHVER=2: PATCHVER=4:' ${GEOIP_PATCH_A} || die |
192 |
# epatch -F0 ${GEOIP_PATCH_A} |
193 |
epatch -F0 "${DISTDIR}/${P}-geoip.patch" |
194 |
fi |
195 |
|
196 |
# Disable tests for now, bug 406399 |
197 |
sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die |
198 |
|
199 |
# bug #220361 |
200 |
rm aclocal.m4 |
201 |
rm -rf libtool.m4/ |
202 |
eautoreconf |
203 |
} |
204 |
|
205 |
src_configure() { |
206 |
local myconf="" |
207 |
|
208 |
if use urandom; then |
209 |
myconf="${myconf} --with-randomdev=/dev/urandom" |
210 |
else |
211 |
myconf="${myconf} --with-randomdev=/dev/random" |
212 |
fi |
213 |
|
214 |
use geoip && myconf="${myconf} --with-geoip" |
215 |
|
216 |
# bug #158664 |
217 |
# gcc-specs-ssp && replace-flags -O[23s] -O |
218 |
|
219 |
# To include db.h from proper path |
220 |
use berkdb && append-flags "-I$(db_includedir)" |
221 |
|
222 |
export BUILD_CC=$(tc-getBUILD_CC) |
223 |
econf \ |
224 |
--sysconfdir=/etc/bind \ |
225 |
--localstatedir=/var \ |
226 |
--with-libtool \ |
227 |
--enable-full-report \ |
228 |
$(use_enable threads) \ |
229 |
$(use_with dlz dlopen) \ |
230 |
$(use_with dlz dlz-filesystem) \ |
231 |
$(use_with dlz dlz-stub) \ |
232 |
$(use_with postgres dlz-postgres) \ |
233 |
$(use_with mysql dlz-mysql) \ |
234 |
$(use_with berkdb dlz-bdb) \ |
235 |
$(use_with ldap dlz-ldap) \ |
236 |
$(use_with odbc dlz-odbc) \ |
237 |
$(use_with ssl openssl "${EPREFIX}"/usr) \ |
238 |
$(use_with ssl ecdsa) \ |
239 |
$(use_with idn) \ |
240 |
$(use_enable ipv6) \ |
241 |
$(use_with xml libxml2) \ |
242 |
$(use_enable xml newstats) \ |
243 |
$(use_with gssapi) \ |
244 |
$(use_enable rpz rpz-nsip) \ |
245 |
$(use_enable rpz rpz-nsdname) \ |
246 |
$(use_enable caps linux-caps) \ |
247 |
$(use_with gost) \ |
248 |
$(use_enable filter-aaaa) \ |
249 |
$(use_enable fixed-rrset) \ |
250 |
$(use_enable rrl) \ |
251 |
$(use_with python) \ |
252 |
--without-readline \ |
253 |
${myconf} |
254 |
|
255 |
# $(use_enable static-libs static) \ |
256 |
|
257 |
# bug #151839 |
258 |
echo '#undef SO_BSDCOMPAT' >> config.h |
259 |
} |
260 |
|
261 |
src_install() { |
262 |
emake DESTDIR="${D}" install |
263 |
|
264 |
dodoc CHANGES FAQ README |
265 |
|
266 |
if use idn; then |
267 |
dodoc contrib/idn/README.idnkit |
268 |
fi |
269 |
|
270 |
if use doc; then |
271 |
dodoc doc/arm/Bv9ARM.pdf |
272 |
|
273 |
docinto misc |
274 |
dodoc doc/misc/* |
275 |
|
276 |
# might a 'html' useflag make sense? |
277 |
docinto html |
278 |
dohtml -r doc/arm/* |
279 |
|
280 |
docinto contrib |
281 |
dodoc contrib/named-bootconf/named-bootconf.sh \ |
282 |
contrib/nanny/nanny.pl |
283 |
|
284 |
# some handy-dandy dynamic dns examples |
285 |
pushd "${D}"/usr/share/doc/${PF} 1>/dev/null |
286 |
tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die |
287 |
popd 1>/dev/null |
288 |
fi |
289 |
|
290 |
use geoip && dodoc "${DISTDIR}"/${GEOIP_DOC_A} |
291 |
|
292 |
insinto /etc/bind |
293 |
newins "${FILESDIR}"/named.conf-r6 named.conf |
294 |
|
295 |
# ftp://ftp.rs.internic.net/domain/named.cache: |
296 |
insinto /var/bind |
297 |
doins "${FILESDIR}"/named.cache |
298 |
|
299 |
insinto /var/bind/pri |
300 |
newins "${FILESDIR}"/127.zone-r1 127.zone |
301 |
newins "${FILESDIR}"/localhost.zone-r3 localhost.zone |
302 |
|
303 |
newinitd "${FILESDIR}"/named.init-r12 named |
304 |
newconfd "${FILESDIR}"/named.confd-r6 named |
305 |
|
306 |
if use gost; then |
307 |
sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die |
308 |
else |
309 |
sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die |
310 |
fi |
311 |
|
312 |
newenvd "${FILESDIR}"/10bind.env 10bind |
313 |
|
314 |
# Let's get rid of those tools and their manpages since they're provided by bind-tools |
315 |
rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1* |
316 |
rm -f "${D}"/usr/share/man/man8/{dnssec-keygen,nsupdate}.8* |
317 |
rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate} |
318 |
rm -f "${D}"/usr/sbin/{dig,host,nslookup,dnssec-keygen,nsupdate} |
319 |
|
320 |
# bug 405251, library archives aren't properly handled by --enable/disable-static |
321 |
if ! use static-libs; then |
322 |
find "${D}" -type f -name '*.la' -delete || die |
323 |
fi |
324 |
|
325 |
if use python; then |
326 |
install_python_tools() { |
327 |
python_convert_shebangs $PYTHON_ABI bin/python/dnssec-checkds bin/python/dnssec-coverage |
328 |
exeinto /usr/sbin |
329 |
newexe bin/python/dnssec-checkds dnssec-checkds-${PYTHON_ABI} |
330 |
newexe bin/python/dnssec-coverage dnssec-coverage-${PYTHON_ABI} |
331 |
} |
332 |
python_execute_function install_python_tools |
333 |
|
334 |
rm -f "${D}/usr/sbin/dnssec-"{checkds,coverage} |
335 |
python_generate_wrapper_scripts "${D}usr/sbin/dnssec-checkds" |
336 |
python_generate_wrapper_scripts "${D}usr/sbin/dnssec-coverage" |
337 |
fi |
338 |
|
339 |
# bug 450406 |
340 |
dosym named.cache /var/bind/root.cache |
341 |
|
342 |
dosym /var/bind/pri /etc/bind/pri |
343 |
dosym /var/bind/sec /etc/bind/sec |
344 |
dosym /var/bind/dyn /etc/bind/dyn |
345 |
keepdir /var/bind/{pri,sec,dyn} |
346 |
|
347 |
dodir /var/{run,log}/named |
348 |
|
349 |
fowners root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri,dyn} |
350 |
fowners root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf} |
351 |
fperms 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf} |
352 |
fperms 0750 /etc/bind /var/bind/pri |
353 |
fperms 0770 /var/{run,log}/named /var/bind/{,sec,dyn} |
354 |
|
355 |
systemd_dounit "${FILESDIR}/named.service" |
356 |
systemd_dotmpfilesd "${FILESDIR}/named.conf" |
357 |
exeinto /usr/libexec |
358 |
doexe "${FILESDIR}/generate-rndc-key.sh" |
359 |
} |
360 |
|
361 |
pkg_postinst() { |
362 |
if [ ! -f '/etc/bind/rndc.key' ]; then |
363 |
if use urandom; then |
364 |
einfo "Using /dev/urandom for generating rndc.key" |
365 |
/usr/sbin/rndc-confgen -r /dev/urandom -a |
366 |
echo |
367 |
else |
368 |
einfo "Using /dev/random for generating rndc.key" |
369 |
/usr/sbin/rndc-confgen -a |
370 |
echo |
371 |
fi |
372 |
chown root:named /etc/bind/rndc.key |
373 |
chmod 0640 /etc/bind/rndc.key |
374 |
fi |
375 |
|
376 |
einfo |
377 |
einfo "You can edit /etc/conf.d/named to customize named settings" |
378 |
einfo |
379 |
use mysql || use postgres || use ldap && { |
380 |
elog "If your named depends on MySQL/PostgreSQL or LDAP," |
381 |
elog "uncomment the specified rc_named_* lines in your" |
382 |
elog "/etc/conf.d/named config to ensure they'll start before bind" |
383 |
einfo |
384 |
} |
385 |
einfo "If you'd like to run bind in a chroot AND this is a new" |
386 |
einfo "install OR your bind doesn't already run in a chroot:" |
387 |
einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." |
388 |
einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" |
389 |
einfo |
390 |
|
391 |
CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) |
392 |
if [[ -n ${CHROOT} ]]; then |
393 |
elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
394 |
elog "To enable the old behaviour (without using mount) uncomment the" |
395 |
elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
396 |
elog "If you decide to use the new/default method, ensure to make backup" |
397 |
elog "first and merge your existing configs/zones to /etc/bind and" |
398 |
elog "/var/bind because bind will now mount the needed directories into" |
399 |
elog "the chroot dir." |
400 |
fi |
401 |
|
402 |
ewarn |
403 |
ewarn "NOTE: /var/bind/named.ca has been renamed to /var/bind/named.cache" |
404 |
ewarn "you may need to fix your named.conf!" |
405 |
ewarn |
406 |
ewarn "NOTE: If you upgrade from <net-dns/bind-9.4.3_p5-r1, you may encounter permission problems" |
407 |
ewarn "To fix the permissions do:" |
408 |
ewarn "chown root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri,dyn}" |
409 |
ewarn "chown root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}" |
410 |
ewarn "chmod 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}" |
411 |
ewarn "chmod 0750 /etc/bind /var/bind/pri" |
412 |
ewarn "chmod 0770 /var/{run,log}/named /var/bind/{,sec,dyn}" |
413 |
ewarn |
414 |
} |
415 |
|
416 |
pkg_config() { |
417 |
CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) |
418 |
CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) |
419 |
CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP}) |
420 |
|
421 |
if [[ -z "${CHROOT}" ]]; then |
422 |
eerror "This config script is designed to automate setting up" |
423 |
eerror "a chrooted bind/named. To do so, please first uncomment" |
424 |
eerror "and set the CHROOT variable in '/etc/conf.d/named'." |
425 |
die "Unset CHROOT" |
426 |
fi |
427 |
if [[ -d "${CHROOT}" ]]; then |
428 |
ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
429 |
ewarn "To enable the old behaviour (without using mount) uncomment the" |
430 |
ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
431 |
ewarn |
432 |
ewarn "${CHROOT} already exists... some things might become overridden" |
433 |
ewarn "press CTRL+C if you don't want to continue" |
434 |
sleep 10 |
435 |
fi |
436 |
|
437 |
echo; einfo "Setting up the chroot directory..." |
438 |
|
439 |
mkdir -m 0750 -p ${CHROOT} |
440 |
mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/{run,log}} |
441 |
mkdir -m 0750 -p ${CHROOT}/etc/bind |
442 |
mkdir -m 0770 -p ${CHROOT}/var/{bind,{run,log}/named} |
443 |
# As of bind 9.8.0 |
444 |
if has_version net-dns/bind[gost]; then |
445 |
if [ "$(get_libdir)" = "lib64" ]; then |
446 |
mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines |
447 |
ln -s lib64 ${CHROOT}/usr/lib |
448 |
else |
449 |
mkdir -m 0755 -p ${CHROOT}/usr/lib/engines |
450 |
fi |
451 |
fi |
452 |
chown root:named ${CHROOT} ${CHROOT}/var/{bind,{run,log}/named} ${CHROOT}/etc/bind |
453 |
|
454 |
mknod ${CHROOT}/dev/null c 1 3 |
455 |
chmod 0666 ${CHROOT}/dev/null |
456 |
|
457 |
mknod ${CHROOT}/dev/zero c 1 5 |
458 |
chmod 0666 ${CHROOT}/dev/zero |
459 |
|
460 |
if use urandom; then |
461 |
mknod ${CHROOT}/dev/urandom c 1 9 |
462 |
chmod 0666 ${CHROOT}/dev/urandom |
463 |
else |
464 |
mknod ${CHROOT}/dev/random c 1 8 |
465 |
chmod 0666 ${CHROOT}/dev/random |
466 |
fi |
467 |
|
468 |
if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then |
469 |
cp -a /etc/bind ${CHROOT}/etc/ |
470 |
cp -a /var/bind ${CHROOT}/var/ |
471 |
fi |
472 |
|
473 |
if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then |
474 |
mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP |
475 |
fi |
476 |
|
477 |
elog "You may need to add the following line to your syslog-ng.conf:" |
478 |
elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" |
479 |
} |