diff options
author | Mark Felder <feld@FreeBSD.org> | 2014-02-13 13:26:03 +0000 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2014-02-13 13:26:03 +0000 |
commit | 11be90420e0323bd506f11c8984abef5f0a258e1 (patch) | |
tree | 3cf9cda9c952bd2c1b70bb1cd0e6960615f9c3bb /dns/knot | |
parent | 19cc0bbf863a00bc418d511eb07f3aa6b63a7bb0 (diff) | |
download | ports-11be90420e0323bd506f11c8984abef5f0a258e1.tar.gz ports-11be90420e0323bd506f11c8984abef5f0a258e1.zip |
Notes
Diffstat (limited to 'dns/knot')
-rw-r--r-- | dns/knot/Makefile | 29 | ||||
-rw-r--r-- | dns/knot/distinfo | 4 | ||||
-rw-r--r-- | dns/knot/files/knot.in | 52 | ||||
-rw-r--r-- | dns/knot/files/knotd.in | 39 | ||||
-rw-r--r-- | dns/knot/files/pkg-message.in | 20 | ||||
-rw-r--r-- | dns/knot/pkg-plist | 10 |
6 files changed, 82 insertions, 72 deletions
diff --git a/dns/knot/Makefile b/dns/knot/Makefile index 3e92ded8bb3f..1970eb4a2935 100644 --- a/dns/knot/Makefile +++ b/dns/knot/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= knot -DISTVERSION= 1.3.3 -PORTREVISION= 1 +DISTVERSION= 1.4.2 CATEGORIES= dns ipv6 MASTER_SITES= https://secure.nic.cz/files/knot-dns/ \ http://dns-lab.com/downloads/knot-dns/ @@ -20,27 +19,37 @@ LIB_DEPENDS= liburcu.so:${PORTSDIR}/sysutils/liburcu USE_AUTOTOOLS= libtool USE_LDCONFIG= yes + USE_OPENSSL= yes +WITH_OPENSSL_PORT=yes + GNU_CONFIGURE= yes +CONFIGURE_ARGS+=--with-storage=/var/db/knot +CONFIGURE_ARGS+=--with-rundir=/var/run/knot + SUB_FILES= pkg-message -USE_RC_SUBR= ${PORTNAME}d +USE_RC_SUBR= ${PORTNAME} INFO= knot PORTDOCS= AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS -OPTIONS_DEFINE= DOCS +USERS= knot +GROUPS= knot +SUB_LIST+= USERS="${USERS}" GROUPS="${GROUPS}" + +post-patch: + ${REINPLACE_CMD} 's|$$(INSTALL) -d $$(DESTDIR)/\@run_dir\@|#$$(INSTALL) -d $$(DESTDIR)/\@run_dir\@|' \ + ${WRKSRC}/src/Makefile.in + ${REINPLACE_CMD} 's|$$(INSTALL) -d $$(DESTDIR)/\@storage_dir\@|#$$(INSTALL) -d $$(DESTDIR)/\@storage_dir\@|' \ + ${WRKSRC}/src/Makefile.in post-install: - @${MKDIR} ${STAGEDIR}${ETCDIR} + ${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${WRKSRC}/samples/knot.sample.conf ${STAGEDIR}${ETCDIR} - @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ - @${MKDIR} ${PREFIX}/var/lib/knot - @${MKDIR} ${PREFIX}/var/run/knot - @${CHOWN} 53:53 ${PREFIX}/var/lib/knot - @${CHOWN} 53:53 ${PREFIX}/var/run/knot .include <bsd.port.mk> diff --git a/dns/knot/distinfo b/dns/knot/distinfo index 9b81be7ae2fd..a8466bb2f7ab 100644 --- a/dns/knot/distinfo +++ b/dns/knot/distinfo @@ -1,2 +1,2 @@ -SHA256 (knot-1.3.3.tar.gz) = 70f5237871a92cd8a777c73b80b6ac339212ea084d4adfaf314388be704027b4 -SIZE (knot-1.3.3.tar.gz) = 1148233 +SHA256 (knot-1.4.2.tar.gz) = 9476111662220935a824c1fa53cbd1673440825e40a2c4a9282539ced4af4687 +SIZE (knot-1.4.2.tar.gz) = 1365873 diff --git a/dns/knot/files/knot.in b/dns/knot/files/knot.in new file mode 100644 index 000000000000..20a17cfec69f --- /dev/null +++ b/dns/knot/files/knot.in @@ -0,0 +1,52 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: knot +# REQUIRE: SERVERS cleanvar +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable knot: +# +# knot_enable="YES": Set to NO by default. +# Set it to YES to enable knot. +# knot_config="": Set to /usr/local/etc/knot/knot.conf +# by default. + +. /etc/rc.subr + +name=knot +rcvar=knot_enable + +load_rc_config ${name} + +: ${knot_enable:=NO} +: ${knot_config="%%PREFIX%%/etc/knot/knot.conf"} + +command=%%PREFIX%%/sbin/knotd +command_args="-c ${knot_config} -d" +control=%%PREFIX%%/sbin/knotc +pidfile=/var/run/knot/knot.pid + +required_files=${knot_config} + +extra_commands=reload +reload_cmd="${name}_reload" +start_precmd="${name}_prestart" + +knot_prestart() { + if [ ! -d /var/run/knot ]; then + install -d -o %%USERS%% -g %%GROUPS%% /var/run/knot + fi + if [ ! -d /var/db/knot ]; then + install -d -o %%USERS%% -g %%GROUPS%% /var/db/knot + fi + grep -v '#' ${knot_config} | grep -q -E 'knot.knot;|bind.bind;' + if [ $? -ne 0 ]; then + echo "Notice: not running as uid.gid knot.knot or bind.bind" + fi + ${control} -c ${knot_config} checkconf + } + +knot_reload() { + echo "Reloading ${name}." diff --git a/dns/knot/files/knotd.in b/dns/knot/files/knotd.in deleted file mode 100644 index eed0d803263b..000000000000 --- a/dns/knot/files/knotd.in +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# PROVIDE: knot -# REQUIRE: SERVERS cleanvar -# KEYWORD: shutdown -# -# Add the following lines to /etc/rc.conf to enable knot: -# -# knot_enable="YES": Set to NO by default. -# Set it to YES to enable knot. -# knot_config="": Set to %%PREFIX%%/etc/knot/knot.conf -# by default. - -. /etc/rc.subr - -name=knot -rcvar=knot_enable - -extra_commands="reload" -reload_cmd="${name}_x reload" -status_cmd="${name}_x status" -stop_cmd=" ${name}_x stop" - -load_rc_config ${name} - -: ${knot_enable:="NO"} -: ${knot_config="%%PREFIX%%/etc/knot/knot.conf"} - -command=%%PREFIX%%/sbin/${name}d -command_args="-c ${knot_config} -d" -required_files=${knot_config} - -knot_x() { - %%PREFIX%%/sbin/${name}c -c ${knot_config} "$1" - } - -run_rc_command "$1" diff --git a/dns/knot/files/pkg-message.in b/dns/knot/files/pkg-message.in index 5237fbe007c3..50dbbd27b8b2 100644 --- a/dns/knot/files/pkg-message.in +++ b/dns/knot/files/pkg-message.in @@ -1,21 +1,11 @@ - #################################################################### # -# To get Knot DNS started: +# To start using Knot DNS, you should complete the following tasks: # - cp %%ETCDIR%%/knot.sample.conf %%ETCDIR%%/knot.conf - $EDITOR %%ETCDIR%%/knot.conf - echo knot_enable=\"YES\" >> /etc/rc.conf +# cp %%ETCDIR%%/knot.sample.conf %%ETCDIR%%/knot.conf +# $EDITOR %%ETCDIR%%/knot.conf +# echo knot_enable=\"YES\" >> /etc/rc.conf # echo knot_config=\"%%PREFIX%%/etc/knot/knot.conf\" >> /etc/rc.conf - %%PREFIX%%/etc/rc.d/knotd start +# %%PREFIX%%/etc/rc.d/knot start # #################################################################### - - When upgrading from version of before 1.3.0-RC1: - mind the default config file location has changed. - - When upgrading from version of 1.3.1-RC1 or before: - the startup script has changed due to parameter changes. - That problem reapeared in port 1.3.3 and was fixed in 1.3.3_1. - -==================================================================== diff --git a/dns/knot/pkg-plist b/dns/knot/pkg-plist index 17febfb0d289..86cd3ef0384c 100644 --- a/dns/knot/pkg-plist +++ b/dns/knot/pkg-plist @@ -1,21 +1,19 @@ -@unexec if cmp -s %B/knot.sample.conf %B/knot.conf; then rm -f %B/knot.conf; fi +@unexec if cmp -s %D/%%ETCDIR%%/knot.sample.conf %D/%%ETCDIR%%/knot.conf; then rm -f %D/%%ETCDIR%%/knot.conf; fi %%ETCDIR%%/knot.sample.conf @exec [ -f %B/knot.conf ] || cp %B/%f %B/knot.conf %%ETCDIR%%/example.com.zone man/man1/kdig.1.gz man/man1/khost.1.gz +man/man1/knsec3hash.1.gz man/man1/knsupdate.1.gz man/man5/knot.conf.5.gz man/man8/knotc.8.gz man/man8/knotd.8.gz @dirrmtry %%ETCDIR%% -@dirrmtry var/run/knot -@dirrmtry var/run -@dirrmtry var/lib/knot -@dirrmtry var/lib -@dirrmtry var bin/kdig bin/khost +bin/knsec3hash bin/knsupdate +info/dir sbin/knotc sbin/knotd |