aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorStefan Wagner <stw@bit-strickerei.de>2016-11-27 02:31:54 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2016-12-06 17:27:32 +0100
commit70a8fb4ee3a856defe4b6f260b445901347991f5 (patch)
tree7e3f1cae9c35ea42009112deb3ad6fc51b3724a6 /testing
parent4dd9320140988c58abc574e73693fe399450d57c (diff)
downloadaports-70a8fb4ee3a856defe4b6f260b445901347991f5.tar.bz2
aports-70a8fb4ee3a856defe4b6f260b445901347991f5.tar.xz
testing/influxdb: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/influxdb/APKBUILD82
-rw-r--r--testing/influxdb/glide.lock60
-rw-r--r--testing/influxdb/glide.yaml55
-rw-r--r--testing/influxdb/influxdb.initd16
-rw-r--r--testing/influxdb/influxdb.logrotate8
-rw-r--r--testing/influxdb/influxdb.pre-install10
6 files changed, 231 insertions, 0 deletions
diff --git a/testing/influxdb/APKBUILD b/testing/influxdb/APKBUILD
new file mode 100644
index 0000000000..32a1308523
--- /dev/null
+++ b/testing/influxdb/APKBUILD
@@ -0,0 +1,82 @@
+# Contributor: Stefan Wagner <stw@bit-strickerei.de>
+# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
+pkgname=influxdb
+pkgver=1.1.0
+pkgrel=0
+pkgdesc="Scalable datastore for metrics, events, and real-time analytics"
+url="https://www.influxdata.com/time-series-platform/influxdb/"
+arch="all"
+license="MIT"
+makedepends="go glide python2 asciidoc xmlto"
+pkgusers="influxdb"
+pkggroups="influxdb"
+install="$pkgname.pre-install"
+subpackages="$pkgname-doc"
+source="influxdb.initd
+ influxdb.logrotate
+ glide.yaml
+ glide.lock
+ "
+builddir="$srcdir/src/github.com/influxdata/$pkgname"
+_git_repo="https://github.com/influxdata/influxdb.git"
+
+unpack() {
+ export GOPATH="$srcdir"
+ git clone --branch v${pkgver} $_git_repo $builddir || return 1
+ cd "$builddir"
+ cp "$srcdir"/glide.yaml "$srcdir"/glide.lock . || return 1
+ glide install --skip-test || return 1
+ default_unpack || return 1
+}
+
+build() {
+ export GOPATH="$srcdir"
+ cd "$builddir"
+ python2 build.py --no-get || return 1
+ make -C man
+}
+
+package() {
+ cd "$builddir"
+
+ install -Dm755 "build/influxd" "$pkgdir/usr/sbin/influxd" || return 1
+ install -Dm755 "build/influx" "$pkgdir/usr/bin/influx" || return 1
+ install -Dm755 "build/influx_tsm" "$pkgdir/usr/bin/influx_tsm" || return 1
+ install -Dm755 "build/influx_inspect" \
+ "$pkgdir/usr/bin/influx_inspect" || return 1
+
+ install -d "$pkgdir/usr/share/man/man1/" || return 1
+ install -Dm644 man/*.1 "$pkgdir/usr/share/man/man1/" || return 1
+
+ install -Dm644 "etc/config.sample.toml" \
+ "$pkgdir/etc/influxdb/influxdb.conf" || return 1
+
+ install -Dm755 "$srcdir/$pkgname.initd" \
+ "$pkgdir/etc/init.d/$pkgname" || return 1
+ install -Dm644 "$srcdir/$pkgname.logrotate" \
+ "$pkgdir/etc/logrotate.d/$pkgname" || return 1
+}
+
+glide_init() {
+ abuild deps clean
+ export GOPATH="$srcdir"
+ git clone --branch v${pkgver} $_git_repo $builddir || return 1
+ cd "$builddir"
+ glide init --non-interactive || return 1
+ glide up --skip-test || return 1
+ cp glide.yaml glide.lock "$startdir"
+ cd $startdir && abuild checksum undeps
+}
+
+md5sums="54bcaed5a2a77027f56e99e98185a95d influxdb.initd
+71164f88bdb1b5388e26d3ae2292d035 influxdb.logrotate
+112882dc7ecc43f5d2c342b6d9bc6cbc glide.yaml
+3afd540d40835696c3b902242fec5277 glide.lock"
+sha256sums="9498954846d5ef2645a8a144b3d33ba5eed9f606149c079dc473ce67509fef74 influxdb.initd
+b15b4ce11fb3489a7c6143297c348067762276b022ac4b650b6149088c10d315 influxdb.logrotate
+06cd6a830ddf2e7724b97ec1b27ba4eccc6ea7175ccd994562dc1e13db52d957 glide.yaml
+e48de7d51db67fb2cee3b8499fbe7ca3a237822fbc413e01f800da44d46ebe41 glide.lock"
+sha512sums="55d5776fde330001f254fed4b01163d576d1995c23b08ef64c3c33b7a53fa49c71092867a17149d3148af7a8e17dc4779481afe9dd54a86eeee16168dbb964e0 influxdb.initd
+5d754e3aeec912bae8f5bf2f84153d4ccc82918d9c728631e8b9ad6737fab3352af0ab63f46ac80aab6384d779bae5d321da0465f26fd8798a9694f7d79f879d influxdb.logrotate
+a06d038e44e0cbcf127e9d420efcde7fcdd5a41854e70f1dfbd0a733f6b6be001a9500e5278bfe69f0836698fd8a2d24094dd041b42057444a48e21590c330af glide.yaml
+5ceffeb1f44f6eb413edf147c729adfdc5cd82695735f8f182f8a2aa923eac345728a49ba43b5296d659c263ba5a08a47f6de114579bf94983f663948e819c40 glide.lock"
diff --git a/testing/influxdb/glide.lock b/testing/influxdb/glide.lock
new file mode 100644
index 0000000000..d04fa16777
--- /dev/null
+++ b/testing/influxdb/glide.lock
@@ -0,0 +1,60 @@
+hash: 06cd6a830ddf2e7724b97ec1b27ba4eccc6ea7175ccd994562dc1e13db52d957
+updated: 2016-12-05T20:35:15.891564468+01:00
+imports:
+- name: collectd.org
+ version: 9fc824c70f713ea0f058a07b49a4c563ef2a3b98
+ subpackages:
+ - api
+ - cdtime
+ - network
+- name: github.com/bmizerany/pat
+ version: c068ca2f0aacee5ac3681d68e4d0a003b7d1fd2c
+- name: github.com/boltdb/bolt
+ version: 5cc10bbbc5c141029940133bb33c9e969512a698
+- name: github.com/BurntSushi/toml
+ version: 99064174e013895bbd9b025c31100bd1d9b590ca
+- name: github.com/davecgh/go-spew
+ version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d
+- name: github.com/dgrijalva/jwt-go
+ version: 63734eae1ef55eaac06fdc0f312615f2e321e273
+- name: github.com/dgryski/go-bits
+ version: 2ad8d707cc05b1815ce6ff2543bb5e8d8f9298ef
+- name: github.com/dgryski/go-bitstream
+ version: 7d46cd22db7004f0cceb6f7975824b560cf0e486
+- name: github.com/gogo/protobuf
+ version: 0394392b81058a7f972029451f06e528bb18ba50
+ subpackages:
+ - proto
+- name: github.com/golang/snappy
+ version: d9eb7a3d35ec988b8585d4a0068e462c27d28380
+- name: github.com/influxdata/usage-client
+ version: 6d3895376368aa52a3a81d2a16e90f0f52371967
+ subpackages:
+ - v1
+- name: github.com/jwilder/encoding
+ version: 4dada27c33277820fe35c7ee71ed34fbc9477d00
+ subpackages:
+ - simple8b
+- name: github.com/kimor79/gollectd
+ version: 61d0deeb4ffcc167b2a1baa8efd72365692811bc
+- name: github.com/paulbellamy/ratecounter
+ version: 5a11f585a31379765c190c033b6ad39956584447
+- name: github.com/peterh/liner
+ version: 8975875355a81d612fafb9f5a6037bdcc2d9b073
+- name: github.com/rakyll/statik
+ version: 274df120e9065bdd08eb1120e0375e3dc1ae8465
+ subpackages:
+ - fs
+- name: github.com/retailnext/hllpp
+ version: 38a7bb71b483e855d35010808143beaf05b67f9d
+- name: golang.org/x/crypto
+ version: c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6
+ subpackages:
+ - bcrypt
+ - blowfish
+ - ssh/terminal
+- name: golang.org/x/sys
+ version: 478fcf54317e52ab69f40bb4c7a1520288d7f7ea
+ subpackages:
+ - unix
+testImports: []
diff --git a/testing/influxdb/glide.yaml b/testing/influxdb/glide.yaml
new file mode 100644
index 0000000000..f99161a626
--- /dev/null
+++ b/testing/influxdb/glide.yaml
@@ -0,0 +1,55 @@
+package: github.com/influxdata/influxdb
+import:
+- package: collectd.org
+ version: 9fc824c70f713ea0f058a07b49a4c563ef2a3b98
+ subpackages:
+ - api
+ - network
+- package: github.com/BurntSushi/toml
+ version: 99064174e013895bbd9b025c31100bd1d9b590ca
+- package: github.com/bmizerany/pat
+ version: c068ca2f0aacee5ac3681d68e4d0a003b7d1fd2c
+- package: github.com/boltdb/bolt
+ version: 5cc10bbbc5c141029940133bb33c9e969512a698
+- package: github.com/davecgh/go-spew
+ version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d
+- package: github.com/dgrijalva/jwt-go
+ version: 63734eae1ef55eaac06fdc0f312615f2e321e273
+- package: github.com/dgryski/go-bits
+ version: 2ad8d707cc05b1815ce6ff2543bb5e8d8f9298ef
+- package: github.com/dgryski/go-bitstream
+ version: 7d46cd22db7004f0cceb6f7975824b560cf0e486
+- package: github.com/gogo/protobuf
+ version: 0394392b81058a7f972029451f06e528bb18ba50
+ subpackages:
+ - proto
+- package: github.com/golang/snappy
+ version: d9eb7a3d35ec988b8585d4a0068e462c27d28380
+- package: github.com/influxdata/usage-client
+ version: 6d3895376368aa52a3a81d2a16e90f0f52371967
+ subpackages:
+ - v1
+- package: github.com/jwilder/encoding
+ version: 4dada27c33277820fe35c7ee71ed34fbc9477d00
+ subpackages:
+ - simple8b
+- package: github.com/kimor79/gollectd
+ version: 61d0deeb4ffcc167b2a1baa8efd72365692811bc
+- package: github.com/paulbellamy/ratecounter
+ version: 5a11f585a31379765c190c033b6ad39956584447
+- package: github.com/peterh/liner
+ version: 8975875355a81d612fafb9f5a6037bdcc2d9b073
+- package: github.com/rakyll/statik
+ version: 274df120e9065bdd08eb1120e0375e3dc1ae8465
+ subpackages:
+ - fs
+- package: github.com/retailnext/hllpp
+ version: 38a7bb71b483e855d35010808143beaf05b67f9d
+- package: golang.org/x/crypto
+ version: c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6
+ subpackages:
+ - bcrypt
+ - ssh/terminal
+- package: golang.org/x/sys
+ subpackages:
+ - unix
diff --git a/testing/influxdb/influxdb.initd b/testing/influxdb/influxdb.initd
new file mode 100644
index 0000000000..491e97d308
--- /dev/null
+++ b/testing/influxdb/influxdb.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+
+pidfile=/run/influxdb.pid
+start_stop_daemon_args="--user influxdb --stderr /var/log/influxdb/influxdb.log"
+command=/usr/sbin/influxd
+command_args="${EXTRA_OPTS}"
+command_background="yes"
+
+depend() {
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath -d -o influxdb:influxdb -m755 /var/lib/influxdb /var/log/influxdb
+}
diff --git a/testing/influxdb/influxdb.logrotate b/testing/influxdb/influxdb.logrotate
new file mode 100644
index 0000000000..e4a3d27580
--- /dev/null
+++ b/testing/influxdb/influxdb.logrotate
@@ -0,0 +1,8 @@
+/var/log/influxdb/influxdb.log {
+ daily
+ missingok
+ copytruncate
+ rotate 7
+ compress
+ notifempty
+}
diff --git a/testing/influxdb/influxdb.pre-install b/testing/influxdb/influxdb.pre-install
new file mode 100644
index 0000000000..3fbf12b1d4
--- /dev/null
+++ b/testing/influxdb/influxdb.pre-install
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+username=influxdb
+groupname="$username"
+
+addgroup -S "$groupname" 2>/dev/null
+adduser -S -D -H -h /var/lib/"$username" -s /sbin/nologin -G "$groupname" \
+ -g "$groupname" "$username" 2>/dev/null
+
+exit 0