Gentoo Archives: gentoo-commits

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