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