diff options
-rw-r--r-- | etc/group | 1 | ||||
-rw-r--r-- | etc/master.passwd | 1 | ||||
-rw-r--r-- | etc/mtree/BSD.root.dist | 2 | ||||
-rw-r--r-- | etc/mtree/BSD.var.dist | 2 | ||||
-rw-r--r-- | lib/Makefile | 6 | ||||
-rw-r--r-- | lib/libunbound/Makefile | 33 | ||||
-rw-r--r-- | share/mk/bsd.libnames.mk | 3 | ||||
-rw-r--r-- | share/mk/bsd.own.mk | 2 | ||||
-rw-r--r-- | tools/build/mk/OptionalObsoleteFiles.inc | 18 | ||||
-rw-r--r-- | tools/build/options/WITHOUT_UNBOUND | 4 | ||||
-rw-r--r-- | usr.sbin/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/unbound/Makefile | 5 | ||||
-rw-r--r-- | usr.sbin/unbound/Makefile.inc | 3 | ||||
-rw-r--r-- | usr.sbin/unbound/anchor/Makefile | 18 | ||||
-rw-r--r-- | usr.sbin/unbound/checkconf/Makefile | 17 | ||||
-rw-r--r-- | usr.sbin/unbound/control/Makefile | 18 | ||||
-rw-r--r-- | usr.sbin/unbound/daemon/Makefile | 17 |
17 files changed, 154 insertions, 0 deletions
@@ -19,6 +19,7 @@ mailnull:*:26: _atf:*:27: guest:*:31: bind:*:53: +unbound:*:59: proxy:*:62: authpf:*:63: _pflogd:*:64: diff --git a/etc/master.passwd b/etc/master.passwd index f979940..7585471 100644 --- a/etc/master.passwd +++ b/etc/master.passwd @@ -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 diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index 352ac21..349db40 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -66,6 +66,8 @@ .. ssl .. + unbound + .. zfs .. .. diff --git a/etc/mtree/BSD.var.dist b/etc/mtree/BSD.var.dist index 196ee42..c422199 100644 --- a/etc/mtree/BSD.var.dist +++ b/etc/mtree/BSD.var.dist @@ -97,6 +97,8 @@ vi.recover mode=01777 .. .. + unbound uname=unbound gname=unbound mode=0750 + .. yp .. .. diff --git a/lib/Makefile b/lib/Makefile index feca8d3..72abecd 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -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 diff --git a/lib/libunbound/Makefile b/lib/libunbound/Makefile new file mode 100644 index 0000000..eab23e1 --- /dev/null +++ b/lib/libunbound/Makefile @@ -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> diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index 00d38ff..25de3b6 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -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 diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 8f7f0b9..252460f 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -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" diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 282818e..09a39ac 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -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 diff --git a/tools/build/options/WITHOUT_UNBOUND b/tools/build/options/WITHOUT_UNBOUND new file mode 100644 index 0000000..1f39ea0 --- /dev/null +++ b/tools/build/options/WITHOUT_UNBOUND @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr unbound 8 +and related programs. diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index f2f5342..102593b 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -317,6 +317,10 @@ SUBDIR+= config SUBDIR+= crunch .endif +.if ${MK_UNBOUND} != "no" +SUBDIR+= unbound +.endif + .if ${MK_USB} != "no" SUBDIR+= uathload SUBDIR+= uhsoctl diff --git a/usr.sbin/unbound/Makefile b/usr.sbin/unbound/Makefile new file mode 100644 index 0000000..2672d23 --- /dev/null +++ b/usr.sbin/unbound/Makefile @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR= daemon anchor checkconf control + +.include <bsd.subdir.mk> diff --git a/usr.sbin/unbound/Makefile.inc b/usr.sbin/unbound/Makefile.inc new file mode 100644 index 0000000..265f86d --- /dev/null +++ b/usr.sbin/unbound/Makefile.inc @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" diff --git a/usr.sbin/unbound/anchor/Makefile b/usr.sbin/unbound/anchor/Makefile new file mode 100644 index 0000000..1404766 --- /dev/null +++ b/usr.sbin/unbound/anchor/Makefile @@ -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> diff --git a/usr.sbin/unbound/checkconf/Makefile b/usr.sbin/unbound/checkconf/Makefile new file mode 100644 index 0000000..6a58806 --- /dev/null +++ b/usr.sbin/unbound/checkconf/Makefile @@ -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> diff --git a/usr.sbin/unbound/control/Makefile b/usr.sbin/unbound/control/Makefile new file mode 100644 index 0000000..7056a9e --- /dev/null +++ b/usr.sbin/unbound/control/Makefile @@ -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> diff --git a/usr.sbin/unbound/daemon/Makefile b/usr.sbin/unbound/daemon/Makefile new file mode 100644 index 0000000..0f9044f --- /dev/null +++ b/usr.sbin/unbound/daemon/Makefile @@ -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> |