1 |
commit: 7dbfccac96626dd3bcc4b54577427924e40410f8 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 30 19:49:25 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 30 19:49:57 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dbfccac |
7 |
|
8 |
app-metrics/collectd: allow lm_sensors-4.5.0 usage |
9 |
|
10 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
app-metrics/collectd/collectd-5.8.1.ebuild | 2 + |
14 |
...ectd-5.8.1-lm_sensors-4.5.0-compatibility.patch | 70 ++++++++++++++++++++++ |
15 |
2 files changed, 72 insertions(+) |
16 |
|
17 |
diff --git a/app-metrics/collectd/collectd-5.8.1.ebuild b/app-metrics/collectd/collectd-5.8.1.ebuild |
18 |
index 9ce52b83d6c..d58a3a63c4d 100644 |
19 |
--- a/app-metrics/collectd/collectd-5.8.1.ebuild |
20 |
+++ b/app-metrics/collectd/collectd-5.8.1.ebuild |
21 |
@@ -159,6 +159,8 @@ REQUIRED_USE=" |
22 |
collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} ) |
23 |
collectd_plugins_smart? ( udev )" |
24 |
|
25 |
+PATCHES=( "${FILESDIR}"/${PN}-5.8.1-lm_sensors-4.5.0-compatibility.patch ) |
26 |
+ |
27 |
# @FUNCTION: collectd_plugin_kernel_linux |
28 |
# @DESCRIPTION: |
29 |
# USAGE: <plugin name> <kernel_options> <severity> |
30 |
|
31 |
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 |
32 |
new file mode 100644 |
33 |
index 00000000000..3476d50664a |
34 |
--- /dev/null |
35 |
+++ b/app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch |
36 |
@@ -0,0 +1,70 @@ |
37 |
+https://github.com/collectd/collectd/issues/3006 |
38 |
+ |
39 |
+--- old/src/sensors.c |
40 |
++++ new/src/sensors.c |
41 |
+@@ -149,7 +149,7 @@ |
42 |
+ static char *conffile = SENSORS_CONF_PATH; |
43 |
+ /* #endif SENSORS_API_VERSION < 0x400 */ |
44 |
+ |
45 |
+-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) |
46 |
++#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) |
47 |
+ typedef struct featurelist { |
48 |
+ const sensors_chip_name *chip; |
49 |
+ const sensors_feature *feature; |
50 |
+@@ -159,9 +159,9 @@ |
51 |
+ |
52 |
+ static char *conffile = NULL; |
53 |
+ static _Bool use_labels = 0; |
54 |
+-/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ |
55 |
++/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */ |
56 |
+ |
57 |
+-#else /* if SENSORS_API_VERSION >= 0x500 */ |
58 |
++#else /* if SENSORS_API_VERSION >= 0x600 */ |
59 |
+ #error "This version of libsensors is not supported yet. Please report this " \ |
60 |
+ "as bug." |
61 |
+ #endif |
62 |
+@@ -223,7 +223,7 @@ |
63 |
+ if (IS_TRUE(value)) |
64 |
+ ignorelist_set_invert(sensor_list, 0); |
65 |
+ } |
66 |
+-#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) |
67 |
++#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) |
68 |
+ else if (strcasecmp(key, "UseLabels") == 0) { |
69 |
+ use_labels = IS_TRUE(value) ? 1 : 0; |
70 |
+ } |
71 |
+@@ -353,7 +353,7 @@ |
72 |
+ } /* while sensors_get_detected_chips */ |
73 |
+ /* #endif SENSORS_API_VERSION < 0x400 */ |
74 |
+ |
75 |
+-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) |
76 |
++#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) |
77 |
+ chip_num = 0; |
78 |
+ while ((chip = sensors_get_detected_chips(NULL, &chip_num)) != NULL) { |
79 |
+ const sensors_feature *feature; |
80 |
+@@ -410,7 +410,7 @@ |
81 |
+ } /* while (subfeature) */ |
82 |
+ } /* while (feature) */ |
83 |
+ } /* while (chip) */ |
84 |
+-#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ |
85 |
++#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */ |
86 |
+ |
87 |
+ if (first_feature == NULL) { |
88 |
+ sensors_cleanup(); |
89 |
+@@ -485,7 +485,7 @@ |
90 |
+ } /* for fl = first_feature .. NULL */ |
91 |
+ /* #endif SENSORS_API_VERSION < 0x400 */ |
92 |
+ |
93 |
+-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) |
94 |
++#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) |
95 |
+ for (featurelist_t *fl = first_feature; fl != NULL; fl = fl->next) { |
96 |
+ double value; |
97 |
+ int status; |
98 |
+@@ -528,7 +528,7 @@ |
99 |
+ |
100 |
+ sensors_submit(plugin_instance, type, type_instance, value); |
101 |
+ } /* for fl = first_feature .. NULL */ |
102 |
+-#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ |
103 |
++#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */ |
104 |
+ |
105 |
+ return 0; |
106 |
+ } /* int sensors_read */ |