From nobody@FreeBSD.org  Fri Sep 21 20:10:51 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 31931106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Sep 2012 20:10:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 121E18FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Sep 2012 20:10:51 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8LKAoeA060152
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Sep 2012 20:10:50 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q8LKAo1w060151;
	Fri, 21 Sep 2012 20:10:50 GMT
	(envelope-from nobody)
Message-Id: <201209212010.q8LKAo1w060151@red.freebsd.org>
Date: Fri, 21 Sep 2012 20:10:50 GMT
From: Kimo Rosenbaum <kimor79@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [NEW PORT] net-mgmt/node-statsd - Simple daemon for easy stats aggregation
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         171855
>Category:       ports
>Synopsis:       [NEW PORT] net-mgmt/node-statsd - Simple daemon for easy stats aggregation
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    swills
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 21 20:20:02 UTC 2012
>Closed-Date:    Sun Dec 22 16:26:34 UTC 2013
>Last-Modified:  Sun Dec 22 16:30:00 UTC 2013
>Originator:     Kimo Rosenbaum
>Release:        9.0-RELEASE
>Organization:
>Environment:
9.0-RELEASE
>Description:
New port: statsd

A network daemon that runs on the Node.js platform and listens for statistics,
like counters and timers, sent over UDP and sends aggregates to one or more
pluggable backend services (e.g., Graphite).

WWW: https://github.com/etsy/statsd
>How-To-Repeat:

>Fix:
See attached shar. Also diff of UIDs and GIDs:

diff --git a/GIDs b/GIDs
index ba40490..a2283db 100644
--- a/GIDs
+++ b/GIDs
@@ -186,6 +186,7 @@ jenkins:*:818:
 openacs:*:820:
 dotlrn:*:821:
 polw:*:825:
+statsd:*:826:
 netdisco:*:840:
 munin:*:842:
 dahdi:*:843:asterisk
diff --git a/UIDs b/UIDs
index 154eea8..cc27d25 100644
--- a/UIDs
+++ b/UIDs
@@ -192,6 +192,7 @@ jenkins:*:818:818::0:0:Jenkins CI:/usr/local/jenkins:/usr/sbin/nologin
 openacs:*:820:820::0:0:OpenACS Daemon User:/nonexistent:/usr/sbin/nologin
 dotlrn:*:821:821::0:0:.LRN Daemon User:/nonexistent:/usr/sbin/nologin
 polw:*:825:825::0:0:Policyd-weight Cache Owner:/nonexistent:/sbin/nologin
