diff options
author | pi <pi@FreeBSD.org> | 2018-03-22 00:52:34 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2018-03-22 00:52:34 +0800 |
commit | 4d1866e3d86458543290e39d0ab59011ba0d85af (patch) | |
tree | 4b4653117f67a2940cf0fb8011f878a8a1d319c4 /net-mgmt | |
parent | 3e80c98d5ce9ec199c8e10a530a3dc5e548eaf9c (diff) | |
download | freebsd-ports-gnome-4d1866e3d86458543290e39d0ab59011ba0d85af.tar.gz freebsd-ports-gnome-4d1866e3d86458543290e39d0ab59011ba0d85af.tar.zst freebsd-ports-gnome-4d1866e3d86458543290e39d0ab59011ba0d85af.zip |
New port: net-mgmt/carbonzipper
carbonzipper is part of the go implementation of the carbon stack. It sits
between carbonapi and go-carbon
WWW: https://github.com/go-graphite/carbonzipper/
PR: 226818
Submitted by: Andreas Andersson <a.andersson.thn@gmail.com>
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/carbonzipper/Makefile | 58 | ||||
-rw-r--r-- | net-mgmt/carbonzipper/distinfo | 45 | ||||
-rw-r--r-- | net-mgmt/carbonzipper/files/carbonzipper.in | 44 | ||||
-rw-r--r-- | net-mgmt/carbonzipper/files/patch-example.conf | 10 | ||||
-rw-r--r-- | net-mgmt/carbonzipper/pkg-descr | 4 | ||||
-rw-r--r-- | net-mgmt/carbonzipper/pkg-plist | 4 |
7 files changed, 166 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index 6a1ca4a4790d..ed35f49a482e 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -31,6 +31,7 @@ SUBDIR += cacti-spine SUBDIR += cacti88 SUBDIR += cacti88-spine + SUBDIR += carbonzipper SUBDIR += ccnet-client SUBDIR += ccnet-server SUBDIR += cdpd diff --git a/net-mgmt/carbonzipper/Makefile b/net-mgmt/carbonzipper/Makefile new file mode 100644 index 000000000000..b07604874433 --- /dev/null +++ b/net-mgmt/carbonzipper/Makefile @@ -0,0 +1,58 @@ +# $FreeBSD$ + +PORTNAME= carbonzipper +DISTVERSION= 0.74 +CATEGORIES= net-mgmt + +MAINTAINER= a.andersson.thn@gmail.com +COMMENT= Proxy between carbonapi and go-carbon + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= go>=1.8:lang/go + +USES= go + +USE_GITHUB= yes +GH_ACCOUNT= go-graphite +GH_SUBDIR= src/github.com/go-graphite/${PORTNAME} +GH_TUPLE= bradfitz:gomemcache:1952afa:gomemcache/src/github.com/bradfitz/gomemcache \ + dgryski:httputil:189c2918:httputil/src/github.com/dgryski/httputil \ + dgryski:go-expirecache:743ef98:goexpirecache/src/github.com/dgryski/go-expirecache \ + facebookgo:atomicfile:2de1f20:atomicfile/src/github.com/facebookgo/atomicfile \ + facebookgo:clock:600d898:clock/src/github.com/facebookgo/clock \ + facebookgo:grace:4afe952:grace/src/github.com/facebookgo/grace \ + facebookgo:httpdown:a3b1354:httpdown/src/github.com/facebookgo/httpdown \ + facebookgo:pidfile:f242e299:pidfile/src/github.com/facebookgo/pidfile \ + facebookgo:stats:1b76add:stats/src/github.com/facebookgo/stats \ + gogo:protobuf:v0.4:protobuf/src/github.com/gogo/protobuf \ + go-yaml:yaml:v2.1.1:yaml/src/gopkg.in/yaml.v2 \ + lestrrat:go-strftime:04ef93e:gostrftime/src/github.com/lestrrat/go-strftime \ + lestrrat-go:file-rotatelogs:v2.1.0:filerotatelogs/src/github.com/lestrrat/go-file-rotatelogs \ + lomik:og-rek:628eefe:ogrek/src/github.com/lomik/og-rek \ + lomik:zapwriter:d4499a3:zapwriter/src/github.com/lomik/zapwriter \ + peterbourgon:g2g:0c2bab2:g2g/src/github.com/peterbourgon/g2g \ + pkg:errors:v0.8.0:errors/src/github.com/pkg/errors \ + satori:go.uuid:v1.1.0:gouuid/src/github.com/satori/go.uuid \ + uber-go:atomic:v1.2.0:atomic/src/go.uber.org/atomic \ + uber-go:multierr:v1.1.0:multierr/src/go.uber.org/multierr \ + uber-go:zap:v1.5.0:zap/src/go.uber.org/zap + +USE_RC_SUBR= ${PORTNAME} + +USERS= carbon +GROUPS= carbon + +do-build: + @cd ${WRKSRC}/ && \ + ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} \ + go build --ldflags '-X main.BuildVersion=${DISTVERSION}' -o carbonzipper + +do-install: + @${MKDIR} ${STAGEDIR}/${PREFIX}/etc/carbonzipper + @${MKDIR} ${STAGEDIR}/var/log/carbonzipper + ${INSTALL_PROGRAM} ${WRKSRC}/carbonzipper ${STAGEDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/example.conf ${STAGEDIR}${PREFIX}/etc/carbonzipper + +.include <bsd.port.mk> diff --git a/net-mgmt/carbonzipper/distinfo b/net-mgmt/carbonzipper/distinfo new file mode 100644 index 000000000000..168ff1b2d5fa --- /dev/null +++ b/net-mgmt/carbonzipper/distinfo @@ -0,0 +1,45 @@ +TIMESTAMP = 1521620905 +SHA256 (go-graphite-carbonzipper-0.74_GH0.tar.gz) = 498b36912a8ef60dcef705ed00c3cf11c098ae89f62dc39fb023a8a89d3516ac +SIZE (go-graphite-carbonzipper-0.74_GH0.tar.gz) = 41391 +SHA256 (bradfitz-gomemcache-1952afa_GH0.tar.gz) = b1a6ff097539342a2b8a7844b12d5e486379cdd0ef2de804385811b59c0a139f +SIZE (bradfitz-gomemcache-1952afa_GH0.tar.gz) = 13053 +SHA256 (dgryski-httputil-189c2918_GH0.tar.gz) = 2d50c6383ab5b483b381da2bc5e4f0c7ae27c8bdbda0e0e8231e7394421c0b77 +SIZE (dgryski-httputil-189c2918_GH0.tar.gz) = 1690 +SHA256 (dgryski-go-expirecache-743ef98_GH0.tar.gz) = 37438da21d42bba99d1dbb2d227687189bcc8c07b746ed56319ab18a69684ce0 +SIZE (dgryski-go-expirecache-743ef98_GH0.tar.gz) = 3363 +SHA256 (facebookgo-atomicfile-2de1f20_GH0.tar.gz) = 69863fac5d2e112cdd0b356cd69d100d2f49345f34d41914589182126a56baac +SIZE (facebookgo-atomicfile-2de1f20_GH0.tar.gz) = 3486 +SHA256 (facebookgo-clock-600d898_GH0.tar.gz) = ef0cdd71a3df0cf2de528d6b8a7db5df5d7a974774d04ec156f0bcba7fb6a6fa +SIZE (facebookgo-clock-600d898_GH0.tar.gz) = 6375 +SHA256 (facebookgo-grace-4afe952_GH0.tar.gz) = e9a47dcc8764c5124eb7250a6ab5263a431f4d183130f84ca0257bb6aa296c94 +SIZE (facebookgo-grace-4afe952_GH0.tar.gz) = 13379 +SHA256 (facebookgo-httpdown-a3b1354_GH0.tar.gz) = 220f737bccc8fa03ac4bd73426c143e5e95c3a5ea9dddaffe3aefd9625ae2468 +SIZE (facebookgo-httpdown-a3b1354_GH0.tar.gz) = 9738 +SHA256 (facebookgo-pidfile-f242e299_GH0.tar.gz) = 5e0cb574b851bc7c92ac58a02a158e8472cc122476fb565a9931b26d34d010e3 +SIZE (facebookgo-pidfile-f242e299_GH0.tar.gz) = 3416 +SHA256 (facebookgo-stats-1b76add_GH0.tar.gz) = 568616050c1d4022b4becf0871c6f87f4ccea6cd5e772238e88060decc66c0d4 +SIZE (facebookgo-stats-1b76add_GH0.tar.gz) = 5655 +SHA256 (gogo-protobuf-v0.4_GH0.tar.gz) = 64fb508b9a8d4af156409804c8a75f2c4885ff9601d8f86b765b5d3ec1a6ef70 +SIZE (gogo-protobuf-v0.4_GH0.tar.gz) = 2430215 +SHA256 (go-yaml-yaml-v2.1.1_GH0.tar.gz) = c14dd951766d03b4480820faece16d1bc756c2c479efd52594fcdb2c826415c3 +SIZE (go-yaml-yaml-v2.1.1_GH0.tar.gz) = 69159 +SHA256 (lestrrat-go-strftime-04ef93e_GH0.tar.gz) = 622be10ee786496a9c825b02cb726785924a21a2a94fd590ba9b5ea90ec75bc5 +SIZE (lestrrat-go-strftime-04ef93e_GH0.tar.gz) = 7273 +SHA256 (lestrrat-go-file-rotatelogs-v2.1.0_GH0.tar.gz) = ba46fb785e23a290190d286165e1e414a730264223c7d6f6e8e18303626cfb45 +SIZE (lestrrat-go-file-rotatelogs-v2.1.0_GH0.tar.gz) = 6565 +SHA256 (lomik-og-rek-628eefe_GH0.tar.gz) = 28d74084b2c7888f7ec85d694baf1623a4a258434594cdc9c579ec1b385e192f +SIZE (lomik-og-rek-628eefe_GH0.tar.gz) = 320232 +SHA256 (lomik-zapwriter-d4499a3_GH0.tar.gz) = cd09dce82d47991e4645ab588fdbebf40e30e3d29feca3e84678711df299d13c +SIZE (lomik-zapwriter-d4499a3_GH0.tar.gz) = 9524 +SHA256 (peterbourgon-g2g-0c2bab2_GH0.tar.gz) = a9304102095692897cb35d0cffed810d24731d0ebdb5dfb7d77f98a5d97913e1 +SIZE (peterbourgon-g2g-0c2bab2_GH0.tar.gz) = 3833 +SHA256 (pkg-errors-v0.8.0_GH0.tar.gz) = bacf6c58e490911398cee61742ddc6a90c560733e4c9dcb3d867b17a894c9dd5 +SIZE (pkg-errors-v0.8.0_GH0.tar.gz) = 11344 +SHA256 (satori-go.uuid-v1.1.0_GH0.tar.gz) = a9509d7769794df7d26964d5dc297c8ad7349f8ff5585f294e8fddd1c6abe946 +SIZE (satori-go.uuid-v1.1.0_GH0.tar.gz) = 7609 +SHA256 (uber-go-atomic-v1.2.0_GH0.tar.gz) = 48179cf603b9a7aaefad6373c6df2c66896c0f9a78c1fcdc47322904f2f1eea0 +SIZE (uber-go-atomic-v1.2.0_GH0.tar.gz) = 6818 +SHA256 (uber-go-multierr-v1.1.0_GH0.tar.gz) = 45405583513302d57d4715fada5ef8c8dbd9c9992956f2d0faa8758d9d885851 +SIZE (uber-go-multierr-v1.1.0_GH0.tar.gz) = 9234 +SHA256 (uber-go-zap-v1.5.0_GH0.tar.gz) = f0c1580f39153ee2aae03d57564a819865dfd4528d59eb15629e063dc48f86fc +SIZE (uber-go-zap-v1.5.0_GH0.tar.gz) = 96068 diff --git a/net-mgmt/carbonzipper/files/carbonzipper.in b/net-mgmt/carbonzipper/files/carbonzipper.in new file mode 100644 index 000000000000..926bccf9182b --- /dev/null +++ b/net-mgmt/carbonzipper/files/carbonzipper.in @@ -0,0 +1,44 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: carbonzipper +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable carbonzipper +# carbonzipper_enable="YES" +# +# carbonzipper_enable (bool): Set to YES to enable carbonzipper +# Default: NO +# carbonzipper_conf (str): carbonzipper configration file +# Default: empty +# carbonzipper_user (str): carbonzipper daemon user +# Default: carbon +# carbonzipper_group (str): carbonzipper daemon group +# Default: carbon + +. /etc/rc.subr + +name="carbonzipper" +rcvar=carbonzipper_enable +load_rc_config $name + +: ${carbonzipper_enable:="NO"} +: ${carbonzipper_user:="carbon"} +: ${carbonzipper_group:="carbon"} +: ${carbonzipper_conf:=""} +: ${carbonzipper_options:="-config ${carbonzipper_conf}"} + +pidfile="/var/run/${name}.pid" +procname="%%PREFIX%%/bin/carbonzipper" +command=/usr/sbin/daemon +command_args="-f -c -p ${pidfile} ${procname} ${carbonzipper_options}" +start_precmd="carbonzipper_precmd" + +carbonzipper_precmd() +{ + install -o ${carbonzipper_user} /dev/null ${pidfile} +} + +run_rc_command "$1" diff --git a/net-mgmt/carbonzipper/files/patch-example.conf b/net-mgmt/carbonzipper/files/patch-example.conf new file mode 100644 index 000000000000..8a12455f4fce --- /dev/null +++ b/net-mgmt/carbonzipper/files/patch-example.conf @@ -0,0 +1,10 @@ +--- example.conf.orig 2018-03-21 08:39:06 UTC ++++ example.conf +@@ -101,6 +101,6 @@ logger: + encodingDuration: "seconds" + - + logger: "" +- file: "carbonapi.log" ++ file: "/var/log/carbonzipper/carbonzipper.log" + level: "info" + encoding: "json" diff --git a/net-mgmt/carbonzipper/pkg-descr b/net-mgmt/carbonzipper/pkg-descr new file mode 100644 index 000000000000..2e8a4aba73d6 --- /dev/null +++ b/net-mgmt/carbonzipper/pkg-descr @@ -0,0 +1,4 @@ +carbonzipper is part of the go implementation of the carbon stack. It sits +between carbonapi and go-carbon + +WWW: https://github.com/go-graphite/carbonzipper/ diff --git a/net-mgmt/carbonzipper/pkg-plist b/net-mgmt/carbonzipper/pkg-plist new file mode 100644 index 000000000000..8b90899c310f --- /dev/null +++ b/net-mgmt/carbonzipper/pkg-plist @@ -0,0 +1,4 @@ +bin/%%GO_PKGNAME%% +@sample %%ETCDIR%%/example.conf +@dir(carbon,carbon,0755) %%ETCDIR%% +@dir(carbon,carbon,0755) /var/log/%%GO_PKGNAME%% |