Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jul 2020 20:57:42 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r542054 - in head/dns/knot-resolver: . files
Message-ID:  <202007112057.06BKvgW3049171@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Sat Jul 11 20:57:41 2020
New Revision: 542054
URL: https://svnweb.freebsd.org/changeset/ports/542054

Log:
  dns/knot-resolver: update 5.1.1 -> 5.1.2
  
  PR:		247699
  Submitted by:	Leo Vandewoestijne <freebsd@dns.company> (maintainer)
  		andrew@tao11.riddles.org.uk
  Relnotes:	https://www.knot-resolver.cz/2020-07-01-knot-resolver-5.1.2.html

Added:
  head/dns/knot-resolver/files/krescachegc.in   (contents, props changed)
  head/dns/knot-resolver/files/kresd.in   (contents, props changed)
  head/dns/knot-resolver/files/patch-etc_meson.build   (contents, props changed)
  head/dns/knot-resolver/files/patch-meson.build   (contents, props changed)
Modified:
  head/dns/knot-resolver/Makefile
  head/dns/knot-resolver/distinfo
  head/dns/knot-resolver/files/pkg-message.in
  head/dns/knot-resolver/pkg-descr
  head/dns/knot-resolver/pkg-plist

Modified: head/dns/knot-resolver/Makefile
==============================================================================
--- head/dns/knot-resolver/Makefile	Sat Jul 11 20:50:36 2020	(r542053)
+++ head/dns/knot-resolver/Makefile	Sat Jul 11 20:57:41 2020	(r542054)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	knot-resolver
-DISTVERSION=	5.1.1
+DISTVERSION=	5.1.2
 CATEGORIES=	dns
 MASTER_SITES=	https://secure.nic.cz/files/knot-resolver/ \
 		https://dns.company/downloads/knot-resolver/
@@ -14,23 +14,26 @@ LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 BUILD_DEPENDS=	bash:shells/bash \
-		cmocka>=1.1.1:sysutils/cmocka \
 		flake8:devel/py-flake8@${PY_FLAVOR} \
-		luacheck:devel/lua-luacheck
-
-LIB_DEPENDS=	libgnutls.so:security/gnutls \
-		libknot.so:dns/knot2-lib \
+		lua51-cqueues>=20200603_1:devel/lua-cqueues@lua51 \
+		luacheck:devel/lua-luacheck \
+		cmake:devel/cmake
+LIB_DEPENDS=	libknot.so:dns/knot2-lib \
+		libdnssec.so:dns/knot2-lib \
+		libzscanner.so:dns/knot2-lib \
+		libgnutls.so:security/gnutls \
 		liblmdb.so:databases/lmdb \
 		libluajit-5.1.so:lang/luajit-openresty \
 		libuv.so:devel/libuv
+RUN_DEPENDS=	lua51-cqueues>=20200603_1:devel/lua-cqueues@lua51
 
-USES=		compiler:c11 compiler:c++11-lang libedit libtool meson \
-		ncurses ninja pkgconfig python shebangfix tar:xz
+USES=		compiler:c11 compiler:c++11-lang libedit libtool \
+		meson ncurses ninja pkgconfig python:3.5+,build \
+		shebangfix tar:xz
+
 USE_CXXSTD=	c++11
-USE_LDCONFIG=	yes
-LDFLAGS+=	-L${LOCALBASE}/lib
 
-SUB_FILES=	pkg-message
+USE_RC_SUBR=	krescachegc kresd
 
 SHEBANG_FILES=	scripts/bench.sh \
 		scripts/build-in-obs.sh \
@@ -50,64 +53,83 @@ SHEBANG_FILES=	scripts/bench.sh \
 		scripts/test-integration-prepare.sh \
 		scripts/update-root-hints.sh
 
-CONFLICTS=	knot-1.* knot1-[0-6].*
-
 MESON_ARGS=	--buildtype=release \
 		--default-library=static \
+		--libdir=${PREFIX}/lib \
+		--pkg-config-path=${PREFIX}/libdata/pkgconfig \
 		--prefix=${LOCALBASE} \
 		-Duser=${USERS} \
 		-Dgroup=${GROUPS} \
 		-Dinstall_kresd_conf=enabled \
 		-Dclient=enabled \
 		-Dutils=enabled \
-		-Dinstall_root_keys=enabled \
 		-Dkeyfile_default=${ETCDIR}/root.keys \
-		-Dmanaged_ta=enabled \
-		-Droot_hints=${ETCDIR}/root.hints \
-		-Dunit_tests=enabled
+		-Droot_hints=${ETCDIR}/root.hints
 
