diff options
author | Steeve Chailloux <steeve@chaahk.com> | 2015-04-07 05:38:41 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-04-16 12:49:51 +0000 |
commit | 6f3e4594878b3172c2adb06841e0d16531810c30 (patch) | |
tree | a30cc7b1616b67c7ac0287a3c0d558ea16c1226e | |
parent | f0edc9c560285077fac8d300b65d65e7295ab486 (diff) | |
download | aports-6f3e4594878b3172c2adb06841e0d16531810c30.tar.bz2 aports-6f3e4594878b3172c2adb06841e0d16531810c30.tar.xz |
testing/logstash: new aport
http://logstash.net
A flexible, open source, data collection, parsing and enrichment pipeline
Signed-off-by: Leonardo Arena <rnalrd@alpinelinux.org>
-rw-r--r-- | testing/logstash/APKBUILD | 64 | ||||
-rw-r--r-- | testing/logstash/logstash.confd | 3 | ||||
-rw-r--r-- | testing/logstash/logstash.initd | 25 | ||||
-rw-r--r-- | testing/logstash/logstash.post-deinstall | 5 | ||||
-rw-r--r-- | testing/logstash/logstash.pre-install | 6 |
5 files changed, 103 insertions, 0 deletions
diff --git a/testing/logstash/APKBUILD b/testing/logstash/APKBUILD new file mode 100644 index 0000000000..ad14878083 --- /dev/null +++ b/testing/logstash/APKBUILD @@ -0,0 +1,64 @@ +# Contributor: Steeve Chailloux <steeve@chaahk.com> +# Maintainer: +pkgname=logstash +pkgver=1.4.2 +pkgrel=0 +pkgdesc="A flexible, open source, data collection, parsing and enrichment pipeline" +url="http://logstash.net" +arch="noarch" +license="apache" +depends="openjdk7-jre-base" +depends_dev="" +makedepends="$depends_dev" +install="$pkgname.pre-install $pkgname.post-deinstall" +pkgusers="logstash" +subpackages="" +source=" + https://download.elasticsearch.org/${pkgname}/${pkgname}/${pkgname}-${pkgver}.tar.gz + $pkgname.confd + $pkgname.initd + " + +_builddir="${srcdir}/${pkgname}-${pkgver}" +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + echo "Nothing to build" +} + +package() { + cd "$_builddir" + + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 + install -m644 -D "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname || return 1 + + # created the necessary dirs + install -dm755 -o logstash -g daemon "$pkgdir/usr/share/logstash" || return 1 + install -dm755 -o logstash -g daemon "$pkgdir/var/log/logstash" || return 1 + install -dm755 -o logstash -g daemon "$pkgdir/var/run/logstash" || return 1 + install -dm755 -o logstash -g daemon "$pkgdir/etc/logstash" || return 1 + + # copy files + cp -r * "$pkgdir/usr/share/logstash/" || return 1 + chown -R logstash:daemon "$pkgdir/usr/share/logstash/" || return 1 +} + +md5sums="6e6be734392e8c7d6d55e23d0bd8d2b3 logstash-1.4.2.tar.gz +27359d9e7e41af5fe4fd77998338ea1c logstash.confd +40465daf3f1bfbb160db982790bf46c9 logstash.initd" +sha256sums="d5be171af8d4ca966a0c731fc34f5deeee9d7631319e3660d1df99e43c5f8069 logstash-1.4.2.tar.gz +c9ecb570f2b33f5aededb590c65c4a9bb9b60321c1e05b9bb7b55cbde89c3cc7 logstash.confd +79bff7a11265489b36db5df9e281691cd06c26b6ec727fd898821823e52c4c4b logstash.initd" +sha512sums="6bf0527446b51582fa996ae03566487f7d3de2262cf2b88c62ba2549b00027c4cd820547afb01678def235f0c49597c2b36daf69b5f3c5eb155933ca6c2b3b7b logstash-1.4.2.tar.gz +8491786f1e8f247a4c284bb5e7c0b0c1f8332a76e61e33053e07d850975f762526a7aa7217b073f0e5c4907c1b0029bcf679c41e0b9713ce12f97b28378590df logstash.confd +49f4785ef3f3389d5d521c4e33b6ffbb29a9192a6dd52af3e62d4e71c6a18b291461e18dce3f03e67856cc4647cf64c625e330353fd1f01f9e983800352b8652 logstash.initd" diff --git a/testing/logstash/logstash.confd b/testing/logstash/logstash.confd new file mode 100644 index 0000000000..f78c45ed53 --- /dev/null +++ b/testing/logstash/logstash.confd @@ -0,0 +1,3 @@ +LS_CONF_DIR="/etc/logstash" +LS_LOG_DIR="/var/log/logstash" +LS_OPTS="-f $LS_CONF_DIR/*.conf -l $LS_LOG_DIR/logstash.log" diff --git a/testing/logstash/logstash.initd b/testing/logstash/logstash.initd new file mode 100644 index 0000000000..e7e8ed7a2c --- /dev/null +++ b/testing/logstash/logstash.initd @@ -0,0 +1,25 @@ +#!/sbin/runscript + +depends() { + needs network + provide logstash +} + +description="logstash" +command="/usr/share/logstash/bin/logstash" +pidfile="/var/run/logstash/logstash.pid" +start_stop_daemon_args="--user logstash" +command_args="${LS_OPTS}" + +start_pre() { + checkpath --owner logstash:daemon --directory ${pidfile%/*} +} + +start() { + ebegin "Starting logstash" + start-stop-daemon $start_stop_daemon_args --background --start --exec \ + $command --make-pidfile --pidfile $pidfile -- $command_args + eend $? +} + +# uses the openrc templates for start()/stop() diff --git a/testing/logstash/logstash.post-deinstall b/testing/logstash/logstash.post-deinstall new file mode 100644 index 0000000000..0a9222b093 --- /dev/null +++ b/testing/logstash/logstash.post-deinstall @@ -0,0 +1,5 @@ +#!/bin/sh + +deluser logstash 2>/dev/null + +exit 0 diff --git a/testing/logstash/logstash.pre-install b/testing/logstash/logstash.pre-install new file mode 100644 index 0000000000..056badb59d --- /dev/null +++ b/testing/logstash/logstash.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +adduser -h /usr/share/logstash -s /sbin/nologin -S -D -H -g "Logstash User" \ + -G daemon logstash 2>/dev/null + +exit 0 |