Build and install the Unbound caching DNS resolver daemon.

Approved by:	re (blanket)
This commit is contained in:
des 2013-09-15 14:51:23 +00:00
parent 3b7e4aa267
commit ea05e625ec
17 changed files with 154 additions and 0 deletions

View File

@ -19,6 +19,7 @@ mailnull:*:26:
_atf:*:27:
guest:*:31:
bind:*:53:
unbound:*:59:
proxy:*:62:
authpf:*:63:
_pflogd:*:64:

View File

@ -15,6 +15,7 @@ smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/no
mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
_atf:*:27:27::0:0:& pseudo-user:/nonexistent:/usr/sbin/nologin
bind:*:53:53::0:0:Bind Sandbox:/:/usr/sbin/nologin
unbound:*:59:59::0:0:Unbound DNS Resolver:/var/unbound:/usr/sbin/nologin
proxy:*:62:62::0:0:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin

View File

@ -66,6 +66,8 @@
..
ssl
..
unbound
..
zfs
..
..

View File

@ -97,6 +97,8 @@
vi.recover mode=01777
..
..
unbound uname=unbound gname=unbound mode=0750
..
yp
..
..

View File

@ -12,6 +12,7 @@
# libcom_err must be built before libpam.
# libcrypt must be built before libpam.
# libkvm must be built before libdevstat.
# libldns must be built before libunbound.
# msun must be built before libg++ and libstdc++.
# libmd must be built before libatm, libopie, libradius, and libtacplus.
# ncurses must be built before libdialog, libedit and libreadline.
@ -116,6 +117,7 @@ SUBDIR= ${SUBDIR_ORDERED} \
libufs \
libugidfw \
libulog \
${_libunbound} \
${_libusbhid} \
${_libusb} \
${_libvgl} \
@ -261,6 +263,10 @@ _libsmutil= libsmutil
_libtelnet= libtelnet
.endif
.if ${MK_UNBOUND} != "no"
_libunbound= libunbound
.endif
.if ${MK_USB} != "no"
_libusbhid= libusbhid
_libusb= libusb

33
lib/libunbound/Makefile Normal file
View File

@ -0,0 +1,33 @@
# $FreeBSD$
# Vendor sources and generated files
LDNSDIR= ${.CURDIR}/../../contrib/ldns
UNBOUNDDIR= ${.CURDIR}/../../contrib/unbound
# Hold my beer and watch this
.PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/iterator ${UNBOUNDDIR}/libunbound ${UNBOUNDDIR}/services ${UNBOUNDDIR}/services/cache ${UNBOUNDDIR}/util ${UNBOUNDDIR}/util/data ${UNBOUNDDIR}/util/storage ${UNBOUNDDIR}/validator
LIB= unbound
PRIVATELIB=
CFLAGS= -I${LDNSDIR} -I${UNBOUNDDIR}
SRCS= alloc.c autotrust.c config_file.c configlexer.c configparser.c \
context.c dname.c dns.c dnstree.c fptr_wlist.c infra.c \
iter_delegpt.c iter_donotq.c iter_fwd.c iter_hints.c iter_priv.c \
iter_resptype.c iter_scrub.c iter_utils.c iterator.c libunbound.c \
libworker.c listen_dnsport.c localzone.c locks.c log.c lookup3.c \
lruhash.c mesh.c mini_event.c modstack.c module.c msgencode.c \
msgparse.c msgreply.c net_help.c netevent.c outbound_list.c \
outside_network.c packed_rrset.c random.c rbtree.c regional.c \
rrset.c rtt.c slabhash.c timehist.c tube.c val_anchor.c \
val_kcache.c val_kentry.c val_neg.c val_nsec.c val_nsec3.c \
val_secalgo.c val_sigcrypt.c val_utils.c validator.c \
winsock_event.c
WARNS?= 3
DPADD+= ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
LDADD+= -lssl -lcrypto -lpthread
.include <bsd.lib.mk>

View File

@ -164,6 +164,9 @@ LIBTINFO?= "don't use LIBTINFO, use LIBNCURSES"
LIBUFS?= ${DESTDIR}${LIBDIR}/libufs.a
LIBUGIDFW?= ${DESTDIR}${LIBDIR}/libugidfw.a
LIBUMEM?= ${DESTDIR}${LIBDIR}/libumem.a
.if ${MK_UNBOUND} != "no"
LIBUNBOUND?= ${DESTDIR}${LIBDIR}/libunbound.a
.endif
LIBUSBHID?= ${DESTDIR}${LIBDIR}/libusbhid.a
LIBUSB?= ${DESTDIR}${LIBDIR}/libusb.a
LIBULOG?= ${DESTDIR}${LIBDIR}/libulog.a

