svn commit: r489774 - in head/dns/knot2: . files

Steve Wills swills at FreeBSD.org
Wed Jan 9 12:33:31 UTC 2019


Author: swills
Date: Wed Jan  9 12:33:30 2019
New Revision: 489774
URL: https://svnweb.freebsd.org/changeset/ports/489774

Log:
  dns/knot2: update to 2.7.5
  
  While here, patch init script to support automatically determining
  config type
  
  PR:		234751
  Submitted by:	Leo Vandewoestijne <freebsd at dns.company> (maintainer)

Modified:
  head/dns/knot2/Makefile   (contents, props changed)
  head/dns/knot2/distinfo   (contents, props changed)
  head/dns/knot2/files/knot.in

Modified: head/dns/knot2/Makefile
==============================================================================
--- head/dns/knot2/Makefile	Wed Jan  9 12:30:03 2019	(r489773)
+++ head/dns/knot2/Makefile	Wed Jan  9 12:33:30 2019	(r489774)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	knot
-DISTVERSION=	2.7.4
-PORTREVISION=	2
+DISTVERSION=	2.7.5
 CATEGORIES=	dns ipv6
 MASTER_SITES=	https://secure.nic.cz/files/knot-dns/ \
 		https://dns.company/downloads/knot-dns/

Modified: head/dns/knot2/distinfo
==============================================================================
--- head/dns/knot2/distinfo	Wed Jan  9 12:30:03 2019	(r489773)
+++ head/dns/knot2/distinfo	Wed Jan  9 12:33:30 2019	(r489774)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1542114322
-SHA256 (knot-2.7.4.tar.xz) = acebe2fbcd8f67b0cb8969376114855316fe831df08321b795147502a5e9fd74
-SIZE (knot-2.7.4.tar.xz) = 1148652
+TIMESTAMP = 1546941720
+SHA256 (knot-2.7.5.tar.xz) = 7d70d6d8f708285517d1d7c4ff2e5ddfd119cd2962c7a8d3f50a4c695209a086
+SIZE (knot-2.7.5.tar.xz) = 1150904

Modified: head/dns/knot2/files/knot.in
==============================================================================
--- head/dns/knot2/files/knot.in	Wed Jan  9 12:30:03 2019	(r489773)
+++ head/dns/knot2/files/knot.in	Wed Jan  9 12:33:30 2019	(r489774)
@@ -33,7 +33,8 @@
 #
 # # optional:
 # NAME_config="%%PREFIX%%/etc/knot/NAME.conf"  # (-c)onfig file
-# NAME_diruser="%%USERS%%"   # /var/db/NAME and /var/run/NAME are created if they
+# NAME_config="db:/var/db/knot/confdb"         # (-C)onfig database
+# NAME_diruser="%%USERS%%"    # /var/db/NAME and /var/run/NAME are created if they
 # NAME_dirgroup="%%GROUPS%%"  # don't exist. These don't control the user/group knot
 #                       # runs as, the config file has a setting for that.
 #
@@ -72,11 +73,26 @@ diruser="$(eval echo \${${name}_diruser})"
 dirgroup="$(eval echo \${${name}_dirgroup})"
 
 command=%%PREFIX%%/sbin/knotd
-command_args="-c ${configfile} -d"
-control=%%PREFIX%%/sbin/knotc
-pidfile=/var/run/${name}/knot.pid
+case "$configfile" in
+db:*)
+	config_args="-C ${configfile#db:}"
+	;;
+*)
+	config_args="-c ${configfile}"
+	;;
+esac
+command_args="${config_args} -d"
+control="%%PREFIX%%/sbin/knotc"
+pidfile="/var/run/${name}/knot.pid"
 
-required_files=${configfile}
+case "$configfile" in
+db:*)
+	required_files=${configfile#db:}/data.mdb
+	;;
+*)
+	required_files=${configfile}
+	;;
+esac
 
 extra_commands=reload
 reload_cmd="knot_reload"
@@ -90,13 +106,13 @@ knot_prestart()
 	if [ ! -d /var/db/${name} ]; then
 		install -d -o ${diruser} -g ${dirgroup} /var/db/${name}
 	fi
-	${control} -c ${configfile} conf-check
+	${control} ${config_args} conf-check
 }
 
 knot_reload()
 {
 	echo "Reloading ${name}."
-	${control} -c ${configfile} reload
+	${control} ${config_args} reload
 }
 
 run_rc_command "$1"


More information about the svn-ports-head mailing list