summaryrefslogtreecommitdiff
path: root/net/djbdns-run
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2014-12-07 04:33:30 +0000
committerschmonz <schmonz@pkgsrc.org>2014-12-07 04:33:30 +0000
commit0a9a2d928c45c8e8a0b13f6d654021751b8aba50 (patch)
tree9e22a12c0a9afa5151552d524586214d6c62fe58 /net/djbdns-run
parent5651fd581e0fb0c59e129d8bb304caa2cb02a88c (diff)
downloadpkgsrc-0a9a2d928c45c8e8a0b13f6d654021751b8aba50.tar.gz
Based on feedback from joerg@ and riastradh@, don't save a persistent
seed file on first startup after all. Primary rationale: it is not desirable that the predictability of the first boot (whatever that may happen to be) force an upper bound on the unpredictability of random seeds for all future dnscache instances. Instead, as before, let dnscache read 128 new bytes on every startup. Just give it /dev/urandom instead of /dev/random. While here, abolish references to LOCALBASE. Bump version.
Diffstat (limited to 'net/djbdns-run')
-rw-r--r--net/djbdns-run/INSTALL4
-rw-r--r--net/djbdns-run/Makefile12
-rw-r--r--net/djbdns-run/files/axfrdns.sh10
-rw-r--r--net/djbdns-run/files/dnscache.sh15
-rw-r--r--net/djbdns-run/files/rbldns.sh10
-rw-r--r--net/djbdns-run/files/tinydns.sh10
6 files changed, 32 insertions, 29 deletions
diff --git a/net/djbdns-run/INSTALL b/net/djbdns-run/INSTALL
index f7d35677258..b64495fe28e 100644
--- a/net/djbdns-run/INSTALL
+++ b/net/djbdns-run/INSTALL
@@ -1,3 +1,5 @@
+UCSPI_TCP_PREFIX=@UCSPI_TCP_PREFIX@
+
psmsg='#
# This file was auto-generated by pkgsrc.'
@@ -11,7 +13,7 @@ POST-INSTALL)
${ECHO} "$psmsg" >> tcp
${CHMOD} 644 tcp
fi
- ${LOCALBASE}/bin/tcprules tcp.cdb tcp.tmp < tcp
+ ${UCSPI_TCP_PREFIX}/bin/tcprules tcp.cdb tcp.tmp < tcp
${CHMOD} 644 tcp.cdb
cd ${PKG_SYSCONFDIR}/dnscache
diff --git a/net/djbdns-run/Makefile b/net/djbdns-run/Makefile
index a19e5ed3335..f209af5a658 100644
--- a/net/djbdns-run/Makefile
+++ b/net/djbdns-run/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.24 2014/12/06 09:41:04 schmonz Exp $
+# $NetBSD: Makefile,v 1.25 2014/12/07 04:33:30 schmonz Exp $
#
-DISTNAME= djbdns-run-20141206
+DISTNAME= djbdns-run-20141207
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
@@ -50,6 +50,14 @@ MAKEVARS+= PKG_SYSCONFDIR.djbdns-run
. endif
.endif
+DJBDNS_TOOLS= daemontools djbdns ucspi-tcp
+
+.for i in ${DJBDNS_TOOLS}
+DJBDNS_TOOL_VAR.${i}= ${i:S/-/_/g:tu}_PREFIX
+EVAL_PREFIX+= ${DJBDNS_TOOL_VAR.${i}}=${i}
+FILES_SUBST+= ${DJBDNS_TOOL_VAR.${i}}=${${DJBDNS_TOOL_VAR.${i}}:Q}
+.endfor
+
do-install:
${INSTALL_DATA} ${FILESDIR}/README.pkgsrc ${DESTDIR}${PREFIX}/share/doc/djbdns-run
diff --git a/net/djbdns-run/files/axfrdns.sh b/net/djbdns-run/files/axfrdns.sh
index 4cf1dafc181..71186e9dc5c 100644
--- a/net/djbdns-run/files/axfrdns.sh
+++ b/net/djbdns-run/files/axfrdns.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: axfrdns.sh,v 1.5 2014/04/15 23:07:21 schmonz Exp $
+# $NetBSD: axfrdns.sh,v 1.6 2014/12/07 04:33:31 schmonz Exp $
#
# @PKGNAME@ script to control axfrdns (DNS zone-transfer and TCP service)
#
@@ -19,7 +19,7 @@ name="axfrdns"
: ${axfrdns_pretcpserver:=""}
: ${axfrdns_log:="YES"}
: ${axfrdns_logcmd:="logger -t nb${name} -p daemon.info"}
-: ${axfrdns_nologcmd:="@LOCALBASE@/bin/multilog -*"}
+: ${axfrdns_nologcmd:="@DAEMONTOOLS_PREFIX@/bin/multilog -*"}
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
@@ -27,7 +27,7 @@ fi
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/axfrdns/tcp.cdb"
-command="@LOCALBASE@/bin/tcpserver"
+command="@UCSPI_TCP_PREFIX@/bin/tcpserver"
procname=${name}
start_precmd="axfrdns_precmd"
extra_commands="reload cdb"
@@ -38,7 +38,7 @@ axfrdns_precmd()
if [ -f /etc/rc.subr ]; then
checkyesno axfrdns_log || axfrdns_logcmd=${axfrdns_nologcmd}
fi
- command="@SETENV@ - ${axfrdns_postenv} ROOT=@PKG_SYSCONFDIR@/tinydns IP=${tinydns_ip} @LOCALBASE@/bin/envuidgid axfrdns @LOCALBASE@/bin/softlimit -d ${axfrdns_datalimit} ${axfrdns_pretcpserver} @LOCALBASE@/bin/argv0 @LOCALBASE@/bin/tcpserver ${name} ${axfrdns_tcpflags} -x @PKG_SYSCONFDIR@/axfrdns/tcp.cdb -- ${tinydns_ip} ${axfrdns_tcpport} @LOCALBASE@/bin/axfrdns </dev/null 2>&1 | @LOCALBASE@/bin/setuidgid dnslog ${axfrdns_logcmd}"
+ command="@SETENV@ - ${axfrdns_postenv} ROOT=@PKG_SYSCONFDIR@/tinydns IP=${tinydns_ip} @DAEMONTOOLS_PREFIX@/bin/envuidgid axfrdns @DAEMONTOOLS_PREFIX@/bin/softlimit -d ${axfrdns_datalimit} ${axfrdns_pretcpserver} @UCSPI_TCP_PREFIX@/bin/argv0 @UCSPI_TCP_PREFIX@/bin/tcpserver ${name} ${axfrdns_tcpflags} -x @PKG_SYSCONFDIR@/axfrdns/tcp.cdb -- ${tinydns_ip} ${axfrdns_tcpport} @DJBDNS_PREFIX@/bin/axfrdns </dev/null 2>&1 | @DAEMONTOOLS_PREFIX@/bin/setuidgid dnslog ${axfrdns_logcmd}"
command_args="&"
rc_flags=""
}
@@ -47,7 +47,7 @@ axfrdns_cdb()
{
@ECHO@ "Reloading @PKG_SYSCONFDIR@/axfrdns/tcp."
cd @PKG_SYSCONFDIR@/axfrdns
- @LOCALBASE@/bin/tcprules tcp.cdb tcp.tmp < tcp
+ @UCSPI_TCP_PREFIX@/bin/tcprules tcp.cdb tcp.tmp < tcp
}
if [ -f /etc/rc.subr ]; then
diff --git a/net/djbdns-run/files/dnscache.sh b/net/djbdns-run/files/dnscache.sh
index e74dacd148e..43cad3ad89a 100644
--- a/net/djbdns-run/files/dnscache.sh
+++ b/net/djbdns-run/files/dnscache.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: dnscache.sh,v 1.6 2014/12/06 09:41:04 schmonz Exp $
+# $NetBSD: dnscache.sh,v 1.7 2014/12/07 04:33:31 schmonz Exp $
#
# @PKGNAME@ script to control dnscache (caching DNS resolver)
#
@@ -19,7 +19,7 @@ name="dnscache"
: ${dnscache_datalimit:="3000000"}
: ${dnscache_log:="YES"}
: ${dnscache_logcmd:="logger -t nb${name} -p daemon.info"}
-: ${dnscache_nologcmd:="@LOCALBASE@/bin/multilog -*"}
+: ${dnscache_nologcmd:="@DAEMONTOOLS_PREFIX@/bin/multilog -*"}
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
@@ -28,7 +28,7 @@ fi
rcvar=${name}
required_dirs="@PKG_SYSCONFDIR@/dnscache/ip @PKG_SYSCONFDIR@/dnscache/servers"
required_files="@PKG_SYSCONFDIR@/dnscache/servers/@"
-command="@LOCALBASE@/bin/${name}"
+command="@DJBDNS_PREFIX@/bin/${name}"
start_precmd="dnscache_precmd"
dnscache_precmd()
@@ -36,14 +36,7 @@ dnscache_precmd()
if [ -f /etc/rc.subr ]; then
checkyesno dnscache_log || dnscache_logcmd=${dnscache_nologcmd}
fi
- if [ ! -f @PKG_SYSCONFDIR@/dnscache/seed ]; then
- old_umask=$(umask)
- umask 066
- dd if=/dev/urandom bs=128 count=1 of=@PKG_SYSCONFDIR@/dnscache/seed
- umask ${old_umask}
- fi
- required_files="${required_files} @PKG_SYSCONFDIR@/dnscache/seed"
- command="@SETENV@ - ${dnscache_postenv} ROOT=@PKG_SYSCONFDIR@/dnscache IP=${dnscache_ip} IPSEND=${dnscache_ipsend} CACHESIZE=${dnscache_size} @LOCALBASE@/bin/envuidgid dnscache @LOCALBASE@/bin/softlimit -o250 -d ${dnscache_datalimit} @LOCALBASE@/bin/dnscache <@PKG_SYSCONFDIR@/dnscache/seed 2>&1 | @LOCALBASE@/bin/setuidgid dnslog ${dnscache_logcmd}"
+ command="@SETENV@ - ${dnscache_postenv} ROOT=@PKG_SYSCONFDIR@/dnscache IP=${dnscache_ip} IPSEND=${dnscache_ipsend} CACHESIZE=${dnscache_size} @DAEMONTOOLS_PREFIX@/bin/envuidgid dnscache @DAEMONTOOLS_PREFIX@/bin/softlimit -o250 -d ${dnscache_datalimit} @DJBDNS_PREFIX@/bin/dnscache </dev/urandom 2>&1 | @DAEMONTOOLS_PREFIX@/bin/setuidgid dnslog ${dnscache_logcmd}"
command_args="&"
rc_flags=""
}
diff --git a/net/djbdns-run/files/rbldns.sh b/net/djbdns-run/files/rbldns.sh
index 01232815b3a..b2dfeeb56fb 100644
--- a/net/djbdns-run/files/rbldns.sh
+++ b/net/djbdns-run/files/rbldns.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: rbldns.sh,v 1.3 2014/04/15 23:07:21 schmonz Exp $
+# $NetBSD: rbldns.sh,v 1.4 2014/12/07 04:33:31 schmonz Exp $
#
# @PKGNAME@ script to control rbldns (local RBL service)
#
@@ -18,7 +18,7 @@ name="rbldns"
: ${rbldns_datalimit:="250000"}
: ${rbldns_log:="YES"}
: ${rbldns_logcmd:="logger -t nb${name} -p daemon.info"}
-: ${rbldns_nologcmd:="@LOCALBASE@/bin/multilog -*"}
+: ${rbldns_nologcmd:="@DAEMONTOOLS_PREFIX@/bin/multilog -*"}
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
@@ -26,7 +26,7 @@ fi
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/rbldns/data.cdb"
-command="@LOCALBASE@/bin/${name}"
+command="@DJBDNS_PREFIX@/bin/${name}"
start_precmd="rbldns_precmd"
extra_commands="reload cdb"
reload_cmd="rbldns_cdb"; cdb_cmd=${reload_cmd}
@@ -36,7 +36,7 @@ rbldns_precmd()
if [ -f /etc/rc.subr ]; then
checkyesno rbldns_log || rbldns_logcmd=${rbldns_nologcmd}
fi
- command="@SETENV@ - ${rbldns_postenv} ROOT=@PKG_SYSCONFDIR@/rbldns IP=${rbldns_ip} BASE=${rbldns_base} @LOCALBASE@/bin/envuidgid rbldns @LOCALBASE@/bin/softlimit -d ${rbldns_datalimit} @LOCALBASE@/bin/rbldns 2>&1 | @LOCALBASE@/bin/setuidgid dnslog ${rbldns_logcmd}"
+ command="@SETENV@ - ${rbldns_postenv} ROOT=@PKG_SYSCONFDIR@/rbldns IP=${rbldns_ip} BASE=${rbldns_base} @DAEMONTOOLS_PREFIX@/bin/envuidgid rbldns @DAEMONTOOLS_PREFIX@/bin/softlimit -d ${rbldns_datalimit} @DJBDNS_PREFIX@/bin/rbldns 2>&1 | @DAEMONTOOLS_PREFIX@/bin/setuidgid dnslog ${rbldns_logcmd}"
command_args="&"
rc_flags=""
}
@@ -45,7 +45,7 @@ rbldns_cdb()
{
@ECHO@ "Reloading @PKG_SYSCONFDIR@/rbldns/data."
cd @PKG_SYSCONFDIR@/rbldns
- @LOCALBASE@/bin/rbldns-data
+ @DJBDNS_PREFIX@/bin/rbldns-data
}
if [ -f /etc/rc.subr ]; then
diff --git a/net/djbdns-run/files/tinydns.sh b/net/djbdns-run/files/tinydns.sh
index 8e0276388e9..b02f3dbd2f5 100644
--- a/net/djbdns-run/files/tinydns.sh
+++ b/net/djbdns-run/files/tinydns.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: tinydns.sh,v 1.5 2014/04/15 23:07:22 schmonz Exp $
+# $NetBSD: tinydns.sh,v 1.6 2014/12/07 04:33:31 schmonz Exp $
#
# @PKGNAME@ script to control tinydns (authoritative DNS service)
#
@@ -17,7 +17,7 @@ name="tinydns"
: ${tinydns_datalimit:="300000"}
: ${tinydns_log:="YES"}
: ${tinydns_logcmd:="logger -t nb${name} -p daemon.info"}
-: ${tinydns_nologcmd:="@LOCALBASE@/bin/multilog -*"}
+: ${tinydns_nologcmd:="@DAEMONTOOLS_PREFIX@/bin/multilog -*"}
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
@@ -25,7 +25,7 @@ fi
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/tinydns/data.cdb"
-command="@LOCALBASE@/bin/${name}"
+command="@DJBDNS_PREFIX@/bin/${name}"
start_precmd="tinydns_precmd"
extra_commands="reload cdb"
reload_cmd="tinydns_cdb"; cdb_cmd=${reload_cmd}
@@ -35,7 +35,7 @@ tinydns_precmd()
if [ -f /etc/rc.subr ]; then
checkyesno tinydns_log || tinydns_logcmd=${tinydns_nologcmd}
fi
- command="@SETENV@ - ${tinydns_postenv} ROOT=@PKG_SYSCONFDIR@/tinydns IP=${tinydns_ip} @LOCALBASE@/bin/envuidgid tinydns @LOCALBASE@/bin/softlimit -d ${tinydns_datalimit} @LOCALBASE@/bin/tinydns </dev/null 2>&1 | @LOCALBASE@/bin/setuidgid dnslog ${tinydns_logcmd}"
+ command="@SETENV@ - ${tinydns_postenv} ROOT=@PKG_SYSCONFDIR@/tinydns IP=${tinydns_ip} @DAEMONTOOLS_PREFIX@/bin/envuidgid tinydns @DAEMONTOOLS_PREFIX@/bin/softlimit -d ${tinydns_datalimit} @DJBDNS_PREFIX@/bin/tinydns </dev/null 2>&1 | @DAEMONTOOLS_PREFIX@/bin/setuidgid dnslog ${tinydns_logcmd}"
command_args="&"
rc_flags=""
}
@@ -44,7 +44,7 @@ tinydns_cdb()
{
@ECHO@ "Reloading @PKG_SYSCONFDIR@/tinydns/data."
cd @PKG_SYSCONFDIR@/tinydns
- @LOCALBASE@/bin/tinydns-data
+ @DJBDNS_PREFIX@/bin/tinydns-data
}
if [ -f /etc/rc.subr ]; then