Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jan 2014 02:40:01 GMT
From:      Mark Felder <feld@FreeBSD.org>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/184946: [UPDATE]: dns/knot 1.3.4
Message-ID:  <201401030240.s032e12b054770@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/184946; it has been noted by GNATS.

From: Mark Felder <feld@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184946: [UPDATE]: dns/knot 1.3.4
Date: Thu, 2 Jan 2014 20:31:30 -0600

 --Apple-Mail=_F0145274-EB24-4AEC-9AAA-298DF5AF464C
 Content-Type: multipart/mixed;
 	boundary="Apple-Mail=_850980A1-4E66-4416-A57B-60F32B1A158E"
 
 
 --Apple-Mail=_850980A1-4E66-4416-A57B-60F32B1A158E
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii
 
 Would you mind testing this more comprehensive patch? I've made some =
 changes so knot better adheres to the FreeBSD heir(7) and best practices
 
 
 --Apple-Mail=_850980A1-4E66-4416-A57B-60F32B1A158E
 Content-Disposition: attachment;
 	filename=knot.txt
 Content-Type: text/plain;
 	name="knot.txt"
 Content-Transfer-Encoding: quoted-printable
 
 Index: Makefile
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 --- Makefile	(revision 338178)
 +++ Makefile	(working copy)
 @@ -2,8 +2,7 @@
  # $FreeBSD$
 =20
  PORTNAME=3D	knot
 -DISTVERSION=3D	1.3.3
 -PORTREVISION=3D	1
 +DISTVERSION=3D	1.3.4
  CATEGORIES=3D	dns ipv6
  MASTER_SITES=3D	https://secure.nic.cz/files/knot-dns/ \
  		http://dns-lab.com/downloads/knot-dns/
 @@ -23,24 +22,26 @@
  USE_OPENSSL=3D	yes
  GNU_CONFIGURE=3D	yes
 =20
 +CONFIGURE_ARGS+=3D--with-storage=3D/var/db/knot
 +CONFIGURE_ARGS+=3D--with-rundir=3D/var/run/knot
 +
  SUB_FILES=3D	pkg-message
 =20
 -USE_RC_SUBR=3D	${PORTNAME}d
 +USE_RC_SUBR=3D	${PORTNAME}
 =20
  INFO=3D		knot
 =20
  PORTDOCS=3D	AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS
 =20
 -OPTIONS_DEFINE=3D	DOCS
 +USERS=3D	knot
 +GROUPS=3D	knot
 =20
 +SUB_LIST+=3D	USERS=3D"${USERS}" GROUPS=3D"${GROUPS}"
 +
  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
 =20
  .include <bsd.port.mk>
 Index: distinfo
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 --- distinfo	(revision 338178)
 +++ distinfo	(working copy)
 @@ -1,2 +1,2 @@
 -SHA256 (knot-1.3.3.tar.gz) =3D =
 70f5237871a92cd8a777c73b80b6ac339212ea084d4adfaf314388be704027b4
 -SIZE (knot-1.3.3.tar.gz) =3D 1148233
 +SHA256 (knot-1.3.4.tar.gz) =3D =
 0e15fb93de9eb2b8cb5d25c2239566462858125cb1b8455fc744835589212399
 +SIZE (knot-1.3.4.tar.gz) =3D 1208147
 Index: files/knot.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 --- files/knot.in	(revision 338178)
 +++ files/knot.in	(working copy)
 @@ -10,7 +10,7 @@
  #
  # knot_enable=3D"YES":	Set to NO by default.
  #			Set it to YES to enable knot.
 -# knot_config=3D"":	Set to %%PREFIX%%/etc/knot/knot.conf
 +# knot_config=3D"":	Set to /usr/local/etc/knot/knot.conf
  #			by default.
 =20
  . /etc/rc.subr
 @@ -18,22 +18,39 @@
  name=3Dknot
  rcvar=3Dknot_enable
 =20
 -extra_commands=3D"reload"
 -reload_cmd=3D"${name}_x reload"
 -status_cmd=3D"${name}_x status"
 -stop_cmd=3D"  ${name}_x stop"
 -
  load_rc_config ${name}
 =20
 -: ${knot_enable:=3D"NO"}
 -: ${knot_config=3D"%%PREFIX%%/etc/knot/knot.conf"}
 +: ${knot_enable:=3DNO}
 +: ${knot_config=3D"%%PREFIX%%/knot/knot.conf"}
 =20
 -command=3D%%PREFIX%%/sbin/${name}d
 +command=3D%%PREFIX%%/sbin/knotd
  command_args=3D"-c ${knot_config} -d"
 +control=3D%%PREFIX%%/sbin/knotc
 +pidfile=3D/var/run/knot/knot.pid
 +
  required_files=3D${knot_config}
 =20
 -knot_x() {
 -	%%PREFIX%%/sbin/${name}c -c ${knot_config} "$1"
 -	}
 +extra_commands=3Dreload
 +reload_cmd=3D"${name}_reload"
 +start_precmd=3D"${name}_prestart"
 =20
 +knot_prestart()
 +{
 +	if [ ! -d /var/run/knot ]; then
 +		install -d -o %%USERS%% -g %%GROUPS%% /var/run/knot
 +	fi
 +=09
 +	if [ ! -d /var/db/knot ]; then
 +		install -d -o %%USERS%% -g %%GROUPS%% /var/db/knot
 +	fi
 +
 +	${control} -c ${knot_config} checkconf
 +}
 +
 +knot_reload()
 +{
 +	echo "Reloading ${name}."
 +	${control} -c ${knot_config} reload
 +}
 +
  run_rc_command "$1"
 Index: files/knotd.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 --- files/knotd.in	(revision 338178)
 +++ files/knotd.in	(working copy)
 @@ -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=3D"YES":	Set to NO by default.
 -#			Set it to YES to enable knot.
 -# knot_config=3D"":	Set to %%PREFIX%%/etc/knot/knot.conf
 -#			by default.
 -
 -. /etc/rc.subr
 -
 -name=3Dknot
 -rcvar=3Dknot_enable
 -
 -extra_commands=3D"reload"
 -reload_cmd=3D"${name}_x reload"
 -status_cmd=3D"${name}_x status"
 -stop_cmd=3D"  ${name}_x stop"
 -
 -load_rc_config ${name}
 -
 -: ${knot_enable:=3D"NO"}
 -: ${knot_config=3D"%%PREFIX%%/etc/knot/knot.conf"}
 -
 -command=3D%%PREFIX%%/sbin/${name}d
 -command_args=3D"-c ${knot_config} -d"
 -required_files=3D${knot_config}
 -
 -knot_x() {
 -	%%PREFIX%%/sbin/${name}c -c ${knot_config} "$1"
 -	}
 -
 -run_rc_command "$1"
 Index: files/patch-src-Makefile.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 --- files/patch-src-Makefile.in	(revision 0)
 +++ files/patch-src-Makefile.in	(working copy)
 @@ -0,0 +1,11 @@
 +--- src/Makefile.in.orig	2013-12-24 09:39:02.671817934 -0600
 ++++ src/Makefile.in	2013-12-24 09:39:11.577816555 -0600
 +@@ -1979,8 +1979,6 @@
 + # Create storage and run-time directories
 + install-data-hook:
 + 	$(INSTALL) -d $(DESTDIR)/@config_dir@
 +-	$(INSTALL) -d $(DESTDIR)/@run_dir@
 +-	$(INSTALL) -d $(DESTDIR)/@storage_dir@
 +=20
 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
 + # Otherwise a system limit (for SysV at least) may be exceeded.
 
 Property changes on: files/patch-src-Makefile.in
 ___________________________________________________________________
 Added: fbsd:nokeywords
 ## -0,0 +1 ##
 +yes
 \ No newline at end of property
 Added: svn:eol-style
 ## -0,0 +1 ##
 +native
 \ No newline at end of property
 Added: svn:mime-type
 ## -0,0 +1 ##
 +text/plain
 \ No newline at end of property
 Index: files/pkg-message.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 --- files/pkg-message.in	(revision 338178)
 +++ files/pkg-message.in	(working copy)
 @@ -7,7 +7,7 @@
    $EDITOR %%ETCDIR%%/knot.conf
    echo knot_enable=3D\"YES\" >> /etc/rc.conf
  # echo knot_config=3D\"%%PREFIX%%/etc/knot/knot.conf\" >> /etc/rc.conf
 -  %%PREFIX%%/etc/rc.d/knotd start
 +  %%PREFIX%%/etc/rc.d/knot start
  #
  ####################################################################
 =20
 Index: pkg-plist
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 --- pkg-plist	(revision 338178)
 +++ pkg-plist	(working copy)
 @@ -1,4 +1,4 @@
 -@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
 @@ -9,11 +9,6 @@
  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/knsupdate
 
 --Apple-Mail=_850980A1-4E66-4416-A57B-60F32B1A158E
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii
 
 
 
 - configure the storage dir at build time to be /var/db/knot
 - configure the run dir at build time to be /var/run/knot
 - rename the rc script from knotd to knot so there is consistency =
 between the rc script filename and the rc.conf entry "knot_enable=3D"YES",=
  etc
 - add a user and group for knot -- yes, we finally run as our own user =
 instead of root!
 - knot's rc script will create the /var/db/knot and /var/run/knot before =
 starting if those directories don't already exist. It also sets to the =
 correct permissions/ownership based on what you built the port with (in =
 case you don't want to use the "knot" user for some reason)
 - knot's rc script does a checkconf before starting so you can get a =
 useful error message on the console if you have a syntax issue in your =
 knot configuration!
 - the patch that was added was to fix a staging violation: knot's build =
 framework is a bit too aggressive about creating the run dir and storage =
 dir and build time.
 
 
 Thank you for your time!
 
 --Apple-Mail=_850980A1-4E66-4416-A57B-60F32B1A158E--
 
 --Apple-Mail=_F0145274-EB24-4AEC-9AAA-298DF5AF464C
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename=signature.asc
 Content-Type: application/pgp-signature;
 	name=signature.asc
 Content-Description: Message signed with OpenPGP using GPGMail
 
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - https://gpgtools.org
 
 iQEcBAEBCgAGBQJSxiECAAoJEJg7ZFAfE+JSfjUH/ROlqMzLopsySsSQT/HWI6sS
 XHj3nMEdRDJnXfn1n9Y1LyueEKaxyfaTVXOXlx0tO3bUEME8EjYNFjSHxKgdA8YI
 jm8GzHe+DclIWZWauBqUlWGr4nhRFlACQJOy8N9YAoA+Fi8jOV78dkbJBL6bKNII
 AHSM2pRXPSPwKF5bQJZj1V8SjFuhbS4Aom2kyjM/zN2knICamKGVagyIhvsIH6EJ
 brDkvDawzTsndgqurkWtcJWA0qg7Z2kzs9qpHAjt3tF8EMcGbY5PEESS0HNJgR+Q
 +zxY4l1svdbefDsW/1kCViguA9+oUlgDTEnhVMPX3Uvje/3WOsk2isFPExzCudc=
 =1HsX
 -----END PGP SIGNATURE-----
 
 --Apple-Mail=_F0145274-EB24-4AEC-9AAA-298DF5AF464C--



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