From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/
Date: Fri, 30 Nov 2018 19:50:04 +0000 (UTC) [thread overview]
Message-ID: <1543607397.7dbfccac96626dd3bcc4b54577427924e40410f8.whissi@gentoo> (raw)
commit: 7dbfccac96626dd3bcc4b54577427924e40410f8
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 30 19:49:25 2018 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Nov 30 19:49:57 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dbfccac
app-metrics/collectd: allow lm_sensors-4.5.0 usage
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
app-metrics/collectd/collectd-5.8.1.ebuild | 2 +
...ectd-5.8.1-lm_sensors-4.5.0-compatibility.patch | 70 ++++++++++++++++++++++
2 files changed, 72 insertions(+)
diff --git a/app-metrics/collectd/collectd-5.8.1.ebuild b/app-metrics/collectd/collectd-5.8.1.ebuild
index 9ce52b83d6c..d58a3a63c4d 100644
--- a/app-metrics/collectd/collectd-5.8.1.ebuild
+++ b/app-metrics/collectd/collectd-5.8.1.ebuild
@@ -159,6 +159,8 @@ REQUIRED_USE="
collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} )
collectd_plugins_smart? ( udev )"
+PATCHES=( "${FILESDIR}"/${PN}-5.8.1-lm_sensors-4.5.0-compatibility.patch )
+
# @FUNCTION: collectd_plugin_kernel_linux
# @DESCRIPTION:
# USAGE: <plugin name> <kernel_options> <severity>
diff --git a/app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch b/app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch
new file mode 100644
index 00000000000..3476d50664a
--- /dev/null
+++ b/app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch
@@ -0,0 +1,70 @@
+https://github.com/collectd/collectd/issues/3006
+
+--- old/src/sensors.c
++++ new/src/sensors.c
+@@ -149,7 +149,7 @@
+ static char *conffile = SENSORS_CONF_PATH;
+ /* #endif SENSORS_API_VERSION < 0x400 */
+
+-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
++#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600)
+ typedef struct featurelist {
+ const sensors_chip_name *chip;
+ const sensors_feature *feature;
+@@ -159,9 +159,9 @@
+
+ static char *conffile = NULL;
+ static _Bool use_labels = 0;
+-/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
++/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */
+
+-#else /* if SENSORS_API_VERSION >= 0x500 */
++#else /* if SENSORS_API_VERSION >= 0x600 */
+ #error "This version of libsensors is not supported yet. Please report this " \
+ "as bug."
+ #endif
+@@ -223,7 +223,7 @@
+ if (IS_TRUE(value))
+ ignorelist_set_invert(sensor_list, 0);
+ }
+-#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
++#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600)
+ else if (strcasecmp(key, "UseLabels") == 0) {
+ use_labels = IS_TRUE(value) ? 1 : 0;
+ }
+@@ -353,7 +353,7 @@
+ } /* while sensors_get_detected_chips */
+ /* #endif SENSORS_API_VERSION < 0x400 */
+
+-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
++#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600)
+ chip_num = 0;
+ while ((chip = sensors_get_detected_chips(NULL, &chip_num)) != NULL) {
+ const sensors_feature *feature;
+@@ -410,7 +410,7 @@
+ } /* while (subfeature) */
+ } /* while (feature) */
+ } /* while (chip) */
+-#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
++#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */
+
+ if (first_feature == NULL) {
+ sensors_cleanup();
+@@ -485,7 +485,7 @@
+ } /* for fl = first_feature .. NULL */
+ /* #endif SENSORS_API_VERSION < 0x400 */
+
+-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
++#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600)
+ for (featurelist_t *fl = first_feature; fl != NULL; fl = fl->next) {
+ double value;
+ int status;
+@@ -528,7 +528,7 @@
+
+ sensors_submit(plugin_instance, type, type_instance, value);
+ } /* for fl = first_feature .. NULL */
+-#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
++#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */
+
+ return 0;
+ } /* int sensors_read */
next reply other threads:[~2018-11-30 19:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-30 19:50 Thomas Deutschmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-04 7:32 [gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/ Sam James
2023-04-14 3:39 Sam James
2022-11-10 23:04 Conrad Kostecki
2022-06-07 17:58 Conrad Kostecki
2022-06-05 14:06 Conrad Kostecki
2020-08-05 15:35 Thomas Deutschmann
2019-08-21 22:53 Thomas Deutschmann
2019-07-20 0:13 Thomas Deutschmann
2018-08-02 18:40 Thomas Deutschmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1543607397.7dbfccac96626dd3bcc4b54577427924e40410f8.whissi@gentoo \
--to=whissi@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox