aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2018-03-22 00:54:24 +0800
committerpi <pi@FreeBSD.org>2018-03-22 00:54:24 +0800
commitf505cbddd99e8674cc3463b8f78aaf2d86e356c2 (patch)
treea35202b714acfdb1a1b3e5edb439d267352d83de
parent4d1866e3d86458543290e39d0ab59011ba0d85af (diff)
downloadfreebsd-ports-gnome-f505cbddd99e8674cc3463b8f78aaf2d86e356c2.tar.gz
freebsd-ports-gnome-f505cbddd99e8674cc3463b8f78aaf2d86e356c2.tar.zst
freebsd-ports-gnome-f505cbddd99e8674cc3463b8f78aaf2d86e356c2.zip
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>
-rw-r--r--net-mgmt/Makefile1
-rw-r--r--net-mgmt/carbon-relay-ng/Makefile39
-rw-r--r--net-mgmt/carbon-relay-ng/distinfo3
-rw-r--r--net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in43
-rw-r--r--net-mgmt/carbon-relay-ng/files/patch-Makefile8
-rw-r--r--net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini14
-rw-r--r--net-mgmt/carbon-relay-ng/pkg-descr6
-rw-r--r--net-mgmt/carbon-relay-ng/pkg-plist4
8 files changed, 118 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile
index ed35f49a482e..f63d24b9bf62 100644
--- a/net-mgmt/Makefile
+++ b/net-mgmt/Makefile
@@ -31,6 +31,7 @@
SUBDIR += cacti-spine
SUBDIR += cacti88
SUBDIR += cacti88-spine
+ SUBDIR += carbon-relay-ng
SUBDIR += carbonzipper
SUBDIR += ccnet-client
SUBDIR += ccnet-server
diff --git a/net-mgmt/carbon-relay-ng/Makefile b/net-mgmt/carbon-relay-ng/Makefile
new file mode 100644
index 000000000000..89e839ab418d
--- /dev/null
+++ b/net-mgmt/carbon-relay-ng/Makefile
@@ -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>
diff --git a/net-mgmt/carbon-relay-ng/distinfo b/net-mgmt/carbon-relay-ng/distinfo
new file mode 100644
index 000000000000..c02b23bb5f50
--- /dev/null
+++ b/net-mgmt/carbon-relay-ng/distinfo
@@ -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
diff --git a/net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in b/net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in
new file mode 100644
index 000000000000..ff203b8aaa3d
--- /dev/null
+++ b/net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in
@@ -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"
diff --git a/net-mgmt/carbon-relay-ng/files/patch-Makefile b/net-mgmt/carbon-relay-ng/files/patch-Makefile
new file mode 100644
index 000000000000..dd7c197eaa14
--- /dev/null
+++ b/net-mgmt/carbon-relay-ng/files/patch-Makefile
@@ -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:
diff --git a/net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini b/net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini
new file mode 100644
index 000000000000..5e9a636f3309
--- /dev/null
+++ b/net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini
@@ -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
diff --git a/net-mgmt/carbon-relay-ng/pkg-descr b/net-mgmt/carbon-relay-ng/pkg-descr
new file mode 100644
index 000000000000..f54e4443c87d
--- /dev/null
+++ b/net-mgmt/carbon-relay-ng/pkg-descr
@@ -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
diff --git a/net-mgmt/carbon-relay-ng/pkg-plist b/net-mgmt/carbon-relay-ng/pkg-plist
new file mode 100644
index 000000000000..d86ca7d284dd
--- /dev/null
+++ b/net-mgmt/carbon-relay-ng/pkg-plist
@@ -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