import ports/net/maradns-deadwood, ok/tweak suggested by gsoares@

Deadwood is the recursive DNS daemon (service) for MaraDNS 2.0.
MaraDNS 2.0 uses separate programs for authoritative records
(maradns) and recursive records (Deadwood). Deadwood is a
standalone recursive server that can either be used in
conjunction with MaraDNS's authoritative server, or by itself.
This commit is contained in:
sthen 2012-03-21 16:17:58 +00:00
parent 25cee56417
commit 52534e0c82
7 changed files with 125 additions and 0 deletions

View File

@ -0,0 +1,39 @@
# $OpenBSD: Makefile,v 1.1.1.1 2012/03/21 16:17:58 sthen Exp $
COMMENT= recursive DNS resolver
DISTNAME= deadwood-3.2.02
PKGNAME= ${DISTNAME:S/^/maradns-/}
EXTRACT_SUFX= .tar.bz2
CATEGORIES= net
HOMEPAGE= http://www.maradns.org/
# BSD
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB += c
MASTER_SITES= http://www.maradns.org/deadwood/stable/ \
http://www.maradns.org/deadwood/stable/old/
MAKE_FLAGS= FLAGS="${CFLAGS} -DIPV6" CC="${CC}"
WRKSRC= ${WRKDIST}/src
post-extract:
rm ${WRKSRC}/*.orig
do-configure:
cd ${WRKSRC}; perl -pi -e 's,/etc/,${SYSCONFDIR}/,g' DwMararc.h DwMain.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/Deadwood ${PREFIX}/sbin
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/maradns-deadwood
cd ${WRKDIST}/doc; \
${INSTALL_MAN} Deadwood.1 ${PREFIX}/man/man1; \
${INSTALL_DATA} dwood3rc ${PREFIX}/share/examples/maradns-deadwood/
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (deadwood-3.2.02.tar.bz2) = OVXGqr6UFAEwDui5Dogdgw==
RMD160 (deadwood-3.2.02.tar.bz2) = mgeohFIAkbg0mzcDheimfMhD6k8=
SHA1 (deadwood-3.2.02.tar.bz2) = ofiHgQ78DXz4PzpJqpJGz43Shyw=
SHA256 (deadwood-3.2.02.tar.bz2) = cEm0NRyjLtFujW9MGAOOTwv/uqCe6xIbXIDl0T+LYSA=
SIZE (deadwood-3.2.02.tar.bz2) = 255528

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-doc_dwood3rc,v 1.1.1.1 2012/03/21 16:17:58 sthen Exp $
--- doc/dwood3rc.orig Wed Feb 29 07:59:53 2012
+++ doc/dwood3rc Tue Mar 20 22:28:45 2012
@@ -6,7 +6,7 @@ bind_address="127.0.0.1" # IP we bind to
# The following line is disabled by being commented out
#bind_address="::1" # We have optional IPv6 support
-chroot_dir = "/etc/deadwood" # Directory we run program from (not used in Win32)
+chroot_dir = "/var/deadwood" # Directory we run program from (not used in Win32)
# The following upstream DNS servers are Google's newly-announced (as of
# December, 2009) public DNS servers. For more information, see
@@ -44,8 +44,8 @@ recursive_acl = "127.0.0.1/16" # Who is allowed to use
maxprocs = 8 # Maximum number of pending requests
handle_overload = 1 # Send SERVER FAIL when overloaded
-maradns_uid = 99 # UID Deadwood runs as
-maradns_gid = 99 # GID Deadwood runs as
+maradns_uid = 695 # UID Deadwood runs as
+maradns_gid = 695 # GID Deadwood runs as
maximum_cache_elements = 60000
@@ -64,3 +64,7 @@ resurrections = 1
# on an internal network, uncomment the following line:
#filter_rfc1918 = 0
+# By default, Deadwood does not allow MX records to be resolved as
+# some protection against spam zombies. To permit this, uncomment the
+# following line:
+#reject_mx = 0

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-src_Makefile,v 1.1.1.1 2012/03/21 16:17:58 sthen Exp $
--- src/Makefile.orig Wed Dec 21 19:44:37 2011
+++ src/Makefile Tue Mar 20 22:30:12 2012
@@ -68,7 +68,7 @@ DwSys.o: DwSys.c DwStr.h
$(CC) $(FLAGS) -Wall -c -o DwSys.o DwSys.c
RandomPrime: RandomPrime.c
- $(CC) -O3 -o RandomPrime RandomPrime.c
+ $(CC) ${FLAGS} -o RandomPrime RandomPrime.c
DwRandPrime.h: RandomPrime
if [ -e /dev/urandom ] ; then ./RandomPrime > DwRandPrime.h ; fi
@@ -86,5 +86,5 @@ Test: Test.c DwStr.o DwStr.h DwStr_functions.h $(OBJS
$(CC) $(FLAGS) -Wall -o Test Test.c $(OBJS)
Deadwood: DwMain.c $(OBJS) DwStr_functions.h version.h
- $(CC) $(FLAGS) -Wall -o Deadwood DwMain.c $(OBJS) -lrt
+ $(CC) $(FLAGS) -Wall -o Deadwood DwMain.c $(OBJS)

View File

@ -0,0 +1,5 @@
Deadwood is the recursive DNS daemon (service) for MaraDNS 2.0.
MaraDNS 2.0 uses separate programs for authoritative records
(maradns) and recursive records (Deadwood). Deadwood is a
standalone recursive server that can either be used in
conjunction with MaraDNS's authoritative server, or by itself.

View File

@ -0,0 +1,14 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/03/21 16:17:58 sthen Exp $
@newgroup _deadwood:695
@newuser _deadwood:695:_deadwood:daemon:maradns-deadwood user:/nonexistent:/sbin/nologin
@man man/man1/Deadwood.1
@bin sbin/Deadwood
share/examples/maradns-deadwood/
share/examples/maradns-deadwood/dwood3rc
@sample ${SYSCONFDIR}/dwood3rc
@group _deadwood
@mode 770
@sample /var/deadwood/
@group
@mode
@rcscript ${RCDIR}/deadwood

View File

@ -0,0 +1,12 @@
#!/bin/sh
#
# $OpenBSD: deadwood.rc,v 1.1.1.1 2012/03/21 16:17:58 sthen Exp $
daemon="${TRUEPREFIX}/sbin/Deadwood"
. /etc/rc.d/rc.subr
rc_bg=YES
rc_reload=NO
rc_cmd $1