Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2018 16:54:24 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r465194 - in head/net-mgmt: . carbon-relay-ng carbon-relay-ng/files
Message-ID:  <201803211654.w2LGsOra059044@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Wed Mar 21 16:54:24 2018
New Revision: 465194
URL: https://svnweb.freebsd.org/changeset/ports/465194

Log:
  New port: net-mgmt/carbon-relay-ng
  
  carbon-relay-ng is a middleware that sit's between graphite capable metrics
  collectors and and carbon instances such as databases/go-carbon and
  databases/py-carbon. It can do sharding and replication to any carbon
  storage.
  
  WWW: https://github.com/graphite-ng/carbon-relay-ng
  
  PR:		226824
  Submitted by:	Andreas Andersson <a.andersson.thn@gmail.com>

Added:
  head/net-mgmt/carbon-relay-ng/
  head/net-mgmt/carbon-relay-ng/Makefile   (contents, props changed)
  head/net-mgmt/carbon-relay-ng/distinfo   (contents, props changed)
  head/net-mgmt/carbon-relay-ng/files/
  head/net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in   (contents, props changed)
  head/net-mgmt/carbon-relay-ng/files/patch-Makefile   (contents, props changed)
  head/net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini   (contents, props changed)
  head/net-mgmt/carbon-relay-ng/pkg-descr   (contents, props changed)
  head/net-mgmt/carbon-relay-ng/pkg-plist   (contents, props changed)
Modified:
  head/net-mgmt/Makefile

Modified: head/net-mgmt/Makefile
==============================================================================
--- head/net-mgmt/Makefile	Wed Mar 21 16:52:34 2018	(r465193)
+++ head/net-mgmt/Makefile	Wed Mar 21 16:54:24 2018	(r465194)
@@ -31,6 +31,7 @@
     SUBDIR += cacti-spine
     SUBDIR += cacti88
     SUBDIR += cacti88-spine
+    SUBDIR += carbon-relay-ng
     SUBDIR += carbonzipper
     SUBDIR += ccnet-client
     SUBDIR += ccnet-server

Added: head/net-mgmt/carbon-relay-ng/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/carbon-relay-ng/Makefile	Wed Mar 21 16:54:24 2018	(r465194)
@@ -0,0 +1,39 @@
+# $FreeBSD$
+
+PORTNAME=		carbon-relay-ng
+DISTVERSIONPREFIX=	v
+DISTVERSION=		0.9.4
+CATEGORIES=		net-mgmt
+
+MAINTAINER=		a.andersson.thn@gmail.com
+COMMENT=		Go implementation of carbonapi
+
+LICENSE=		BSD2CLAUSE
+LICENSE_FILE=		${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=		go>=1.8:lang/go \
+			go-bindata:devel/go-bindata
+
+USES=			gmake
+
+USE_GITHUB=		yes
+GH_ACCOUNT=		graphite-ng
+GH_SUBDIR=		src/github.com/${GH_ACCOUNT}/${PORTNAME}
+USE_RC_SUBR=		${PORTNAME}
+
+USERS=			carbon
+GROUPS=			carbon
+
+do-build:
+	@cd ${WRKSRC}/${GH_SUBDIR} && \
+		${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} VERSION=${DISTVERSION} \
+		${MAKE_CMD} build
+
+do-install:
+	@${MKDIR} ${STAGEDIR}/${PREFIX}/etc/carbon-relay-ng
+	@${MKDIR} ${STAGEDIR}/var/run/carbon-relay-ng
+	@${MKDIR} ${STAGEDIR}/var/run/carbon-relay-ng/spool
+	${INSTALL_PROGRAM} ${WRKSRC}/carbon-relay-ng ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_DATA} ${WRKSRC}/examples/carbon-relay-ng.ini ${STAGEDIR}${PREFIX}/etc/carbon-relay-ng/carbon-relay-ng.ini.sample
+
+.include <bsd.port.mk>