View File

@ -358,6 +358,7 @@ __DEFAULT_YES_OPTIONS = \
TELNET \
TEXTPROC \
TOOLCHAIN \
UNBOUND \
USB \
UTMPX \
WIRELESS \
@ -521,6 +522,7 @@ MK_LIBICONV_COMPAT:= no
.if ${MK_LDNS} == "no"
MK_LDNS_UTILS:= no
MK_UNBOUND:= no
.endif
.if ${MK_LDNS_UTILS} != "no"

View File

@ -4367,6 +4367,24 @@ OLD_FILES+=usr/share/man/man8/telnetd.8.gz
# to be filled in
#.endif
.if ${MK_UNBOUND} == no
OLD_FILES+=usr/lib/private/libunbound.a
OLD_FILES+=usr/lib/private/libunbound.so
OLD_LIBS+=usr/lib/private/libunbound.so.5
OLD_FILES+=usr/lib/private/libunbound_p.a
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
OLD_FILES+=usr/lib32/private/libunbound.a
OLD_FILES+=usr/lib32/private/libunbound.so
OLD_LIBS+=usr/lib32/private/libunbound.so.5
OLD_FILES+=usr/lib32/private/libunbound_p.a
.endif
OLD_FILES+=usr/sbin/unbound
OLD_FILES+=usr/sbin/unbound-anchor
OLD_FILES+=usr/sbin/unbound-checkconf
OLD_FILES+=usr/sbin/unbound-control
OLD_FILES+=usr/sbin/unbound-control-setup
.endif
#.if ${MK_USB} == no
# to be filled in
#.endif

View File

@ -0,0 +1,4 @@
.\" $FreeBSD$
Set to not build
.Xr unbound 8
and related programs.

View File

@ -317,6 +317,10 @@ SUBDIR+= config
SUBDIR+= crunch
.endif
.if ${MK_UNBOUND} != "no"
SUBDIR+= unbound
.endif
.if ${MK_USB} != "no"
SUBDIR+= uathload
SUBDIR+= uhsoctl

View File

@ -0,0 +1,5 @@
# $FreeBSD$
SUBDIR= daemon anchor checkconf control
.include <bsd.subdir.mk>

View File

@ -0,0 +1,3 @@
# $FreeBSD$
.include "../Makefile.inc"

View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Vendor sources and generated files
LDNSDIR= ${.CURDIR}/../../../contrib/ldns
UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
EXPATDIR= ${.CURDIR}/../../../contrib/expat
.PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/doc
PROG= unbound-anchor
SRCS= unbound-anchor.c
CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR} -I${EXPATDIR}/lib
DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBBSDXML} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
LDADD= -lunbound -lldns -lutil -lbsdxml -lssl -lcrypto -lpthread
USEPRIVATELIB= ldns
MAN= unbound-anchor.8
.include <bsd.prog.mk>

View File

@ -0,0 +1,17 @@
# $FreeBSD$
# Vendor sources and generated files
LDNSDIR= ${.CURDIR}/../../../contrib/ldns
UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
.PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/doc
PROG= unbound-checkconf
SRCS= unbound-checkconf.c worker_cb.c
CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR}
DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
LDADD= -lunbound -lldns -lutil -lssl -lcrypto -lpthread
USEPRIVATELIB= ldns
MAN= unbound-checkconf.8
.include <bsd.prog.mk>

View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Vendor sources and generated files
LDNSDIR= ${.CURDIR}/../../../contrib/ldns
UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
.PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/doc
PROG= unbound-control
SCRIPTS= unbound-control-setup.sh
SRCS= unbound-control.c worker_cb.c
CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR}
DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
LDADD= -lunbound -lldns -lutil -lssl -lcrypto -lpthread
USEPRIVATELIB= ldns
MAN= unbound-control.8
.include <bsd.prog.mk>

View File

@ -0,0 +1,17 @@
# $FreeBSD$
# Vendor sources and generated files
LDNSDIR= ${.CURDIR}/../../../contrib/ldns
UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
.PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/daemon ${UNBOUNDDIR}/doc
PROG= unbound
SRCS= acl_list.c cachedump.c daemon.c remote.c stats.c unbound.c worker.c
CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR}
DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
LDADD= -lunbound -lldns -lutil -lssl -lcrypto -lpthread
USEPRIVATELIB= ldns
MAN= unbound.8 unbound.conf.5
.include <bsd.prog.mk>