-#		--libdir=${PREFIX}/lib
-#		--pkg-config-path=${PREFIX}/libdata/pkgconfig
-#		lmdb_CFLAGS=-I${PREFIX}/include lmdb_LIBS=-llmdb
-#		-Dlmdb_CFLAGS=-I${PREFIX}/include \	# doesn't help
-#		-Dlmdb_LIBS=-llmdb			# doesn't help
-#		-Dconfig_tests=enabled \		# complains about missing cqueues lua package
-#		-Dextra_tests=enabled \			# also requires -Dsendmmsg=disabled
+LDFLAGS+=	-L${LOCALBASE}/lib
 
-OPTIONS_DEFINE=		DOCS DNSTAP DOXYGEN TRUSTANCHOR
-OPTIONS_DEFAULT=	DOCS DNSTAP DOXYGEN
+CONFLICTS=	knot-1.* knot1-[0-6].*
 
-# docs/meson.build wants python2 or python3 - not -for example- python3.7
-# So this currently is partially broken:
-#DOCS_MESON_ON=			-Ddoc=enabled
+SUB_FILES=	pkg-message
 
-DNSTAP_DESC=			dnstap support
-DNSTAP_LIB_DEPENDS=		libprotobuf.so:devel/protobuf \
-				libprotobuf-c.so:devel/protobuf-c \
-				libfstrm.so:devel/fstrm
-DNSTAP_PLIST_FILES=		lib/knot-resolver/kres_modules/dnstap.so
-DNSTAP_MESON_ON=		-Ddnstap=enabled
-DNSTAP_MESON_OFF=		-Ddnstap=disabled
+SUB_LIST=	USERS=${USERS} \
+		GROUPS=${GROUPS} \
+		RUNDIR=${RUNDIR}
 
-DOXYGEN_IMPLIES=		DOCS
-DOXYGEN_BUILD_DEPENDS=		doxygen:devel/doxygen \
-				${PY_SPHINX} \
-				${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR}
+USERS=		kresd
+GROUPS=		kresd
+RUNDIR=		/var/run/kresd
 
-TRUSTANCHOR_DESC=		Trust anchor bootstrapping and stats
-TRUSTANCHOR_USES=		lua
-TRUSTANCHOR_BUILD_DEPENDS=	${LUA_PKGNAMEPREFIX}luasocket>=0:net/luasocket@${LUA_FLAVOR} \
-				${LUA_PKGNAMEPREFIX}luasec>=0:security/luasec@${LUA_FLAVOR}
+PLIST_SUB=	USERS=${USERS} \
+		GROUPS=${GROUPS} \
+		RUNDIR=${RUNDIR}
 
-.include <bsd.port.options.mk>
+OPTIONS_DEFINE=		DOCS EXAMPLES DNSTAP ROOTKEYS TRUSTANCHOR TEST TESTUNIT TESTCONF TESTEXTRA
+OPTIONS_DEFAULT=	DOCS EXAMPLES ROOTKEYS TRUSTANCHOR TEST TESTUNIT TESTCONF
 
-USERS=		kresd
-GROUPS=		${USERS}
+DNSTAP_DESC=		dnstap support
+ROOTKEYS_DESC=		install root.keys
+TESTCONF_DESC=		Do config tests
+TESTEXTRA_DESC=		Do extra tests
+TESTUNIT_DESC=		Do unit tests
+TEST_DESC=		Do tests
+TRUSTANCHOR_DESC=	Trust anchor bootstrapping, management and stats
 
+DNSTAP_LIB_DEPENDS=	libprotobuf.so:devel/protobuf \
+			libprotobuf-c.so:devel/protobuf-c \
+			libfstrm.so:devel/fstrm
+DNSTAP_MESON_ON=	-Ddnstap=enabled
+DNSTAP_MESON_OFF=	-Ddnstap=disabled
+DNSTAP_PLIST_FILES=	lib/knot-resolver/kres_modules/dnstap.so
+
+ROOTKEYS_MESON_ON=	-Dinstall_root_keys=enabled
+ROOTKEYS_MESON_OFF=	-Dinstall_root_keys=disabled
+ROOTKEYS_PLIST_FILES=	${ETCDIR}/root.keys
+
+TESTCONF_MESON_ON=	-Dconfig_tests=enabled
+TESTCONF_MESON_OFF=	-Dconfig_tests=disabled
+
+TESTEXTRA_BROKEN=	CMake Error: The source directory misses CMakeLists.txt
+TESTEXTRA_BUILD_DEPENDS=git:devel/git
+TESTEXTRA_USES=		cmake python:3
+TESTEXTRA_MESON_ON=	-Dextra_tests=enabled \
+			-Dsendmmsg=disabled
+TESTEXTRA_MESON_OFF=	-Dextra_tests=disabled
+
+TESTUNIT_BUILD_DEPENDS=	cmocka>=1.1.1:sysutils/cmocka
+TESTUNIT_MESON_ON=	-Dunit_tests=enabled
+TESTUNIT_MESON_OFF=	-Dunit_tests=disabled
+
+TRUSTANCHOR_MESON_ON=	-Dmanaged_ta=enabled
+TRUSTANCHOR_MESON_OFF=	-Dmanaged_ta=disabled
+
 PORTDOCS=	AUTHORS COPYING CodingStyle NEWS README.md
