aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Daudt <kdaudt@alpinelinux.org>2020-06-14 15:42:02 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2020-06-14 19:07:49 +0000
commitc54681c22b965c39040adb88c009576b289fdbcc (patch)
tree0b5cb3dc77bd6f464740836224609b1d42400691
parent0f1232ae4d6cfeb201972ec7f78bff18026fd66e (diff)
downloadaports-c54681c22b965c39040adb88c009576b289fdbcc.tar.gz
aports-c54681c22b965c39040adb88c009576b289fdbcc.tar.bz2
aports-c54681c22b965c39040adb88c009576b289fdbcc.tar.xz
testing/zabbix-agent2-alpine: new aport
-rw-r--r--testing/zabbix-agent2-alpine/APKBUILD51
-rw-r--r--testing/zabbix-agent2-alpine/enable-plugins.patch12
-rw-r--r--testing/zabbix-agent2-alpine/zabbix-agent2.initd9
-rw-r--r--testing/zabbix-agent2-alpine/zabbix_agent2.conf8
4 files changed, 80 insertions, 0 deletions
diff --git a/testing/zabbix-agent2-alpine/APKBUILD b/testing/zabbix-agent2-alpine/APKBUILD
new file mode 100644
index 0000000000..d3db2a0525
--- /dev/null
+++ b/testing/zabbix-agent2-alpine/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
+# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
+pkgname=zabbix-agent2-alpine
+pkgver=5.0.1
+pkgrel=0
+_plugins_version=0.2
+pkgdesc="Zabbix Agent2 with additional plugins"
+url="https://gitlab.alpinelinux.org/alpine/infra/infra-packages/-/tree/master/infra/zabbix-agent2-alpine"
+arch="all"
+license="GPL-2.0-or-later"
+makedepends="go autoconf automake pcre-dev zlib-dev"
+options="!check" # no test suite
+subpackages="$pkgname-openrc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/zabbix/zabbix/archive/$pkgver.tar.gz
+ https://gitlab.alpinelinux.org/alpine/infra/zabbix-agent2-plugins/-/archive/v$_plugins_version/zabbix-agent2-plugins-v$_plugins_version.tar.gz
+ zabbix-agent2.initd
+ zabbix_agent2.conf
+ enable-plugins.patch
+ "
+builddir="$srcdir/zabbix-$pkgver"
+
+prepare() {
+ default_prepare
+ ./bootstrap.sh
+
+ cp -r "$srcdir"/zabbix-agent2-plugins-v$_plugins_version/plugins/* \
+ "$builddir"/src/go/plugins/
+}
+
+build() {
+ ./configure \
+ --sysconfdir=/etc/zabbix \
+ --mandir=/usr/share/man \
+ --enable-agent2 \
+ --enable-static
+ make
+}
+
+package() {
+ install -Dm0755 src/go/bin/zabbix_agent2 $pkgdir/usr/sbin/zabbix_agent2
+ install -Dm0755 $srcdir/zabbix-agent2.initd $pkgdir/etc/init.d/zabbix-agent2
+ install -dm0755 $pkgdir/etc/zabbix/agent2.conf.d/
+
+ install -Dm0644 $srcdir/zabbix_agent2.conf $pkgdir/etc/zabbix/zabbix_agent2.conf
+}
+
+sha512sums="831920f49c9d8f6d1e0da7be82a2cca2007558ea73e35584939e77a1a9f517c4e5154676afff53f31d13f887d6369add960192bbdbdb40b7b56218a907528d66 zabbix-agent2-alpine-5.0.1.tar.gz
+1270b0d4166aba0e199ea66ed870eafc1fb65ed2c49317e35567504ad651ea294849656ea0b98172b896a91eeb5c87c692217a986e6bc6ed896498e7c7776197 zabbix-agent2-plugins-v0.2.tar.gz
+177fafc9534a1107f91b428ddf2655e0ef617c417189afa40e3bb34b1e8492dafd53db5845fd97096b90b846da2cc27775d1bea942b0f6f8275de49778b8c154 zabbix-agent2.initd
+a5668a01ef840f63516b86976f27906f1e4689fb7c1fd0864ce82028d2405fc6a5ba3b9d1bfa2828343935cbeb5fd9c6c7aba4bf1a00e3e301b12199ea61bd13 zabbix_agent2.conf
+fb5b237edd229c6300867084810c9bb051e9c7ee09fc4499837d8be9f99678549de757cf2c5dbecf513322e4705e7ea2be8e4f4965fded3d09a10a69ec17b37e enable-plugins.patch"
diff --git a/testing/zabbix-agent2-alpine/enable-plugins.patch b/testing/zabbix-agent2-alpine/enable-plugins.patch
new file mode 100644
index 0000000000..336483814c
--- /dev/null
+++ b/testing/zabbix-agent2-alpine/enable-plugins.patch
@@ -0,0 +1,12 @@
+This makes the go agent aware of the added plugins
+
+diff --git a/src/go/plugins/plugins_linux.go b/src/go/plugins/plugins_linux.go
+index 714f783..7a57116 100644
+--- a/src/go/plugins/plugins_linux.go
++++ b/src/go/plugins/plugins_linux.go
+@@ -42,4 +42,5 @@ import (
+ _ "zabbix.com/plugins/zabbix/async"
+ _ "zabbix.com/plugins/zabbix/stats"
+ _ "zabbix.com/plugins/zabbix/sync"
++ _ "zabbix.com/plugins/alpine"
+ )
diff --git a/testing/zabbix-agent2-alpine/zabbix-agent2.initd b/testing/zabbix-agent2-alpine/zabbix-agent2.initd
new file mode 100644
index 0000000000..5ea926e326
--- /dev/null
+++ b/testing/zabbix-agent2-alpine/zabbix-agent2.initd
@@ -0,0 +1,9 @@
+#!/sbin/openrc-run
+
+command=/usr/sbin/zabbix_agent2
+supervisor="supervise-daemon"
+
+start_pre() {
+ checkpath --directory --owner zabbix:zabbix /run/zabbix/
+ checkpath --directory --owner zabbix:zabbix /var/log/zabbix
+}
diff --git a/testing/zabbix-agent2-alpine/zabbix_agent2.conf b/testing/zabbix-agent2-alpine/zabbix_agent2.conf
new file mode 100644
index 0000000000..a104873de2
--- /dev/null
+++ b/testing/zabbix-agent2-alpine/zabbix_agent2.conf
@@ -0,0 +1,8 @@
+DebugLevel=3
+HostnameItem=system.hostname
+LogFile=/var/log/zabbix/zabbix_agentd.log
+ControlSocket=/run/zabbix/agent2.sock
+
+DenyKey=system.run[*]
+
+Include=/etc/zabbix/agent2.conf.d/*.conf