+statsd:*:826:826::0:0:Statsd Daemon:/nonexistent:/sbin/nologin
 netdisco:*:840:840::0:0:netdisco daemon:/nonexistent:/usr/sbin/nologin
 munin:*:842:842::0:0:Munin:/var/munin:/usr/sbin/nologin
 fossy:*:901:901::0:0:FOSSology user:/usr/local/share/fossology:/usr/local/bin/bash

Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	node-statsd
#	node-statsd/Makefile
#	node-statsd/distinfo
#	node-statsd/files
#	node-statsd/files/statsd.in
#	node-statsd/pkg-descr
#	node-statsd/pkg-plist
#
echo c - node-statsd
mkdir -p node-statsd > /dev/null 2>&1
echo x - node-statsd/Makefile
sed 's/^X//' >node-statsd/Makefile << 'END-of-node-statsd/Makefile'
XPORTNAME=	statsd
XPORTVERSION=	0.5.0
XCATEGORIES=	net-mgmt
XPKGNAMEPREFIX=	node-
XDISTVERSION=	v0.5.0
X
XMAINTAINER=	kimor79@yahoo.com
XCOMMENT=Simple daemon for easy stats aggregation
X
XUSE_GITHUB=	yes
XGH_ACCOUNT=	etsy
XGH_COMMIT=	712dcfb
X
XNO_BUILD=	yes
X
XRUN_DEPENDS=	node:${PORTSDIR}/www/node
X
XUSERS=		statsd
XGROUPS=		statsd
XUSE_RC_SUBR=	statsd
X
Xpost-patch:
X	@${REINPLACE_CMD} \
X		-e 's;\./;${DATADIR}/;' \
X		${WRKSRC}/stats.js
X
Xdo-install:
X	${MKDIR} ${DATADIR}/backends
X	(cd ${WRKSRC}/backends/ && ${COPYTREE_SHARE} \* ${DATADIR}/backends)
X	${MKDIR} ${DATADIR}/lib
X	(cd ${WRKSRC}/lib/ && ${COPYTREE_SHARE} \* ${DATADIR}/lib)
X	${CP} ${WRKSRC}/config.js ${DATADIR}/config.js
X	${CP} ${WRKSRC}/stats.js ${DATADIR}/stats.js
X
Xpost-install:
X	${INSTALL} -m 0755 -o statsd -g statsd -d /var/run/statsd
X	@${INSTALL_DATA} ${WRKSRC}/exampleConfig.js \
X		${PREFIX}/etc/statsd.js.sample
X	@[ -f ${PREFIX}/etc/statsd.js ] || \
X		${CP} ${PREFIX}/etc/statsd.js.sample \
X		${PREFIX}/etc/statsd.js
X
X.include <bsd.port.mk>
END-of-node-statsd/Makefile
echo x - node-statsd/distinfo
sed 's/^X//' >node-statsd/distinfo << 'END-of-node-statsd/distinfo'
XSHA256 (statsd-v0.5.0.tar.gz) = 9c116085acf7026b48a5bd0f8e7f2e6e0fc642556d38d4b5e2166905fa2727e8
XSIZE (statsd-v0.5.0.tar.gz) = 27391
END-of-node-statsd/distinfo
echo c - node-statsd/files
mkdir -p node-statsd/files > /dev/null 2>&1
echo x - node-statsd/files/statsd.in
sed 's/^X//' >node-statsd/files/statsd.in << 'END-of-node-statsd/files/statsd.in'
X#!/bin/sh
X
X# PROVIDE: statsd
X# REQUIRE: LOGIN
X# KEYWORD: shutdown
X
X#
X# Add the following line to /etc/rc.conf to enable mysql:
X# statsd_enable (bool):	Set to "NO" by default.
X#			Set it to "YES" to enable statsd.
X# statsd_config (str):	Default to "%%PREFIX%%/etc/statsd.js"
X#			Statsd configuration file.
X# statsd_user (str):	Default to "statsd".
X#			User to run as.
X
X. "/etc/rc.subr"
X
Xname="statsd"
Xrcvar=`set_rcvar`
Xload_rc_config $name
X
X# set defaults
X: ${statsd_enable:="NO"}
X: ${statsd_config:="%%PREFIX%%/etc/statsd.js"}
X: ${statsd_user:="statsd"}
X
Xpidfile="/var/run/statsd/${name}.pid"
X
Xrequired_files="${statsd_config}"
X
Xcommand="/usr/sbin/daemon"
Xcommand_args="-cf -p ${pidfile} %%PREFIX%%/bin/node %%DATADIR%%/stats.js ${statsd_config}"
Xprocname="%%PREFIX%%/bin/node"
Xstop_postcmd=stop_postcmd
X
Xstop_postcmd() {
X	rm -f $pidfile
X}
X
Xrun_rc_command "$1"
END-of-node-statsd/files/statsd.in
echo x - node-statsd/pkg-descr
sed 's/^X//' >node-statsd/pkg-descr << 'END-of-node-statsd/pkg-descr'
XA network daemon that runs on the Node.js platform and listens for statistics,
Xlike counters and timers, sent over UDP and sends aggregates to one or more
Xpluggable backend services (e.g., Graphite).
X
XWWW: https://github.com/etsy/statsd
END-of-node-statsd/pkg-descr
echo x - node-statsd/pkg-plist
sed 's/^X//' >node-statsd/pkg-plist << 'END-of-node-statsd/pkg-plist'
X%%DATADIR%%/config.js
X%%DATADIR%%/stats.js
X%%DATADIR%%/backends/console.js
X%%DATADIR%%/backends/graphite.js
X%%DATADIR%%/lib/logger.js
X@unexec if cmp -s %D/etc/statsd.js.sample %D/etc/statsd.js; then rm -f %D/etc/statsd.js; fi
Xetc/statsd.js.sample
X@exec [ -f %B/statsd.js ] || cp %B/%f %B/statsd.js
X@unexec rmdir /var/run/statsd 2>/dev/null || true
X@exec /bin/mkdir -p /var/run/statsd
X@exec /usr/sbin/chown -Rh statsd:statsd /var/run/statsd
X@dirrmtry %%DATADIR%%/lib
X@dirrmtry %%DATADIR%%/backends
X@dirrmtry %%DATADIR%%
END-of-node-statsd/pkg-plist
exit



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->swills 
Responsible-Changed-By: swills 
Responsible-Changed-When: Sat Oct 19 01:44:26 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171855 
State-Changed-From-To: open->closed 
State-Changed-By: swills 
State-Changed-When: Sun Dec 22 16:26:34 UTC 2013 
State-Changed-Why:  
New port added, with mior changes. Took the liberty of updating to the 
latest version also. Sorry it took so long. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171855 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/171855: commit references a PR
Date: Sun, 22 Dec 2013 16:26:07 +0000 (UTC)

 Author: swills
 Date: Sun Dec 22 16:25:58 2013
 New Revision: 337198
 URL: http://svnweb.freebsd.org/changeset/ports/337198
 
 Log:
   A network daemon that runs on the Node.js platform and listens for statistics,
   like counters and timers, sent over UDP and sends aggregates to one or more
   pluggable backend services (e.g., Graphite).
   
   WWW: https://github.com/etsy/statsd
   
   PR:		ports/171855
   Submitted by:	kimor79@yahoo.com
 
 Added:
   head/net-mgmt/statsd/
   head/net-mgmt/statsd/Makefile   (contents, props changed)
   head/net-mgmt/statsd/distinfo   (contents, props changed)
   head/net-mgmt/statsd/files/
   head/net-mgmt/statsd/files/statsd.in   (contents, props changed)
   head/net-mgmt/statsd/pkg-descr   (contents, props changed)
   head/net-mgmt/statsd/pkg-plist   (contents, props changed)
 Modified:
   head/GIDs
   head/UIDs
   head/net-mgmt/Makefile
 
 Modified: head/GIDs
 ==============================================================================
 --- head/GIDs	Sun Dec 22 16:22:28 2013	(r337197)
 +++ head/GIDs	Sun Dec 22 16:25:58 2013	(r337198)
 @@ -199,6 +199,7 @@ jenkins:*:818:
  openacs:*:820:
  dotlrn:*:821:
  polw:*:825:
 +statsd:*:826:
  netdisco:*:840:
  munin:*:842:
  dahdi:*:843:asterisk
 
 Modified: head/UIDs
 ==============================================================================
 --- head/UIDs	Sun Dec 22 16:22:28 2013	(r337197)
 +++ head/UIDs	Sun Dec 22 16:25:58 2013	(r337198)
 @@ -206,6 +206,7 @@ jenkins:*:818:818::0:0:Jenkins CI:/usr/l
  openacs:*:820:820::0:0:OpenACS Daemon User:/nonexistent:/usr/sbin/nologin
  dotlrn:*:821:821::0:0:.LRN Daemon User:/nonexistent:/usr/sbin/nologin
  polw:*:825:825::0:0:Policyd-weight Cache Owner:/nonexistent:/sbin/nologin
 +statsd:*:826:826::0:0:Statsd Daemon:/nonexistent:/sbin/nologin
  netdisco:*:840:840::0:0:netdisco daemon:/nonexistent:/usr/sbin/nologin
  munin:*:842:842::0:0:Munin:/var/munin:/usr/sbin/nologin
  fossy:*:901:901::0:0:FOSSology user:/usr/local/share/fossology:/usr/local/bin/bash
 
 Modified: head/net-mgmt/Makefile
 ==============================================================================
 --- head/net-mgmt/Makefile	Sun Dec 22 16:22:28 2013	(r337197)
 +++ head/net-mgmt/Makefile	Sun Dec 22 16:25:58 2013	(r337198)
 @@ -307,6 +307,7 @@
      SUBDIR += softflowd
      SUBDIR += spectools
      SUBDIR += ssgless
 +    SUBDIR += statsd
      SUBDIR += subcalc
      SUBDIR += sysmon
      SUBDIR += tcpreplay
 
 Added: head/net-mgmt/statsd/Makefile
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/net-mgmt/statsd/Makefile	Sun Dec 22 16:25:58 2013	(r337198)
 @@ -0,0 +1,40 @@
 +# $FreeBSD$
 +
 +PORTNAME=	statsd
 +PORTVERSION=	0.7.0
 +CATEGORIES=	net-mgmt
 +MASTER_SITES=	https://github.com/etsy/${PORTNAME}/archive/v${PORTVERSION}.tar.gz?dummy=/
 +
 +MAINTAINER=	kimor79@yahoo.com
 +COMMENT=	Simple daemon for easy stats aggregation
 +
 +RUN_DEPENDS=	node:${PORTSDIR}/www/node
 +
 +NO_BUILD=	yes
 +FETCH_ARGS=	-Fpr
 +
 +USERS=		statsd
 +GROUPS=		statsd
 +USE_RC_SUBR=	statsd
 +SUB_FILES+=	statsd
 +SUB_LIST+=	USERS=${USERS} GROUPS=${GROUPS}
 +
 +post-patch:
 +	@${REINPLACE_CMD} \
 +		-e 's;\./;${DATADIR}/;' \
 +		${WRKSRC}/stats.js
 +
 +do-install:
 +	${MKDIR} ${STAGEDIR}${DATADIR}/backends
 +	(cd ${WRKSRC}/backends/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/backends)
 +	${MKDIR} ${STAGEDIR}${DATADIR}/lib
 +	(cd ${WRKSRC}/lib/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/lib)
 +	${CP} ${WRKSRC}/exampleConfig.js ${STAGEDIR}${DATADIR}/exampleConfig.js
 +	${CP} ${WRKSRC}/exampleProxyConfig.js ${STAGEDIR}${DATADIR}/exampleProxyConfig.js
 +	${CP} ${WRKSRC}/stats.js ${STAGEDIR}${DATADIR}/stats.js
 +
 +post-install:
 +	@${INSTALL_DATA} ${WRKSRC}/exampleConfig.js \
 +		${STAGEDIR}${PREFIX}/etc/statsd.js.sample
 +
 +.include <bsd.port.mk>
 
 Added: head/net-mgmt/statsd/distinfo
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/net-mgmt/statsd/distinfo	Sun Dec 22 16:25:58 2013	(r337198)
 @@ -0,0 +1,2 @@
 +SHA256 (statsd-0.7.0.tar.gz) = a398f08eac233e5d58b11d22febd2afee7d27f89112d97fe0035eda77aee065e
 +SIZE (statsd-0.7.0.tar.gz) = 51073
 
 Added: head/net-mgmt/statsd/files/statsd.in
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/net-mgmt/statsd/files/statsd.in	Sun Dec 22 16:25:58 2013	(r337198)
 @@ -0,0 +1,40 @@
 +#!/bin/sh
 +#
 +# $FreeBSD$
 +#
 +
 +# PROVIDE: statsd
 +# REQUIRE: NETWORK
 +# KEYWORD: shutdown
 +
 +#
 +# Add the following line to /etc/rc.conf to enable mysql:
 +# statsd_enable (bool):	Set to "NO" by default.
 +#			Set it to "YES" to enable statsd.
 +# statsd_config (str):	Default to "%%PREFIX%%/etc/statsd.js"
 +#			Statsd configuration file.
 +# statsd_user (str):	Default to "statsd".
 +#			User to run as.
 +
 +. /etc/rc.subr
 +
 +name=statsd
 +rcvar=statsd_enable
 +load_rc_config $name
 +
 +# set defaults
 +: ${statsd_enable:=NO}
 +: ${statsd_config="%%PREFIX%%/etc/statsd.js"}
 +: ${statsd_user="%%USERS%%"}
 +
 +pidfile="/var/run/statsd/${name}.pid"
 +
 +required_files="${statsd_config}"
 +
 +command=/usr/sbin/daemon
 +command_args="-cf -p ${pidfile} %%PREFIX%%/bin/node %%DATADIR%%/stats.js ${statsd_config}"
 +procname="${name}"
 +stop_postcmd="rm -f $pidfile"
 +start_precmd="install -d -o statsd -g statsd ${pidfile%/*}"
 +
 +run_rc_command "$1"
 
 Added: head/net-mgmt/statsd/pkg-descr
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/net-mgmt/statsd/pkg-descr	Sun Dec 22 16:25:58 2013	(r337198)
 @@ -0,0 +1,5 @@
 +A network daemon that runs on the Node.js platform and listens for statistics,
 +like counters and timers, sent over UDP and sends aggregates to one or more
 +pluggable backend services (e.g., Graphite).
 +
 +WWW: https://github.com/etsy/statsd
 
 Added: head/net-mgmt/statsd/pkg-plist
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/net-mgmt/statsd/pkg-plist	Sun Dec 22 16:25:58 2013	(r337198)
 @@ -0,0 +1,19 @@
 +%%DATADIR%%/backends/console.js
 +%%DATADIR%%/backends/graphite.js
 +%%DATADIR%%/backends/repeater.js
 +%%DATADIR%%/exampleConfig.js
 +%%DATADIR%%/exampleProxyConfig.js
 +%%DATADIR%%/lib/config.js
 +%%DATADIR%%/lib/helpers.js
 +%%DATADIR%%/lib/logger.js
 +%%DATADIR%%/lib/mgmt_console.js
 +%%DATADIR%%/lib/process_metrics.js
 +%%DATADIR%%/lib/process_mgmt.js
 +%%DATADIR%%/lib/set.js
 +%%DATADIR%%/stats.js
 +@unexec if cmp -s %D/etc/statsd.js.sample %D/etc/statsd.js; then rm -f %D/etc/statsd.js; fi
 +etc/statsd.js.sample
 +@exec [ -f %B/statsd.js ] || cp %B/%f %B/statsd.js
 +@dirrmtry %%DATADIR%%/lib
 +@dirrmtry %%DATADIR%%/backends
 +@dirrmtry %%DATADIR%%
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
