diff options
Diffstat (limited to 'app-metrics/collectd')
-rw-r--r-- | app-metrics/collectd/Manifest | 5 | ||||
-rw-r--r-- | app-metrics/collectd/collectd-5.10.0.ebuild | 2 | ||||
-rw-r--r-- | app-metrics/collectd/collectd-5.11.0-r3.ebuild (renamed from app-metrics/collectd/collectd-5.11.0-r2.ebuild) | 8 | ||||
-rw-r--r-- | app-metrics/collectd/files/collectd-5.11.0-libsigrok-0.4+.patch | 157 |
4 files changed, 166 insertions, 6 deletions
diff --git a/app-metrics/collectd/Manifest b/app-metrics/collectd/Manifest index 885cf9bb17c8..3643cba865e0 100644 --- a/app-metrics/collectd/Manifest +++ b/app-metrics/collectd/Manifest @@ -1,9 +1,10 @@ +AUX collectd-5.11.0-libsigrok-0.4+.patch 5447 BLAKE2B 6de12feb7226ae3a16a89f3282b54d363cc64e176fe4f9cc9a6bfef0874bca0447a8d21689f8d3c91b2840d12ba4abd3c6f38cfc0b4e885582cc42c81865a1f8 SHA512 a7c99664f632eaff35eef18a0bd8da5bfa39812d223eb6449acd0fa871c5d43a401ed48b1003275a2ae0362b92c69ab52b46af39fa69dd7e4cc2b2969dc4b2de AUX collectd.confd-r2 2001 BLAKE2B fbf1a64aab6ec60111553466c3a8b725200ab13d0e09c1ba1d71e68213e8f978c3cad0dfc5eb2c536ced8213f172804f0596b3494f9b42b0cacf3432105cab5a SHA512 729f2b4e06c4a8c95d32c03c6f3f292eaa4895780ace180b74fcf139a949e9c28a2b3ae823bdebec0014f9b4d919adb399bc7f019c68c0e268b263326959edb7 AUX collectd.initd-r2 1843 BLAKE2B ccb12e55de72565aa7b6bb0f2c4e7a5a6d15ff23d5bc75e9cb36e1f2dba85b3b2b587336f976059af165ae89333d681ffe0cf53bbcd8098eaeff75228cb80b68 SHA512 8f0a73f0f2b2280c0f2e35894a9dfa38af937930eb090eab52cbe81089a146bd974f6a2a3062b7147611f9c13b770a945a1a9228a026405d31578e27a3fd3b80 AUX collectd.logrotate 115 BLAKE2B ce2a79787096b04af6ecd128633dde68fb868a02cc1d246c3e512c1733133fcc8da41b3ab2a0051b4da78c53e6629b2ad8085872dec1d4c28e397c88cafe3a90 SHA512 87ec01784d415f00834c2b20614f11f7e08b70f88d7c87509a8b8fd7e1af8758565b9ed6a6840af7bf1006cb941a61a6ff4f3176f6ded722728f24483b08bc8e AUX collectd.tmpfile 39 BLAKE2B 0d1ee2f02e539e854b62b47032308d08505fa31d8428e98f8d150c924201074c5edae22eea3990edf3a7837f1473193fe009a501645bf064638c532ec53a36cc SHA512 55fb70da9ece74b143c3e971b890954842230691039f8ad2240cc4c8d699e4e7a21efcbfd0b3cb2503e90af0bbdd0c7d886e09baf9fc86ec26c115a0bce6a668 DIST collectd-5.10.0.tar.bz2 1856377 BLAKE2B d4c011c5d2d9bfcf8400a35ca92f0b8c82fd58c3201b1b57a6b48c98af63efaab03c5fb1144bae28e7661743626871eaa962959929ff7fcdd5778b72c7054c4e SHA512 1296085fb19bba0c7b7d8684ec877851158b25c9f7b58fc3ae602fba7d7dc718876e730e1cdba96d39101cc5452705bb3445aaee717b219025ae816299b6a3c5 DIST collectd-5.11.0.tar.bz2 1851663 BLAKE2B b07c727ed553b3d11967da734a98fda753794be199377b08a2780b7d3f79acef345f160d930dda68cd12aa0949bbc0aee6ca5e7ae01e16a5e392a4a73e272d1d SHA512 87671545e3d01770c204ba4439265d1c0add6a105bf04ff02dc04db3731fd933d32ecb9b0dc15f2e504d70c3e421a64cf19728c897aa4fb1fda86e393ffc15bf -EBUILD collectd-5.10.0.ebuild 19527 BLAKE2B bf575f7baf55daa3cffaa4364314173633953fc000c5e3b8e7d148dff55b1682add29042fe2e0822dc8083ebd7fa255515f3f79f3f5f841741633af224918705 SHA512 e6b7526484732b452eba2d39d23e37e97b75a077531584abd00c544f0c935e7324988a96bf991fa403dfb2b757b63dc71026f2a4d864f2abe500d95776913c5f -EBUILD collectd-5.11.0-r2.ebuild 20112 BLAKE2B 000f4fa19daedd49bad9b7505c87b18c6ef6b277503fffb0a3c7e534b077cb68a745e32220d4936241aa816b7f04f41d581b37631b55d7bca33ff5afe02e07ca SHA512 05acb7c3fb06fc0987ea64206f12cf10f336b03eb52ab646770ac945241c132fdcb52f91d1a9a94862fb13634c0fb886954ab227e1157a956138cc939f191991 +EBUILD collectd-5.10.0.ebuild 19520 BLAKE2B e646e57372302d728b631cb1ed5f72dd80bfce4ca7a205a94ce2e519331af2da6b73b510ee664370dfddb7c7844bf0e9b745f6193072d805294aca574f85c426 SHA512 a46634c0e2c9b1635df9f8c3b506236687f9d2f65fb43c81a4706452e06300317a35218fe88fb7230a840f752356a171bb40000ef5c94989b250d1450b5d2e09 +EBUILD collectd-5.11.0-r3.ebuild 20165 BLAKE2B 45e097795910d4ba94f87ae1d229ff16d6fa506dea277d13c95c264ef86fe2bdf0b719aabff95b2a8648e8bab3471793a4de862463ad30759703912d6234ba5b SHA512 48a422500ad9a5c8a577a6b60987cee1898ec4e7cab67bed78f33579167457c9a16150217b0f0fba5d26ea95deca83e4bb905ee4cabdef899510eb4d5382c452 MISC metadata.xml 1515 BLAKE2B 5525766b822463f94f7c2cddbdf78b4c4ea5a473880a473d0b51481d948569cfc7f51bd2e74eb67065ab2be1b23e4fb7ee99512d018c6e6b5ac1ee7331eae9eb SHA512 51c17c16d27b722d729d036d67c562ab76e212dac9bcd004a7e43c2c5e041b8c46e74f9a130f30c2e18cc95ca1b367034246eff02cfaf55f6f9375ff836749e5 diff --git a/app-metrics/collectd/collectd-5.10.0.ebuild b/app-metrics/collectd/collectd-5.10.0.ebuild index 16fc096048b0..08653b81531b 100644 --- a/app-metrics/collectd/collectd-5.10.0.ebuild +++ b/app-metrics/collectd/collectd-5.10.0.ebuild @@ -56,7 +56,7 @@ COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind memcachec memcached memory modbus mqtt multimeter mysql netlink network network nfs nginx notify_desktop notify_email notify_nagios ntpd numa nut olsrd onewire openldap openvpn oracle ovs_events - ovs_stats perl ping postgresql powerdns processes protocols python + ovs_stats perl ping postgresql powerdns processes protocols python redis routeros rrdcached rrdtool sensors serial sigrok smart snmp snmp_agent statsd swap sysevent syslog table tail tail_csv target_notification target_replace target_scale target_set tcpconns diff --git a/app-metrics/collectd/collectd-5.11.0-r2.ebuild b/app-metrics/collectd/collectd-5.11.0-r3.ebuild index 85a978ee3c47..a455ee29e466 100644 --- a/app-metrics/collectd/collectd-5.11.0-r2.ebuild +++ b/app-metrics/collectd/collectd-5.11.0-r3.ebuild @@ -15,7 +15,7 @@ SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2" LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~x86" +KEYWORDS="~alpha amd64 arm ~x86" IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs" # The plugin lists have to follow here since they extend IUSE @@ -59,7 +59,7 @@ COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind multimeter mysql netlink network network nfs nginx notify_desktop notify_email notify_nagios ntpd numa nut olsrd onewire openldap openvpn oracle ovs_events ovs_stats pcie_errors perl ping postgresql - powerdns procevent processes protocols python python redis routeros + powerdns procevent processes protocols python redis routeros rrdcached rrdtool sensors serial sigrok slurm smart snmp snmp_agent statsd swap synproxy sysevent syslog table tail tail_csv target_notification target_replace target_scale target_set tcpconns @@ -129,7 +129,7 @@ COMMON_DEPEND=" collectd_plugins_rrdcached? ( net-analyzer/rrdtool:= ) collectd_plugins_rrdtool? ( net-analyzer/rrdtool:= ) collectd_plugins_sensors? ( sys-apps/lm-sensors:= ) - collectd_plugins_sigrok? ( <sci-libs/libsigrok-0.4:= dev-libs/glib:2 ) + collectd_plugins_sigrok? ( >=sci-libs/libsigrok-0.4:= dev-libs/glib:2 ) collectd_plugins_slurm? ( sys-cluster/slurm ) collectd_plugins_smart? ( dev-libs/libatasmart:0= ) collectd_plugins_snmp? ( net-analyzer/net-snmp ) @@ -170,6 +170,8 @@ REQUIRED_USE=" collectd_plugins_smart? ( udev ) contrib? ( perl )" +PATCHES=( "${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch ) + # @FUNCTION: collectd_plugin_kernel_linux # @DESCRIPTION: # USAGE: <plugin name> <kernel_options> <severity> diff --git a/app-metrics/collectd/files/collectd-5.11.0-libsigrok-0.4+.patch b/app-metrics/collectd/files/collectd-5.11.0-libsigrok-0.4+.patch new file mode 100644 index 000000000000..981864e81c32 --- /dev/null +++ b/app-metrics/collectd/files/collectd-5.11.0-libsigrok-0.4+.patch @@ -0,0 +1,157 @@ +Backport of https://github.com/u1f35c/collectd/commit/9e36cd85a2bbd6daa55f1f392f60f9c95573ae2c +aka https://github.com/collectd/collectd/issues/1574 + +--- a/configure.ac ++++ b/configure.ac +@@ -5367,7 +5367,7 @@ AC_SUBST([BUILD_WITH_LIBSENSORS_LIBS]) + # libsigrok {{{ + AC_SUBST([LIBSIGROK_CFLAGS]) + AC_SUBST([LIBSIGROK_LIBS]) +-PKG_CHECK_MODULES([LIBSIGROK], [libsigrok < 0.4], ++PKG_CHECK_MODULES([LIBSIGROK], [libsigrok >= 0.4], + [with_libsigrok="yes"], + [with_libsigrok="no (pkg-config could not find libsigrok)"] + ) +--- a/src/sigrok.c ++++ b/src/sigrok.c +@@ -127,22 +127,22 @@ static int sigrok_config(oconfig_item_t *ci) { + return 0; + } + +-static const char *sigrok_value_type(const struct sr_datafeed_analog *analog) { ++static const char *sigrok_value_type(const struct sr_analog_meaning *meaning) { + const char *s; + +- if (analog->mq == SR_MQ_VOLTAGE) ++ if (meaning->mq == SR_MQ_VOLTAGE) + s = "voltage"; +- else if (analog->mq == SR_MQ_CURRENT) ++ else if (meaning->mq == SR_MQ_CURRENT) + s = "current"; +- else if (analog->mq == SR_MQ_FREQUENCY) ++ else if (meaning->mq == SR_MQ_FREQUENCY) + s = "frequency"; +- else if (analog->mq == SR_MQ_POWER) ++ else if (meaning->mq == SR_MQ_POWER) + s = "power"; +- else if (analog->mq == SR_MQ_TEMPERATURE) ++ else if (meaning->mq == SR_MQ_TEMPERATURE) + s = "temperature"; +- else if (analog->mq == SR_MQ_RELATIVE_HUMIDITY) ++ else if (meaning->mq == SR_MQ_RELATIVE_HUMIDITY) + s = "humidity"; +- else if (analog->mq == SR_MQ_SOUND_PRESSURE_LEVEL) ++ else if (meaning->mq == SR_MQ_SOUND_PRESSURE_LEVEL) + s = "spl"; + else + s = "gauge"; +@@ -172,7 +172,7 @@ static void sigrok_feed_callback(const struct sr_dev_inst *sdi, + ERROR("sigrok plugin: Received data from driver \"%s\" but " + "can't find a configuration / device matching " + "it.", +- sdi->driver->name); ++ sr_dev_inst_driver_get(sdi)->name); + return; + } + +@@ -191,11 +191,11 @@ static void sigrok_feed_callback(const struct sr_dev_inst *sdi, + + /* Ignore all but the first sample on the first probe. */ + analog = packet->payload; +- vl.values = &(value_t){.gauge = analog->data[0]}; ++ vl.values = &(value_t){.gauge = ((float *) analog->data)[0]}; + vl.values_len = 1; + sstrncpy(vl.plugin, "sigrok", sizeof(vl.plugin)); + sstrncpy(vl.plugin_instance, cfdev->name, sizeof(vl.plugin_instance)); +- sstrncpy(vl.type, sigrok_value_type(analog), sizeof(vl.type)); ++ sstrncpy(vl.type, sigrok_value_type(&analog->meaning[0]), sizeof(vl.type)); + + plugin_dispatch_values(&vl); + cfdev->last_dispatch = cdtime(); +@@ -207,6 +207,7 @@ static void sigrok_free_drvopts(struct sr_config *src) { + } + + static int sigrok_init_driver(struct config_device *cfdev, ++ struct sr_session *session, + struct sr_dev_driver *drv) { + struct sr_config *src; + GSList *devlist, *drvopts; +@@ -248,21 +249,22 @@ static int sigrok_init_driver(struct config_device *cfdev, + cfdev->sdi = devlist->data; + g_slist_free(devlist); + ssnprintf(hwident, sizeof(hwident), "%s %s %s", +- cfdev->sdi->vendor ? cfdev->sdi->vendor : "", +- cfdev->sdi->model ? cfdev->sdi->model : "", +- cfdev->sdi->version ? cfdev->sdi->version : ""); ++ sr_dev_inst_vendor_get(cfdev->sdi), ++ sr_dev_inst_model_get(cfdev->sdi), ++ sr_dev_inst_version_get(cfdev->sdi)); + INFO("sigrok plugin: Device \"%s\" is a %s", cfdev->name, hwident); + + if (sr_dev_open(cfdev->sdi) != SR_OK) + return -1; + +- if (sr_session_dev_add(cfdev->sdi) != SR_OK) ++ if (sr_session_dev_add(session, cfdev->sdi) != SR_OK) + return -1; + + return 1; + } + + static void *sigrok_read_thread(void *arg __attribute__((unused))) { ++ struct sr_session *session; + struct sr_dev_driver *drv, **drvlist; + GSList *l; + struct config_device *cfdev; +@@ -277,11 +279,11 @@ static void *sigrok_read_thread(void *arg __attribute__((unused))) { + return NULL; + } + +- if (!sr_session_new()) ++ if (!sr_session_new(sr_ctx, &session)) + return NULL; + + num_devices = 0; +- drvlist = sr_driver_list(); ++ drvlist = sr_driver_list(sr_ctx); + for (l = config_devices; l; l = l->next) { + cfdev = l->data; + drv = NULL; +@@ -296,7 +298,7 @@ static void *sigrok_read_thread(void *arg __attribute__((unused))) { + return NULL; + } + +- if ((ret = sigrok_init_driver(cfdev, drv)) < 0) ++ if ((ret = sigrok_init_driver(cfdev, session, drv)) < 0) + /* Error was already logged. */ + return NULL; + +@@ -305,21 +307,22 @@ static void *sigrok_read_thread(void *arg __attribute__((unused))) { + + if (num_devices > 0) { + /* Do this only when we're sure there's hardware to talk to. */ +- if (sr_session_datafeed_callback_add(sigrok_feed_callback, NULL) != SR_OK) ++ if (sr_session_datafeed_callback_add(session, sigrok_feed_callback, ++ NULL) != SR_OK) + return NULL; + + /* Start acquisition on all devices. */ +- if (sr_session_start() != SR_OK) ++ if (sr_session_start(session) != SR_OK) + return NULL; + + /* Main loop, runs forever. */ +- sr_session_run(); ++ sr_session_run(session); + +- sr_session_stop(); +- sr_session_dev_remove_all(); ++ sr_session_stop(session); ++ sr_session_dev_remove_all(session); + } + +- sr_session_destroy(); ++ sr_session_destroy(session); + + sr_exit(sr_ctx); + |