+PORTEXAMPLES=	config.cluster config.docker config.internal config.isp \
+		config.personal config.privacy config.splitview
 
-STRIP_TARGETS=	sbin/kresd \
+STRIP_TARGETS=	sbin/kres-cache-gc \
 		sbin/kresc \
+		sbin/kresd \
 		lib/knot-resolver/ahocorasick.so \
 		lib/knot-resolver/kres_modules/bogus_log.so \
 		lib/knot-resolver/kres_modules/dnstap.so \
@@ -117,14 +139,17 @@ STRIP_TARGETS=	sbin/kresd \
 		lib/knot-resolver/kres_modules/refuse_nord.so \
 		lib/knot-resolver/kres_modules/stats.so
 
+pre-install:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${RUNDIR}
+
 pre-install-TEST-on: do-test
 
 post-install:
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/
 .for STRIP_TGT in ${STRIP_TARGETS}
 	if [ -f ${STAGEDIR}${PREFIX}/${STRIP_TGT} ]; then \
-	    ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${STRIP_TGT}; \
+	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${STRIP_TGT}; \
 	fi
 .endfor
 

Modified: head/dns/knot-resolver/distinfo
==============================================================================
--- head/dns/knot-resolver/distinfo	Sat Jul 11 20:50:36 2020	(r542053)
+++ head/dns/knot-resolver/distinfo	Sat Jul 11 20:57:41 2020	(r542054)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1589914626
-SHA256 (knot-resolver-5.1.1.tar.xz) = f72214046df8aae2b1a5c6d1ad0bc8b166aa060df5b008f6e88b4f6ba79cbf4e
-SIZE (knot-resolver-5.1.1.tar.xz) = 1744544
+TIMESTAMP = 1593645886
+SHA256 (knot-resolver-5.1.2.tar.xz) = caa4f941caf39080184554fb1310f383eba4b30d9c4c2215670d6b0a2de8f836
+SIZE (knot-resolver-5.1.2.tar.xz) = 1749236

Added: head/dns/knot-resolver/files/krescachegc.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/knot-resolver/files/krescachegc.in	Sat Jul 11 20:57:41 2020	(r542054)
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: krescachegc
+# REQUIRE: SERVERS cleanvar
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable knot-resolver:
+#
+# krescachegc_enable="YES":	Set to YES to enable krescachegc.
+#				Set to NO by default.
+# krescachegc_millis="1000":	Set to garbage collect interval in milliseconds
+#				Set to 1000 by default.
+#
+
+. /etc/rc.subr
+
+name=krescachegc
+rcvar=krescachegc_enable
+
+load_rc_config ${name}
+
+# set defaults
+
+krescachegc_enable=${krescachegc_enable:-"NO"}
+krescachegc_millis=${krescachegc_millis:-"1000"}
+
+pidfile="%%RUNDIR%%/${name}.pid"
+procname="%%PREFIX%%/sbin/kres-cache-gc"
+
+command=/usr/sbin/daemon
+command_args="-c -f -r -P ${pidfile} -u %%USERS%% -- ${procname} -c %%RUNDIR%% -d ${krescachegc_millis}"
+
+run_rc_command "$1"

Added: head/dns/knot-resolver/files/kresd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/knot-resolver/files/kresd.in	Sat Jul 11 20:57:41 2020	(r542054)
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: kresd
+# REQUIRE: NETWORKING
+# BEFORE: SERVERS
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable knot-resolver:
+#
+# kresd_enable="YES":	Set to YES to enable kresd.
+#			Set to NO by default.
+# kresd_config="":	Set to %%ETCDIR%%/kresd.conf
+#			by default.
+#
+
+. /etc/rc.subr
+
+name=kresd
+rcvar=kresd_enable
+
+load_rc_config ${name}
+
+# set defaults
+
+kresd_enable=${kresd_enable:-"NO"}
+kresd_config=${kresd_config:-"%%ETCDIR%%/${name}.conf"}
+
+pidfile="%%RUNDIR%%/${name}.pid"
+procname="%%PREFIX%%/sbin/${name}"
+required_files="${kresd_config}"
+
+command="/usr/sbin/daemon"
+command_args="-c -f -S -r -P ${pidfile} -- ${procname} -c ${kresd_config} -n -q %%RUNDIR%%"
+
+run_rc_command "$1"

