diff options
author | Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com> | 2017-04-19 18:19:07 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-04-22 08:10:46 +0700 |
commit | b51c6fe5812025a3548702ab50e2b2d54b2c2c73 (patch) | |
tree | 905a05374e50fef9e9817363e7e66d466c380e6e /system/influxdb | |
parent | 5e4d5e3ce284370b7d949ec01e26975d30a6bfa5 (diff) |
system/influxdb: Added (An Open-Source Time Series Database).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/influxdb')
-rw-r--r-- | system/influxdb/README | 17 | ||||
-rw-r--r-- | system/influxdb/doinst.sh | 30 | ||||
-rw-r--r-- | system/influxdb/influxdb | 3 | ||||
-rw-r--r-- | system/influxdb/influxdb.SlackBuild | 115 | ||||
-rw-r--r-- | system/influxdb/influxdb.info | 10 | ||||
-rw-r--r-- | system/influxdb/slack-desc | 19 |
6 files changed, 194 insertions, 0 deletions
diff --git a/system/influxdb/README b/system/influxdb/README new file mode 100644 index 0000000000000..9200de4e1579f --- /dev/null +++ b/system/influxdb/README @@ -0,0 +1,17 @@ +influxdb (An Open-Source Time Series Database) + +InfluxDB is an open source time series database with no external dependencies. +It's useful for recording metrics, events, and performing analytics. + +It supports high write loads, large data set storage, and conserves space thru +downsampling, automatically expiring and deleting unwanted data as well as +backup and restore. InfluxDB also makes it easy to analyze data by providing an +easy-to-use SQL-like query language. + + +Groupname and Username + +You must have the "influxdb" group and user to run this script, for example: + + groupadd -g 348 influxdb + useradd -u 348 -s /bin/false -d /var/lib/influxdb influxdb diff --git a/system/influxdb/doinst.sh b/system/influxdb/doinst.sh new file mode 100644 index 0000000000000..7df18d0fee32d --- /dev/null +++ b/system/influxdb/doinst.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +config() { + NEW="$1" + OLD="`dirname $NEW`/`basename $NEW .new`" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +config etc/influxdb/influxdb.conf.new +config etc/logrotate.d/influxdb.new +config etc/default/influxdb.new + +preserve_perms etc/rc.d/rc.influxdb.new diff --git a/system/influxdb/influxdb b/system/influxdb/influxdb new file mode 100644 index 0000000000000..73e4287d702e7 --- /dev/null +++ b/system/influxdb/influxdb @@ -0,0 +1,3 @@ +# InfluxDB options + +INFLUXD_OPTS="" diff --git a/system/influxdb/influxdb.SlackBuild b/system/influxdb/influxdb.SlackBuild new file mode 100644 index 0000000000000..bc795d028b1f1 --- /dev/null +++ b/system/influxdb/influxdb.SlackBuild @@ -0,0 +1,115 @@ +#!/bin/sh + +# Slackware build script for InfluxDB + +# Copyright 2017 Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=influxdb +VERSION=${VERSION:-1.2.2} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +UIDGID=348 +if ! grep -q ^${PRGNAM}: /etc/group; then + echo " You must have the \"$PRGNAM\" group to run this script." + echo " # groupadd -g $UIDGID $PRGNAM" + exit 1 +elif ! grep -q ^${PRGNAM}: /etc/passwd; then + echo " You must have the \"$PRGNAM\" user to run this script." + echo " # useradd -u $UIDGID -s /bin/false -d /var/lib/$PRGNAM $PRGNAM" + exit 1 +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "x86_64" ]; then + PKG_ARCH=amd64 +elif [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then + PKG_ARCH=i386 +else + echo "$ARCH is not supported." + exit 1 +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-${VERSION}* +tar xvf $CWD/$PRGNAM-${VERSION}_linux_${PKG_ARCH}.tar.gz +cd $PRGNAM-${VERSION}* +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +cp -a . $PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/etc/rc.d +mv $PKG/usr/lib/influxdb/scripts/init.sh $PKG/etc/rc.d/rc.influxdb.new +rm -rf $PKG/usr/lib + +mv $PKG/usr/share/man $PKG/usr/man +rmdir $PKG/usr/share +find $PKG/usr/man -type f -exec gzip -q -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mv $PKG/etc/influxdb/influxdb.conf $PKG/etc/influxdb/influxdb.conf.new +mv $PKG/etc/logrotate.d/influxdb $PKG/etc/logrotate.d/influxdb.new +mkdir -p $PKG/etc/default +cat $CWD/influxdb > $PKG/etc/default/influxdb.new + +chown influxdb:influxdb $PKG/var/lib/influxdb +chmod 0750 $PKG/var/lib/influxdb + +chown influxdb:influxdb $PKG/var/log/influxdb +chmod 0755 $PKG/var/log/influxdb + +mkdir -p $PKG/var/run/influxdb +chown influxdb:influxdb $PKG/var/run/influxdb +chmod 0750 $PKG/var/run/influxdb + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/influxdb/influxdb.info b/system/influxdb/influxdb.info new file mode 100644 index 0000000000000..d54db030c3d95 --- /dev/null +++ b/system/influxdb/influxdb.info @@ -0,0 +1,10 @@ +PRGNAM="influxdb" +VERSION="1.2.2" +HOMEPAGE="https://www.influxdata.com" +DOWNLOAD="https://dl.influxdata.com/influxdb/releases/influxdb-1.2.2_linux_i386.tar.gz" +MD5SUM="07451ddb87e5251eb74bf0f386561e36" +DOWNLOAD_x86_64="https://dl.influxdata.com/influxdb/releases/influxdb-1.2.2_linux_amd64.tar.gz" +MD5SUM_x86_64="60586f50d81e186f84d969b6caa81690" +REQUIRES="" +MAINTAINER="Giuseppe Di Terlizzi" +EMAIL="giuseppe.diterlizzi@gmail.com" diff --git a/system/influxdb/slack-desc b/system/influxdb/slack-desc new file mode 100644 index 0000000000000..e07a5c3db3469 --- /dev/null +++ b/system/influxdb/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +influxdb: influxdb (An Open-Source Time Series Database) +influxdb: +influxdb: InfluxDB is an open source time series database with no external +influxdb: dependencies. It's useful for recording metrics, events, and +influxdb: performing analytics. +influxdb: +influxdb: +influxdb: +influxdb: +influxdb: Home-Page: https://www.influxdata.com/ +influxdb: |