1 |
dertobi123 08/08/02 07:21:15 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: bind-9.5.0_p2.ebuild bind-9.4.2_p2.ebuild |
5 |
Removed: bind-9.5.0_p1-r2.ebuild |
6 |
Log: |
7 |
Version bump |
8 |
(Portage version: 2.2_rc6/cvs/Linux 2.6.25-gentoo-r6 x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.205 net-dns/bind/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/ChangeLog?rev=1.205&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/ChangeLog?rev=1.205&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/ChangeLog?r1=1.204&r2=1.205 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v |
20 |
retrieving revision 1.204 |
21 |
retrieving revision 1.205 |
22 |
diff -u -r1.204 -r1.205 |
23 |
--- ChangeLog 27 Jul 2008 08:56:35 -0000 1.204 |
24 |
+++ ChangeLog 2 Aug 2008 07:21:14 -0000 1.205 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for net-dns/bind |
27 |
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.204 2008/07/27 08:56:35 dertobi123 Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.205 2008/08/02 07:21:14 dertobi123 Exp $ |
30 |
+ |
31 |
+*bind-9.5.0_p2 (02 Aug 2008) |
32 |
+*bind-9.4.2_p2 (02 Aug 2008) |
33 |
+ |
34 |
+ 02 Aug 2008; Tobias Scherbaum <dertobi123@g.o> |
35 |
+ +bind-9.4.2_p2.ebuild, -bind-9.5.0_p1-r2.ebuild, +bind-9.5.0_p2.ebuild: |
36 |
+ Version bump |
37 |
|
38 |
*bind-9.5.0_p1-r2 (27 Jul 2008) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 net-dns/bind/bind-9.5.0_p2.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/bind-9.5.0_p2.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/bind-9.5.0_p2.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: bind-9.5.0_p2.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2008 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.5.0_p2.ebuild,v 1.1 2008/08/02 07:21:14 dertobi123 Exp $ |
53 |
|
54 |
inherit eutils libtool autotools toolchain-funcs flag-o-matic |
55 |
|
56 |
MY_PV="${PV/_p2/-P2}" |
57 |
SDB_LDAP_VER="1.1.0" |
58 |
|
59 |
DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" |
60 |
HOMEPAGE="http://www.isc.org/products/BIND/bind9.html" |
61 |
SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${PN}-${MY_PV}.tar.gz |
62 |
sdb-ldap? ( mirror://gentoo/bind-sdb-ldap-${SDB_LDAP_VER}.tar.bz2 ) |
63 |
doc? ( mirror://gentoo/dyndns-samples.tbz2 )" |
64 |
|
65 |
LICENSE="as-is" |
66 |
SLOT="0" |
67 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
68 |
IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads resolvconf urandom sdb-ldap" |
69 |
|
70 |
DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g ) |
71 |
mysql? ( >=virtual/mysql-4.0 ) |
72 |
odbc? ( >=dev-db/unixODBC-2.2.6 ) |
73 |
ldap? ( net-nds/openldap ) |
74 |
idn? ( net-dns/idnkit )" |
75 |
|
76 |
RDEPEND="${DEPEND} |
77 |
selinux? ( sec-policy/selinux-bind ) |
78 |
resolvconf? ( || ( net-dns/openresolv net-dns/resolvconf-gentoo ) )" |
79 |
|
80 |
S="${WORKDIR}/${PN}-${MY_PV}" |
81 |
|
82 |
pkg_setup() { |
83 |
use threads && { |
84 |
echo |
85 |
ewarn "If you're in vserver enviroment, you're probably want to" |
86 |
ewarn "disable threads support because of linux capabilities dependency" |
87 |
echo |
88 |
} |
89 |
|
90 |
ebegin "Creating named group and user" |
91 |
enewgroup named 40 |
92 |
enewuser named 40 -1 /etc/bind named |
93 |
eend ${?} |
94 |
} |
95 |
|
96 |
src_unpack() { |
97 |
unpack ${A} |
98 |
cd "${S}" |
99 |
|
100 |
# Adjusting PATHs in manpages |
101 |
for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do |
102 |
sed -i \ |
103 |
-e 's:/etc/named.conf:/etc/bind/named.conf:g' \ |
104 |
-e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ |
105 |
-e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ |
106 |
"${i}" |
107 |
done |
108 |
|
109 |
use dlz && epatch "${FILESDIR}"/${PN}-9.4.0-dlzbdb-close_cursor.patch |
110 |
|
111 |
# bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse |
112 |
# (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/) |
113 |
use dlz && use mysql && has_version ">=dev-db/mysql-5" && epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch |
114 |
|
115 |
# should be installed by bind-tools |
116 |
sed -e "s:nsupdate ::g" -i "${S}"/bin/Makefile.in |
117 |
|
118 |
# sdb-ldap patch as per bug #160567 |
119 |
# Upstream URL: http://bind9-ldap.bayour.com/ |
120 |
use sdb-ldap && epatch "${WORKDIR}"/sdb-ldap/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch |
121 |
|
122 |
# bug #220361 |
123 |
rm "${S}"/aclocal.m4 "${S}"/libtool.m4 |
124 |
WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf |
125 |
|
126 |
# bug #151839 |
127 |
sed -e \ |
128 |
's:struct isc_socket {:#undef SO_BSDCOMPAT\n\nstruct isc_socket {:' \ |
129 |
-i lib/isc/unix/socket.c |
130 |
|
131 |
# remove useless c++ checks |
132 |
epunt_cxx |
133 |
} |
134 |
|
135 |
src_compile() { |
136 |
local myconf="" |
137 |
|
138 |
use ssl && myconf="${myconf} --with-openssl" |
139 |
use idn && myconf="${myconf} --with-idn" |
140 |
|
141 |
use dlz && { |
142 |
myconf="${myconf} --with-dlz-filesystem --with-dlz-stub" |
143 |
use postgres && myconf="${myconf} --with-dlz-postgres" |
144 |
use mysql && myconf="${myconf} --with-dlz-mysql" |
145 |
use berkdb && myconf="${myconf} --with-dlz-bdb" |
146 |
use ldap && myconf="${myconf} --with-dlz-ldap" |
147 |
use odbc && myconf="${myconf} --with-dlz-odbc" |
148 |
} |
149 |
|
150 |
if use threads; then |
151 |
if use dlz && use mysql; then |
152 |
echo |
153 |
ewarn |
154 |
ewarn "MySQL uses thread local storage in its C api. Thus MySQL" |
155 |
ewarn "requires that each thread of an application execute a MySQL" |
156 |
ewarn "\"thread initialization\" to setup the thread local storage." |
157 |
ewarn "This is impossible to do safely while staying within the DLZ" |
158 |
ewarn "driver API. This is a limitation caused by MySQL, and not" |
159 |
ewarn "the DLZ API." |
160 |
ewarn "Because of this BIND MUST only run with a single thread when" |
161 |
ewarn "using the MySQL driver." |
162 |
ewarn |
163 |
myconf="${myconf} --disable-linux-caps --disable-threads" |
164 |
ewarn "Threading support disabled" |
165 |
epause 10 |
166 |
else |
167 |
myconf="${myconf} --enable-linux-caps --enable-threads" |
168 |
einfo "Threading support enabled" |
169 |
fi |
170 |
else |
171 |
myconf="${myconf} --disable-linux-caps --disable-threads" |
172 |
fi |
173 |
|
174 |
if use urandom; then |
175 |
myconf="${myconf} --with-randomdev=/dev/urandom" |
176 |
else |
177 |
myconf="${myconf} --with-randomdev=/dev/random" |
178 |
fi |
179 |
|
180 |
# bug #227333 |
181 |
append-flags -D_GNU_SOURCE |
182 |
|
183 |
# bug #158664 |
184 |
gcc-specs-ssp && replace-flags -O[23s] -O |
185 |
export BUILD_CC="${CBUILD}-gcc" |
186 |
econf \ |
187 |
--sysconfdir=/etc/bind \ |
188 |
--localstatedir=/var \ |
189 |
--with-libtool \ |
190 |
`use_enable ipv6` \ |
191 |
${myconf} || die "econf failed" |
192 |
|
193 |
emake -j1 || die "failed to compile bind" |
194 |
} |
195 |
|
196 |
src_install() { |
197 |
einstall || die "failed to install bind" |
198 |
|
199 |
dodoc CHANGES COPYRIGHT FAQ README |
200 |
|
201 |
use doc && { |
202 |
docinto misc |
203 |
dodoc doc/misc/* |
204 |
|
205 |
docinto html |
206 |
dohtml doc/arm/* |
207 |
|
208 |
docinto draft |
209 |
dodoc doc/draft/* |
210 |
|
211 |
docinto rfc |
212 |
dodoc doc/rfc/* |
213 |
|
214 |
docinto contrib |
215 |
dodoc contrib/named-bootconf/named-bootconf.sh \ |
216 |
contrib/nanny/nanny.pl |
217 |
|
218 |
# some handy-dandy dynamic dns examples |
219 |
cd "${D}"/usr/share/doc/${PF} |
220 |
tar pjxf ${DISTFILES}/dyndns-samples.tbz2 |
221 |
} |
222 |
|
223 |
newenvd "${FILESDIR}"/10bind.env 10bind |
224 |
|
225 |
dodir /etc/bind /var/bind/{pri,sec} |
226 |
keepdir /var/bind/sec |
227 |
|
228 |
insinto /etc/bind ; newins "${FILESDIR}"/named.conf-r3 named.conf |
229 |
|
230 |
# ftp://ftp.rs.internic.net/domain/named.ca: |
231 |
insinto /var/bind ; doins "${FILESDIR}"/named.ca |
232 |
|
233 |
insinto /var/bind/pri |
234 |
doins "${FILESDIR}"/127.zone |
235 |
newins "${FILESDIR}"/localhost.zone-r2 localhost.zone |
236 |
|
237 |
newinitd "${FILESDIR}"/named.init-r5 named |
238 |
newconfd "${FILESDIR}"/named.confd-r2 named |
239 |
|
240 |
dosym ../../var/bind/named.ca /var/bind/root.cache |
241 |
dosym ../../var/bind/pri /etc/bind/pri |
242 |
dosym ../../var/bind/sec /etc/bind/sec |
243 |
|
244 |
# Let's get rid of those tools and their manpages since they're provided by bind-tools |
245 |
rm -f "${D}"/usr/share/man/man1/{dig.1,host.1,nslookup.1} |
246 |
rm -f "${D}"/usr/share/man/man8/{dnssec-keygen.8,nsupdate.8} |
247 |
rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate} |
248 |
|
249 |
use resolvconf && { |
250 |
exeinto /etc/resolvconf/update.d |
251 |
newexe "${FILESDIR}"/resolvconf.bind bind |
252 |
} |
253 |
} |
254 |
|
255 |
pkg_postinst() { |
256 |
if [ ! -f '/etc/bind/rndc.key' ]; then |
257 |
if [ -c /dev/urandom ]; then |
258 |
einfo "Using /dev/urandom for generating rndc.key" |
259 |
/usr/sbin/rndc-confgen -r /dev/urandom -a -u named |
260 |
echo |
261 |
else |
262 |
einfo "Using /dev/random for generating rndc.key" |
263 |
/usr/sbin/rndc-confgen -a -u named |
264 |
echo |
265 |
fi |
266 |
fi |
267 |
|
268 |
install -d -o named -g named "${ROOT}"/var/run/named \ |
269 |
"${ROOT}"/var/bind/pri "${ROOT}"/var/bind/sec |
270 |
chown -R named:named "${ROOT}"/var/bind |
271 |
|
272 |
elog "The default zone files are now installed as *.zone," |
273 |
elog "be careful merging config files if you have modified" |
274 |
elog "/var/bind/pri/127 or /var/bind/pri/localhost" |
275 |
elog |
276 |
elog "You can edit /etc/conf.d/named to customize named settings" |
277 |
elog |
278 |
elog "The BIND ebuild now includes chroot support." |
279 |
elog "If you like to run bind in chroot AND this is a new install OR" |
280 |
elog "your bind doesn't already run in chroot, simply run:" |
281 |
elog "\`emerge --config '=${CATEGORY}/${PF}'\`" |
282 |
elog "Before running the above command you might want to change the chroot" |
283 |
elog "dir in /etc/conf.d/named. Otherwise /chroot/dns will be used." |
284 |
elog |
285 |
elog "Recently verisign added a wildcard A record to the .COM and .NET TLD" |
286 |
elog "zones making all .com and .net domains appear to be registered" |
287 |
elog "This causes many problems such as breaking important anti-spam checks" |
288 |
elog "which verify source domains exist. ISC released a patch for BIND which" |
289 |
elog "adds 'delegation-only' zones to allow admins to return the .com and .net" |
290 |
elog "domain resolution to their normal function." |
291 |
elog |
292 |
elog "There is no need to create a com or net data file. Just the" |
293 |
elog "entries to the named.conf file is enough." |
294 |
elog |
295 |
elog " zone "com" IN { type delegation-only; };" |
296 |
elog " zone "net" IN { type delegation-only; };" |
297 |
|
298 |
echo |
299 |
ewarn "BIND >=9.2.5 makes the priority argument to MX records mandatory" |
300 |
ewarn "when it was previously optional. If the priority is missing, BIND" |
301 |
ewarn "won't load the zone file at all." |
302 |
echo |
303 |
} |
304 |
|
305 |
pkg_config() { |
306 |
CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/named 2>/dev/null` |
307 |
EXISTS="no" |
308 |
|
309 |
if [ -z "${CHROOT}" -a ! -d "/chroot/dns" ]; then |
310 |
CHROOT="/chroot/dns" |
311 |
elif [ -d ${CHROOT} ]; then |
312 |
eerror; eerror "${CHROOT:-/chroot/dns} already exists. Quitting."; eerror; EXISTS="yes" |
313 |
fi |
314 |
|
315 |
if [ ! "$EXISTS" = yes ]; then |
316 |
einfo ; einfon "Setting up the chroot directory..." |
317 |
mkdir -m 700 -p ${CHROOT} |
318 |
mkdir -p ${CHROOT}/{dev,etc,var/run/named} |
319 |
chown -R named:named ${CHROOT}/var/run/named |
320 |
cp -R /etc/bind ${CHROOT}/etc/ |
321 |
cp /etc/localtime ${CHROOT}/etc/localtime |
322 |
chown named:named ${CHROOT}/etc/bind/rndc.key |
323 |
cp -R /var/bind ${CHROOT}/var/ |
324 |
chown -R named:named ${CHROOT}/var/ |
325 |
mknod ${CHROOT}/dev/zero c 1 5 |
326 |
mknod ${CHROOT}/dev/random c 1 8 |
327 |
chmod 666 ${CHROOT}/dev/{random,zero} |
328 |
chown root:named ${CHROOT} |
329 |
chmod 0750 ${CHROOT} |
330 |
|
331 |
grep -q "^#[[:blank:]]\?CHROOT" /etc/conf.d/named ; RETVAL=$? |
332 |
if [ $RETVAL = 0 ]; then |
333 |
sed 's/^# \?\(CHROOT.*\)$/\1/' /etc/conf.d/named > /etc/conf.d/named.orig 2>/dev/null |
334 |
mv --force /etc/conf.d/named.orig /etc/conf.d/named |
335 |
fi |
336 |
|
337 |
sleep 1; echo " Done."; sleep 1 |
338 |
einfo |
339 |
einfo "Add the following to your root .bashrc or .bash_profile: " |
340 |
einfo " alias rndc='rndc -k ${CHROOT}/etc/bind/rndc.key'" |
341 |
einfo "Then do the following: " |
342 |
einfo " source /root/.bashrc or .bash_profile" |
343 |
einfo |
344 |
fi |
345 |
} |
346 |
|
347 |
|
348 |
|
349 |
1.1 net-dns/bind/bind-9.4.2_p2.ebuild |
350 |
|
351 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/bind-9.4.2_p2.ebuild?rev=1.1&view=markup |
352 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/bind-9.4.2_p2.ebuild?rev=1.1&content-type=text/plain |
353 |
|
354 |
Index: bind-9.4.2_p2.ebuild |
355 |
=================================================================== |
356 |
# Copyright 1999-2008 Gentoo Foundation |
357 |
# Distributed under the terms of the GNU General Public License v2 |
358 |
# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.4.2_p2.ebuild,v 1.1 2008/08/02 07:21:14 dertobi123 Exp $ |
359 |
|
360 |
inherit eutils libtool autotools toolchain-funcs flag-o-matic |
361 |
|
362 |
DLZ_VERSION="9.3.3" |
363 |
MY_PV="${PV/_p2/-P2}" |
364 |
|
365 |
DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" |
366 |
HOMEPAGE="http://www.isc.org/products/BIND/bind9.html" |
367 |
SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${PN}-${MY_PV}.tar.gz |
368 |
doc? ( mirror://gentoo/dyndns-samples.tbz2 )" |
369 |
|
370 |
LICENSE="as-is" |
371 |
SLOT="0" |
372 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
373 |
IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads resolvconf urandom" |
374 |
|
375 |
DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g ) |
376 |
mysql? ( >=virtual/mysql-4.0 ) |
377 |
odbc? ( >=dev-db/unixODBC-2.2.6 ) |
378 |
ldap? ( net-nds/openldap ) |
379 |
idn? ( net-dns/idnkit )" |
380 |
|
381 |
RDEPEND="${DEPEND} |
382 |
selinux? ( sec-policy/selinux-bind ) |
383 |
resolvconf? ( || ( net-dns/openresolv net-dns/resolvconf-gentoo ) )" |
384 |
|
385 |
S="${WORKDIR}/${PN}-${MY_PV}" |
386 |
|
387 |
pkg_setup() { |
388 |
use threads && { |
389 |
echo |
390 |
ewarn "If you're in vserver enviroment, you're probably want to" |
391 |
ewarn "disable threads support because of linux capabilities dependency" |
392 |
echo |
393 |
} |
394 |
|
395 |
ebegin "Creating named group and user" |
396 |
enewgroup named 40 |
397 |
enewuser named 40 -1 /etc/bind named |
398 |
eend ${?} |
399 |
} |
400 |
|
401 |
src_unpack() { |
402 |
unpack ${A} |
403 |
cd "${S}" |
404 |
|
405 |
# Adjusting PATHs in manpages |
406 |
for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do |
407 |
sed -i \ |
408 |
-e 's:/etc/named.conf:/etc/bind/named.conf:g' \ |
409 |
-e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ |
410 |
-e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ |
411 |
"${i}" |
412 |
done |
413 |
|
414 |
use dlz && epatch "${FILESDIR}"/${PN}-9.4.0-dlzbdb-close_cursor.patch |
415 |
|
416 |
# bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse |
417 |
# (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/) |
418 |
use dlz && use mysql && epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch |
419 |
|
420 |
# should be installed by bind-tools |
421 |
sed -e "s:nsupdate ::g" -i "${S}"/bin/Makefile.in |
422 |
|
423 |
# bug #220361 |
424 |
rm "${S}"/aclocal.m4 "${S}"/libtool.m4 |
425 |
WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf |
426 |
|
427 |
# bug #151839 |
428 |
sed -e \ |
429 |
's:struct isc_socket {:#undef SO_BSDCOMPAT\n\nstruct isc_socket {:' \ |
430 |
-i lib/isc/unix/socket.c |
431 |
|
432 |
# remove useless c++ checks |
433 |
epunt_cxx |
434 |
} |
435 |
|
436 |
src_compile() { |
437 |
local myconf="" |
438 |
|
439 |
use ssl && myconf="${myconf} --with-openssl" |
440 |
use idn && myconf="${myconf} --with-idn" |
441 |
|
442 |
use dlz && { |
443 |
myconf="${myconf} --with-dlz-filesystem --with-dlz-stub" |
444 |
use postgres && myconf="${myconf} --with-dlz-postgres" |
445 |
use mysql && myconf="${myconf} --with-dlz-mysql" |
446 |
use berkdb && myconf="${myconf} --with-dlz-bdb" |
447 |
use ldap && myconf="${myconf} --with-dlz-ldap" |
448 |
use odbc && myconf="${myconf} --with-dlz-odbc" |
449 |
} |
450 |
|
451 |
if use threads; then |
452 |
if use dlz && use mysql; then |
453 |
echo |
454 |
ewarn |
455 |
ewarn "MySQL uses thread local storage in its C api. Thus MySQL" |
456 |
ewarn "requires that each thread of an application execute a MySQL" |
457 |
ewarn "\"thread initialization\" to setup the thread local storage." |
458 |
ewarn "This is impossible to do safely while staying within the DLZ" |
459 |
ewarn "driver API. This is a limitation caused by MySQL, and not" |
460 |
ewarn "the DLZ API." |
461 |
ewarn "Because of this BIND MUST only run with a single thread when" |
462 |
ewarn "using the MySQL driver." |
463 |
ewarn |
464 |
myconf="${myconf} --disable-linux-caps --disable-threads" |
465 |
ewarn "Threading support disabled" |
466 |
epause 10 |
467 |
else |
468 |
myconf="${myconf} --enable-linux-caps --enable-threads" |
469 |
einfo "Threading support enabled" |
470 |
fi |
471 |
else |
472 |
myconf="${myconf} --disable-linux-caps --disable-threads" |
473 |
fi |
474 |
|
475 |
if use urandom; then |
476 |
myconf="${myconf} --with-randomdev=/dev/urandom" |
477 |
else |
478 |
myconf="${myconf} --with-randomdev=/dev/random" |
479 |
fi |
480 |
|
481 |
# bug #158664 |
482 |
gcc-specs-ssp && replace-flags -O[23s] -O |
483 |
export BUILD_CC="${CBUILD}-gcc" |
484 |
econf \ |
485 |
--sysconfdir=/etc/bind \ |
486 |
--localstatedir=/var \ |
487 |
--with-libtool \ |
488 |
`use_enable ipv6` \ |
489 |
${myconf} || die "econf failed" |
490 |
|
491 |
emake -j1 || die "failed to compile bind" |
492 |
} |
493 |
|
494 |
src_install() { |
495 |
einstall || die "failed to install bind" |
496 |
|
497 |
dodoc CHANGES COPYRIGHT FAQ README |
498 |
|
499 |
use doc && { |
500 |
docinto misc |
501 |
dodoc doc/misc/* |
502 |
|
503 |
docinto html |
504 |
dohtml doc/arm/* |
505 |
|
506 |
docinto draft |
507 |
dodoc doc/draft/* |
508 |
|
509 |
docinto rfc |
510 |
dodoc doc/rfc/* |
511 |
|
512 |
docinto contrib |
513 |
dodoc contrib/named-bootconf/named-bootconf.sh \ |
514 |
contrib/nanny/nanny.pl |
515 |
|
516 |
# some handy-dandy dynamic dns examples |
517 |
cd "${D}"/usr/share/doc/${PF} |
518 |
tar pjxf ${DISTFILES}/dyndns-samples.tbz2 |
519 |
} |
520 |
|
521 |
newenvd "${FILESDIR}"/10bind.env 10bind |
522 |
|
523 |
dodir /etc/bind /var/bind/{pri,sec} |
524 |
keepdir /var/bind/sec |
525 |
|
526 |
insinto /etc/bind ; newins "${FILESDIR}"/named.conf-r3 named.conf |
527 |
|
528 |
# ftp://ftp.rs.internic.net/domain/named.ca: |
529 |
insinto /var/bind ; doins "${FILESDIR}"/named.ca |
530 |
|
531 |
insinto /var/bind/pri |
532 |
doins "${FILESDIR}"/127.zone |
533 |
newins "${FILESDIR}"/localhost.zone-r2 localhost.zone |
534 |
|
535 |
newinitd "${FILESDIR}"/named.init-r5 named |
536 |
newconfd "${FILESDIR}"/named.confd-r2 named |
537 |
|
538 |
dosym ../../var/bind/named.ca /var/bind/root.cache |
539 |
dosym ../../var/bind/pri /etc/bind/pri |
540 |
dosym ../../var/bind/sec /etc/bind/sec |
541 |
|
542 |
# Let's get rid of those tools and their manpages since they're provided by bind-tools |
543 |
rm -f "${D}"/usr/share/man/man1/{dig.1,host.1,nslookup.1} |
544 |
rm -f "${D}"/usr/share/man/man8/{dnssec-keygen.8,nsupdate.8} |
545 |
rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate} |
546 |
|
547 |
use resolvconf && { |
548 |
exeinto /etc/resolvconf/update.d |
549 |
newexe "${FILESDIR}"/resolvconf.bind bind |
550 |
} |
551 |
} |
552 |
|
553 |
pkg_postinst() { |
554 |
if [ ! -f '/etc/bind/rndc.key' ]; then |
555 |
if [ -c /dev/urandom ]; then |
556 |
einfo "Using /dev/urandom for generating rndc.key" |
557 |
/usr/sbin/rndc-confgen -r /dev/urandom -a -u named |
558 |
echo |
559 |
else |
560 |
einfo "Using /dev/random for generating rndc.key" |
561 |
/usr/sbin/rndc-confgen -a -u named |
562 |
echo |
563 |
fi |
564 |
fi |
565 |
|
566 |
install -d -o named -g named "${ROOT}"/var/run/named \ |
567 |
"${ROOT}"/var/bind/pri "${ROOT}"/var/bind/sec |
568 |
chown -R named:named "${ROOT}"/var/bind |
569 |
|
570 |
elog "The default zone files are now installed as *.zone," |
571 |
elog "be careful merging config files if you have modified" |
572 |
elog "/var/bind/pri/127 or /var/bind/pri/localhost" |
573 |
elog |
574 |
elog "You can edit /etc/conf.d/named to customize named settings" |
575 |
elog |
576 |
elog "The BIND ebuild now includes chroot support." |
577 |
elog "If you like to run bind in chroot AND this is a new install OR" |
578 |
elog "your bind doesn't already run in chroot, simply run:" |
579 |
elog "\`emerge --config '=${CATEGORY}/${PF}'\`" |
580 |
elog "Before running the above command you might want to change the chroot" |
581 |
elog "dir in /etc/conf.d/named. Otherwise /chroot/dns will be used." |
582 |
elog |
583 |
elog "Recently verisign added a wildcard A record to the .COM and .NET TLD" |
584 |
elog "zones making all .com and .net domains appear to be registered" |
585 |
elog "This causes many problems such as breaking important anti-spam checks" |
586 |
elog "which verify source domains exist. ISC released a patch for BIND which" |
587 |
elog "adds 'delegation-only' zones to allow admins to return the .com and .net" |
588 |
elog "domain resolution to their normal function." |
589 |
elog |
590 |
elog "There is no need to create a com or net data file. Just the" |
591 |
elog "entries to the named.conf file is enough." |
592 |
elog |
593 |
elog " zone "com" IN { type delegation-only; };" |
594 |
elog " zone "net" IN { type delegation-only; };" |
595 |
|
596 |
echo |
597 |
ewarn "BIND >=9.2.5 makes the priority argument to MX records mandatory" |
598 |
ewarn "when it was previously optional. If the priority is missing, BIND" |
599 |
ewarn "won't load the zone file at all." |
600 |
echo |
601 |
} |
602 |
|
603 |
pkg_config() { |
604 |
CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/named 2>/dev/null` |
605 |
EXISTS="no" |
606 |
|
607 |
if [ -z "${CHROOT}" -a ! -d "/chroot/dns" ]; then |
608 |
CHROOT="/chroot/dns" |
609 |
elif [ -d ${CHROOT} ]; then |
610 |
eerror; eerror "${CHROOT:-/chroot/dns} already exists. Quitting."; eerror; EXISTS="yes" |
611 |
fi |
612 |
|
613 |
if [ ! "$EXISTS" = yes ]; then |
614 |
einfo ; einfon "Setting up the chroot directory..." |
615 |
mkdir -m 700 -p ${CHROOT} |
616 |
mkdir -p ${CHROOT}/{dev,etc,var/run/named} |
617 |
chown -R named:named ${CHROOT}/var/run/named |
618 |
cp -R /etc/bind ${CHROOT}/etc/ |
619 |
cp /etc/localtime ${CHROOT}/etc/localtime |
620 |
chown named:named ${CHROOT}/etc/bind/rndc.key |
621 |
cp -R /var/bind ${CHROOT}/var/ |
622 |
chown -R named:named ${CHROOT}/var/ |
623 |
mknod ${CHROOT}/dev/zero c 1 5 |
624 |
mknod ${CHROOT}/dev/random c 1 8 |
625 |
chmod 666 ${CHROOT}/dev/{random,zero} |
626 |
chown root:named ${CHROOT} |
627 |
chmod 0750 ${CHROOT} |
628 |
|
629 |
grep -q "^#[[:blank:]]\?CHROOT" /etc/conf.d/named ; RETVAL=$? |
630 |
if [ $RETVAL = 0 ]; then |
631 |
sed 's/^# \?\(CHROOT.*\)$/\1/' /etc/conf.d/named > /etc/conf.d/named.orig 2>/dev/null |
632 |
mv --force /etc/conf.d/named.orig /etc/conf.d/named |
633 |
fi |
634 |
|
635 |
sleep 1; echo " Done."; sleep 1 |
636 |
einfo |
637 |
einfo "Add the following to your root .bashrc or .bash_profile: " |
638 |
einfo " alias rndc='rndc -k ${CHROOT}/etc/bind/rndc.key'" |
639 |
einfo "Then do the following: " |
640 |
einfo " source /root/.bashrc or .bash_profile" |
641 |
einfo |
642 |
fi |
643 |
} |