Added: head/net-mgmt/carbon-relay-ng/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/carbon-relay-ng/distinfo	Wed Mar 21 16:54:24 2018	(r465194)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1521631625
+SHA256 (graphite-ng-carbon-relay-ng-v0.9.4_GH0.tar.gz) = 7097d77eb40397565571b7a5d982831e9aa8e90bc2f9321e217115d1e9757745
+SIZE (graphite-ng-carbon-relay-ng-v0.9.4_GH0.tar.gz) = 6409643

Added: head/net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in	Wed Mar 21 16:54:24 2018	(r465194)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: carbon_relay_ng
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable carbon_relay_ng
+# carbon_relay_ng_enable="YES"
+#
+# carbon_relay_ng_enable (bool): 	Set to YES to enable carbon_relay_ng
+#				Default: NO
+# carbon_relay_ng_conf (str):		carbon_relay_ng configration file
+#				Default: empty
+# carbon_relay_ng_user (str):		carbon_relay_ng daemon user
+#				Default: carbon
+# carbon_relay_ng_group (str):		carbon_relay_ng daemon group
+#				Default: carbon
+
+. /etc/rc.subr
+
+name="carbon_relay_ng"
+rcvar=carbon_relay_ng_enable
+load_rc_config $name
+
+: ${carbon_relay_ng_enable:="NO"}
+: ${carbon_relay_ng_user:="carbon"}
+: ${carbon_relay_ng_group:="carbon"}
+: ${carbon_relay_ng_conf:=""}
+
+pidfile="/var/run/carbon-relay-ng/${name}.pid"
+procname="%%PREFIX%%/bin/carbon-relay-ng"
+command=/usr/sbin/daemon
+command_args="-f -c -p ${pidfile} ${procname} ${carbon_relay_ng_conf}"
+start_precmd="carbon_relay_ng_precmd"
+
+carbon_relay_ng_precmd()
+{
+    install -o ${carbon_relay_ng_user} /dev/null ${pidfile}
+}
+
+run_rc_command "$1"

Added: head/net-mgmt/carbon-relay-ng/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/carbon-relay-ng/files/patch-Makefile	Wed Mar 21 16:54:24 2018	(r465194)
@@ -0,0 +1,8 @@
+--- Makefile.orig	2018-03-21 11:37:45 UTC
++++ Makefile
+@@ -1,4 +1,4 @@
+-VERSION=$(shell git describe --tags --always | sed 's/^v//')
++VERSION?=$(shell git describe --tags --always | sed 's/^v//')
+ 
+ 
+ build:

Added: head/net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini	Wed Mar 21 16:54:24 2018	(r465194)
@@ -0,0 +1,14 @@
+--- examples/carbon-relay-ng.ini.orig	2018-03-21 13:32:07 UTC
++++ examples/carbon-relay-ng.ini
+@@ -10,9 +10,9 @@ max_procs = 2
+ admin_addr = "0.0.0.0:2004"
+ http_addr = "0.0.0.0:8081"
+ #spool_dir = "/var/spool/carbon-relay-ng"
+-spool_dir = "spool"
++spool_dir = "/var/run/carbon-relay-ng/spool"
+ #pid_file = "/var/run/carbon-relay-ng.pid"
+-pid_file = "carbon-relay-ng.pid"
++#pid_file = "carbon-relay-ng.pid"
+ 
+ ## Logging ##
+ # one of critical error warning notice info debug

Added: head/net-mgmt/carbon-relay-ng/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/carbon-relay-ng/pkg-descr	Wed Mar 21 16:54:24 2018	(r465194)
@@ -0,0 +1,6 @@
+carbon-relay-ng is a middleware that sit's between graphite capable metrics
+collectors and and carbon instances such as databases/go-carbon and 
+databases/py-carbon. It can do sharding and replication to any carbon
+storage.
+
+WWW: https://github.com/graphite-ng/carbon-relay-ng

Added: head/net-mgmt/carbon-relay-ng/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/carbon-relay-ng/pkg-plist	Wed Mar 21 16:54:24 2018	(r465194)
@@ -0,0 +1,4 @@
+bin/carbon-relay-ng
+@sample %%ETCDIR%%/carbon-relay-ng.ini.sample
+@dir(carbon,carbon,0755) /var/run/carbon-relay-ng/spool
+@dir(carbon,carbon,0755) /var/run/carbon-relay-ng



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