1 |
robbat2 10/04/28 21:59:38 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: bind-9.6.1_p3-r1.ebuild |
5 |
Log: |
6 |
Bug #231242: GeoIP patch support for BIND. |
7 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.265 net-dns/bind/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/ChangeLog?rev=1.265&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/ChangeLog?rev=1.265&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/ChangeLog?r1=1.264&r2=1.265 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v |
19 |
retrieving revision 1.264 |
20 |
retrieving revision 1.265 |
21 |
diff -p -w -b -B -u -u -r1.264 -r1.265 |
22 |
--- ChangeLog 30 Mar 2010 13:25:32 -0000 1.264 |
23 |
+++ ChangeLog 28 Apr 2010 21:59:37 -0000 1.265 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for net-dns/bind |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.264 2010/03/30 13:25:32 idl0r Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.265 2010/04/28 21:59:37 robbat2 Exp $ |
29 |
+ |
30 |
+*bind-9.6.1_p3-r1 (28 Apr 2010) |
31 |
+ |
32 |
+ 28 Apr 2010; Robin H. Johnson <robbat2@g.o> |
33 |
+ +bind-9.6.1_p3-r1.ebuild: |
34 |
+ Bug #231242: GeoIP patch support for BIND. |
35 |
|
36 |
30 Mar 2010; Christian Ruppert <idl0r@g.o> -bind-9.4.3_p4.ebuild: |
37 |
Remove bind-9.4.3_p4.ebuild, bug 308035 and bug 301548 |
38 |
|
39 |
|
40 |
|
41 |
1.1 net-dns/bind/bind-9.6.1_p3-r1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/bind-9.6.1_p3-r1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/bind/bind-9.6.1_p3-r1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: bind-9.6.1_p3-r1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2010 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.6.1_p3-r1.ebuild,v 1.1 2010/04/28 21:59:38 robbat2 Exp $ |
51 |
|
52 |
EAPI="2" |
53 |
|
54 |
inherit eutils autotools toolchain-funcs flag-o-matic |
55 |
|
56 |
MY_PV="${PV/_p/-P}" |
57 |
MY_P="${PN}-${MY_PV}" |
58 |
|
59 |
SDB_LDAP_VER="1.1.0" |
60 |
|
61 |
GEOIP_PV=1.3 |
62 |
GEOIP_SRC_URI_BASE="http://bind-geoip.googlecode.com/" |
63 |
GEOIP_P="bind-geoip-${GEOIP_PV}" |
64 |
|
65 |
DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" |
66 |
HOMEPAGE="http://www.isc.org/software/bind" |
67 |
SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz |
68 |
sdb-ldap? ( mirror://gentoo/bind-sdb-ldap-${SDB_LDAP_VER}.tar.bz2 ) |
69 |
doc? ( mirror://gentoo/dyndns-samples.tbz2 ) |
70 |
geoip? ( ${GEOIP_SRC_URI_BASE}/files/${GEOIP_P}-readme.txt |
71 |
${GEOIP_SRC_URI_BASE}/files/${GEOIP_P}.patch )" |
72 |
|
73 |
LICENSE="as-is" |
74 |
SLOT="0" |
75 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
76 |
IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads |
77 |
resolvconf urandom sdb-ldap xml geoip" |
78 |
|
79 |
DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g ) |
80 |
mysql? ( >=virtual/mysql-4.0 ) |
81 |
odbc? ( >=dev-db/unixODBC-2.2.6 ) |
82 |
ldap? ( net-nds/openldap ) |
83 |
idn? ( net-dns/idnkit ) |
84 |
postgres? ( virtual/postgresql-base ) |
85 |
threads? ( >=sys-libs/libcap-2.1.0 ) |
86 |
xml? ( dev-libs/libxml2 ) |
87 |
geoip? ( >=dev-libs/geoip-1.4.6 )" |
88 |
|
89 |
RDEPEND="${DEPEND} |
90 |
selinux? ( sec-policy/selinux-bind ) |
91 |
resolvconf? ( net-dns/openresolv )" |
92 |
|
93 |
S="${WORKDIR}/${MY_P}" |
94 |
|
95 |
pkg_setup() { |
96 |
use threads && { |
97 |
ewarn |
98 |
ewarn "If you're in vserver enviroment, you're probably want to" |
99 |
ewarn "disable threads support because of linux capabilities dependency" |
100 |
ewarn |
101 |
} |
102 |
|
103 |
ebegin "Creating named group and user" |
104 |
enewgroup named 40 |
105 |
enewuser named 40 -1 /etc/bind named |
106 |
eend ${?} |
107 |
} |
108 |
|
109 |
src_prepare() { |
110 |
# bug 278364 (workaround) |
111 |
epatch "${FILESDIR}/${PN}-9.6.1-parallel.patch" |
112 |
|
113 |
# Adjusting PATHs in manpages |
114 |
for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do |
115 |
sed -i \ |
116 |
-e 's:/etc/named.conf:/etc/bind/named.conf:g' \ |
117 |
-e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ |
118 |
-e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ |
119 |
"${i}" || die "sed failed, ${i} doesn't exist" |
120 |
done |
121 |
|
122 |
use dlz && epatch "${FILESDIR}"/${PN}-9.4.0-dlzbdb-close_cursor.patch |
123 |
|
124 |
# bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse |
125 |
# (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/) |
126 |
use dlz && use mysql && has_version ">=dev-db/mysql-5" && epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch |
127 |
|
128 |
# should be installed by bind-tools |
129 |
sed -i -e "s:nsupdate ::g" bin/Makefile.in || die |
130 |
|
131 |
# sdb-ldap patch as per bug #160567 |
132 |
# Upstream URL: http://bind9-ldap.bayour.com/ |
133 |
use sdb-ldap && epatch "${WORKDIR}"/sdb-ldap/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch |
134 |
|
135 |
use geoip && epatch "${DISTDIR}"/${GEOIP_P}.patch |
136 |
|
137 |
# bug #220361 |
138 |
rm {aclocal,libtool}.m4 |
139 |
WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf |
140 |
|
141 |
# bug #151839 |
142 |
sed -i -e \ |
143 |
's:struct isc_socket {:#undef SO_BSDCOMPAT\n\nstruct isc_socket {:' \ |
144 |
lib/isc/unix/socket.c || die |
145 |
|
146 |
# remove useless c++ checks |
147 |
epunt_cxx |
148 |
} |
149 |
|
150 |
src_configure() { |
151 |
local myconf="" |
152 |
|
153 |
use dlz && { |
154 |
myconf="${myconf} --with-dlz-filesystem --with-dlz-stub" |
155 |
use postgres && myconf="${myconf} --with-dlz-postgres" |
156 |
use mysql && myconf="${myconf} --with-dlz-mysql" |
157 |
use berkdb && myconf="${myconf} --with-dlz-bdb" |
158 |
use ldap && myconf="${myconf} --with-dlz-ldap" |
159 |
use odbc && myconf="${myconf} --with-dlz-odbc" |
160 |
} |
161 |
|
162 |
if use threads; then |
163 |
if use dlz && use mysql; then |
164 |
ewarn |
165 |
ewarn "MySQL uses thread local storage in its C api. Thus MySQL" |
166 |
ewarn "requires that each thread of an application execute a MySQL" |
167 |
ewarn "\"thread initialization\" to setup the thread local storage." |
168 |
ewarn "This is impossible to do safely while staying within the DLZ" |
169 |
ewarn "driver API. This is a limitation caused by MySQL, and not" |
170 |
ewarn "the DLZ API." |
171 |
ewarn "Because of this BIND MUST only run with a single thread when" |
172 |
ewarn "using the MySQL driver." |
173 |
ewarn |
174 |
myconf="${myconf} --disable-linux-caps --disable-threads" |
175 |
ewarn "Threading support disabled" |
176 |
epause 10 |
177 |
else |
178 |
myconf="${myconf} --enable-linux-caps --enable-threads" |
179 |
einfo "Threading support enabled" |
180 |
fi |
181 |
else |
182 |
myconf="${myconf} --disable-linux-caps --disable-threads" |
183 |
fi |
184 |
|
185 |
if use urandom; then |
186 |
myconf="${myconf} --with-randomdev=/dev/urandom" |
187 |
else |
188 |
myconf="${myconf} --with-randomdev=/dev/random" |
189 |
fi |
190 |
|
191 |
# bug #158664 |
192 |
gcc-specs-ssp && replace-flags -O[23s] -O |
193 |
export BUILD_CC="${CBUILD}-gcc" |
194 |
econf \ |
195 |
--sysconfdir=/etc/bind \ |
196 |
--localstatedir=/var \ |
197 |
--with-libtool \ |
198 |
$(use_with ssl openssl) \ |
199 |
$(use_with idn) \ |
200 |
$(use_enable ipv6) \ |
201 |
$(use_with xml libxml2) \ |
202 |
${myconf} |
203 |
} |
204 |
|
205 |
src_install() { |
206 |
emake DESTDIR="${D}" install || die |
207 |
|
208 |
dodoc CHANGES FAQ KNOWN-DEFECTS README || die |
209 |
|
210 |
if use idn; then |
211 |
dodoc README.idnkit || die |
212 |
fi |
213 |
|
214 |
if use doc; then |
215 |
dodoc doc/arm/Bv9ARM.pdf || die |
216 |
|
217 |
docinto misc |
218 |
dodoc doc/misc/* || die |
219 |
|
220 |
# might a 'html' useflag make sense? |
221 |
docinto html |
222 |
dohtml -r doc/arm/* || die |
223 |
|
224 |
docinto draft |
225 |
dodoc doc/draft/* || die |
226 |
|
227 |
docinto rfc |
228 |
dodoc doc/rfc/* || die |
229 |
|
230 |
docinto contrib |
231 |
dodoc contrib/named-bootconf/named-bootconf.sh \ |
232 |
contrib/nanny/nanny.pl || die |
233 |
|
234 |
# some handy-dandy dynamic dns examples |
235 |
cd "${D}"/usr/share/doc/${PF} |
236 |
tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die |
237 |
fi |
238 |
|
239 |
use geoip && dodoc "${DISTDIR}"/${GEOIP_P}-readme.txt |
240 |
|
241 |
newenvd "${FILESDIR}"/10bind.env 10bind || die |
242 |
|
243 |
keepdir /var/bind/sec |
244 |
|
245 |
insinto /etc/bind |
246 |
newins "${FILESDIR}"/named.conf-r3 named.conf || die |
247 |
|
248 |
# ftp://ftp.rs.internic.net/domain/named.ca: |
249 |
insinto /var/bind |
250 |
doins "${FILESDIR}"/named.ca || die |
251 |
|
252 |
insinto /var/bind/pri |
253 |
newins "${FILESDIR}"/127.zone-r1 127.zone || die |
254 |
newins "${FILESDIR}"/localhost.zone-r3 localhost.zone || die |
255 |
|
256 |
newinitd "${FILESDIR}"/named.init-r7 named || die |
257 |
newconfd "${FILESDIR}"/named.confd-r3 named || die |
258 |
|
259 |
dosym /var/bind/named.ca /var/bind/root.cache |
260 |
dosym /var/bind/pri /etc/bind/pri |
261 |
dosym /var/bind/sec /etc/bind/sec |
262 |
|
263 |
# Let's get rid of those tools and their manpages since they're provided by bind-tools |
264 |
rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1* |
265 |
rm -f "${D}"/usr/share/man/man8/{dnssec-keygen,nsupdate}.8* |
266 |
rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate} |
267 |
rm -f "${D}"/usr/sbin/{dig,host,nslookup,dnssec-keygen,nsupdate} |
268 |
} |
269 |
|
270 |
pkg_postinst() { |
271 |
if [ ! -f '/etc/bind/rndc.key' ]; then |
272 |
if [ -c /dev/urandom ]; then |
273 |
einfo "Using /dev/urandom for generating rndc.key" |
274 |
/usr/sbin/rndc-confgen -r /dev/urandom -a -u named |
275 |
echo |
276 |
else |
277 |
einfo "Using /dev/random for generating rndc.key" |
278 |
/usr/sbin/rndc-confgen -a -u named |
279 |
echo |
280 |
fi |
281 |
fi |
282 |
|
283 |
install -d -o named -g named "${ROOT}"/var/run/named \ |
284 |
"${ROOT}"/var/bind/{pri,sec} "${ROOT}"/var/log/named |
285 |
chown -R named:named "${ROOT}"/var/bind |
286 |
|
287 |
einfo "The default zone files are now installed as *.zone," |
288 |
einfo "be careful merging config files if you have modified" |
289 |
einfo "/var/bind/pri/127 or /var/bind/pri/localhost" |
290 |
einfo |
291 |
einfo "You can edit /etc/conf.d/named to customize named settings" |
292 |
einfo |
293 |
einfo "The BIND ebuild now includes chroot support." |
294 |
einfo "If you like to run bind in chroot AND this is a new install OR" |
295 |
einfo "your bind doesn't already run in chroot, simply run:" |
296 |
einfo "\`emerge --config '=${CATEGORY}/${PF}'\`" |
297 |
einfo "Before running the above command you might want to change the chroot" |
298 |
einfo "dir in /etc/conf.d/named. Otherwise /chroot/dns will be used." |
299 |
einfo |
300 |
einfo "Recently verisign added a wildcard A record to the .COM and .NET TLD" |
301 |
einfo "zones making all .com and .net domains appear to be registered" |
302 |
einfo "This causes many problems such as breaking important anti-spam checks" |
303 |
einfo "which verify source domains exist. ISC released a patch for BIND which" |
304 |
einfo "adds 'delegation-only' zones to allow admins to return the .com and .net" |
305 |
einfo "domain resolution to their normal function." |
306 |
einfo |
307 |
einfo "There is no need to create a com or net data file. Just the" |
308 |
einfo "entries to the named.conf file is enough." |
309 |
einfo |
310 |
einfo " zone "com" IN { type delegation-only; };" |
311 |
einfo " zone "net" IN { type delegation-only; };" |
312 |
|
313 |
ewarn "NOTE: as of 'bind-9.6.1' the chroot part of the init-script got some major changes." |
314 |
} |
315 |
|
316 |
pkg_config() { |
317 |
CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/named 2>/dev/null` |
318 |
EXISTS="no" |
319 |
|
320 |
if [ -z "${CHROOT}" -a ! -d "/chroot/dns" ]; then |
321 |
CHROOT="/chroot/dns" |
322 |
elif [ -d ${CHROOT} ]; then |
323 |
eerror; eerror "${CHROOT:-/chroot/dns} already exists. Quitting."; eerror; EXISTS="yes" |
324 |
fi |
325 |
|
326 |
if [ ! "$EXISTS" = yes ]; then |
327 |
einfo ; einfon "Setting up the chroot directory..." |
328 |
|
329 |
mkdir -m 750 -p ${CHROOT} |
330 |
mkdir -p ${CHROOT}/{dev,proc,etc/bind,var/{run,log}/named,var/bind} |
331 |
chown -R named:named ${CHROOT} |
332 |
chown root:named ${CHROOT} |
333 |
|
334 |
cp /etc/localtime ${CHROOT}/etc/localtime |
335 |
|
336 |
mknod ${CHROOT}/dev/zero c 1 5 |
337 |
chmod 666 ${CHROOT}/dev/zero |
338 |
|
339 |
if use urandom; then |
340 |
mknod ${CHROOT}/dev/urandom c 1 9 |
341 |
chmod 666 ${CHROOT}/dev/urandom |
342 |
else |
343 |
mknod ${CHROOT}/dev/random c 1 8 |
344 |
chmod 666 ${CHROOT}/dev/random |
345 |
fi |
346 |
|
347 |
if [ -f '/etc/syslog-ng/syslog-ng.conf' ]; then |
348 |
echo "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" >>/etc/syslog-ng/syslog-ng.conf |
349 |
fi |
350 |
|
351 |
grep -q "^#[[:blank:]]\?CHROOT" /etc/conf.d/named ; RETVAL=$? |
352 |
if [ $RETVAL = 0 ]; then |
353 |
sed -i 's/^# \?\(CHROOT.*\)$/\1/' /etc/conf.d/named 2>/dev/null |
354 |
fi |
355 |
else |
356 |
ewarn "NOTE: as of 'bind-9.6.1' the chroot part of the init-script got some major changes." |
357 |
fi |
358 |
} |