From 629d228aa60609817434177281934a5030c4a7d5 Mon Sep 17 00:00:00 2001 From: jca Date: Sun, 12 Apr 2015 16:07:13 +0000 Subject: [PATCH] Import knot-1.6.2 Tests by Pierre Emeriaud (co-maintainer) and florian@, ok sthen@ DESCR: Knot DNS is a high-performance authoritative-only DNS server which supports all key features of the domain name system including zone transfers and DNSSEC. Among its goals is support for on-line addition and removal of zones. --- net/knot/Makefile | 48 +++++++++++++++++++ net/knot/distinfo | 2 + .../patches/patch-samples_knot_sample_conf_in | 23 +++++++++ .../patches/patch-src_libknot_dnssec_config_h | 18 +++++++ .../patches/patch-src_libknot_util_endian_h | 15 ++++++ net/knot/pkg/DESCR | 4 ++ net/knot/pkg/PLIST | 34 +++++++++++++ net/knot/pkg/knot.rc | 26 ++++++++++ 8 files changed, 170 insertions(+) create mode 100644 net/knot/Makefile create mode 100644 net/knot/distinfo create mode 100644 net/knot/patches/patch-samples_knot_sample_conf_in create mode 100644 net/knot/patches/patch-src_libknot_dnssec_config_h create mode 100644 net/knot/patches/patch-src_libknot_util_endian_h create mode 100644 net/knot/pkg/DESCR create mode 100644 net/knot/pkg/PLIST create mode 100644 net/knot/pkg/knot.rc diff --git a/net/knot/Makefile b/net/knot/Makefile new file mode 100644 index 00000000000..77ce33a9c95 --- /dev/null +++ b/net/knot/Makefile @@ -0,0 +1,48 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2015/04/12 16:07:13 jca Exp $ + +COMMENT = authoritative DNS server + +DISTNAME = knot-1.6.2 + +SHARED_LIBS += zscanner 0.0 # .0.1 +SHARED_LIBS += knot 0.0 # .0.1 + +CATEGORIES = net + +HOMEPAGE = https://www.knot-dns.cz/ + +MAINTAINER = Pierre Emeriaud , \ + Jeremie Courreges-Anglas + +# GPLv3+ +PERMIT_PACKAGE_CDROM = Yes + +WANTLIB += c crypto idn m pthread urcu urcu-common z + +MASTER_SITES = https://secure.nic.cz/files/knot-dns/ + +EXTRACT_SUFX = .tar.xz + +MODULES = devel/gettext +BUILD_DEPENDS = devel/bison \ + devel/flex +LIB_DEPENDS = devel/libidn \ + devel/liburcu + +USE_GMAKE = Yes +USE_LIBTOOL= gnu +CONFIGURE_STYLE = gnu +CONFIGURE_ARGS += ${CONFIGURE_SHARED} \ + --with-storage=/var/db/knot \ + --with-libidn \ + --without-dnstap \ + --without-lmdb +CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" \ + ac_cv_path_PDFLATEX="false" \ + ac_cv_path_SPHINXBUILD="false" + +post-install: + mv ${WRKINST}/etc/knot/ ${PREFIX}/share/examples/knot/ + +.include diff --git a/net/knot/distinfo b/net/knot/distinfo new file mode 100644 index 00000000000..73d92d35add --- /dev/null +++ b/net/knot/distinfo @@ -0,0 +1,2 @@ +SHA256 (knot-1.6.2.tar.xz) = Af4K6AgZksizeAReMaLQNFLQrm2K+qGQX9dn9+I3atQ= +SIZE (knot-1.6.2.tar.xz) = 782416 diff --git a/net/knot/patches/patch-samples_knot_sample_conf_in b/net/knot/patches/patch-samples_knot_sample_conf_in new file mode 100644 index 00000000000..0178792078c --- /dev/null +++ b/net/knot/patches/patch-samples_knot_sample_conf_in @@ -0,0 +1,23 @@ +$OpenBSD: patch-samples_knot_sample_conf_in,v 1.1.1.1 2015/04/12 16:07:13 jca Exp $ +--- samples/knot.sample.conf.in.orig Tue Feb 10 23:44:11 2015 ++++ samples/knot.sample.conf.in Tue Feb 10 23:44:44 2015 +@@ -13,7 +13,7 @@ system { + + # User for running server + # May also specify user.group (e.g. knot.knot) +- user knot.knot; ++ user _knot._knot; + + # Directory for storing run-time data + # e.g. PID file and control sockets +@@ -83,7 +83,7 @@ log { + } + + # Log warnings, errors and criticals to stderr +- stderr { +- any warning; +- } ++ #stderr { ++ # any warning; ++ #} + } diff --git a/net/knot/patches/patch-src_libknot_dnssec_config_h b/net/knot/patches/patch-src_libknot_dnssec_config_h new file mode 100644 index 00000000000..3be4232b2a1 --- /dev/null +++ b/net/knot/patches/patch-src_libknot_dnssec_config_h @@ -0,0 +1,18 @@ +$OpenBSD: patch-src_libknot_dnssec_config_h,v 1.1.1.1 2015/04/12 16:07:13 jca Exp $ + +Disable use of the GOST *engine*, not in LibreSSL. + +--- src/libknot/dnssec/config.h.orig Thu Feb 19 09:43:56 2015 ++++ src/libknot/dnssec/config.h Fri Apr 3 02:52:00 2015 +@@ -40,10 +40,6 @@ + #undef KNOT_ENABLE_ECDSA + #endif + +-#if !defined(OPENSSL_NO_GOST) && OPENSSL_VERSION_NUMBER >= 0x1000001fL +- #define KNOT_ENABLE_GOST 1 +-#else +- #undef KNOT_ENABLE_GOST +-#endif ++#undef KNOT_ENABLE_GOST + + /*! @} */ diff --git a/net/knot/patches/patch-src_libknot_util_endian_h b/net/knot/patches/patch-src_libknot_util_endian_h new file mode 100644 index 00000000000..d5778c27ae7 --- /dev/null +++ b/net/knot/patches/patch-src_libknot_util_endian_h @@ -0,0 +1,15 @@ +$OpenBSD: patch-src_libknot_util_endian_h,v 1.1.1.1 2015/04/12 16:07:13 jca Exp $ +--- src/libknot/util/endian.h.orig Thu Feb 19 09:43:56 2015 ++++ src/libknot/util/endian.h Fri Apr 3 02:42:16 2015 +@@ -32,10 +32,7 @@ + #elif defined(__FreeBSD__) || defined(__NetBSD__) + # include + #elif defined(__OpenBSD__) +-# include +-# define be16toh(x) betoh16(x) +-# define be32toh(x) betoh32(x) +-# define be64toh(x) betoh64(x) ++# include + #elif defined(__APPLE__) + # include + # define be16toh(x) OSSwapBigToHostInt16(x) diff --git a/net/knot/pkg/DESCR b/net/knot/pkg/DESCR new file mode 100644 index 00000000000..8f44a64340e --- /dev/null +++ b/net/knot/pkg/DESCR @@ -0,0 +1,4 @@ +Knot DNS is a high-performance authoritative-only DNS server which +supports all key features of the domain name system including zone +transfers and DNSSEC. Among its goals is support for on-line addition +and removal of zones. diff --git a/net/knot/pkg/PLIST b/net/knot/pkg/PLIST new file mode 100644 index 00000000000..720bebe2e28 --- /dev/null +++ b/net/knot/pkg/PLIST @@ -0,0 +1,34 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2015/04/12 16:07:13 jca Exp $ +@newgroup _knot:751 +@newuser _knot:751:_knot::Knot DNS Server:/var/empty:/sbin/nologin +@bin bin/kdig +@bin bin/khost +@bin bin/knsec3hash +@bin bin/knsupdate +lib/libknot.a +lib/libknot.la +@lib lib/libknot.so.${LIBknot_VERSION} +lib/libzscanner.a +lib/libzscanner.la +@lib lib/libzscanner.so.${LIBzscanner_VERSION} +@man man/man1/kdig.1 +@man man/man1/khost.1 +@man man/man1/knsec3hash.1 +@man man/man1/knsupdate.1 +@man man/man5/knot.conf.5 +@man man/man8/knotc.8 +@man man/man8/knotd.8 +@bin sbin/knotc +@bin sbin/knotd +share/examples/knot/ +@sample /etc/knot/ +share/examples/knot/example.com.zone +@sample /etc/knot/example.com.zone +share/examples/knot/knot.sample.conf +@sample /etc/knot/knot.conf +@mode 750 +@owner _knot +@sample /var/db/knot/ +@owner +@mode +@rcscript ${RCDIR}/knot diff --git a/net/knot/pkg/knot.rc b/net/knot/pkg/knot.rc new file mode 100644 index 00000000000..c5ef812a63f --- /dev/null +++ b/net/knot/pkg/knot.rc @@ -0,0 +1,26 @@ +#!/bin/sh + +daemon="${PREFIX}/sbin/knotd -d" +knotc="${PREFIX}/sbin/knotc" + +. /etc/rc.d/rc.subr + +rc_start() { + install -d -o _knot -g wheel -m 750 /var/run/knot/ + ${knotc} checkconf || return 1 + ${daemon} ${daemon_flags} +} + +rc_check() { + ${knotc} status || return 1 +} + +rc_reload() { + ${knotc} reload || return 1 +} + +rc_stop() { + ${knotc} stop || return 1 +} + +rc_cmd $1