Lines 132-137
Link Here
|
132 |
rm aclocal.m4 |
132 |
rm aclocal.m4 |
133 |
rm -rf libtool.m4/ |
133 |
rm -rf libtool.m4/ |
134 |
eautoreconf |
134 |
eautoreconf |
|
|
135 |
|
136 |
epatch_user |
135 |
} |
137 |
} |
136 |
|
138 |
|
137 |
src_configure() { |
139 |
src_configure() { |
Lines 153-160
Link Here
|
153 |
|
155 |
|
154 |
export BUILD_CC=$(tc-getBUILD_CC) |
156 |
export BUILD_CC=$(tc-getBUILD_CC) |
155 |
econf \ |
157 |
econf \ |
156 |
--sysconfdir=/etc/bind \ |
158 |
--sysconfdir="${EPREFIX}"/etc/bind \ |
157 |
--localstatedir=/var \ |
159 |
--localstatedir="${EPREFIX}"/var \ |
158 |
--with-libtool \ |
160 |
--with-libtool \ |
159 |
--enable-full-report \ |
161 |
--enable-full-report \ |
160 |
--without-readline \ |
162 |
--without-readline \ |
Lines 166-172
Link Here
|
166 |
$(use_enable rpz rpz-nsip) \ |
168 |
$(use_enable rpz rpz-nsip) \ |
167 |
$(use_enable seccomp) \ |
169 |
$(use_enable seccomp) \ |
168 |
$(use_enable threads) \ |
170 |
$(use_enable threads) \ |
169 |
$(use_with berkdb dlz-bdb) \ |
171 |
$(use_with berkdb dlz-bdb "${EPREFIX}"/usr) \ |
170 |
$(use_with dlz dlopen) \ |
172 |
$(use_with dlz dlopen) \ |
171 |
$(use_with dlz dlz-filesystem) \ |
173 |
$(use_with dlz dlz-filesystem) \ |
172 |
$(use_with dlz dlz-stub) \ |
174 |
$(use_with dlz dlz-stub) \ |
Lines 216-222
Link Here
|
216 |
dodoc contrib/scripts/{nanny.pl,named-bootconf.sh} |
218 |
dodoc contrib/scripts/{nanny.pl,named-bootconf.sh} |
217 |
|
219 |
|
218 |
# some handy-dandy dynamic dns examples |
220 |
# some handy-dandy dynamic dns examples |
219 |
pushd "${D}"/usr/share/doc/${PF} 1>/dev/null |
221 |
pushd "${ED}"/usr/share/doc/${PF} 1>/dev/null |
220 |
tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die |
222 |
tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die |
221 |
popd 1>/dev/null |
223 |
popd 1>/dev/null |
222 |
fi |
224 |
fi |
Lines 235-265
Link Here
|
235 |
newconfd "${FILESDIR}"/named.confd-r7 named |
237 |
newconfd "${FILESDIR}"/named.confd-r7 named |
236 |
|
238 |
|
237 |
if use gost; then |
239 |
if use gost; then |
238 |
sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die |
240 |
sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${ED}/etc/init.d/named" || die |
239 |
else |
241 |
else |
240 |
sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die |
242 |
sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${ED}/etc/init.d/named" || die |
241 |
fi |
243 |
fi |
242 |
|
244 |
|
243 |
newenvd "${FILESDIR}"/10bind.env 10bind |
245 |
newenvd "${FILESDIR}"/10bind.env 10bind |
244 |
|
246 |
|
245 |
# Let's get rid of those tools and their manpages since they're provided by bind-tools |
247 |
# 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,host,nslookup}.1* |
248 |
rm -f "${ED}"/usr/share/man/man1/{dig,host,nslookup}.1* |
247 |
rm -f "${D}"/usr/share/man/man8/nsupdate.8* |
249 |
rm -f "${ED}"/usr/share/man/man8/nsupdate.8* |
248 |
rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate} |
250 |
rm -f "${ED}"/usr/bin/{dig,host,nslookup,nsupdate} |
249 |
rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate} |
251 |
rm -f "${ED}"/usr/sbin/{dig,host,nslookup,nsupdate} |
250 |
for tool in dsfromkey importkey keyfromlabel keygen \ |
252 |
for tool in dsfromkey importkey keyfromlabel keygen \ |
251 |
revoke settime signzone verify; do |
253 |
revoke settime signzone verify; do |
252 |
rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}" |
254 |
rm -f "${ED}"/usr/{,s}bin/dnssec-"${tool}" |
253 |
rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8* |
255 |
rm -f "${ED}"/usr/share/man/man8/dnssec-"${tool}".8* |
254 |
done |
256 |
done |
255 |
|
257 |
|
256 |
# bug 405251, library archives aren't properly handled by --enable/disable-static |
258 |
# bug 405251, library archives aren't properly handled by --enable/disable-static |
257 |
if ! use static-libs; then |
259 |
if ! use static-libs; then |
258 |
find "${D}" -type f -name '*.a' -delete || die |
260 |
find "${ED}" -type f -name '*.a' -delete || die |
259 |
fi |
261 |
fi |
260 |
|
262 |
|
261 |
# bug 405251 |
263 |
# bug 405251 |
262 |
find "${D}" -type f -name '*.la' -delete || die |
264 |
find "${ED}" -type f -name '*.la' -delete || die |
263 |
|
265 |
|
264 |
if use python; then |
266 |
if use python; then |
265 |
install_python_tools() { |
267 |
install_python_tools() { |
Lines 267-282
Link Here
|
267 |
} |
269 |
} |
268 |
python_foreach_impl install_python_tools |
270 |
python_foreach_impl install_python_tools |
269 |
|
271 |
|
270 |
python_replicate_script "${D}usr/sbin/dnssec-checkds" |
272 |
python_replicate_script "${ED}usr/sbin/dnssec-checkds" |
271 |
python_replicate_script "${D}usr/sbin/dnssec-coverage" |
273 |
python_replicate_script "${ED}usr/sbin/dnssec-coverage" |
272 |
fi |
274 |
fi |
273 |
|
275 |
|
274 |
# bug 450406 |
276 |
# bug 450406 |
275 |
dosym named.cache /var/bind/root.cache |
277 |
dosym named.cache /var/bind/root.cache |
276 |
|
278 |
|
277 |
dosym /var/bind/pri /etc/bind/pri |
279 |
dosym "${EPREFIX}"/var/bind/pri /etc/bind/pri |
278 |
dosym /var/bind/sec /etc/bind/sec |
280 |
dosym "${EPREFIX}"/var/bind/sec /etc/bind/sec |
279 |
dosym /var/bind/dyn /etc/bind/dyn |
281 |
dosym "${EPREFIX}"/var/bind/dyn /etc/bind/dyn |
280 |
keepdir /var/bind/{pri,sec,dyn} |
282 |
keepdir /var/bind/{pri,sec,dyn} |
281 |
|
283 |
|
282 |
dodir /var/log/named |
284 |
dodir /var/log/named |
Lines 294-355
Link Here
|
294 |
} |
296 |
} |
295 |
|
297 |
|
296 |
pkg_postinst() { |
298 |
pkg_postinst() { |
297 |
if [ ! -f '/etc/bind/rndc.key' ]; then |
299 |
if [ ! -f "${EPREFIX}"'/etc/bind/rndc.key' ]; then |
298 |
if use urandom; then |
300 |
if use urandom; then |
299 |
einfo "Using /dev/urandom for generating rndc.key" |
301 |
einfo "Using /dev/urandom for generating rndc.key" |
300 |
/usr/sbin/rndc-confgen -r /dev/urandom -a |
302 |
"${EPREFIX}"/usr/sbin/rndc-confgen -r /dev/urandom -a |
301 |
echo |
303 |
echo |
302 |
else |
304 |
else |
303 |
einfo "Using /dev/random for generating rndc.key" |
305 |
einfo "Using /dev/random for generating rndc.key" |
304 |
/usr/sbin/rndc-confgen -a |
306 |
"${EPREFIX}"/usr/sbin/rndc-confgen -a |
305 |
echo |
307 |
echo |
306 |
fi |
308 |
fi |
307 |
chown root:named /etc/bind/rndc.key |
309 |
chown root:named "${EPREFIX}"/etc/bind/rndc.key |
308 |
chmod 0640 /etc/bind/rndc.key |
310 |
chmod 0640 "${EPREFIX}"/etc/bind/rndc.key |
309 |
fi |
311 |
fi |
310 |
|
312 |
|
311 |
einfo |
313 |
einfo |
312 |
einfo "You can edit /etc/conf.d/named to customize named settings" |
314 |
einfo "You can edit ${EPREFIX}/etc/conf.d/named to customize named settings" |
313 |
einfo |
315 |
einfo |
314 |
use mysql || use postgres || use ldap && { |
316 |
use mysql || use postgres || use ldap && { |
315 |
elog "If your named depends on MySQL/PostgreSQL or LDAP," |
317 |
elog "If your named depends on MySQL/PostgreSQL or LDAP," |
316 |
elog "uncomment the specified rc_named_* lines in your" |
318 |
elog "uncomment the specified rc_named_* lines in your" |
317 |
elog "/etc/conf.d/named config to ensure they'll start before bind" |
319 |
elog "${EPREFIX}/etc/conf.d/named config to ensure they'll start before bind" |
318 |
einfo |
320 |
einfo |
319 |
} |
321 |
} |
320 |
einfo "If you'd like to run bind in a chroot AND this is a new" |
322 |
einfo "If you'd like to run bind in a chroot AND this is a new" |
321 |
einfo "install OR your bind doesn't already run in a chroot:" |
323 |
einfo "install OR your bind doesn't already run in a chroot:" |
322 |
einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." |
324 |
einfo "1) Uncomment and set the CHROOT variable in ${EPREFIX}/etc/conf.d/named." |
323 |
einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" |
325 |
einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" |
324 |
einfo |
326 |
einfo |
325 |
|
327 |
|
326 |
CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) |
328 |
CHROOT=$(source "${EPREFIX}"/etc/conf.d/named 2>/dev/null; echo ${CHROOT}) |
327 |
if [[ -n ${CHROOT} ]]; then |
329 |
if [[ -n ${CHROOT} ]]; then |
328 |
elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
330 |
elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
329 |
elog "To enable the old behaviour (without using mount) uncomment the" |
331 |
elog "To enable the old behaviour (without using mount) uncomment the" |
330 |
elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
332 |
elog "CHROOT_NOMOUNT option in your ${EPREFIX}/etc/conf.d/named config." |
331 |
elog "If you decide to use the new/default method, ensure to make backup" |
333 |
elog "If you decide to use the new/default method, ensure to make backup" |
332 |
elog "first and merge your existing configs/zones to /etc/bind and" |
334 |
elog "first and merge your existing configs/zones to ${EPREFIX}/etc/bind and" |
333 |
elog "/var/bind because bind will now mount the needed directories into" |
335 |
elog "${EPREFIX}/var/bind because bind will now mount the needed directories into" |
334 |
elog "the chroot dir." |
336 |
elog "the chroot dir." |
335 |
fi |
337 |
fi |
336 |
} |
338 |
} |
337 |
|
339 |
|
338 |
pkg_config() { |
340 |
pkg_config() { |
339 |
CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) |
341 |
CHROOT=$(source "${EPREFIX}"/etc/conf.d/named; echo ${CHROOT}) |
340 |
CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) |
342 |
CHROOT_NOMOUNT=$(source "${EPREFIX}"/etc/conf.d/named; echo ${CHROOT_NOMOUNT}) |
341 |
CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP}) |
343 |
CHROOT_GEOIP=$(source "${EPREFIX}"/etc/conf.d/named; echo ${CHROOT_GEOIP}) |
342 |
|
344 |
|
343 |
if [[ -z "${CHROOT}" ]]; then |
345 |
if [[ -z "${CHROOT}" ]]; then |
344 |
eerror "This config script is designed to automate setting up" |
346 |
eerror "This config script is designed to automate setting up" |
345 |
eerror "a chrooted bind/named. To do so, please first uncomment" |
347 |
eerror "a chrooted bind/named. To do so, please first uncomment" |
346 |
eerror "and set the CHROOT variable in '/etc/conf.d/named'." |
348 |
eerror "and set the CHROOT variable in '${EPREFIX}/etc/conf.d/named'." |
347 |
die "Unset CHROOT" |
349 |
die "Unset CHROOT" |
348 |
fi |
350 |
fi |
349 |
if [[ -d "${CHROOT}" ]]; then |
351 |
if [[ -d "${CHROOT}" ]]; then |
350 |
ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
352 |
ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
351 |
ewarn "To enable the old behaviour (without using mount) uncomment the" |
353 |
ewarn "To enable the old behaviour (without using mount) uncomment the" |
352 |
ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
354 |
ewarn "CHROOT_NOMOUNT option in your ${EPREFIX}/etc/conf.d/named config." |
353 |
ewarn |
355 |
ewarn |
354 |
ewarn "${CHROOT} already exists... some things might become overridden" |
356 |
ewarn "${CHROOT} already exists... some things might become overridden" |
355 |
ewarn "press CTRL+C if you don't want to continue" |
357 |
ewarn "press CTRL+C if you don't want to continue" |
Lines 388-395
Link Here
|
388 |
fi |
390 |
fi |
389 |
|
391 |
|
390 |
if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then |
392 |
if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then |
391 |
cp -a /etc/bind ${CHROOT}/etc/ |
393 |
cp -a "${EPREFIX}"/etc/bind ${CHROOT}/etc/ |
392 |
cp -a /var/bind ${CHROOT}/var/ |
394 |
cp -a "${EPREFIX}"/var/bind ${CHROOT}/var/ |
393 |
fi |
395 |
fi |
394 |
|
396 |
|
395 |
if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then |
397 |
if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then |