diff options
author | Tom Wijsman <tomwij@gentoo.org> | 2013-08-22 09:43:03 +0000 |
---|---|---|
committer | Tom Wijsman <tomwij@gentoo.org> | 2013-08-22 09:43:03 +0000 |
commit | 0077489679f0302ba5540efa8c8573b91c1f377b (patch) | |
tree | 07628fea2bc57459d9e546bfc8fb432971bb24c0 /app-admin/collectd | |
parent | Add missing inherit to systemd eclass (diff) | |
download | historical-0077489679f0302ba5540efa8c8573b91c1f377b.tar.gz historical-0077489679f0302ba5540efa8c8573b91c1f377b.tar.bz2 historical-0077489679f0302ba5540efa8c8573b91c1f377b.zip |
EAPI 5. Version bump to 5.4.0. Added cgroups, lvm and statsd plugins; amongst other fixes. Proxied commit for Johan Bergström, fixes bug #482070.
Package-Manager: portage-2.2.0/cvs/Linux x86_64
Manifest-Sign-Key: 0x6D34E57D
Diffstat (limited to 'app-admin/collectd')
-rw-r--r-- | app-admin/collectd/ChangeLog | 9 | ||||
-rw-r--r-- | app-admin/collectd/Manifest | 30 | ||||
-rw-r--r-- | app-admin/collectd/collectd-5.4.0.ebuild | 371 | ||||
-rw-r--r-- | app-admin/collectd/metadata.xml | 3 |
4 files changed, 394 insertions, 19 deletions
diff --git a/app-admin/collectd/ChangeLog b/app-admin/collectd/ChangeLog index 626448e5b4fe..8ed91c501984 100644 --- a/app-admin/collectd/ChangeLog +++ b/app-admin/collectd/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-admin/collectd # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/ChangeLog,v 1.53 2013/05/12 10:34:14 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/ChangeLog,v 1.54 2013/08/22 09:42:58 tomwij Exp $ + +*collectd-5.4.0 (22 Aug 2013) + + 22 Aug 2013; Tom Wijsman <TomWij@gentoo.org> +collectd-5.4.0.ebuild, + metadata.xml: + EAPI 5. Version bump to 5.4.0. Added cgroups, lvm and statsd plugins; amongst + other fixes. Proxied commit for Johan Bergström, fixes bug #482070. *collectd-5.2.2 (12 May 2013) diff --git a/app-admin/collectd/Manifest b/app-admin/collectd/Manifest index 887f4f4451a6..c313cf288b70 100644 --- a/app-admin/collectd/Manifest +++ b/app-admin/collectd/Manifest @@ -23,6 +23,7 @@ DIST collectd-5.2.0.tar.bz2 1391762 SHA256 3f8dd235b8e2493a4ad558e3cd15b89007a0d DIST collectd-5.2.1.tar.bz2 1395740 SHA256 d82a5c302d2cfa0c3f7a3c7b7e37fb3faf42b17d2addae036cb819b6b25b9d98 SHA512 f97c9367ed45dc01f187ee8ec2cfdb27e26380b1369383c4d2b5569fc13ec660ffaf074a4b2929c1fb6633ad97aef87ef2fe2a633da5527bb26703f8ca625736 WHIRLPOOL 21127c27f1ac146699b4a7c355e8f60e9d78784e3f7908b7208feaaecb687c64de05f03877265f58ecc852cbad906b4acfb0026493e61372ddb03cc3419a599e DIST collectd-5.2.2.tar.bz2 1466248 SHA256 7b8906d1c8866155b31820ef108be92abcee7fcd278d386bf0d449e704ba4696 SHA512 a85b15ed824b8a0b273ad77c51c118c270a14abb15abc0a948ed2f19374bac4ff3912faf7addce2a2ee6db971ff9da07ad3baa1c2aabd29ea2caee696a911b16 WHIRLPOOL 455e4b1caf94779794b9999e73070b04bc282d45aaec819dd8e8a57f0bcc0baa875e9f6846dc4c1fbef5979d1e607d72d273646c15b7fa8586245eedcec08b55 DIST collectd-5.3.0.tar.bz2 1501308 SHA256 5b04150f3c79f90f1a610ed22a2287ef5d8a07dcc2d0fa7a6a650edd9dc1ea01 SHA512 7d6175bb7c23839f331a8549aa74abe875acbf752b2618125a383106b692f6f5e358db11746fc4ec03a2a7418ec56a7aa1becc1b65fa8a056e0c620025d8ff97 WHIRLPOOL f6b84fe3502be198d875c23fc971d9a7fecbe2e1e280d16159bca76dcb646a8fa5cc9400724e4fff5a00f7d37cd4a7a92bbf79d0be16d6d726965333b49ffd3c +DIST collectd-5.4.0.tar.bz2 1506520 SHA256 90973894a1f10775d409fe23ce7bc4d89c1b7c6f4d9918b305d160605871923e SHA512 10de94d082e6bf2e0a8e2f0b179868c0f25b223c61cb8a5fda641d01f90d6332062459410d54d74a4d666f7149bb429976e9542dabeda988ed6772df9001b222 WHIRLPOOL 19db89217dfaf38fd358a60a64155e01bd68d4c8ca4fad13b97667eb3e4e4d8dbe4e9cae8568e970d8d6fe5e8dde960b06159b3026d1a554fad7a455f973ff0a EBUILD collectd-5.1.0-r1.ebuild 13039 SHA256 79521d9f28c13621de895bd9c4dd9c0f9011d132c50c0333caefd69dfd1dda58 SHA512 8000c771e827fb23aafa4af402e713b17a537cb5dac17f5423cceed3da27da53f6d80aae0c9cff3c29102bfbedc4282db0a7d6ed6627371f717276a3e1b9c548 WHIRLPOOL df9aef6f32f53c6a2e838d446e17f41e99349533d6a7aaa2bc1b7ab061ae51ad31d5d41d45aa11c328a18ec964542d61e9c350c63439c9c6bf61b0e6a2710e74 EBUILD collectd-5.1.0-r2.ebuild 13143 SHA256 0edea50f8894b2735858679655d83c2e68611d17757f598051da5f1b82c167c9 SHA512 a099084e14dadc7948206cfd524c75d13007cb526fff85551438f5f5554427e79367d6e8aaaeb7c82623ded288de5a3e7067caea4242eab3a79f998aab4b2697 WHIRLPOOL 54d377f35bcaf1d99d2bbf28fe5c6ace98cae4a24c39a040e82695510bf48c8d0fe6bd46d4674d45d1eb903ec47123001b845e8f157f8e96c7fc4d554e40872f EBUILD collectd-5.1.1-r1.ebuild 12876 SHA256 5521c0397620811aae33cab7fac41574d29559149cd13388adaf6aec3e2b85ba SHA512 028edcb6698c42f9518d021b8a87ea6d632aeb64d11b6627f98a07b66d63ced7a1d512ccf1478b7e8b73bc752cd36a8921b3d1f6dacd88f45e83239ba34d1b75 WHIRLPOOL 29bf5c2267e5ca8ed996a2f37f56065be24556270218cd342568d8dbd86a418d9f58dd26a032f2ea152e427ab3c48193722fa90e9a96a6dac99a3c9dd3a27c93 @@ -32,24 +33,17 @@ EBUILD collectd-5.2.0.ebuild 12836 SHA256 0bfb51dc839796b5e32f45611109a12da3f523 EBUILD collectd-5.2.1.ebuild 13115 SHA256 2edd8f6191e72f6cd758e355e6541f6e0cc6c117dc7bb61379250bfb102c00e3 SHA512 6bca239875017c5008fda580a58546152f54af5577a10a1f1e749dec0081b465c46beaff285f13c67e26a5db55fba9dadb7bd3fab01eec7723cc7bd28f8af119 WHIRLPOOL e3018fcd4b14ace3c582572e95fb39712a2697321708d3c0e85140fc12d654efb9bf9e13e018159552b81337c1fa42504df28de408ac6ef64c6179bb1f9beed4 EBUILD collectd-5.2.2.ebuild 13115 SHA256 39cac44939fcbc02b952f2ac12c86c30596f0bb17c255ebaed3e009937b4c7ac SHA512 aa2a28783c703b24cedde8b39f8fb0a2d79c7bb7d79b227e0e54205d630adaac26ca64c2ff511fac41c71f26d3726f96e7ceede1a58b569c8c1be3f2256af540 WHIRLPOOL 4efe6734d1b2bfe2291fae9f7dd3f94245b8708f7f054fe2c8a791895c709f21f1537de8efd8ebc5b055c4259f0c3f26ce1f2e9606fd265436a6a40be7b86c84 EBUILD collectd-5.3.0.ebuild 13165 SHA256 89eefa9b8458f6c21e186de9331919b992a08cdd0e406bd296b89d9f31b19d56 SHA512 8552f5247db92ce19cbce15a82c3656fbef46e3d2c21207389a465609376520b1b11f72324953be0b08ae42fdc85c2cdffa52c6099dbddac322e08e1c378cea5 WHIRLPOOL af3ca68d008ccde70b43602cb1cd01d8d7039eb34aa78663ca8694f859ad0920f2913ff05518a24c9ec60684f7c47122d2813cef0624ba12cc637ef5f6c4ac89 -MISC ChangeLog 10737 SHA256 b266de89576cfbd10927971daa2de9462fe27f7d0461cc3b7d69751001342a75 SHA512 a44e6fd9d6c7cc1b78e1007294fff0aa0b5eb8be63cd1ccaec89b0c49fc94326fcb0880b740f404cfc64a1f1f50bc14cf5ca9e0c0862bd17cc062e50b7b7a46d WHIRLPOOL 2811376f3d667aa757c338db9a4d122b7bd79e3968be4d20736d4923aa6649750ba6d871c95e1c5d2f94efe4d7deb70bd40c2006186f3199dcfb726315cc8de8 -MISC metadata.xml 13197 SHA256 9bb892b004ad111ce67d23e5c1cc6bcddfd4152f9a62550c878be361a1c2b268 SHA512 80f2ef5ef1ef267546f4cb040bf79d67a77daeee2dd52e79f38c942da29f9e1250ff8437238ce38bb4a1720d8baa48d78f971dcbc97fed17a141d3a60bc21d1c WHIRLPOOL 06add4b9db1ddd13b91f34501dde92e999eaae9439cc3708723125c54d4e055e141d256c28513e66e58d187a1d51dbfb4ad8bcfd1567d74428c515553ebc92ef +EBUILD collectd-5.4.0.ebuild 13234 SHA256 91134ba00fee63a4b7b5d773f33d5b02323d443eecd798e2821e3d3009ea4bde SHA512 c9a5999ac73dd56ad90e15c096e9efb5474459cb1e2aa6b1a243fc266aea61aa3fbcf76772effa31e5097a2b1644be50ea23290797528cd08efd6181531b6559 WHIRLPOOL c13dccab3def73e30ec08e6bc7003edb78cd4c61f2606658eded6e397937eb6da198bbe1587aa884bfd9cba2e66d7644e85a203d845b80e8aa673b89f35cc162 +MISC ChangeLog 11005 SHA256 a37520d9dae8e4d902e332613c5159ea53fe11cfbd1fe78e1a2403277e1f92ba SHA512 e24d9ad6746713d73f479d1892a672c2e050c1cfc6171df28b773aa6210ab62fd5a9d0af18587b597a5eaf07512ec67eb553a2d2257f475a0d5ff9c4d40c5943 WHIRLPOOL a908884fc64208de5d1044535da1b669aa2db1cd9ea413f70e73c26e2fab2e2c99bc90d6cabade494b3ade6f27281ce72a24f699319c8e88cbacbd042c1fec97 +MISC metadata.xml 13489 SHA256 81de8a64ff73bf93b53bd8f8dbbffa350a4ce29be3f398a5ae0dc4e5bb631421 SHA512 9ee82a3ae16ee851d22b9843793b976851fc9beb98a1a98645a0af8e2fa7957258e4462dc3a4f41d96091ffea43e489b6884293d1e4f3f851e9d53d80cf0c097 WHIRLPOOL 82a3c44d991e4d625bac58636f9a6ba53095f25ec6125bc89e82812844c98fbc484aa35bcbc591dbd4a1eed573730057da92ac49e0c18e3c1f9ba2f46aca4d20 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.19 (GNU/Linux) +Version: GnuPG v2.0.21 (GNU/Linux) -iQJ8BAEBCABmBQJRj3AnXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w -ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNTVDNDczOUYzRjJEMTRGNDRGMzU2RkMw -OUJGNEY1NEMyQkE3RjNDAAoJEAm/T1TCun88MS4QALeuwA5eiLvILp7nFNTciYcW -Wu0JbYYYt+uRWjLjsLH6PjDBn7Da9MPQZEiwlZknboDEh2V6E4L5ZlgM/WyvEMGS -pjBymvIgcGWxeArujDGacDdkm9RGENgE6RvJzA7jAOdoD0djgWMFRdkqlzbi6B2G -eAjAn74tW7R4f8j64KU7MlGsfXEiXuIXcjCEbZVI6eHiJ1fhClKAQvlXFDTNWbQp -ZrFdnedxnCgB0L8HNxKnD3PVWH8fJQR4BVhKvnEdFy8F9CXw9/HuS3nDTvJKb7ZG -VrQZkfEZSNG7SnOp6ajDqRfQ2rQEw+WUYzRPV4+6NNpyQU3HFmzlJTpA/vIJbSpv -TWyva98029EtWfU8aJmMf01kumatV8Vp8zt3UpWPviQPPCJcKcKUmCaKtVFODH3m -RNwEgnFv1vIXlFBa0ndCewdToCQrH3lfncWE+Ea6rvIiZhPOXr9qvIvrCCyqOabG -yPdj9hOZrlLuP9I1Qlmqz+aAOjWsoDai5rXER4H1dtPFXDZrmEr2ZJ6Yb7DUirFd -k5s34NBhf7EP+ZuPjv93y4ggG540/Zf7gsJzQ4QRhVZ5aCENUq/RJtpz350HhawS -6qtbaUKBxiSpyTgHD7Zr7axfukAPzWNVCRjBSnyCvmSGBadN4IOrx7g9x9JkMdNX -DHhTfIFCVjN3o//Ytcda -=5tBW +iQEcBAEBCAAGBQJSFd0mAAoJEJWyH81tNOV9r5MH/1TSDoG8lo6GXlLj9xicXTvM +a4ICdwahSE3icWTXpWpsYNoUElERg+P0S8j1Ji6zy4un1gAkptUXSJ+stDg/dRJC +eRnWvNHyVU8EUrFv7zzpFyimc+ovPYk1OmnDZwQ2E+f65jmkm672kM89YBHxo/47 +70QY4dXmkXOa2MQ+WMTxPmEdBhBJYvyvilX6yJ4qFY86WdigkCwA+qgW9AxVlZRF +bb2eV+ylprsht7F/a2eRWhItZkVoGS18LjSHrfjtiQ5Jy53lX4YByhza077YALBY +2aiNCLBt7x0vGM8aKUSxTC8yUQSzJf2cG7BZRLhvR1RKO7Nmx1sR92/XXCyTIto= +=/jsX -----END PGP SIGNATURE----- diff --git a/app-admin/collectd/collectd-5.4.0.ebuild b/app-admin/collectd/collectd-5.4.0.ebuild new file mode 100644 index 000000000000..8591cb3b04e6 --- /dev/null +++ b/app-admin/collectd/collectd-5.4.0.ebuild @@ -0,0 +1,371 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/collectd-5.4.0.ebuild,v 1.1 2013/08/22 09:42:58 tomwij Exp $ + +EAPI="5" + +inherit autotools base eutils linux-info multilib perl-app systemd user + +DESCRIPTION="A a daemon which collects system statistic and provides mechanisms to store the values" + +HOMEPAGE="http://collectd.org" +SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin perl static-libs" + +# The plugin lists have to follow here since they extend IUSE + +# Plugins that to my knowledge cannot be supported (eg. dependencies not in gentoo) +COLLECTD_IMPOSSIBLE_PLUGINS="aquaero mic netapp pinba sigrok xmms" + +# Plugins that still need some work +COLLECTD_UNTESTED_PLUGINS="amqp apple_sensors genericjmx ipvs lpar modbus redis + tape write_redis zfs_arc" + +# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS +COLLECTD_TESTED_PLUGINS="aggregation apache apcups ascent battery bind cgroups + conntrack contextswitch cpu cpufreq csv curl curl_json curl_xml dbi df disk dns + email entropy ethstat exec filecount fscache gmond hddtemp interface ipmi + iptables irq java libvirt load logfile lvm madwifi match_empty_counter + match_hashed match_regex match_timediff match_value mbmon md memcachec memcached + memory multimeter mysql netlink network network nfs nginx notify_desktop + notify_email ntpd numa nut olsrd onewire openvpn oracle perl perl ping postgresql + powerdns processes protocols python python routeros rrdcached rrdcached rrdtool + sensors serial snmp statsd swap syslog table tail target_notification + target_replace target_scale target_set tcpconns teamspeak2 ted thermal threshold + tokyotyrant unixsock uptime users uuid varnish vmem vserver wireless + write_graphite write_http write_mongodb" + +COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}" + +COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} + +for plugin in ${COLLECTD_ALL_PLUGINS}; do + IUSE="${IUSE} collectd_plugins_${plugin}" +done +unset plugin + +# Now come the dependencies. + +COMMON_DEPEND=" + dev-libs/libgcrypt + sys-devel/libtool + perl? ( dev-lang/perl[ithreads] ( || ( sys-devel/libperl[ithreads] >=sys-devel/libperl-5.10 ) ) ) + collectd_plugins_apache? ( net-misc/curl ) + collectd_plugins_ascent? ( net-misc/curl dev-libs/libxml2 ) + collectd_plugins_bind? ( dev-libs/libxml2 ) + collectd_plugins_curl? ( net-misc/curl ) + collectd_plugins_curl_json? ( net-misc/curl dev-libs/yajl ) + collectd_plugins_curl_xml? ( net-misc/curl dev-libs/libxml2 ) + collectd_plugins_dbi? ( dev-db/libdbi ) + collectd_plugins_dns? ( net-libs/libpcap ) + collectd_plugins_gmond? ( sys-cluster/ganglia ) + collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) + collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.13 ) + collectd_plugins_java? ( virtual/jre dev-java/java-config-wrapper ) + collectd_plugins_libvirt? ( app-emulation/libvirt dev-libs/libxml2 ) + collectd_plugins_lvm? ( sys-fs/lvm2 ) + collectd_plugins_memcachec? ( dev-libs/libmemcached ) + collectd_plugins_mysql? ( >=virtual/mysql-5.0 ) + collectd_plugins_netlink? ( net-libs/libmnl ) + collectd_plugins_nginx? ( net-misc/curl ) + collectd_plugins_notify_desktop? ( x11-libs/libnotify ) + collectd_plugins_notify_email? ( net-libs/libesmtp dev-libs/openssl ) + collectd_plugins_nut? ( sys-power/nut ) + collectd_plugins_onewire? ( sys-fs/owfs ) + collectd_plugins_oracle? ( dev-db/oracle-instantclient-basic ) + collectd_plugins_perl? ( dev-lang/perl[ithreads] ( || ( sys-devel/libperl[ithreads] >=sys-devel/libperl-5.10 ) ) ) + collectd_plugins_ping? ( net-libs/liboping ) + collectd_plugins_postgresql? ( dev-db/postgresql-base ) + collectd_plugins_python? ( =dev-lang/python-2* ) + collectd_plugins_routeros? ( net-libs/librouteros ) + collectd_plugins_rrdcached? ( net-analyzer/rrdtool ) + collectd_plugins_rrdtool? ( net-analyzer/rrdtool ) + collectd_plugins_sensors? ( sys-apps/lm_sensors ) + collectd_plugins_snmp? ( net-analyzer/net-snmp ) + collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant ) + collectd_plugins_varnish? ( www-servers/varnish ) + collectd_plugins_write_http? ( net-misc/curl ) + collectd_plugins_write_mongodb? ( dev-libs/mongo-c-driver ) + + kernel_FreeBSD? ( + collectd_plugins_disk? ( sys-libs/libstatgrab ) + collectd_plugins_interface? ( sys-libs/libstatgrab ) + collectd_plugins_load? ( sys-libs/libstatgrab ) + collectd_plugins_memory? ( sys-libs/libstatgrab ) + collectd_plugins_swap? ( sys-libs/libstatgrab ) + collectd_plugins_users? ( sys-libs/libstatgrab ) + )" + +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + kernel_linux? ( + collectd_plugins_vserver? ( sys-kernel/vserver-sources ) + )" + +RDEPEND="${COMMON_DEPEND} + collectd_plugins_syslog? ( virtual/logger )" + +PATCHES=( + "${FILESDIR}/${PN}-4.10.2"-{libocci,nohal}.patch + "${FILESDIR}/${PN}-4.10.3"-werror.patch + "${FILESDIR}/${PN}-5.1.0"-libperl.patch + "${FILESDIR}/${PN}-5.1.1"-lt.patch +) + +# @FUNCTION: collectd_plugin_kernel_linux +# @DESCRIPTION: +# USAGE: <plug-in name> <kernel_options> <severity> +# kernel_options is a list of kernel configurations options; the check tests whether at least +# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message +# is emitted. +collectd_plugin_kernel_linux() { + local multi_opt opt + if has ${1} ${COLLECTD_ALL_PLUGINS}; then + if use collectd_plugins_${1}; then + for opt in ${2}; do + if linux_chkconfig_present ${opt}; then return 0; fi + done + multi_opt=${2//\ /\ or\ } + case ${3} in + (info) + elog "The ${1} plug-in can use kernel features that are disabled now; enable ${multi_opt} in your kernel" + ;; + (warn) + ewarn "The ${1} plug-in uses kernel features that are disabled now; enable ${multi_opt} in your kernel" + ;; + (error) + eerror "The ${1} plug-in needs kernel features that are disabled now; enable ${multi_opt} in your kernel" + ;; + (*) + die "function collectd_plugin_kernel_linux called with invalid third argument" + ;; + esac + fi + fi +} + +collectd_linux_kernel_checks() { + linux-info_pkg_setup + + # battery.c:/proc/pmu/battery_%i + # battery.c:/proc/acpi/battery + collectd_plugin_kernel_linux battery ACPI_BATTERY warn + + # cgroups.c:/sys/fs/cgroup/ + collectd_plugin_kernel_linux cgroups CONFIG_CGROUPS warn + + # cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/ + collectd_plugin_kernel_linux cpufreq SYSFS warn + collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn + + # nfs.c:/proc/net/rpc/nfs + # nfs.c:/proc/net/rpc/nfsd + collectd_plugin_kernel_linux nfs NFS_COMMON warn + + # serial.c:/proc/tty/driver/serial + # serial.c:/proc/tty/driver/ttyS + collectd_plugin_kernel_linux serial SERIAL_CORE warn + + # swap.c:/proc/meminfo + collectd_plugin_kernel_linux swap SWAP warn + + # thermal.c:/proc/acpi/thermal_zone + # thermal.c:/sys/class/thermal + collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn + collectd_plugin_kernel_linux thermal ACPI_THERMAL warn + + # vmem.c:/proc/vmstat + collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn + + # uuid.c:/sys/hypervisor/uuid + collectd_plugin_kernel_linux uuid SYSFS info + + # wireless.c:/proc/net/wireless + collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn +} + +pkg_setup() { + if use kernel_linux; then + if linux_config_exists; then + einfo "Checking your linux kernel configuration:" + collectd_linux_kernel_checks + else + elog "Cannot find a linux kernel configuration. Continuing anyway." + fi + fi + + enewgroup collectd + enewuser collectd -1 -1 /var/lib/collectd collectd +} + +src_prepare() { + base_src_prepare + + # There's some strange prefix handling in the default config file, resulting in + # paths like "/usr/var/..." + sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die + + sed -i -e "s:/etc/collectd/collectd.conf:/etc/collectd.conf:g" contrib/collectd.service || die + + # fix installdirs for perl, bug 444360 + sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die + + rm -r libltdl || die + + eautoreconf +} + +src_configure() { + # Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here + # should work independent of the operating system. + + local linux_plugins="battery cpu cpufreq disk entropy ethstat interface iptables ipvs irq load + memory md netlink nfs numa processes serial swap tcpconns thermal users vmem vserver + wireless" + + local libstatgrab_plugins="cpu disk interface load memory swap users" + local bsd_plugins="cpu tcpconns ${libstatgrab_plugins}" + + local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" + + local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" + local myos_plugins="" + if use kernel_linux; then + einfo "Enabling Linux plugins." + myos_plugins=${linux_plugins} + elif use kernel_FreeBSD; then + einfo "Enabling FreeBSD plugins." + myos_plugins=${bsd_plugins} + elif use kernel_Darwin; then + einfo "Enabling Darwin plugins." + myos_plugins=${darwin_plugins} + fi + + # Do we debug? + local myconf="$(use_enable debug)" + + local plugin + + # Disable what needs to be disabled. + for plugin in ${COLLECTD_DISABLED_PLUGINS}; do + myconf+=" --disable-${plugin}" + done + + # Set enable/disable for each single plugin. + for plugin in ${COLLECTD_ALL_PLUGINS}; do + if has ${plugin} ${osdependent_plugins}; then + # plugin is os-dependent ... + if has ${plugin} ${myos_plugins}; then + # ... and available in this os + myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" + else + # ... and NOT available in this os + if use collectd_plugins_${plugin}; then + ewarn "You try to enable the ${plugin} plugin, but it is not available for this" + ewarn "kernel. Disabling it automatically." + fi + myconf+=" --disable-${plugin}" + fi + elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then + if use collectd_plugins_perl && ! use perl; then + ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag" + myconf+= --disable-perl + else + myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" + fi + else + myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" + fi + done + + # Need JAVA_HOME for java. + if use collectd_plugins_java; then + myconf+=" --with-java=$(java-config -g JAVA_HOME)" + fi + + # Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. + if ! use collectd_plugins_iptables; then + myconf+=" --with-libiptc=no" + fi + + if use perl; then + myconf+=" --with-perl-bindings=INSTALLDIRS=vendor" + else + myconf+=" --without-perl-bindings" + fi + + # No need for v5upgrade + myconf+=" --disable-target_v5upgrade" + + # Finally, run econf. + KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl $(use_enable static-libs static) --localstatedir=/var ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + fixlocalpod + + find "${D}/usr/" -name "*.la" -exec rm -f {} + + + # use collectd_plugins_ping && setcap cap_net_raw+ep ${D}/usr/sbin/collectd + # we cannot do this yet + + fowners root:collectd /etc/collectd.conf + fperms u=rw,g=r,o= /etc/collectd.conf + + dodoc AUTHORS ChangeLog NEWS README TODO + + if use contrib ; then + insinto /usr/share/doc/${PF} + doins -r contrib + fi + + keepdir /var/lib/${PN} + fowners collectd:collectd /var/lib/${PN} + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + systemd_dounit "contrib/${PN}.service" + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate" collectd + + sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":PIDFile "/var/run/collectd/collectd.pid":' "${D}"/etc/collectd.conf || die + sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/var/run/collectd/collectd-unixsock":' "${D}"/etc/collectd.conf || die + sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${D}"/etc/collectd.conf || die + sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${D}"/etc/collectd.conf || die +} + +collectd_rdeps() { + if (use collectd_plugins_${1} && ! has_version "${2}"); then + elog "The ${1} plug-in needs ${2} to be installed locally or remotely to work." + fi +} + +pkg_postinst() { + collectd_rdeps apcups sys-power/apcupsd + collectd_rdeps hddtemp app-admin/hddtemp + collectd_rdeps mbmon sys-apps/xmbmon + collectd_rdeps memcached ">=net-misc/memcached-1.2.2-r2" + collectd_rdeps ntpd net-misc/ntp + collectd_rdeps openvpn ">=net-misc/openvpn-2.0.9" + collectd_rdeps write_mongodb "dev-db/mongodb" + + echo + elog "collectd is now started as unprivileged user by default." + elog "You may want to recheck the configuration." + elog + + if use collectd_plugins_email; then + ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." + fi + if use contrib; then + elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," + elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed." + fi +} diff --git a/app-admin/collectd/metadata.xml b/app-admin/collectd/metadata.xml index d113b154cc86..e3c5cb0a0345 100644 --- a/app-admin/collectd/metadata.xml +++ b/app-admin/collectd/metadata.xml @@ -15,6 +15,7 @@ <flag name='collectd_plugins_ascent'>Build the ascent input plugin (statistics about a free server for World of Warcraft)</flag> <flag name='collectd_plugins_battery'>Build the battery input plugin (charge, current and voltage of ACPI and PMU based laptop batteries)</flag> <flag name='collectd_plugins_bind'>Build the bind input plugin (name server and resolver statistics)</flag> + <flag name='collectd_plugins_cgroups'>Build the cgroups CPU accounting collection plugin</flag> <flag name='collectd_plugins_conntrack'>Build the conntrack input plugin (number of nf_conntrack entries)</flag> <flag name='collectd_plugins_contextswitch'>Build the contextswitch input plugin (number of context switches done by the operating system)</flag> <flag name='collectd_plugins_cpu'>Build the cpu input plugin (time spent in the system, user, nice, idle, and related states)</flag> @@ -43,6 +44,7 @@ <flag name='collectd_plugins_libvirt'>Build the libvirt input plugin (statistics about virtualized guests on a system)</flag> <flag name='collectd_plugins_load'>Build the load input plugin (system load)</flag> <flag name='collectd_plugins_logfile'>Build the logfile output plugin (writes log messages to a text file)</flag> + <flag name='collectd_plugins_lvm'>Build the LVM input plugin</flag> <flag name='collectd_plugins_madwifi'>Build the madwifi input plugin (information about Atheros wireless LAN chipsets)</flag> <flag name='collectd_plugins_match_empty_counter'>Build the match_empty_counter filter plugin</flag> <flag name='collectd_plugins_match_hashed'>Build the match_hashed filter plugin</flag> @@ -82,6 +84,7 @@ <flag name='collectd_plugins_sensors'>Build the sensors input plugin (uses lm-sensors to read hardware sensors)</flag> <flag name='collectd_plugins_serial'>Build the serial input plugin (collects the traffic on serial interfaces)</flag> <flag name='collectd_plugins_snmp'>Build the snmp input plugin (read values from network devices using SNMP)</flag> + <flag name='collectd_plugins_statsd'>Build the statsd input plugin (accepts statsd-type metrics from a UDP socket)</flag> <flag name='collectd_plugins_swap'>Build the swap input plugin (amount of memory currently written to swap)</flag> <flag name='collectd_plugins_syslog'>Build the syslog output plugin (receives messages from collectd and dispatches them to syslog)</flag> <flag name='collectd_plugins_table'>Build the table input plugin (parses table-like structured plain text)</flag> |