summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorLeo Vandewoestijne <freebsd@dns.company>2021-08-04 05:44:16 +0800
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2021-08-04 05:44:16 +0800
commiteef99349b29d7e8588ca7c109062ef79ef24dcbf (patch)
tree352d6fcf16103a907c52a65abfeb22ecab4a1e0c /dns
parent9e105bf9845a0928c26dc3d1907d27c18291ef50 (diff)
downloadfreebsd-ports-eef99349b29d7e8588ca7c109062ef79ef24dcbf.zip
dns/knot-resolver: Update to 5.4.0
Changes: https://www.knot-resolver.cz/2021-07-29-knot-resolver-5.4.0.html PR: 257553
Diffstat (limited to 'dns')
-rw-r--r--dns/knot-resolver/Makefile46
-rw-r--r--dns/knot-resolver/distinfo6
-rw-r--r--dns/knot-resolver/files/krescachegc.in3
-rw-r--r--dns/knot-resolver/files/kresd.in36
-rw-r--r--dns/knot-resolver/pkg-plist1
5 files changed, 63 insertions, 29 deletions
diff --git a/dns/knot-resolver/Makefile b/dns/knot-resolver/Makefile
index 9ba9d9959d01..d77c54e75cc2 100644
--- a/dns/knot-resolver/Makefile
+++ b/dns/knot-resolver/Makefile
@@ -1,8 +1,7 @@
# Created by: Leo Vandewoestijne <freebsd@dns.company>
PORTNAME= knot-resolver
-DISTVERSION= 5.3.0
-PORTREVISION= 1
+DISTVERSION= 5.4.0
CATEGORIES= dns
MASTER_SITES= https://secure.nic.cz/files/knot-resolver/ \
https://dns.company/downloads/knot-resolver/
@@ -42,16 +41,17 @@ SHEBANG_FILES= scripts/bench.sh \
scripts/coverage_c_combine.sh \
scripts/coverage_env.sh \
scripts/gen-cdefs.sh \
+ scripts/gen-pgp-keyblock.sh \
scripts/get-date.sh \
scripts/luacov_gen_empty.sh \
- scripts/make-dev-archive.sh \
- scripts/make-distrofiles.sh \
+ scripts/make-archive.sh \
scripts/make-doc.sh \
- scripts/make-srpm.sh \
- scripts/obs-build.sh \
+ scripts/make-obs.sh \
scripts/run-pylint.sh \
+ scripts/run-scanbuild-with-args.sh \
scripts/test-config.sh \
scripts/test-integration-prepare.sh \
+ scripts/update-authors.sh \
scripts/update-root-hints.sh
MESON_ARGS= --buildtype=release \
@@ -60,7 +60,6 @@ MESON_ARGS= --buildtype=release \
--pkg-config-path=${PREFIX}/libdata/pkgconfig \
--prefix=${LOCALBASE} \
-Dclient=enabled \
- -Duser=${USERS} \
-Dgroup=${GROUPS} \
-Dinstall_kresd_conf=enabled \
-Dkeyfile_default=${ETCDIR}/root.keys \
@@ -74,17 +73,25 @@ CONFLICTS= knot-1.* knot1-[0-6].*
SUB_FILES= pkg-message
-SUB_LIST= USERS=${USERS} \
- GROUPS=${GROUPS} \
- RUNDIR=${RUNDIR}
+KRESD_USER= kresd
+KRESD_GROUP= kresd
+KRESD_RUNDIR= /var/run/kresd
+
+SUB_LIST= GROUPS=${GROUPS} \
+ RUNDIR=${RUNDIR} \
+ USERS=${USERS}
+
+USERS= ${KRESD_USER}
+GROUPS= ${KRESD_GROUP}
+RUNDIR= ${KRESD_RUNDIR}
-USERS= kresd
-GROUPS= kresd
-RUNDIR= /var/run/kresd
+PLIST_SUB= GROUPS=${GROUPS} \
+ RUNDIR=${RUNDIR} \
+ USERS=${USERS}
-PLIST_SUB= USERS=${USERS} \
- GROUPS=${GROUPS} \
- RUNDIR=${RUNDIR}
+PORTDOCS= AUTHORS COPYING CodingStyle NEWS README.md
+PORTEXAMPLES= config.cluster config.docker config.internal config.isp \
+ config.personal config.privacy config.splitview
OPTIONS_DEFINE= DOCS EXAMPLES DNSTAP ROOTKEYS TRUSTANCHOR TEST TESTUNIT TESTCONF TESTEXTRA
OPTIONS_DEFAULT= DOCS EXAMPLES ROOTKEYS TRUSTANCHOR TEST TESTUNIT
@@ -115,7 +122,8 @@ 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_ON= -Dextra_tests=enabled \
+ -Dsendmmsg=disabled
TESTEXTRA_MESON_OFF= -Dextra_tests=disabled
TESTUNIT_BUILD_DEPENDS= cmocka>=1.1.1:sysutils/cmocka
@@ -125,10 +133,6 @@ 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/kres-cache-gc \
sbin/kresc \
sbin/kresd \
diff --git a/dns/knot-resolver/distinfo b/dns/knot-resolver/distinfo
index 60513e9313d8..4c346a045ffb 100644
--- a/dns/knot-resolver/distinfo
+++ b/dns/knot-resolver/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1614684836
-SHA256 (knot-resolver-5.3.0.tar.xz) = fb6cb2c03f4fffbdd8a0098127383d03b14cf7d6abf3a0cd229fb13ff68ee33e
-SIZE (knot-resolver-5.3.0.tar.xz) = 1865456
+TIMESTAMP = 1627893046
+SHA256 (knot-resolver-5.4.0.tar.xz) = 534af671b98433b23b57039acc9d7d3c100a4888a8cf9aeba36161774ca0815e
+SIZE (knot-resolver-5.4.0.tar.xz) = 1894392
diff --git a/dns/knot-resolver/files/krescachegc.in b/dns/knot-resolver/files/krescachegc.in
index 44912be08123..163d4101df9e 100644
--- a/dns/knot-resolver/files/krescachegc.in
+++ b/dns/knot-resolver/files/krescachegc.in
@@ -20,7 +20,6 @@ rcvar=krescachegc_enable
load_rc_config ${name}
# set defaults
-
krescachegc_enable=${krescachegc_enable:-"NO"}
krescachegc_millis=${krescachegc_millis:-"1000"}
@@ -28,6 +27,6 @@ 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}"
+command_args="-c -f -S -r -P ${pidfile} -T ${name} -u %%USERS%% -- ${procname} -d ${krescachegc_millis}"
run_rc_command "$1"
diff --git a/dns/knot-resolver/files/kresd.in b/dns/knot-resolver/files/kresd.in
index 1aa44de36514..344bf82f9479 100644
--- a/dns/knot-resolver/files/kresd.in
+++ b/dns/knot-resolver/files/kresd.in
@@ -21,15 +21,45 @@ rcvar=kresd_enable
load_rc_config ${name}
# set defaults
-
kresd_enable=${kresd_enable:-"NO"}
kresd_config=${kresd_config:-"%%ETCDIR%%/${name}.conf"}
+kresd_user="%%USERS%%"
+kresd_group="%%GROUPS%%"
+kresd_rundir="/var/run/${name}"
-pidfile="%%RUNDIR%%/${name}.pid"
+pidfile="${kresd_rundir}/${name}.pid"
procname="%%PREFIX%%/sbin/${name}"
required_files="${kresd_config}"
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+
command="/usr/sbin/daemon"
-command_args="-c -f -S -r -P ${pidfile} -- ${procname} -c ${kresd_config} -n -q %%RUNDIR%%"
+command_args="-c -f -S -r -P ${pidfile} -T ${name} -- ${procname} -c ${kresd_config} -n -q ${kresd_rundir}"
+
+kresd_start() {
+ if [ ! -d /var/run/${name} ]; then
+ install -d -o ${kresd_user} -g ${kresd_group} -m 700 ${kresd_rundir}
+ fi
+ if [ ! -f "${pidfile}" ]; then
+ echo "starting ${name}..." && \
+ ${command} ${command_args}
+ echo -e "\e[1A\e[K${name} started."
+ else
+ echo "${name} already seems to be running."
+ fi
+ }
+
+kresd_stop() {
+ if [ -f "${pidfile}" ]; then
+ echo "stopping ${name}..." && \
+ for pid in `ps waux | grep ${procname} | grep daemon | awk '{print $2}'`; do \
+ kill -TERM $pid
+ done
+ echo -e "\e[1A\e[K${name} stopped."
+ else
+ echo "${name} seems to be not running."
+ fi
+ }
run_rc_command "$1"
diff --git a/dns/knot-resolver/pkg-plist b/dns/knot-resolver/pkg-plist
index 68b5268537ae..69a01c6c04fa 100644
--- a/dns/knot-resolver/pkg-plist
+++ b/dns/knot-resolver/pkg-plist
@@ -10,6 +10,7 @@ include/libkres/dnssec.h
include/libkres/impl.h
include/libkres/iterate.h
include/libkres/layer.h
+include/libkres/log.h
include/libkres/lru.h
include/libkres/map.h
include/libkres/module.h