Commit 225e2563 authored by Jakub Jirutka's avatar Jakub Jirutka
Browse files

community/collectd: split many plugins into subpackages

collectd includes dozens of plugins. I moved into subpackages all
plugins depend on any extra library (except libyajl), plugins for
programs that are not in the base Alpine installation, plugins for
monitoring hardware devices and some bigger plugins.

I also added meta-package collectd-plugins-all that can be used to
quickly install all the plugins.

This allowed to decrease the size of the collectd package from
2.2 MiB to 1.5 MiB and removed dependency on libcrypto1.1, libcurl,
and net-snmp-agent-libs.
parent 67391377
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=collectd
pkgver=5.12.0
pkgrel=1
pkgrel=2
pkgdesc="The system statistics collection daemon"
url="https://collectd.org/"
arch="all !mips !mips64 !s390x" # limited by libvirt
......@@ -42,8 +43,9 @@ subpackages="
$pkgname-libs
$pkgname-perl
$pkgname-utils
$pkgname-plugins-all:_all:noarch
"
install="$pkgname.pre-install"
install="$pkgname.pre-install $pkgname.post-upgrade"
source="https://storage.googleapis.com/collectd-tarballs/collectd-$pkgver.tar.bz2
collectd.initd
gnu_source.patch
......@@ -57,30 +59,57 @@ options="!check" # test_common fails
# <subpackage>[:<libname>...]
_plugins="
apache
apcups
ascent
battery
bind
ceph
chrony
curl:curl*
disk
dns
email
exec
hddtemp
infiniband
ipmi
iptables
log_logstash
lua
madwifi
mbmon
mcelog
memcached
mqtt
multimeter
mysql
network
nginx
olsrd
openvpn
ovs:ovs_*
pcie_errors
ping
postgresql
powerdns
python
redis
rrdtool:rrd*
sensors
snmp
serial
snmp:snmp*
statsd
sysevent
teamspeak2
ted
turbostat
virt
vserver
wireless
write_http
write_redis
write_stackdriver
zookeeper
"
for _i in $_plugins; do
subpackages="$subpackages $pkgname-${_i%%:*}:_plugin"
......@@ -141,6 +170,17 @@ utils() {
amove usr/bin/*
}
_all() {
pkgdesc="Meta package for all collectd plugins"
depends=""
local plugin; for plugin in $_plugins; do
depends="$depends $pkgname-${plugin%%:*}"
done
mkdir -p "$subpkgdir"
}
_plugin() {
local name="${subpkgname#$pkgname-}"
pkgdesc="$name pluin for collectd"
......
#!/bin/sh
ver_new="$1"
ver_old="$2"
if [ "$(apk version -t "$ver_old" '5.12.0-r2')" = '<' ]; then
cat >&2 <<-EOF
*
* Many plugins has been moved from the collectd package into subpackages.
* If collectd fails to start due to missing plugins, you have to install
* them: apk add collectd-<plugin>. Or you can install meta-package
* collectd-plugins-all if you want *all* collectd plugins.
*
EOF
fi
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment