From owner-svn-ports-head@FreeBSD.ORG Mon May 18 17:44:34 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1005A2F1; Mon, 18 May 2015 17:44:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F20E01A66; Mon, 18 May 2015 17:44:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4IHiXm3030628; Mon, 18 May 2015 17:44:33 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4IHiX4C030624; Mon, 18 May 2015 17:44:33 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201505181744.t4IHiX4C030624@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Mon, 18 May 2015 17:44:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r386695 - in head/dns/nsd: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 17:44:34 -0000 Author: amdmi3 Date: Mon May 18 17:44:32 2015 New Revision: 386695 URL: https://svnweb.freebsd.org/changeset/ports/386695 Log: - Add option to install Munun plugin PR: 199798 Submitted by: tgyurci@gmail.com Approved by: maintainer timeout Modified: head/dns/nsd/Makefile head/dns/nsd/files/nsd.in head/dns/nsd/pkg-plist Modified: head/dns/nsd/Makefile ============================================================================== --- head/dns/nsd/Makefile Mon May 18 17:37:53 2015 (r386694) +++ head/dns/nsd/Makefile Mon May 18 17:44:32 2015 (r386695) @@ -11,6 +11,7 @@ MAINTAINER= jaap@NLnetLabs.nl COMMENT= Authoritative only non-recursive name server LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE CONFLICTS= nsd-[0-3]* nsd3-[0-9]* @@ -29,7 +30,7 @@ NSDMAX_IPS?= 512 GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-libevent=${LOCALBASE} \ --with-user=${NSDUSER} \ - --with-configdir=${PREFIX}/etc/nsd \ + --with-configdir=${ETCDIR} \ --localstatedir=${NSDLSDIR} \ --with-dbfile=${NSDDBDIR}/nsd.db \ --with-pidfile=${NSDRUNDIR}/nsd.pid @@ -50,8 +51,9 @@ PORTDOCS= CREDITS ChangeLog LICENSE NSD- differences.tex OPTIONS_DEFINE= ROOT_SERVER LARGEFILE IPV6 BIND8_STATS CHECKING \ - MINRESPSIZE NSEC3 MMAP MAXIPS DOCS RRL ZONE_STATS + MINRESPSIZE NSEC3 MMAP MAXIPS DOCS RRL ZONE_STATS MUNIN_PLUGIN OPTIONS_DEFAULT= LARGEFILE IPV6 NSEC3 MINRESPSIZE RRL +OPTIONS_SUB= yes ROOT_SERVER_DESC= Configure as a root server LARGEFILE_DESC= Largefile support @@ -63,6 +65,7 @@ MMAP_DESC= Use mmap instead of malloc ( MAXIPS_DESC= Raise max-ips from 8 to ${NSDMAX_IPS} RRL_DESC= Response Rate Limiting ZONE_STATS_DESC= Separate statistics for each zone +MUNIN_PLUGIN_DESC= Install Munin plugin (requires BIND8_STATS) LIB_DEPENDS+= libevent.so:${PORTSDIR}/devel/libevent2 @@ -78,6 +81,18 @@ MAXIPS_CONFIGURE_ON= --with-max-ips=${N RRL_CONFIGURE_ENABLE= ratelimit ZONE_STATS_CONFIGURE_ENABLE= zone-stats +.include + +post-build: +.if ${PORT_OPTIONS:MMUNIN_PLUGIN} + ${REINPLACE_CMD} \ + -e 's|/usr/local|${LOCALBASE}|g' \ + -e 's|/usr/local/etc/nsd.conf|${ETCDIR}/nsd.conf|g' \ + -e 's|/usr/local/var/munin/plugin-state|/var/munin/plugin-state/root|g' \ + -e '90s|/var/munin/plugin-state/root|$${MUNIN_PLUGSTATE}|' \ + ${WRKSRC}/contrib/nsd_munin_ +.endif + post-install: ${INSTALL_DATA} ${WRKSRC}/nsd.conf.sample \ ${STAGEDIR}${PREFIX}/etc/nsd/nsd.conf.sample @@ -87,5 +102,10 @@ post-install: ${STAGEDIR}${PREFIX}/sbin/nsd-checkconf \ ${STAGEDIR}${PREFIX}/sbin/nsd-checkzone \ ${STAGEDIR}${PREFIX}/sbin/nsd-control +.if ${PORT_OPTIONS:MMUNIN_PLUGIN} + @${MKDIR} ${STAGEDIR}${PREFIX}/share/munin/plugins + ${INSTALL_SCRIPT} ${WRKSRC}/contrib/nsd_munin_ \ + ${STAGEDIR}${PREFIX}/share/munin/plugins +.endif .include Modified: head/dns/nsd/files/nsd.in ============================================================================== --- head/dns/nsd/files/nsd.in Mon May 18 17:37:53 2015 (r386694) +++ head/dns/nsd/files/nsd.in Mon May 18 17:44:32 2015 (r386695) @@ -21,7 +21,7 @@ rcvar=nsd_enable load_rc_config "${name}" : ${nsd_enable="NO"} -config=${nsd_config:=%%PREFIX%%/etc/nsd/nsd.conf} +config=${nsd_config:=%%ETCDIR%%/nsd.conf} required_files=${config} pidfile=`%%PREFIX%%/sbin/nsd-checkconf -f -o pidfile ${config}` command="%%PREFIX%%/sbin/${name}" Modified: head/dns/nsd/pkg-plist ============================================================================== --- head/dns/nsd/pkg-plist Mon May 18 17:37:53 2015 (r386694) +++ head/dns/nsd/pkg-plist Mon May 18 17:44:32 2015 (r386695) @@ -9,6 +9,7 @@ sbin/nsd-checkconf sbin/nsd-checkzone sbin/nsd-control sbin/nsd-control-setup +%%MUNIN_PLUGIN%%share/munin/plugins/nsd_munin_ @dir(%%NSDUSER%%,%%NSDGROUP%%,0755) %%NSDRUNDIR%% @dir(%%NSDUSER%%,%%NSDGROUP%%,0755) %%NSDDBDIR%% @exec chown -R %%NSDUSER%%:%%NSDGROUP%% %%NSDRUNDIR%%