955c8d3a4e
respond to queries and wrote nothing to the logs. This would have been more fun to debug if my production system hadn't been relying on it for name resolution. The problem was a blocking read from /dev/random. I'm the one who put that there, over 10 years ago. Do we need it? From my reading of <http://cr.yp.to/djbdns/dnscache-conf.html> and dnscache-conf.c, the seed needn't consist of top-notch randomness. A sysadmin following DJB to the letter (rather than using this djbdns-run package) would run dnscache-conf once to configure a dnscache instance. dnscache-conf would cook 128 bytes of randomness -- without direct assistance from any kernel device -- and write it to a file. dnscache would read the same file on every startup. Therefore, we... 1. Generate a random seed iff it doesn't exist (not on every startup) 2. Generate it from /dev/urandom instead of /dev/random ...so that the configuration we generate more nearly matches that of DJB's documented procedure, and the kind of problem I encountered is much more difficult to trigger. While here, add LICENSE (2-clause-bsd) and otherwise placate pkglint. Bump version.
56 lines
1.6 KiB
Makefile
56 lines
1.6 KiB
Makefile
# $NetBSD: Makefile,v 1.24 2014/12/06 09:41:04 schmonz Exp $
|
|
#
|
|
|
|
DISTNAME= djbdns-run-20141206
|
|
CATEGORIES= net
|
|
MASTER_SITES= # empty
|
|
DISTFILES= # empty
|
|
|
|
MAINTAINER= schmonz@NetBSD.org
|
|
COMMENT= Configures djbdns to cache and serve queries
|
|
LICENSE= 2-clause-bsd
|
|
|
|
DEPENDS_DJBDNS= djbdns>=1.05nb5:../../net/djbdns
|
|
DEPENDS+= ${DEPENDS_DJBDNS}
|
|
DEPENDS+= daemontools-[0-9]*:../../sysutils/daemontools
|
|
DEPENDS+= ucspi-tcp-[0-9]*:../../net/ucspi-tcp
|
|
|
|
WRKSRC= ${WRKDIR}
|
|
NO_BUILD= yes
|
|
NO_CHECKSUM= yes
|
|
|
|
MAKE_DIRS+= ${PKG_SYSCONFDIR}/axfrdns
|
|
MAKE_DIRS+= ${PKG_SYSCONFDIR}/dnscache/ip
|
|
MAKE_DIRS+= ${PKG_SYSCONFDIR}/dnscache/servers
|
|
MAKE_DIRS+= ${PKG_SYSCONFDIR}/rbldns
|
|
MAKE_DIRS+= ${PKG_SYSCONFDIR}/tinydns
|
|
PKG_GROUPS= djbdns
|
|
PKG_USERS+= dnslog:djbdns
|
|
PKG_USERS+= axfrdns:djbdns
|
|
PKG_USERS+= dnscache:djbdns
|
|
PKG_USERS+= rbldns:djbdns
|
|
PKG_USERS+= tinydns:djbdns
|
|
RCD_SCRIPTS= axfrdns djbdns dnscache rbldns tinydns
|
|
FILES_SUBST+= PKGNAME=${PKGNAME:Q}
|
|
|
|
INSTALLATION_DIRS= share/doc/djbdns-run
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
# Detect the PKG_SYSCONFDIR of the installed djbdns, so we can create
|
|
# config files there and refer to them from rc.d scripts.
|
|
#
|
|
.if !defined(PKG_SYSCONFDIR.djbdns-run)
|
|
PKG_SYSCONFDIR.djbdns-run!= \
|
|
${PKG_INFO} -Q PKG_SYSCONFDIR \
|
|
${DEPENDS_DJBDNS:C/:.*$//:Q} 2>/dev/null || \
|
|
${ECHO} "PKG_SYSCONFDIR.djbdns-run_not_set"
|
|
. if empty(PKG_SYSCONFDIR.djbdns-run:M*not_set)
|
|
MAKEVARS+= PKG_SYSCONFDIR.djbdns-run
|
|
. endif
|
|
.endif
|
|
|
|
do-install:
|
|
${INSTALL_DATA} ${FILESDIR}/README.pkgsrc ${DESTDIR}${PREFIX}/share/doc/djbdns-run
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|