Date: Tue, 19 Jul 2016 13:29:03 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r418783 - in head/sysutils: munin-common munin-common/files munin-node munin-node/files Message-ID: <201607191329.u6JDT3d0092413@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Tue Jul 19 13:29:03 2016 New Revision: 418783 URL: https://svnweb.freebsd.org/changeset/ports/418783 Log: Install munin-async and munin-asyncd with munin-node. PR: 211159 Reported by: axel axel re Sponsored by: Absolight Added: head/sysutils/munin-node/files/munin-asyncd.in (contents, props changed) Modified: head/sysutils/munin-common/files/patch-Makefile (contents, props changed) head/sysutils/munin-common/munin.mk head/sysutils/munin-node/Makefile (contents, props changed) head/sysutils/munin-node/pkg-plist (contents, props changed) Modified: head/sysutils/munin-common/files/patch-Makefile ============================================================================== --- head/sysutils/munin-common/files/patch-Makefile Tue Jul 19 13:24:51 2016 (r418782) +++ head/sysutils/munin-common/files/patch-Makefile Tue Jul 19 13:29:03 2016 (r418783) @@ -134,7 +134,17 @@ fi \ done -@@ -183,7 +166,7 @@ install-async: +@@ -176,14 +159,14 @@ install-plugins-java: build-plugins-java + install-async-prime: install-async + + install-async: +- mkdir -p $(LIBDIR) +- $(INSTALL) -m 0755 build/node/_bin/munin-async $(LIBDIR)/ +- $(INSTALL) -m 0755 build/node/_bin/munin-asyncd $(LIBDIR)/ ++ mkdir -p $(DESTDIR)$(LIBDIR) ++ $(INSTALL) -m 0755 build/node/_bin/munin-async $(DESTDIR)$(LIBDIR)/ ++ $(INSTALL) -m 0755 build/node/_bin/munin-asyncd $(DESTDIR)$(LIBDIR)/ + install-node-prime: install-node-pre install-node install-node-pre: build/node/munin-node.conf install-pre Modified: head/sysutils/munin-common/munin.mk ============================================================================== --- head/sysutils/munin-common/munin.mk Tue Jul 19 13:24:51 2016 (r418782) +++ head/sysutils/munin-common/munin.mk Tue Jul 19 13:29:03 2016 (r418783) @@ -29,6 +29,7 @@ MAKE_ARGS= ${MUNIN_DIRS} \ USERS= munin GROUPS= munin PLIST_SUB= ${MUNIN_DIRS} USER=${USERS} GROUP=${GROUPS} +SUB_LIST= ${MUNIN_DIRS} USER=${USERS} GROUP=${GROUPS} CPE_VENDOR= munin-monitoring Modified: head/sysutils/munin-node/Makefile ============================================================================== --- head/sysutils/munin-node/Makefile Tue Jul 19 13:24:51 2016 (r418782) +++ head/sysutils/munin-node/Makefile Tue Jul 19 13:29:03 2016 (r418783) @@ -3,7 +3,7 @@ PORTNAME= munin PORTVERSION= ${MUNIN_VERSION} -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= sysutils perl5 MASTER_SITES= ${MUNIN_SITES} PKGNAMESUFFIX= -node @@ -32,8 +32,8 @@ SHEBANG_FILES= node/sbin/munin-node node .include "${.CURDIR}/../munin-common/munin.mk" -ALL_TARGET= build-node build-plugins -INSTALL_TARGET= install-node-prime install-plugins-prime +ALL_TARGET= build-node build-plugins build/node/_bin/munin-async build/node/_bin/munin-asyncd +INSTALL_TARGET= install-node-prime install-async-prime install-plugins-prime NO_ARCH= yes OPTIONS_DEFINE= SNMP PERL JAVA @@ -55,7 +55,7 @@ JAVA_BUILD= yes JAVA_RUN= yes SUB_FILES= pkg-message plugins.conf -USE_RC_SUBR= munin-node munin-sched +USE_RC_SUBR= munin-asyncd munin-node munin-sched post-patch: @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ @@ -72,9 +72,7 @@ post-patch: @${FIND} ${WRKSRC}/node/sbin -type f -name "*.orig" -delete post-install: - ${MKDIR} ${STAGEDIR}${DBDIR}/plugin-state - ${INSTALL_SCRIPT} ${WRKDIR}/munin-node \ - ${STAGEDIR}${PREFIX}/etc/rc.d/munin-node + ${MKDIR} ${STAGEDIR}${DBDIR}/plugin-state ${STAGEDIR}${SPOOLDIR}/async ${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf \ ${STAGEDIR}${ETCDIR}/munin-node.conf.sample ${INSTALL_DATA} ${WRKDIR}/plugins.conf \ Added: head/sysutils/munin-node/files/munin-asyncd.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/munin-node/files/munin-asyncd.in Tue Jul 19 13:29:03 2016 (r418783) @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: munin-asyncd +# REQUIRE: DAEMON munin-node +# BEFORE: cron +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable munin-asyncd: +# munin_asyncd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable munin-asyncd +# munin_asyncd_spool: The spool directory, default: +# %%DBDIR%%/async +# munin_asyncd_host: Host to connect to, default: localhost:4949 +# munin_asyncd_args: Extra args to pass to munin-asyncd +# + +. /etc/rc.subr + +name=munin_asyncd +rcvar=munin_asyncd_enable + +load_rc_config $name + +: ${munin_asyncd_enable:=NO} +: ${munin_asyncd_spool:=%%SPOOLDIR%%/async} +: ${munin_asyncd_host:=localhost:4949} + +command="%%DATADIR%%/munin-asyncd" +command_interpreter="%%PREFIX%%/bin/perl" +pidfile="/var/run/${name}.pid" + +start_cmd() +{ + check_startmsgs && echo "Starting ${name}." + daemon -u %%USER%% -f -p ${pidfile} ${command_interpreter} ${command} --spool ${munin_asyncd_spool} --host ${munin_asyncd_host} ${munin_asyncd_args} +} + +run_rc_command $1 Modified: head/sysutils/munin-node/pkg-plist ============================================================================== --- head/sysutils/munin-node/pkg-plist Tue Jul 19 13:24:51 2016 (r418782) +++ head/sysutils/munin-node/pkg-plist Tue Jul 19 13:29:03 2016 (r418783) @@ -50,6 +50,8 @@ sbin/munin-node sbin/munin-node-configure sbin/munin-run sbin/munin-sched +%%DATADIR%%/munin-async +%%DATADIR%%/munin-asyncd %%JAVA%%%%DATADIR%%/munin-jmx-plugins.jar %%DATADIR%%/plugins/amavis %%DATADIR%%/plugins/apache_accesses @@ -251,4 +253,6 @@ sbin/munin-sched %%DATADIR%%/plugins/zimbra_ @dir(%%USER%%,%%GROUP%%,) %%DBDIRNODE%%/plugin-state @dir %%ETCDIR%%/plugins +@dir(%%USER%%,%%GROUP%%,) %%SPOOLDIR%%/async +@comment @dir %%SPOOLDIR%% @comment @dir %%DBDIRNODE%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607191329.u6JDT3d0092413>