diff options
author | swills <swills@FreeBSD.org> | 2015-06-26 20:51:07 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2015-06-26 20:51:07 +0800 |
commit | 843e57e4d0e358b93b88595815daca946eff5ee1 (patch) | |
tree | 7d682ae960c20239c5abe1eec0aed53cfe81ebcd /databases/influxdb | |
parent | ec52e152c36d0eb43103e05414c4f1a216faae26 (diff) | |
download | freebsd-ports-gnome-843e57e4d0e358b93b88595815daca946eff5ee1.tar.gz freebsd-ports-gnome-843e57e4d0e358b93b88595815daca946eff5ee1.tar.zst freebsd-ports-gnome-843e57e4d0e358b93b88595815daca946eff5ee1.zip |
databases/influxdb: create port
An open-source, distributed, time series database with no external dependencies.
WWW: http://influxdb.com
PR: 198073
Submitted by: Stefan Lambrev <cheffo@freebsd-bg.org>
Diffstat (limited to 'databases/influxdb')
-rw-r--r-- | databases/influxdb/Makefile | 131 | ||||
-rw-r--r-- | databases/influxdb/distinfo | 34 | ||||
-rw-r--r-- | databases/influxdb/files/influxd.in | 47 | ||||
-rw-r--r-- | databases/influxdb/files/patch-cluster_client__pool.go | 11 | ||||
-rw-r--r-- | databases/influxdb/files/patch-cluster_shard__writer.go | 11 | ||||
-rw-r--r-- | databases/influxdb/pkg-descr | 13 | ||||
-rw-r--r-- | databases/influxdb/pkg-plist | 6 |
7 files changed, 253 insertions, 0 deletions
diff --git a/databases/influxdb/Makefile b/databases/influxdb/Makefile new file mode 100644 index 000000000000..ba4c515a2102 --- /dev/null +++ b/databases/influxdb/Makefile @@ -0,0 +1,131 @@ +# $FreeBSD$ + +PORTNAME= influxdb +PORTVERSION= 0.9.0 +DISTVERSIONPREFIX= v +CATEGORIES= databases net-mgmt + +MAINTAINER= cheffo@freebsd-bg.org +COMMENT= Open-source distributed time series database + +LICENSE= MIT + +BUILD_DEPENDS= go>=1.4.0:${PORTSDIR}/lang/go + +ONLY_FOR_ARCHS= i386 amd64 + +USE_RC_SUBR= influxd + +USE_GITHUB= yes +GH_ACCOUNT= influxdb:DEFAULT \ + alecthomas:log4go \ + armon:go_metrics \ + BurntSushi:toml \ + bmizerany:pat \ + boltdb:bolt \ + cheffo:crypto,go_uuid \ + fatih:pool \ + gogo:gogo_protobuf \ + golang:golang_protobuf \ + hashicorp:raft,raft_boltdb,go_msgpack \ + kimor79:gollectd \ + peterh:liner \ + rakyll:statik +GH_PROJECT= bolt:bolt crypto:crypto go-metrics:go_metrics \ + go-msgpack:go_msgpack gollectd:gollectd liner:liner \ + log4go:log4go pat:pat pool:pool protobuf:gogo_protobuf \ + protobuf:golang_protobuf raft-boltdb:raft_boltdb raft:raft \ + statik:statik toml:toml go-uuid:go_uuid +GH_TAGNAME= 04a3e85:bolt 056c9bc:toml 1351f93:crypto 1bb0d1c:liner \ + 1bcc57d:log4go 274df12:statik 58bbd41:gogo_protobuf \ + 61d0dee:gollectd aece6fb:golang_protobuf b2d95e5:go_metrics \ + b8a3500:pat cba550e:pool d1e82c1:raft_boltdb ed3ca8a:go_uuid \ + f0f02dd:raft fa3f638:go_msgpack + +SUB_FILES= influxd +SUB_LIST+= INFLUXD_USER=${INFLUXD_USER} \ + INFLUXD_GROUP=${INFLUXD_GROUP} \ + INFLUXD_DBDIR=${INFLUXD_DBDIR} \ + INFLUXD_PIDDIR=${INFLUXD_PIDDIR} \ + INFLUXD_LOGDIR=${INFLUXD_LOGDIR} + +PLIST_SUB= INFLUXD_USER=${INFLUXD_USER} \ + INFLUXD_GROUP=${INFLUXD_GROUP} \ + INFLUXD_DBDIR=${INFLUXD_DBDIR} \ + INFLUXD_PIDDIR=${INFLUXD_PIDDIR} \ + INFLUXD_LOGDIR=${INFLUXD_LOGDIR} + +INFLUXD_USER?= influxd +INFLUXD_GROUP?= influxd + +INFLUXD_DBDIR= /var/db/${PORTNAME}/ +INFLUXD_LOGDIR= /var/log/${PORTNAME}/ +INFLUXD_PIDDIR= /var/run/${PORTNAME}/ + +USERS= ${INFLUXD_USER} +GROUPS= ${INFLUXD_GROUP} + +STRIP= # stripping can break go binaries + +post-patch: + @${MKDIR} ${WRKSRC}/src/code.google.com/p + @${MKDIR} ${WRKSRC}/src/github.com/BurntSushi + @${MKDIR} ${WRKSRC}/src/github.com/armon + @${MKDIR} ${WRKSRC}/src/github.com/bmizerany + @${MKDIR} ${WRKSRC}/src/github.com/boltdb + @${MKDIR} ${WRKSRC}/src/github.com/fatih + @${MKDIR} ${WRKSRC}/src/github.com/gogo + @${MKDIR} ${WRKSRC}/src/github.com/golang + @${MKDIR} ${WRKSRC}/src/github.com/hashicorp + @${MKDIR} ${WRKSRC}/src/github.com/influxdb + @${MKDIR} ${WRKSRC}/src/github.com/kimor79 + @${MKDIR} ${WRKSRC}/src/github.com/peterh + @${MKDIR} ${WRKSRC}/src/github.com/rakyll + @${MKDIR} ${WRKSRC}/src/golang.org/x + @${MKDIR} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME} +.for src in CHANGELOG.md CONTRIBUTING.md LICENSE QUERIES.md README.md \ + balancer.go balancer_test.go circle-test.sh circle.yml client \ + cluster cmd continuous_queries.md diagnostics.go errors.go etc \ + influxql meta package.sh scripts services shared snapshot statik \ + stats.go stats_test.go tcp tests toml tsdb uuid + @${MV} ${WRKSRC}/${src} \ + ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME} +.endfor + @${MV} ${WRKSRC_bolt} ${WRKSRC}/src/github.com/boltdb/bolt + @${MV} ${WRKSRC_crypto} ${WRKSRC}/src/golang.org/x/crypto + @${MV} ${WRKSRC_go_metrics} ${WRKSRC}/src/github.com/armon/go-metrics + @${MV} ${WRKSRC_go_msgpack} ${WRKSRC}/src/github.com/hashicorp/go-msgpack + @${MV} ${WRKSRC_go_uuid} ${WRKSRC}/src/code.google.com/p/go-uuid + @${MV} ${WRKSRC_gogo_protobuf} ${WRKSRC}/src/github.com/gogo/protobuf + @${MV} ${WRKSRC_golang_protobuf} ${WRKSRC}/src/github.com/golang/protobuf + @${MV} ${WRKSRC_gollectd} ${WRKSRC}/src/github.com/kimor79/gollectd + @${MV} ${WRKSRC_liner} ${WRKSRC}/src/github.com/peterh/liner + @${MV} ${WRKSRC_log4go} ${WRKSRC}/src/code.google.com/p/log4go + @${MV} ${WRKSRC_pat} ${WRKSRC}/src/github.com/bmizerany/pat + @${MV} ${WRKSRC_pool} ${WRKSRC}/src/github.com/fatih/pool + @${MV} ${WRKSRC_raft_boltdb} ${WRKSRC}/src/github.com/hashicorp/raft-boltdb + @${MV} ${WRKSRC_raft} ${WRKSRC}/src/github.com/hashicorp/raft + @${MV} ${WRKSRC_statik} ${WRKSRC}/src/github.com/rakyll/statik + @${MV} ${WRKSRC_toml} ${WRKSRC}/src/github.com/BurntSushi/toml + +do-build: + @cd ${WRKSRC}/src/github.com/influxdb/ && ${SETENV} GOPATH=${WRKSRC} go install ./... + +do-install: + ${MKDIR} ${STAGEDIR}${INFLUXD_DBDIR} \ + ${STAGEDIR}${INFLUXD_PIDDIR} \ + ${STAGEDIR}${INFLUXD_LOGDIR} + +post-install: + ${INSTALL_PROGRAM} ${WRKSRC}/bin/influxd ${STAGEDIR}${PREFIX}/bin/influxd + ${INSTALL_PROGRAM} ${WRKSRC}/bin/influx ${STAGEDIR}${PREFIX}/bin/influx + @${SED} -i .bak -e \ + "s|/tmp/influxdb/development|/var/db/influxdb|g" \ + ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/etc/config.sample.toml + ${INSTALL_DATA} \ + ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/etc/config.sample.toml \ + ${STAGEDIR}${PREFIX}/etc/influxd.conf.sample + @${MKDIR} ${STAGEDIR}/var/db/influxdb + @${MKDIR} ${STAGEDIR}/var/log/influxdb + +.include <bsd.port.mk> diff --git a/databases/influxdb/distinfo b/databases/influxdb/distinfo new file mode 100644 index 000000000000..90af2551cf9f --- /dev/null +++ b/databases/influxdb/distinfo @@ -0,0 +1,34 @@ +SHA256 (influxdb-influxdb-v0.9.0_GH0.tar.gz) = c7cc869754d7bfb9374b0a16a9b91073d9588adedbd7bfda1d5709e22d3a3d75 +SIZE (influxdb-influxdb-v0.9.0_GH0.tar.gz) = 2554827 +SHA256 (alecthomas-log4go-1bcc57d_GH0.tar.gz) = f15f25fb0d4d88ce9817f1a04c32c5ca7cf35358615b61601ef47be388733604 +SIZE (alecthomas-log4go-1bcc57d_GH0.tar.gz) = 16190 +SHA256 (armon-go-metrics-b2d95e5_GH0.tar.gz) = a3c2f9b16157249cf248c5a21fc9ade43c35c451005ed9dcc2d4b52b0f2f9680 +SIZE (armon-go-metrics-b2d95e5_GH0.tar.gz) = 11360 +SHA256 (BurntSushi-toml-056c9bc_GH0.tar.gz) = 73125940543e2922a77bee42f068f35383b5e260e5fbab867efcb7a59a05671a +SIZE (BurntSushi-toml-056c9bc_GH0.tar.gz) = 37104 +SHA256 (bmizerany-pat-b8a3500_GH0.tar.gz) = 6468a8b27db2bed1edf6eb845da6f7466221c7b0b41112d77710e4ac76926a2f +SIZE (bmizerany-pat-b8a3500_GH0.tar.gz) = 5205 +SHA256 (boltdb-bolt-04a3e85_GH0.tar.gz) = 63ea778d7f9f82e94610ed0a96cd4135993704440d6e3e9b09cdfb5c96c8d54e +SIZE (boltdb-bolt-04a3e85_GH0.tar.gz) = 72745 +SHA256 (cheffo-crypto-1351f93_GH0.tar.gz) = 29ddf6009158914fb35f9d8e27c48164428dedac6a1314215e1717ae913d96f0 +SIZE (cheffo-crypto-1351f93_GH0.tar.gz) = 860364 +SHA256 (cheffo-go-uuid-ed3ca8a_GH0.tar.gz) = 3ad72804ee9b735add1039ec8cffd445fefd66852a3b7c0b82baf428696ca921 +SIZE (cheffo-go-uuid-ed3ca8a_GH0.tar.gz) = 41022 +SHA256 (fatih-pool-cba550e_GH0.tar.gz) = fdcbcf67872333b16b74647bc4c8aa8100de81f58f0ea99ff83a519bf142e4cb +SIZE (fatih-pool-cba550e_GH0.tar.gz) = 4854 +SHA256 (gogo-protobuf-58bbd41_GH0.tar.gz) = 1d50a318b50a5f07e8111972081bef9d9dd2a7b9e3915fc88b10291620981498 +SIZE (gogo-protobuf-58bbd41_GH0.tar.gz) = 1147405 +SHA256 (golang-protobuf-aece6fb_GH0.tar.gz) = 3f4db232b0548a3b527f087539c9de28068c2f5603f66b1ff16b84ed222884b0 +SIZE (golang-protobuf-aece6fb_GH0.tar.gz) = 142325 +SHA256 (hashicorp-raft-f0f02dd_GH0.tar.gz) = 93fa0a92f3ef54a133c71d1b5f0288e12f3d933a392693c6d947c8f55637ee73 +SIZE (hashicorp-raft-f0f02dd_GH0.tar.gz) = 57418 +SHA256 (hashicorp-raft-boltdb-d1e82c1_GH0.tar.gz) = 68bb2996a4ec490c099612efcc255ad721014aaf42afbf9f0b21fcf8361162d9 +SIZE (hashicorp-raft-boltdb-d1e82c1_GH0.tar.gz) = 8879 +SHA256 (hashicorp-go-msgpack-fa3f638_GH0.tar.gz) = 6353c623d5d58c7ca03e2bdac63f9da7da8848fb1f5f7f239b33e3ce6fe6c6bd +SIZE (hashicorp-go-msgpack-fa3f638_GH0.tar.gz) = 49496 +SHA256 (kimor79-gollectd-61d0dee_GH0.tar.gz) = 217d827fb26d1cf7b1fa3bae7fa51fc5b25ff2141151ffa7d328d015cd4fb498 +SIZE (kimor79-gollectd-61d0dee_GH0.tar.gz) = 9508 +SHA256 (peterh-liner-1bb0d1c_GH0.tar.gz) = 0ed1d975b6af46820eb55826527a9ab0263376da5a20e94b21695e21267f6f2e +SIZE (peterh-liner-1bb0d1c_GH0.tar.gz) = 16925 +SHA256 (rakyll-statik-274df12_GH0.tar.gz) = 47cb3d4bc95171baeac813c0373cdfc232c4339fb09f251a76df247615216d49 +SIZE (rakyll-statik-274df12_GH0.tar.gz) = 77898 diff --git a/databases/influxdb/files/influxd.in b/databases/influxdb/files/influxd.in new file mode 100644 index 000000000000..44860737e34d --- /dev/null +++ b/databases/influxdb/files/influxd.in @@ -0,0 +1,47 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: influxd +# REQUIRE: DAEMON NETWORKING +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable influxdb: +# influxd_enable="YES" +# +# influxd_enable (bool): Set to YES to enable influxd +# Default: NO +# influxd_conf (str): influxd configuration file +# Default: ${PREFIX}/etc/influxd.conf +# influxd_user (str): influxd daemon user +# Default: influxd +# influxd_group (str): influxd daemon group +# Default: influxd +# influxd_flags (str): Extra flags passed to influxd + +. /etc/rc.subr + +name="influxd" +rcvar=influxd_enable + +: ${influxd_enable:="NO"} +: ${influxd_user:="%%INFLUXD_USER%%"} +: ${influxd_group:="%%INFLUXD_GROUP%%"} +: ${influxd_flags:=""} +: ${influxd_conf:="%%PREFIX%%/etc/${name}.conf"} +: ${influxd_options:="${influxdb_flags} -config=${influxd_conf}"} + +# daemon +influxd_pidfile="%%INFLUXD_PIDDIR%%${name}.pid" +procname="%%PREFIX%%/bin/${name}" +command=/usr/sbin/daemon +command_args=" -f -c -p ${influxd_pidfile} ${procname} ${influxd_options}" +start_precmd="influxd_precmd" + +influxd_precmd() +{ + install -o ${influxd_user} /dev/null ${influxd_pidfile} +} + +load_rc_config $name +run_rc_command "$1" diff --git a/databases/influxdb/files/patch-cluster_client__pool.go b/databases/influxdb/files/patch-cluster_client__pool.go new file mode 100644 index 000000000000..6f7c858c7683 --- /dev/null +++ b/databases/influxdb/files/patch-cluster_client__pool.go @@ -0,0 +1,11 @@ +--- cluster/client_pool.go.orig 2015-06-23 14:38:16 UTC ++++ cluster/client_pool.go +@@ -4,7 +4,7 @@ import ( + "net" + "sync" + +- "gopkg.in/fatih/pool.v2" ++ "github.com/fatih/pool" + ) + + type clientPool struct { diff --git a/databases/influxdb/files/patch-cluster_shard__writer.go b/databases/influxdb/files/patch-cluster_shard__writer.go new file mode 100644 index 000000000000..5f0f69f8b58f --- /dev/null +++ b/databases/influxdb/files/patch-cluster_shard__writer.go @@ -0,0 +1,11 @@ +--- cluster/shard_writer.go.orig 2015-06-23 14:38:36 UTC ++++ cluster/shard_writer.go +@@ -7,7 +7,7 @@ import ( + + "github.com/influxdb/influxdb/meta" + "github.com/influxdb/influxdb/tsdb" +- "gopkg.in/fatih/pool.v2" ++ "github.com/fatih/pool" + ) + + const ( diff --git a/databases/influxdb/pkg-descr b/databases/influxdb/pkg-descr new file mode 100644 index 000000000000..8cd9fca3d6af --- /dev/null +++ b/databases/influxdb/pkg-descr @@ -0,0 +1,13 @@ +An open-source, distributed, time series database with no external dependencies. +InfluxDB is the new home for all of your metrics, events, and analytics. + +InfluxDB is a time series, metrics, and analytics database. It'written in Go and +has no external dependencies. That means once you install it there's nothing +else to manage (like Redis, ZooKeeper, HBase, or whatever). + +InfluxDB is targeted at use cases for DevOps, metrics, sensor data, and +real-time analytics. It arose from our need for a database like this on more +than a few previous products we' built. You can read more about our jurney from +SaaS application to open source time series database. + +WWW: http://influxdb.com diff --git a/databases/influxdb/pkg-plist b/databases/influxdb/pkg-plist new file mode 100644 index 000000000000..0edbca6eb68b --- /dev/null +++ b/databases/influxdb/pkg-plist @@ -0,0 +1,6 @@ +bin/influx +bin/influxd +@dir(%%INFLUXD_USER%%,%%INFLUXD_GROUP%%,0750) %%INFLUXD_DBDIR%% +@dir(%%INFLUXD_USER%%,%%INFLUXD_GROUP%%,0750) %%INFLUXD_LOGDIR%% +@dir(%%INFLUXD_USER%%,%%INFLUXD_GROUP%%,0750) %%INFLUXD_PIDDIR%% +@sample etc/%%INFLUXD_USER%%.conf.sample |