Date: Mon, 19 Mar 2018 20:22:29 +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: r465028 - in head: . databases databases/go-carbon databases/go-carbon/files Message-ID: <201803192022.w2JKMTMU008730@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pi Date: Mon Mar 19 20:22:29 2018 New Revision: 465028 URL: https://svnweb.freebsd.org/changeset/ports/465028 Log: New port: databases/go-carbon go-carbon is a go implementation of the carbon component of the graphite project. It has support for multiple cpu's and can achieve higher concurrency. WWW: https://github.com/lomik/go-carbon PR: 226732 Submitted by: Andreas Andersson <a.andersson.thn@gmail.com> Added: head/databases/go-carbon/ head/databases/go-carbon/Makefile (contents, props changed) head/databases/go-carbon/distinfo (contents, props changed) head/databases/go-carbon/files/ head/databases/go-carbon/files/go-carbon.in (contents, props changed) head/databases/go-carbon/files/patch-deploy_go-carbon.conf (contents, props changed) head/databases/go-carbon/pkg-descr (contents, props changed) head/databases/go-carbon/pkg-plist (contents, props changed) Modified: head/GIDs head/UIDs head/databases/Makefile Modified: head/GIDs ============================================================================== --- head/GIDs Mon Mar 19 20:14:38 2018 (r465027) +++ head/GIDs Mon Mar 19 20:22:29 2018 (r465028) @@ -170,7 +170,7 @@ sqlgrey:*:226: _hfm:*:227: osrm:*:228: kismet:*:229: -# free: 230 +carbon:*:230: # free: 231 # free: 232 # free: 233 Modified: head/UIDs ============================================================================== --- head/UIDs Mon Mar 19 20:14:38 2018 (r465027) +++ head/UIDs Mon Mar 19 20:22:29 2018 (r465028) @@ -175,7 +175,7 @@ sqlgrey:*:226:226::0:0:SQLgrey Owner:/nonexistent:/usr _hfm:*:227:227::0:0:hfm daemon:/nonexistent:/usr/sbin/nologin osrm:*:228:228::0:0:osrm:/nonexistent:/usr/sbin/nologin # free: 229 -# free: 230 +carbon:*:230:230::0:0:osrm:/nonexistent:/usr/sbin/nologin # free: 231 # free: 232 # free: 233 Modified: head/databases/Makefile ============================================================================== --- head/databases/Makefile Mon Mar 19 20:14:38 2018 (r465027) +++ head/databases/Makefile Mon Mar 19 20:22:29 2018 (r465028) @@ -94,6 +94,7 @@ SUBDIR += gigabase SUBDIR += gnats4 SUBDIR += gnatsweb4 + SUBDIR += go-carbon SUBDIR += gomdb SUBDIR += gosqlite3 SUBDIR += gqlplus Added: head/databases/go-carbon/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/go-carbon/Makefile Mon Mar 19 20:22:29 2018 (r465028) @@ -0,0 +1,38 @@ +# $FreeBSD$ + +PORTNAME= go-carbon +DISTVERSIONPREFIX= v +DISTVERSION= 0.12.0 +CATEGORIES= databases + +MAINTAINER= a.andersson.thn@gmail.com +COMMENT= Go implementation of carbon + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +BUILD_DEPENDS= go>=1.8:lang/go + +USES= go + +USE_GITHUB= yes +GH_ACCOUNT= lomik +USE_RC_SUBR= ${PORTNAME} + +USERS= carbon +GROUPS= carbon + +do-build: + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC}/_vendor \ + go build --ldflags '-X main.BuildVersion=${DISTVERSION}' github.com/lomik/go-carbon + +do-install: + @${MKDIR} ${STAGEDIR}/var/db/go-carbon + @${MKDIR} ${STAGEDIR}/var/log/go-carbon + @${MKDIR} ${STAGEDIR}/${PREFIX}/etc/go-carbon + ${INSTALL_PROGRAM} ${WRKSRC}/go-carbon ${STAGEDIR}${PREFIX}/bin/ + ${INSTALL} ${WRKSRC}/deploy/go-carbon.conf ${STAGEDIR}${PREFIX}/etc/go-carbon/ + ${INSTALL} ${WRKSRC}/deploy/storage-aggregation.conf ${STAGEDIR}${PREFIX}/etc/go-carbon/ + ${INSTALL} ${WRKSRC}/deploy/storage-schemas.conf ${STAGEDIR}${PREFIX}/etc/go-carbon/ + +.include <bsd.port.mk> Added: head/databases/go-carbon/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/go-carbon/distinfo Mon Mar 19 20:22:29 2018 (r465028) @@ -0,0 +1,3 @@ +TIMESTAMP = 1521477973 +SHA256 (lomik-go-carbon-v0.12.0_GH0.tar.gz) = 2661492a9b0209977548ef86340f606e29630ab9d5d971bdf745d4b30495875c +SIZE (lomik-go-carbon-v0.12.0_GH0.tar.gz) = 3035132 Added: head/databases/go-carbon/files/go-carbon.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/go-carbon/files/go-carbon.in Mon Mar 19 20:22:29 2018 (r465028) @@ -0,0 +1,55 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: go-carbon +# REQUIRE: LOGIN +# BEFORE: securelevel +# KEYWORD: shutdown + +# Add the following line to /etc/rc.conf to enable `go-carbon': +# +# go_carbon_enable="YES" +# +# optional: +# +# go_carbon_conf (flags): Set extra flags here. More options in go-carbon(1) +# Default is empty "". +# go_carbon_user (user): Set user to run go-carbon. +# Default is "carbon". + +. /etc/rc.subr + +name="go-carbon" +rcvar="go_carbon_enable" + +: ${go_carbon_enable:="NO"} +: ${go_carbon_user:="carbon"} +: ${go_carbon_config:="/usr/local/etc/go-carbon/go-carbon.conf"} + +start_cmd="go_carbon_start" +stop_cmd="go_carbon_stop" +status_cmd="go_carbon_status" +procname="/usr/local/bin/go-carbon" +pidfile="/var/run/$name.pid" + +# read configuration and set defaults +load_rc_config "$name" + +go_carbon_start() +{ + ${procname} -config ${go_carbon_config} -daemon -pidfile ${pidfile} +} + +go_carbon_stop() +{ + kill -TERM `cat /var/run/go-carbon.pid` +} + +go_carbon_status() +{ + echo "go-carbon is running as pid" `cat /var/run/go-carbon.pid` +} + +run_rc_command "$1" Added: head/databases/go-carbon/files/patch-deploy_go-carbon.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/go-carbon/files/patch-deploy_go-carbon.conf Mon Mar 19 20:22:29 2018 (r465028) @@ -0,0 +1,17 @@ +--- deploy/go-carbon.conf.orig 2018-03-19 13:53:13 UTC ++++ deploy/go-carbon.conf +@@ -11,11 +11,11 @@ metric-interval = "1m0s" + max-cpu = 4 + + [whisper] +-data-dir = "/var/lib/graphite/whisper" ++data-dir = "/var/db/go-carbon/whisper" + # http://graphite.readthedocs.org/en/latest/config-carbon.html#storage-schemas-conf. Required +-schemas-file = "/etc/go-carbon/storage-schemas.conf" ++schemas-file = "/usr/local/etc/go-carbon/storage-schemas.conf" + # http://graphite.readthedocs.org/en/latest/config-carbon.html#storage-aggregation-conf. Optional +-aggregation-file = "/etc/go-carbon/storage-aggregation.conf" ++aggregation-file = "/usr/local/etc/go-carbon/storage-aggregation.conf" + # Worker threads count. Metrics sharded by "crc32(metricName) % workers" + workers = 8 + # Limits the number of whisper update_many() calls per second. 0 - no limit Added: head/databases/go-carbon/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/go-carbon/pkg-descr Mon Mar 19 20:22:29 2018 (r465028) @@ -0,0 +1,4 @@ +go-carbon is a go implementation of the carbon component of the graphite +project. It has support for multiple cpu's and can achieve higher concurrency. + +WWW: https://github.com/lomik/go-carbon Added: head/databases/go-carbon/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/go-carbon/pkg-plist Mon Mar 19 20:22:29 2018 (r465028) @@ -0,0 +1,6 @@ +bin/%%GO_PKGNAME%% +%%ETCDIR%%/%%GO_PKGNAME%%.conf +%%ETCDIR%%/storage-aggregation.conf +%%ETCDIR%%/storage-schemas.conf +@dir(carbon,carbon,0750) /var/db/%%GO_PKGNAME%% +@dir(carbon,carbon,0750) /var/log/%%GO_PKGNAME%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803192022.w2JKMTMU008730>