1 |
idl0r 10/12/01 18:16:32 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: bind-9.6.2_p3.ebuild bind-9.7.2_p3.ebuild |
5 |
Removed: bind-9.7.2_p2-r1.ebuild bind-9.7.1_p2-r2.ebuild |
6 |
bind-9.6.2_p2-r2.ebuild bind-9.6.2_p2-r1.ebuild |
7 |
Log: |
8 |
Version bumps. |
9 |
|
10 |
(Portage version: 2.2.0_alpha6/cvs/Linux x86_64) |
11 |
|
12 |
Revision Changes Path |
13 |
1.297 net-dns/bind/ChangeLog |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?rev=1.297&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?rev=1.297&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?r1=1.296&r2=1.297 |
18 |
|
19 |
Index: ChangeLog |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v |
22 |
retrieving revision 1.296 |
23 |
retrieving revision 1.297 |
24 |
diff -u -r1.296 -r1.297 |
25 |
--- ChangeLog 24 Oct 2010 20:47:16 -0000 1.296 |
26 |
+++ ChangeLog 1 Dec 2010 18:16:32 -0000 1.297 |
27 |
@@ -1,6 +1,14 @@ |
28 |
# ChangeLog for net-dns/bind |
29 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.296 2010/10/24 20:47:16 idl0r Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.297 2010/12/01 18:16:32 idl0r Exp $ |
32 |
+ |
33 |
+*bind-9.7.2_p3 (01 Dec 2010) |
34 |
+*bind-9.6.2_p3 (01 Dec 2010) |
35 |
+ |
36 |
+ 01 Dec 2010; Christian Ruppert <idl0r@g.o> -bind-9.6.2_p2-r1.ebuild, |
37 |
+ -bind-9.6.2_p2-r2.ebuild, +bind-9.6.2_p3.ebuild, -bind-9.7.1_p2-r2.ebuild, |
38 |
+ -bind-9.7.2_p2-r1.ebuild, +bind-9.7.2_p3.ebuild: |
39 |
+ Version bumps. |
40 |
|
41 |
*bind-9.7.2_p2-r1 (24 Oct 2010) |
42 |
*bind-9.7.1_p2-r2 (24 Oct 2010) |
43 |
|
44 |
|
45 |
|
46 |
1.1 net-dns/bind/bind-9.6.2_p3.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.6.2_p3.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.6.2_p3.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: bind-9.6.2_p3.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2010 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.6.2_p3.ebuild,v 1.1 2010/12/01 18:16:32 idl0r Exp $ |
56 |
|
57 |
EAPI="3" |
58 |
|
59 |
inherit eutils autotools toolchain-funcs flag-o-matic |
60 |
|
61 |
MY_PV="${PV/_p/-P}" |
62 |
MY_P="${PN}-${MY_PV}" |
63 |
|
64 |
SDB_LDAP_VER="1.1.0" |
65 |
|
66 |
GEOIP_PV=1.3 |
67 |
GEOIP_SRC_URI_BASE="http://bind-geoip.googlecode.com/" |
68 |
GEOIP_P="bind-geoip-${GEOIP_PV}" |
69 |
|
70 |
DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" |
71 |
HOMEPAGE="http://www.isc.org/software/bind" |
72 |
SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz |
73 |
doc? ( mirror://gentoo/dyndns-samples.tbz2 ) |
74 |
geoip? ( ${GEOIP_SRC_URI_BASE}/files/${GEOIP_P}-readme.txt |
75 |
${GEOIP_SRC_URI_BASE}/files/${GEOIP_P}.patch )" |
76 |
# sdb-ldap? ( mirror://gentoo/bind-sdb-ldap-${SDB_LDAP_VER}.tar.bz2 ) |
77 |
|
78 |
LICENSE="as-is" |
79 |
SLOT="0" |
80 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
81 |
IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads |
82 |
resolvconf urandom xml geoip gssapi" # sdb-ldap |
83 |
|
84 |
DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g ) |
85 |
mysql? ( >=virtual/mysql-4.0 ) |
86 |
odbc? ( >=dev-db/unixODBC-2.2.6 ) |
87 |
ldap? ( net-nds/openldap ) |
88 |
idn? ( net-dns/idnkit ) |
89 |
postgres? ( dev-db/postgresql-base ) |
90 |
threads? ( >=sys-libs/libcap-2.1.0 ) |
91 |
xml? ( dev-libs/libxml2 ) |
92 |
geoip? ( >=dev-libs/geoip-1.4.6 ) |
93 |
gssapi? ( virtual/krb5 )" |
94 |
# sdb-ldap? ( net-nds/openldap ) |
95 |
|
96 |
RDEPEND="${DEPEND} |
97 |
selinux? ( sec-policy/selinux-bind ) |
98 |
resolvconf? ( net-dns/openresolv ) |
99 |
sys-process/psmisc" |
100 |
|
101 |
S="${WORKDIR}/${MY_P}" |
102 |
|
103 |
pkg_setup() { |
104 |
use threads && { |
105 |
ewarn |
106 |
ewarn "If you're in vserver enviroment, you're probably want to" |
107 |
ewarn "disable threads support because of linux capabilities dependency" |
108 |
ewarn |
109 |
} |
110 |
|
111 |
ebegin "Creating named group and user" |
112 |
enewgroup named 40 |
113 |
enewuser named 40 -1 /etc/bind named |
114 |
eend ${?} |
115 |
} |
116 |
|
117 |
src_prepare() { |
118 |
# bug 278364 (workaround) |
119 |
epatch "${FILESDIR}/${PN}-9.6.1-parallel.patch" |
120 |
|
121 |
# Adjusting PATHs in manpages |
122 |
for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do |
123 |
sed -i \ |
124 |
-e 's:/etc/named.conf:/etc/bind/named.conf:g' \ |
125 |
-e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ |
126 |
-e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ |
127 |
"${i}" || die "sed failed, ${i} doesn't exist" |
128 |
done |
129 |
|
130 |
if use dlz; then |
131 |
epatch "${FILESDIR}"/${PN}-9.4.0-dlzbdb-close_cursor.patch |
132 |
|
133 |
# bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse |
134 |
# (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/) |
135 |
if use mysql && has_version ">=dev-db/mysql-5"; then |
136 |
epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch |
137 |
fi |
138 |
|
139 |
if use ldap; then |
140 |
# bug 238681 |
141 |
epatch "${FILESDIR}/bind-9.6.1-dlz-patch-ldap-url.patch" \ |
142 |
"${FILESDIR}/bind-9.6.1-dlz-patch-dollar2.patch" |
143 |
fi |
144 |
fi |
145 |
|
146 |
# should be installed by bind-tools |
147 |
sed -i -r -e "s:(nsupdate|dig) ::g" bin/Makefile.in || die |
148 |
|
149 |
# sdb-ldap patch as per bug #160567 |
150 |
# Upstream URL: http://bind9-ldap.bayour.com/ |
151 |
# FIXME: bug 302735 |
152 |
# use sdb-ldap && epatch "${WORKDIR}"/sdb-ldap/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch |
153 |
|
154 |
if use geoip; then |
155 |
cp "${DISTDIR}"/${GEOIP_P}.patch "${S}" || die |
156 |
sed -i -e 's/-RELEASEVER=3/-RELEASEVER=2/' \ |
157 |
-e 's/+RELEASEVER=3-geoip-1.3/+RELEASEVER=2-geoip-1.3/' \ |
158 |
${GEOIP_P}.patch || die |
159 |
epatch ${GEOIP_P}.patch |
160 |
fi |
161 |
|
162 |
# bug #220361 |
163 |
rm {aclocal,libtool}.m4 |
164 |
WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf |
165 |
|
166 |
# remove useless c++ checks |
167 |
epunt_cxx |
168 |
} |
169 |
|
170 |
src_configure() { |
171 |
local myconf="" |
172 |
|
173 |
use dlz && { |
174 |
myconf="${myconf} --with-dlz-filesystem --with-dlz-stub" |
175 |
use postgres && myconf="${myconf} --with-dlz-postgres" |
176 |
use mysql && myconf="${myconf} --with-dlz-mysql" |
177 |
use berkdb && myconf="${myconf} --with-dlz-bdb" |
178 |
use ldap && myconf="${myconf} --with-dlz-ldap" |
179 |
use odbc && myconf="${myconf} --with-dlz-odbc" |
180 |
} |
181 |
|
182 |
if use threads; then |
183 |
if use dlz && use mysql; then |
184 |
ewarn |
185 |
ewarn "MySQL uses thread local storage in its C api. Thus MySQL" |
186 |
ewarn "requires that each thread of an application execute a MySQL" |
187 |
ewarn "\"thread initialization\" to setup the thread local storage." |
188 |
ewarn "This is impossible to do safely while staying within the DLZ" |
189 |
ewarn "driver API. This is a limitation caused by MySQL, and not" |
190 |
ewarn "the DLZ API." |
191 |
ewarn "Because of this BIND MUST only run with a single thread when" |
192 |
ewarn "using the MySQL driver." |
193 |
ewarn |
194 |
myconf="${myconf} --disable-linux-caps --disable-threads" |
195 |
ewarn "Threading support disabled" |
196 |
else |
197 |
myconf="${myconf} --enable-linux-caps --enable-threads" |
198 |
einfo "Threading support enabled" |
199 |
fi |
200 |
else |
201 |
myconf="${myconf} --disable-linux-caps --disable-threads" |
202 |
fi |
203 |
|
204 |
if use urandom; then |
205 |
myconf="${myconf} --with-randomdev=/dev/urandom" |
206 |
else |
207 |
myconf="${myconf} --with-randomdev=/dev/random" |
208 |
fi |
209 |
|
210 |
use geoip && myconf="${myconf} --with-geoip" |
211 |
|
212 |
# bug #158664 |
213 |
gcc-specs-ssp && replace-flags -O[23s] -O |
214 |
|
215 |
export BUILD_CC=$(tc-getBUILD_CC) |
216 |
econf \ |
217 |
--sysconfdir=/etc/bind \ |
218 |
--localstatedir=/var \ |
219 |
--with-libtool \ |
220 |
$(use_with ssl openssl) \ |
221 |
$(use_with idn) \ |
222 |
$(use_enable ipv6) \ |
223 |
$(use_with xml libxml2) \ |
224 |
$(use_with gssapi) \ |
225 |
${myconf} |
226 |
|
227 |
# bug #151839 |
228 |
echo '#undef SO_BSDCOMPAT' >> config.h |
229 |
} |
230 |
|
231 |
src_install() { |
232 |
emake DESTDIR="${D}" install || die |
233 |
|
234 |
dodoc CHANGES FAQ KNOWN-DEFECTS README |
235 |
|
236 |
if use idn; then |
237 |
dodoc README.idnkit || die |
238 |
fi |
239 |
|
240 |
if use doc; then |
241 |
dodoc doc/arm/Bv9ARM.pdf || die |
242 |
|
243 |
docinto misc |
244 |
dodoc doc/misc/* || die |
245 |
|
246 |
# might a 'html' useflag make sense? |
247 |
docinto html |
248 |
dohtml -r doc/arm/* || die |
249 |
|
250 |
docinto draft |
251 |
dodoc doc/draft/* || die |
252 |
|
253 |
docinto rfc |
254 |
dodoc doc/rfc/* || die |
255 |
|
256 |
docinto contrib |
257 |
dodoc contrib/named-bootconf/named-bootconf.sh \ |
258 |
contrib/nanny/nanny.pl || die |
259 |
|
260 |
# some handy-dandy dynamic dns examples |
261 |
cd "${D}"/usr/share/doc/${PF} |
262 |
tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die |
263 |
fi |
264 |
|
265 |
use geoip && dodoc "${DISTDIR}"/${GEOIP_P}-readme.txt |
266 |
|
267 |
insinto /etc/bind |
268 |
newins "${FILESDIR}"/named.conf-r4 named.conf || die |
269 |
|
270 |
# ftp://ftp.rs.internic.net/domain/named.cache: |
271 |
insinto /var/bind |
272 |
doins "${FILESDIR}"/named.cache || die |
273 |
|
274 |
insinto /var/bind/pri |
275 |
newins "${FILESDIR}"/127.zone-r1 127.zone || die |
276 |
newins "${FILESDIR}"/localhost.zone-r3 localhost.zone || die |
277 |
|
278 |
newinitd "${FILESDIR}"/named.init-r8 named || die |
279 |
newconfd "${FILESDIR}"/named.confd-r4 named || die |
280 |
|
281 |
newenvd "${FILESDIR}"/10bind.env 10bind || die |
282 |
|
283 |
# Let's get rid of those tools and their manpages since they're provided by bind-tools |
284 |
rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1* |
285 |
rm -f "${D}"/usr/share/man/man8/{dnssec-keygen,nsupdate}.8* |
286 |
rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate} |
287 |
rm -f "${D}"/usr/sbin/{dig,host,nslookup,dnssec-keygen,nsupdate} |
288 |
|
289 |
dosym /var/bind/named.cache /var/bind/root.cache || die |
290 |
dosym /var/bind/pri /etc/bind/pri || die |
291 |
dosym /var/bind/sec /etc/bind/sec || die |
292 |
keepdir /var/bind/sec |
293 |
|
294 |
dodir /var/{run,log}/named || die |
295 |
|
296 |
fowners root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri} |
297 |
fowners root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/named.conf |
298 |
fperms 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/named.conf |
299 |
fperms 0750 /etc/bind /var/bind/pri |
300 |
fperms 0770 /var/{run,log}/named /var/bind/{,sec} |
301 |
} |
302 |
|
303 |
pkg_postinst() { |
304 |
if [ ! -f '/etc/bind/rndc.key' ]; then |
305 |
if use urandom; then |
306 |
einfo "Using /dev/urandom for generating rndc.key" |
307 |
/usr/sbin/rndc-confgen -r /dev/urandom -a |
308 |
echo |
309 |
else |
310 |
einfo "Using /dev/random for generating rndc.key" |
311 |
/usr/sbin/rndc-confgen -a |
312 |
echo |
313 |
fi |
314 |
chown root:named /etc/bind/rndc.key |
315 |
chmod 0640 /etc/bind/rndc.key |
316 |
fi |
317 |
|
318 |
einfo |
319 |
einfo "You can edit /etc/conf.d/named to customize named settings" |
320 |
einfo |
321 |
use mysql || use postgres || use ldap && { |
322 |
elog "If your named depends on MySQL/PostgreSQL or LDAP," |
323 |
elog "uncomment the specified rc_named_* lines in your" |
324 |
elog "/etc/conf.d/named config to ensure they'll start before bind" |
325 |
einfo |
326 |
} |
327 |
einfo "If you'd like to run bind in a chroot AND this is a new" |
328 |
einfo "install OR your bind doesn't already run in a chroot:" |
329 |
einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." |
330 |
einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" |
331 |
einfo |
332 |
|
333 |
CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) |
334 |
if [[ -n ${CHROOT} ]]; then |
335 |
elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
336 |
elog "To enable the old behaviour (without using mount) uncomment the" |
337 |
elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
338 |
elog "If you decide to use the new/default method, ensure to make backup" |
339 |
elog "first and merge your existing configs/zones to /etc/bind and" |
340 |
elog "/var/bind because bind will now mount the needed directories into" |
341 |
elog "the chroot dir." |
342 |
fi |
343 |
|
344 |
ewarn |
345 |
ewarn "NOTE: /var/bind/named.ca has been renamed to /var/bind/named.cache" |
346 |
ewarn "you may need to fix your named.conf!" |
347 |
ewarn |
348 |
ewarn "NOTE: If you upgrade from <net-dns/bind-9.4.3_p5-r1, you may encounter permission problems" |
349 |
ewarn "To fix the permissions do:" |
350 |
ewarn "chown root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri}" |
351 |
ewarn "chown root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}" |
352 |
ewarn "chmod 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}" |
353 |
ewarn "chmod 0750 /etc/bind /var/bind/pri" |
354 |
ewarn "chmod 0770 /var/{run,log}/named /var/bind/{,sec}" |
355 |
ewarn |
356 |
} |
357 |
|
358 |
pkg_config() { |
359 |
CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) |
360 |
CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) |
361 |
|
362 |
if [[ -z "${CHROOT}" ]]; then |
363 |
eerror "This config script is designed to automate setting up" |
364 |
eerror "a chrooted bind/named. To do so, please first uncomment" |
365 |
eerror "and set the CHROOT variable in '/etc/conf.d/named'." |
366 |
die "Unset CHROOT" |
367 |
fi |
368 |
if [[ -d "${CHROOT}" ]]; then |
369 |
ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
370 |
ewarn "To enable the old behaviour (without using mount) uncomment the" |
371 |
ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
372 |
ewarn |
373 |
ewarn "${CHROOT} already exists... some things might become overridden" |
374 |
ewarn "press CTRL+C if you don't want to continue" |
375 |
sleep 10 |
376 |
fi |
377 |
|
378 |
echo; einfo "Setting up the chroot directory..." |
379 |
|
380 |
mkdir -m 0750 -p ${CHROOT} |
381 |
mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/{run,log}} |
382 |
mkdir -m 0750 -p ${CHROOT}/etc/bind |
383 |
mkdir -m 0770 -p ${CHROOT}/var/{bind,{run,log}/named} |
384 |
chown root:named ${CHROOT} ${CHROOT}/var/{bind,{run,log}/named} ${CHROOT}/etc/bind |
385 |
|
386 |
cp /etc/localtime ${CHROOT}/etc/localtime |
387 |
|
388 |
mknod ${CHROOT}/dev/null c 1 3 |
389 |
chmod 0666 ${CHROOT}/dev/null |
390 |
|
391 |
mknod ${CHROOT}/dev/zero c 1 5 |
392 |
chmod 0666 ${CHROOT}/dev/zero |
393 |
|
394 |
if use urandom; then |
395 |
mknod ${CHROOT}/dev/urandom c 1 9 |
396 |
chmod 0666 ${CHROOT}/dev/urandom |
397 |
else |
398 |
mknod ${CHROOT}/dev/random c 1 8 |
399 |
chmod 0666 ${CHROOT}/dev/random |
400 |
fi |
401 |
|
402 |
if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then |
403 |
cp -a /etc/bind ${CHROOT}/etc/ |
404 |
cp -a /var/bind ${CHROOT}/var/ |
405 |
fi |
406 |
|
407 |
elog "You may need to add the following line to your syslog-ng.conf:" |
408 |
elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" |
409 |
} |
410 |
|
411 |
|
412 |
|
413 |
1.1 net-dns/bind/bind-9.7.2_p3.ebuild |
414 |
|
415 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.7.2_p3.ebuild?rev=1.1&view=markup |
416 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.7.2_p3.ebuild?rev=1.1&content-type=text/plain |
417 |
|
418 |
Index: bind-9.7.2_p3.ebuild |
419 |
=================================================================== |
420 |
# Copyright 1999-2010 Gentoo Foundation |
421 |
# Distributed under the terms of the GNU General Public License v2 |
422 |
# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.7.2_p3.ebuild,v 1.1 2010/12/01 18:16:32 idl0r Exp $ |
423 |
|
424 |
EAPI="3" |
425 |
|
426 |
inherit eutils autotools toolchain-funcs flag-o-matic |
427 |
|
428 |
MY_PV="${PV/_p/-P}" |
429 |
MY_P="${PN}-${MY_PV}" |
430 |
|
431 |
SDB_LDAP_VER="1.1.0" |
432 |
|
433 |
GEOIP_PV=1.3 |
434 |
GEOIP_SRC_URI_BASE="http://bind-geoip.googlecode.com/" |
435 |
GEOIP_P="bind-geoip-${GEOIP_PV}" |
436 |
|
437 |
DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" |
438 |
HOMEPAGE="http://www.isc.org/software/bind" |
439 |
SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz |
440 |
doc? ( mirror://gentoo/dyndns-samples.tbz2 ) |
441 |
geoip? ( ${GEOIP_SRC_URI_BASE}/files/${GEOIP_P}-readme.txt |
442 |
${GEOIP_SRC_URI_BASE}/files/${GEOIP_P}.patch )" |
443 |
# sdb-ldap? ( mirror://gentoo/bind-sdb-ldap-${SDB_LDAP_VER}.tar.bz2 ) |
444 |
|
445 |
LICENSE="as-is" |
446 |
SLOT="0" |
447 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
448 |
IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads |
449 |
resolvconf urandom xml geoip gssapi" # sdb-ldap |
450 |
|
451 |
DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g ) |
452 |
mysql? ( >=virtual/mysql-4.0 ) |
453 |
odbc? ( >=dev-db/unixODBC-2.2.6 ) |
454 |
ldap? ( net-nds/openldap ) |
455 |
idn? ( net-dns/idnkit ) |
456 |
postgres? ( dev-db/postgresql-base ) |
457 |
threads? ( >=sys-libs/libcap-2.1.0 ) |
458 |
xml? ( dev-libs/libxml2 ) |
459 |
geoip? ( >=dev-libs/geoip-1.4.6 ) |
460 |
gssapi? ( virtual/krb5 )" |
461 |
# sdb-ldap? ( net-nds/openldap ) |
462 |
|
463 |
RDEPEND="${DEPEND} |
464 |
selinux? ( sec-policy/selinux-bind ) |
465 |
resolvconf? ( net-dns/openresolv ) |
466 |
sys-process/psmisc" |
467 |
|
468 |
S="${WORKDIR}/${MY_P}" |
469 |
|
470 |
pkg_setup() { |
471 |
use threads && { |
472 |
ewarn |
473 |
ewarn "If you're in vserver enviroment, you're probably want to" |
474 |
ewarn "disable threads support because of linux capabilities dependency" |
475 |
ewarn |
476 |
} |
477 |
|
478 |
ebegin "Creating named group and user" |
479 |
enewgroup named 40 |
480 |
enewuser named 40 -1 /etc/bind named |
481 |
eend ${?} |
482 |
} |
483 |
|
484 |
src_prepare() { |
485 |
# Adjusting PATHs in manpages |
486 |
for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do |
487 |
sed -i \ |
488 |
-e 's:/etc/named.conf:/etc/bind/named.conf:g' \ |
489 |
-e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ |
490 |
-e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ |
491 |
"${i}" || die "sed failed, ${i} doesn't exist" |
492 |
done |
493 |
|
494 |
if use dlz; then |
495 |
# bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse |
496 |
# (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/) |
497 |
if use mysql && has_version ">=dev-db/mysql-5"; then |
498 |
epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch |
499 |
fi |
500 |
fi |
501 |
|
502 |
# should be installed by bind-tools |
503 |
sed -i -r -e "s:(nsupdate|dig) ::g" bin/Makefile.in || die |
504 |
|
505 |
# sdb-ldap patch as per bug #160567 |
506 |
# Upstream URL: http://bind9-ldap.bayour.com/ |
507 |
# FIXME: bug 302735 |
508 |
# use sdb-ldap && epatch "${WORKDIR}"/sdb-ldap/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch |
509 |
|
510 |
if use geoip; then |
511 |
cp "${DISTDIR}"/${GEOIP_P}.patch "${S}" || die |
512 |
sed -i -e 's/-RELEASEVER=3/-RELEASEVER=2/' \ |
513 |
-e 's/+RELEASEVER=3-geoip-1.3/+RELEASEVER=2-geoip-1.3/' \ |
514 |
${GEOIP_P}.patch || die |
515 |
epatch ${GEOIP_P}.patch |
516 |
fi |
517 |
|
518 |
# bug #220361 |
519 |
rm {aclocal,libtool}.m4 |
520 |
WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf |
521 |
|
522 |
# remove useless c++ checks |
523 |
epunt_cxx |
524 |
} |
525 |
|
526 |
src_configure() { |
527 |
local myconf="" |
528 |
|
529 |
use dlz && { |
530 |
myconf="${myconf} --with-dlz-filesystem --with-dlz-stub" |
531 |
use postgres && myconf="${myconf} --with-dlz-postgres" |
532 |
use mysql && myconf="${myconf} --with-dlz-mysql" |
533 |
use berkdb && myconf="${myconf} --with-dlz-bdb" |
534 |
use ldap && myconf="${myconf} --with-dlz-ldap" |
535 |
use odbc && myconf="${myconf} --with-dlz-odbc" |
536 |
} |
537 |
|
538 |
if use threads; then |
539 |
if use dlz && use mysql; then |
540 |
ewarn |
541 |
ewarn "MySQL uses thread local storage in its C api. Thus MySQL" |
542 |
ewarn "requires that each thread of an application execute a MySQL" |
543 |
ewarn "\"thread initialization\" to setup the thread local storage." |
544 |
ewarn "This is impossible to do safely while staying within the DLZ" |
545 |
ewarn "driver API. This is a limitation caused by MySQL, and not" |
546 |
ewarn "the DLZ API." |
547 |
ewarn "Because of this BIND MUST only run with a single thread when" |
548 |
ewarn "using the MySQL driver." |
549 |
ewarn |
550 |
myconf="${myconf} --disable-linux-caps --disable-threads" |
551 |
ewarn "Threading support disabled" |
552 |
else |
553 |
myconf="${myconf} --enable-linux-caps --enable-threads" |
554 |
einfo "Threading support enabled" |
555 |
fi |
556 |
else |
557 |
myconf="${myconf} --disable-linux-caps --disable-threads" |
558 |
fi |
559 |
|
560 |
if use urandom; then |
561 |
myconf="${myconf} --with-randomdev=/dev/urandom" |
562 |
else |
563 |
myconf="${myconf} --with-randomdev=/dev/random" |
564 |
fi |
565 |
|
566 |
use geoip && myconf="${myconf} --with-geoip" |
567 |
|
568 |
# bug #158664 |
569 |
gcc-specs-ssp && replace-flags -O[23s] -O |
570 |
|
571 |
export BUILD_CC=$(tc-getBUILD_CC) |
572 |
econf \ |
573 |
--sysconfdir=/etc/bind \ |
574 |
--localstatedir=/var \ |
575 |
--with-libtool \ |
576 |
$(use_with ssl openssl) \ |
577 |
$(use_with idn) \ |
578 |
$(use_enable ipv6) \ |
579 |
$(use_with xml libxml2) \ |
580 |
$(use_with gssapi) \ |
581 |
${myconf} |
582 |
|
583 |
# bug #151839 |
584 |
echo '#undef SO_BSDCOMPAT' >> config.h |
585 |
} |
586 |
|
587 |
src_install() { |
588 |
emake DESTDIR="${D}" install || die |
589 |
|
590 |
dodoc CHANGES FAQ README |
591 |
|
592 |
if use idn; then |
593 |
dodoc contrib/idn/README.idnkit || die |
594 |
fi |
595 |
|
596 |
if use doc; then |
597 |
dodoc doc/arm/Bv9ARM.pdf || die |
598 |
|
599 |
docinto misc |
600 |
dodoc doc/misc/* || die |
601 |
|
602 |
# might a 'html' useflag make sense? |
603 |
docinto html |
604 |
dohtml -r doc/arm/* || die |
605 |
|
606 |
docinto draft |
607 |
dodoc doc/draft/* || die |
608 |
|
609 |
docinto rfc |
610 |
dodoc doc/rfc/* || die |
611 |
|
612 |
docinto contrib |
613 |
dodoc contrib/named-bootconf/named-bootconf.sh \ |
614 |
contrib/nanny/nanny.pl || die |
615 |
|
616 |
# some handy-dandy dynamic dns examples |
617 |
cd "${D}"/usr/share/doc/${PF} |
618 |
tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die |
619 |
fi |
620 |
|
621 |
use geoip && dodoc "${DISTDIR}"/${GEOIP_P}-readme.txt |
622 |
|
623 |
insinto /etc/bind |
624 |
newins "${FILESDIR}"/named.conf-r4 named.conf || die |
625 |
|
626 |
# ftp://ftp.rs.internic.net/domain/named.cache: |
627 |
insinto /var/bind |
628 |
doins "${FILESDIR}"/named.cache || die |
629 |
|
630 |
insinto /var/bind/pri |
631 |
newins "${FILESDIR}"/127.zone-r1 127.zone || die |
632 |
newins "${FILESDIR}"/localhost.zone-r3 localhost.zone || die |
633 |
|
634 |
newinitd "${FILESDIR}"/named.init-r8 named || die |
635 |
newconfd "${FILESDIR}"/named.confd-r4 named || die |
636 |
|
637 |
newenvd "${FILESDIR}"/10bind.env 10bind || die |
638 |
|
639 |
# Let's get rid of those tools and their manpages since they're provided by bind-tools |
640 |
rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1* |
641 |
rm -f "${D}"/usr/share/man/man8/{dnssec-keygen,nsupdate}.8* |
642 |
rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate} |
643 |
rm -f "${D}"/usr/sbin/{dig,host,nslookup,dnssec-keygen,nsupdate} |
644 |
|
645 |
dosym /var/bind/named.cache /var/bind/root.cache || die |
646 |
dosym /var/bind/pri /etc/bind/pri || die |
647 |
dosym /var/bind/sec /etc/bind/sec || die |
648 |
keepdir /var/bind/sec |
649 |
|
650 |
dodir /var/{run,log}/named || die |
651 |
|
652 |
fowners root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri} |
653 |
fowners root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf} |
654 |
fperms 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf} |
655 |
fperms 0750 /etc/bind /var/bind/pri |
656 |
fperms 0770 /var/{run,log}/named /var/bind/{,sec} |
657 |
} |
658 |
|
659 |
pkg_postinst() { |
660 |
if [ ! -f '/etc/bind/rndc.key' ]; then |
661 |
if use urandom; then |
662 |
einfo "Using /dev/urandom for generating rndc.key" |
663 |
/usr/sbin/rndc-confgen -r /dev/urandom -a |
664 |
echo |
665 |
else |
666 |
einfo "Using /dev/random for generating rndc.key" |
667 |
/usr/sbin/rndc-confgen -a |
668 |
echo |
669 |
fi |
670 |
chown root:named /etc/bind/rndc.key |
671 |
chmod 0640 /etc/bind/rndc.key |
672 |
fi |
673 |
|
674 |
einfo |
675 |
einfo "You can edit /etc/conf.d/named to customize named settings" |
676 |
einfo |
677 |
use mysql || use postgres || use ldap && { |
678 |
elog "If your named depends on MySQL/PostgreSQL or LDAP," |
679 |
elog "uncomment the specified rc_named_* lines in your" |
680 |
elog "/etc/conf.d/named config to ensure they'll start before bind" |
681 |
einfo |
682 |
} |
683 |
einfo "If you'd like to run bind in a chroot AND this is a new" |
684 |
einfo "install OR your bind doesn't already run in a chroot:" |
685 |
einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." |
686 |
einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" |
687 |
einfo |
688 |
|
689 |
CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) |
690 |
if [[ -n ${CHROOT} ]]; then |
691 |
elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
692 |
elog "To enable the old behaviour (without using mount) uncomment the" |
693 |
elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
694 |
elog "If you decide to use the new/default method, ensure to make backup" |
695 |
elog "first and merge your existing configs/zones to /etc/bind and" |
696 |
elog "/var/bind because bind will now mount the needed directories into" |
697 |
elog "the chroot dir." |
698 |
fi |
699 |
|
700 |
ewarn |
701 |
ewarn "NOTE: /var/bind/named.ca has been renamed to /var/bind/named.cache" |
702 |
ewarn "you may need to fix your named.conf!" |
703 |
ewarn |
704 |
ewarn "NOTE: If you upgrade from <net-dns/bind-9.4.3_p5-r1, you may encounter permission problems" |
705 |
ewarn "To fix the permissions do:" |
706 |
ewarn "chown root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri}" |
707 |
ewarn "chown root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}" |
708 |
ewarn "chmod 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}" |
709 |
ewarn "chmod 0750 /etc/bind /var/bind/pri" |
710 |
ewarn "chmod 0770 /var/{run,log}/named /var/bind/{,sec}" |
711 |
ewarn |
712 |
} |
713 |
|
714 |
pkg_config() { |
715 |
CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) |
716 |
CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) |
717 |
|
718 |
if [[ -z "${CHROOT}" ]]; then |
719 |
eerror "This config script is designed to automate setting up" |
720 |
eerror "a chrooted bind/named. To do so, please first uncomment" |
721 |
eerror "and set the CHROOT variable in '/etc/conf.d/named'." |
722 |
die "Unset CHROOT" |
723 |
fi |
724 |
if [[ -d "${CHROOT}" ]]; then |
725 |
ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
726 |
ewarn "To enable the old behaviour (without using mount) uncomment the" |
727 |
ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
728 |
ewarn |
729 |
ewarn "${CHROOT} already exists... some things might become overridden" |
730 |
ewarn "press CTRL+C if you don't want to continue" |
731 |
sleep 10 |
732 |
fi |
733 |
|
734 |
echo; einfo "Setting up the chroot directory..." |
735 |
|
736 |
mkdir -m 0750 -p ${CHROOT} |
737 |
mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/{run,log}} |
738 |
mkdir -m 0750 -p ${CHROOT}/etc/bind |
739 |
mkdir -m 0770 -p ${CHROOT}/var/{bind,{run,log}/named} |
740 |
chown root:named ${CHROOT} ${CHROOT}/var/{bind,{run,log}/named} ${CHROOT}/etc/bind |
741 |
|
742 |
cp /etc/localtime ${CHROOT}/etc/localtime |
743 |
|
744 |
mknod ${CHROOT}/dev/null c 1 3 |
745 |
chmod 0666 ${CHROOT}/dev/null |
746 |
|
747 |
mknod ${CHROOT}/dev/zero c 1 5 |
748 |
chmod 0666 ${CHROOT}/dev/zero |
749 |
|
750 |
if use urandom; then |
751 |
mknod ${CHROOT}/dev/urandom c 1 9 |
752 |
chmod 0666 ${CHROOT}/dev/urandom |
753 |
else |
754 |
mknod ${CHROOT}/dev/random c 1 8 |
755 |
chmod 0666 ${CHROOT}/dev/random |
756 |
fi |
757 |
|
758 |
if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then |
759 |
cp -a /etc/bind ${CHROOT}/etc/ |
760 |
cp -a /var/bind ${CHROOT}/var/ |
761 |
fi |
762 |
|
763 |
elog "You may need to add the following line to your syslog-ng.conf:" |
764 |
elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" |
765 |
} |