Gentoo Archives: gentoo-commits

From: "Christian Ruppert (idl0r)" <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-dns/bind: ChangeLog bind-9.7.2_p2.ebuild
Date: Tue, 05 Oct 2010 10:43:58
Message-Id: 20101005104352.CD29820051@flycatcher.gentoo.org
1 idl0r 10/10/05 10:43:52
2
3 Modified: ChangeLog
4 Added: bind-9.7.2_p2.ebuild
5 Log:
6 Add bind-9.7.2-P2.
7
8 (Portage version: 2.2_rc88/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.295 net-dns/bind/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?rev=1.295&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?rev=1.295&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/ChangeLog?r1=1.294&r2=1.295
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v
20 retrieving revision 1.294
21 retrieving revision 1.295
22 diff -u -r1.294 -r1.295
23 --- ChangeLog 23 Sep 2010 21:05:25 -0000 1.294
24 +++ ChangeLog 5 Oct 2010 10:43:52 -0000 1.295
25 @@ -1,6 +1,11 @@
26 # ChangeLog for net-dns/bind
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.294 2010/09/23 21:05:25 idl0r Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.295 2010/10/05 10:43:52 idl0r Exp $
30 +
31 +*bind-9.7.2_p2 (05 Oct 2010)
32 +
33 + 05 Oct 2010; Christian Ruppert <idl0r@g.o> +bind-9.7.2_p2.ebuild:
34 + Add bind-9.7.2-P2.
35
36 *bind-9.7.1_p2-r1 (23 Sep 2010)
37 *bind-9.6.2_p2-r1 (23 Sep 2010)
38
39
40
41 1.1 net-dns/bind/bind-9.7.2_p2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.7.2_p2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.7.2_p2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: bind-9.7.2_p2.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.7.2_p2.ebuild,v 1.1 2010/10/05 10:43:52 idl0r Exp $
51
52 EAPI="3"
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 doc? ( mirror://gentoo/dyndns-samples.tbz2 )
69 geoip? ( ${GEOIP_SRC_URI_BASE}/files/${GEOIP_P}-readme.txt
70 ${GEOIP_SRC_URI_BASE}/files/${GEOIP_P}.patch )"
71 # sdb-ldap? ( mirror://gentoo/bind-sdb-ldap-${SDB_LDAP_VER}.tar.bz2 )
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 xml geoip gssapi" # sdb-ldap
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? ( dev-db/postgresql-base )
85 threads? ( >=sys-libs/libcap-2.1.0 )
86 xml? ( dev-libs/libxml2 )
87 geoip? ( >=dev-libs/geoip-1.4.6 )
88 gssapi? ( virtual/krb5 )"
89 # sdb-ldap? ( net-nds/openldap )
90
91 RDEPEND="${DEPEND}
92 selinux? ( sec-policy/selinux-bind )
93 resolvconf? ( net-dns/openresolv )
94 sys-process/psmisc"
95
96 S="${WORKDIR}/${MY_P}"
97
98 pkg_setup() {
99 use threads && {
100 ewarn
101 ewarn "If you're in vserver enviroment, you're probably want to"
102 ewarn "disable threads support because of linux capabilities dependency"
103 ewarn
104 }
105
106 ebegin "Creating named group and user"
107 enewgroup named 40
108 enewuser named 40 -1 /etc/bind named
109 eend ${?}
110 }
111
112 src_prepare() {
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 if use dlz; then
123 # bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse
124 # (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/)
125 if use mysql && has_version ">=dev-db/mysql-5"; then
126 epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch
127 fi
128 fi
129
130 # should be installed by bind-tools
131 sed -i -r -e "s:(nsupdate|dig) ::g" bin/Makefile.in || die
132
133 # sdb-ldap patch as per bug #160567
134 # Upstream URL: http://bind9-ldap.bayour.com/
135 # FIXME: bug 302735
136 # use sdb-ldap && epatch "${WORKDIR}"/sdb-ldap/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
137
138 if use geoip; then
139 cp "${DISTDIR}"/${GEOIP_P}.patch "${S}" || die
140 sed -i -e 's/-RELEASEVER=3/-RELEASEVER=2/' \
141 -e 's/+RELEASEVER=3-geoip-1.3/+RELEASEVER=2-geoip-1.3/' \
142 ${GEOIP_P}.patch || die
143 epatch ${GEOIP_P}.patch
144 fi
145
146 # bug #220361
147 rm {aclocal,libtool}.m4
148 WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf
149
150 # remove useless c++ checks
151 epunt_cxx
152 }
153
154 src_configure() {
155 local myconf=""
156
157 use dlz && {
158 myconf="${myconf} --with-dlz-filesystem --with-dlz-stub"
159 use postgres && myconf="${myconf} --with-dlz-postgres"
160 use mysql && myconf="${myconf} --with-dlz-mysql"
161 use berkdb && myconf="${myconf} --with-dlz-bdb"
162 use ldap && myconf="${myconf} --with-dlz-ldap"
163 use odbc && myconf="${myconf} --with-dlz-odbc"
164 }
165
166 if use threads; then
167 if use dlz && use mysql; then
168 ewarn
169 ewarn "MySQL uses thread local storage in its C api. Thus MySQL"
170 ewarn "requires that each thread of an application execute a MySQL"
171 ewarn "\"thread initialization\" to setup the thread local storage."
172 ewarn "This is impossible to do safely while staying within the DLZ"
173 ewarn "driver API. This is a limitation caused by MySQL, and not"
174 ewarn "the DLZ API."
175 ewarn "Because of this BIND MUST only run with a single thread when"
176 ewarn "using the MySQL driver."
177 ewarn
178 myconf="${myconf} --disable-linux-caps --disable-threads"
179 ewarn "Threading support disabled"
180 else
181 myconf="${myconf} --enable-linux-caps --enable-threads"
182 einfo "Threading support enabled"
183 fi
184 else
185 myconf="${myconf} --disable-linux-caps --disable-threads"
186 fi
187
188 if use urandom; then
189 myconf="${myconf} --with-randomdev=/dev/urandom"
190 else
191 myconf="${myconf} --with-randomdev=/dev/random"
192 fi
193
194 use geoip && myconf="${myconf} --with-geoip"
195
196 # bug #158664
197 gcc-specs-ssp && replace-flags -O[23s] -O
198
199 export BUILD_CC=$(tc-getBUILD_CC)
200 econf \
201 --sysconfdir=/etc/bind \
202 --localstatedir=/var \
203 --with-libtool \
204 $(use_with ssl openssl) \
205 $(use_with idn) \
206 $(use_enable ipv6) \
207 $(use_with xml libxml2) \
208 $(use_with gssapi) \
209 ${myconf}
210
211 # bug #151839
212 echo '#undef SO_BSDCOMPAT' >> config.h
213 }
214
215 src_install() {
216 emake DESTDIR="${D}" install || die
217
218 dodoc CHANGES FAQ README
219
220 if use idn; then
221 dodoc contrib/idn/README.idnkit || die
222 fi
223
224 if use doc; then
225 dodoc doc/arm/Bv9ARM.pdf || die
226
227 docinto misc
228 dodoc doc/misc/* || die
229
230 # might a 'html' useflag make sense?
231 docinto html
232 dohtml -r doc/arm/* || die
233
234 docinto draft
235 dodoc doc/draft/* || die
236
237 docinto rfc
238 dodoc doc/rfc/* || die
239
240 docinto contrib
241 dodoc contrib/named-bootconf/named-bootconf.sh \
242 contrib/nanny/nanny.pl || die
243
244 # some handy-dandy dynamic dns examples
245 cd "${D}"/usr/share/doc/${PF}
246 tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
247 fi
248
249 use geoip && dodoc "${DISTDIR}"/${GEOIP_P}-readme.txt
250
251 insinto /etc/bind
252 newins "${FILESDIR}"/named.conf-r4 named.conf || die
253
254 # ftp://ftp.rs.internic.net/domain/named.cache:
255 insinto /var/bind
256 doins "${FILESDIR}"/named.cache || die
257
258 insinto /var/bind/pri
259 newins "${FILESDIR}"/127.zone-r1 127.zone || die
260 newins "${FILESDIR}"/localhost.zone-r3 localhost.zone || die
261
262 newinitd "${FILESDIR}"/named.init-r8 named || die
263 newconfd "${FILESDIR}"/named.confd-r4 named || die
264
265 newenvd "${FILESDIR}"/10bind.env 10bind || die
266
267 # Let's get rid of those tools and their manpages since they're provided by bind-tools
268 rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
269 rm -f "${D}"/usr/share/man/man8/{dnssec-keygen,nsupdate}.8*
270 rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate}
271 rm -f "${D}"/usr/sbin/{dig,host,nslookup,dnssec-keygen,nsupdate}
272
273 dosym /var/bind/named.cache /var/bind/root.cache || die
274 dosym /var/bind/pri /etc/bind/pri || die
275 dosym /var/bind/sec /etc/bind/sec || die
276 keepdir /var/bind/sec
277
278 dodir /var/{run,log}/named || die
279
280 fowners root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri}
281 fowners root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}
282 fperms 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}
283 fperms 0750 /etc/bind /var/bind/pri
284 fperms 0770 /var/{run,log}/named /var/bind/{,sec}
285 }
286
287 pkg_postinst() {
288 if [ ! -f '/etc/bind/rndc.key' ]; then
289 if use urandom; then
290 einfo "Using /dev/urandom for generating rndc.key"
291 /usr/sbin/rndc-confgen -r /dev/urandom -a
292 echo
293 else
294 einfo "Using /dev/random for generating rndc.key"
295 /usr/sbin/rndc-confgen -a
296 echo
297 fi
298 chown root:named /etc/bind/rndc.key
299 chmod 0640 /etc/bind/rndc.key
300 fi
301
302 einfo
303 einfo "You can edit /etc/conf.d/named to customize named settings"
304 einfo
305 use mysql || use postgres || use ldap && {
306 elog "If your named depends on MySQL/PostgreSQL or LDAP,"
307 elog "uncomment the specified rc_named_* lines in your"
308 elog "/etc/conf.d/named config to ensure they'll start before bind"
309 einfo
310 }
311 einfo "If you'd like to run bind in a chroot AND this is a new"
312 einfo "install OR your bind doesn't already run in a chroot:"
313 einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
314 einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
315 einfo
316
317 CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
318 if [[ -n ${CHROOT} ]]; then
319 elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
320 elog "To enable the old behaviour (without using mount) uncomment the"
321 elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
322 elog "If you decide to use the new/default method, ensure to make backup"
323 elog "first and merge your existing configs/zones to /etc/bind and"
324 elog "/var/bind because bind will now mount the needed directories into"
325 elog "the chroot dir."
326 fi
327
328 ewarn
329 ewarn "NOTE: /var/bind/named.ca has been renamed to /var/bind/named.cache"
330 ewarn "you may need to fix your named.conf!"
331 ewarn
332 ewarn "NOTE: If you upgrade from <net-dns/bind-9.4.3_p5-r1, you may encounter permission problems"
333 ewarn "To fix the permissions do:"
334 ewarn "chown root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri}"
335 ewarn "chown root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}"
336 ewarn "chmod 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf}"
337 ewarn "chmod 0750 /etc/bind /var/bind/pri"
338 ewarn "chmod 0770 /var/{run,log}/named /var/bind/{,sec}"
339 ewarn
340 }
341
342 pkg_config() {
343 CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
344 CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
345
346 if [[ -z "${CHROOT}" ]]; then
347 eerror "This config script is designed to automate setting up"
348 eerror "a chrooted bind/named. To do so, please first uncomment"
349 eerror "and set the CHROOT variable in '/etc/conf.d/named'."
350 die "Unset CHROOT"
351 fi
352 if [[ -d "${CHROOT}" ]]; then
353 ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
354 ewarn "To enable the old behaviour (without using mount) uncomment the"
355 ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
356 ewarn
357 ewarn "${CHROOT} already exists... some things might become overridden"
358 ewarn "press CTRL+C if you don't want to continue"
359 sleep 10
360 fi
361
362 echo; einfo "Setting up the chroot directory..."
363
364 mkdir -m 0750 -p ${CHROOT}
365 mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/{run,log}}
366 mkdir -m 0750 -p ${CHROOT}/etc/bind
367 mkdir -m 0770 -p ${CHROOT}/var/{bind,{run,log}/named}
368 chown root:named ${CHROOT} ${CHROOT}/var/{bind,{run,log}/named} ${CHROOT}/etc/bind
369
370 cp /etc/localtime ${CHROOT}/etc/localtime
371
372 mknod ${CHROOT}/dev/null c 1 3
373 chmod 0666 ${CHROOT}/dev/null
374
375 mknod ${CHROOT}/dev/zero c 1 5
376 chmod 0666 ${CHROOT}/dev/zero
377
378 if use urandom; then
379 mknod ${CHROOT}/dev/urandom c 1 9
380 chmod 0666 ${CHROOT}/dev/urandom
381 else
382 mknod ${CHROOT}/dev/random c 1 8
383 chmod 0666 ${CHROOT}/dev/random
384 fi
385
386 if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
387 cp -a /etc/bind ${CHROOT}/etc/
388 cp -a /var/bind ${CHROOT}/var/
389 fi
390
391 elog "You may need to add the following line to your syslog-ng.conf:"
392 elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
393 }