Added: head/dns/knot-resolver/files/patch-etc_meson.build
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/knot-resolver/files/patch-etc_meson.build	Sat Jul 11 20:57:41 2020	(r542054)
@@ -0,0 +1,14 @@
+--- etc/meson.build.orig	2020-07-01 12:27:52 UTC
++++ etc/meson.build
+@@ -7,9 +7,9 @@ if install_root_hints
+   etc_files += 'root.hints'
+ endif
+ 
+-if managed_ta
++#if managed_ta
+   etc_files += 'icann-ca.pem'
+-endif
++#endif
+ 
+ if install_root_keys
+   root_keys_path = keyfile_default.split('/')

Added: head/dns/knot-resolver/files/patch-meson.build
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/knot-resolver/files/patch-meson.build	Sat Jul 11 20:57:41 2020	(r542054)
@@ -0,0 +1,11 @@
+--- meson.build.orig	2020-07-01 12:27:52 UTC
++++ meson.build
+@@ -47,7 +47,7 @@ endif
+ prefix = get_option('prefix')
+ data_dir = join_paths(prefix, get_option('datadir'), 'knot-resolver')
+ doc_dir = join_paths(prefix, get_option('datadir'), 'doc', 'knot-resolver')
+-examples_dir = join_paths(doc_dir, 'examples')
++examples_dir = join_paths(prefix, 'share', 'examples', 'knot-resolver')
+ etc_dir = join_paths(prefix, get_option('sysconfdir'), 'knot-resolver')
+ lib_dir = join_paths(prefix, get_option('libdir'), 'knot-resolver')
+ modules_dir = join_paths(lib_dir, 'kres_modules')

Modified: head/dns/knot-resolver/files/pkg-message.in
==============================================================================
--- head/dns/knot-resolver/files/pkg-message.in	Sat Jul 11 20:50:36 2020	(r542053)
+++ head/dns/knot-resolver/files/pkg-message.in	Sat Jul 11 20:57:41 2020	(r542054)
@@ -6,11 +6,8 @@
    - man kresd
    - https://knot-resolver.readthedocs.io/
 
-  To run as daemon see:
-   - https://knot-resolver.readthedocs.io/en/latest/daemon.html
-
   If upgrading:
-   - https://knot-resolver.readthedocs.io/en/stable/upgrading.html
+   - https://knot-resolver.readthedocs.io/en/latest/upgrading.html
 EOM
 }
 ]

Modified: head/dns/knot-resolver/pkg-descr
==============================================================================
--- head/dns/knot-resolver/pkg-descr	Sat Jul 11 20:50:36 2020	(r542053)
+++ head/dns/knot-resolver/pkg-descr	Sat Jul 11 20:57:41 2020	(r542054)
@@ -1,4 +1,10 @@
-The Knot DNS Resolver is a caching full resolver implementation,
-including both a resolver library and a daemon.
+Knot Resolver is a caching DNS resolver scalable from huge resolver
+farms down to home network routers.
+Knot Resolver is a modern resolver implementation designed for
+scalability, resiliency, and flexibility. Its design is
+different from other resolvers: The core architecture is tiny and
+efficient, and most of the rich features are implemented as
+optional modules, which limits attack surface and improves
+performance.
 
 WWW: https://www.knot-resolver.cz/

Modified: head/dns/knot-resolver/pkg-plist
==============================================================================
--- head/dns/knot-resolver/pkg-plist	Sat Jul 11 20:50:36 2020	(r542053)
+++ head/dns/knot-resolver/pkg-plist	Sat Jul 11 20:57:41 2020	(r542054)
@@ -1,7 +1,6 @@
+@sample %%ETCDIR%%/kresd.conf
 %%ETCDIR%%/icann-ca.pem
-%%ETCDIR%%/kresd.conf
 %%ETCDIR%%/root.hints
-%%ETCDIR%%/root.keys
 include/libkres/api.h
 include/libkres/array.h
 include/libkres/cdb_api.h
@@ -91,10 +90,5 @@ man/man8/kresd.8.gz
 sbin/kres-cache-gc
 sbin/kresc
 sbin/kresd
-%%PORTDOCS%%%%DOCSDIR%%/examples/config.cluster
-%%PORTDOCS%%%%DOCSDIR%%/examples/config.docker
-%%PORTDOCS%%%%DOCSDIR%%/examples/config.internal
-%%PORTDOCS%%%%DOCSDIR%%/examples/config.isp
-%%PORTDOCS%%%%DOCSDIR%%/examples/config.personal
-%%PORTDOCS%%%%DOCSDIR%%/examples/config.privacy
-%%PORTDOCS%%%%DOCSDIR%%/examples/config.splitview
+@dir(%%USERS%%,%%GROUPS%%,0755) %%ETCDIR%%
+@dir(%%USERS%%,%%GROUPS%%,0755) %%RUNDIR%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007112057.06BKvgW3049171>