summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-08-22 00:52:35 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-08-22 00:53:44 +0200
commit7628e513e894f1fa4d23dd8b4b5a052a4a068dd9 (patch)
treeb34188308ac0a2b38b8f3ad213005c8e5b9fdab4 /app-metrics/collectd
parentsys-libs/glibc: drop telinit call from pkg_*(), bug #642784 (diff)
downloadgentoo-7628e513e894f1fa4d23dd8b4b5a052a4a068dd9.tar.gz
gentoo-7628e513e894f1fa4d23dd8b4b5a052a4a068dd9.tar.bz2
gentoo-7628e513e894f1fa4d23dd8b4b5a052a4a068dd9.zip
app-metrics/collectd: unbreack v5.9.1
Add some upstream patches to fix broken v5.9.1 release. Package-Manager: Portage-2.3.72, Repoman-2.3.17 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'app-metrics/collectd')
-rw-r--r--app-metrics/collectd/collectd-5.9.1-r1.ebuild (renamed from app-metrics/collectd/collectd-5.9.1.ebuild)2
-rw-r--r--app-metrics/collectd/files/collectd-5.9.1-fixup.patch81
2 files changed, 82 insertions, 1 deletions
diff --git a/app-metrics/collectd/collectd-5.9.1.ebuild b/app-metrics/collectd/collectd-5.9.1-r1.ebuild
index e79b4d6e0e41..052e491c9290 100644
--- a/app-metrics/collectd/collectd-5.9.1.ebuild
+++ b/app-metrics/collectd/collectd-5.9.1-r1.ebuild
@@ -160,7 +160,7 @@ REQUIRED_USE="
collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} )
collectd_plugins_smart? ( udev )"
-PATCHES=()
+PATCHES=( "${FILESDIR}"/${P}-fixup.patch )
S="${WORKDIR}/${PN}-${PN}-${PV}"
diff --git a/app-metrics/collectd/files/collectd-5.9.1-fixup.patch b/app-metrics/collectd/files/collectd-5.9.1-fixup.patch
new file mode 100644
index 000000000000..93f97d95a9c4
--- /dev/null
+++ b/app-metrics/collectd/files/collectd-5.9.1-fixup.patch
@@ -0,0 +1,81 @@
+--- a/src/daemon/plugin.c
++++ b/src/daemon/plugin.c
+@@ -647,7 +647,8 @@ static void start_read_threads(size_t num) /* {{{ */
+ }
+
+ char name[THREAD_NAME_MAX];
+- snprintf(name, sizeof(name), "reader#%" PRIu64, (uint64_t)read_threads_num);
++ ssnprintf(name, sizeof(name), "reader#%" PRIu64,
++ (uint64_t)read_threads_num);
+ set_thread_name(read_threads[read_threads_num], name);
+
+ read_threads_num++;
+@@ -836,8 +837,8 @@ static void start_write_threads(size_t num) /* {{{ */
+ }
+
+ char name[THREAD_NAME_MAX];
+- snprintf(name, sizeof(name), "writer#%" PRIu64,
+- (uint64_t)write_threads_num);
++ ssnprintf(name, sizeof(name), "writer#%" PRIu64,
++ (uint64_t)write_threads_num);
+ set_thread_name(write_threads[write_threads_num], name);
+
+ write_threads_num++;
+--- a/src/intel_rdt.c
++++ b/src/intel_rdt.c
+@@ -325,8 +325,12 @@ static int strlisttoarray(char *str_list, char ***names, size_t *names_num) {
+ continue;
+
+ if ((isdupstr((const char **)*names, *names_num, token))) {
+- ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'",
+- token, str_list);
++ if (str_list != NULL)
++ ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'",
++ token, str_list);
++ else
++ ERROR(RDT_PLUGIN ": Duplicated process name \'%s\'", token);
++
+ return -EINVAL;
+ } else {
+ if (0 != strarray_add(names, names_num, token)) {
+--- a/src/intel_rdt.c
++++ b/src/intel_rdt.c
+@@ -325,11 +325,7 @@ static int strlisttoarray(char *str_list, char ***names, size_t *names_num) {
+ continue;
+
+ if ((isdupstr((const char **)*names, *names_num, token))) {
+- if (str_list != NULL)
+- ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'",
+- token, str_list);
+- else
+- ERROR(RDT_PLUGIN ": Duplicated process name \'%s\'", token);
++ ERROR(RDT_PLUGIN ": Duplicated process name \'%s\'", token);
+
+ return -EINVAL;
+ } else {
+--- a/src/syslog.c
++++ b/src/syslog.c
+@@ -51,8 +51,7 @@ static int sl_config(const char *key, const char *value) {
+ log_level = parse_log_severity(value);
+ if (log_level < 0) {
+ log_level = LOG_INFO;
+- ERROR("syslog: invalid loglevel [%s] defaulting to 'info'", value);
+- return 1;
++ WARNING("syslog: invalid loglevel [%s] defaulting to 'info'", value);
+ }
+ } else if (strcasecmp(key, "NotifyLevel") == 0) {
+ notif_severity = parse_notif_severity(value);
+--- a/src/utils/common/common.c
++++ b/src/utils/common/common.c
+@@ -99,10 +99,7 @@ int ssnprintf(char *str, size_t sz, const char *format, ...) {
+
+ va_end(ap);
+
+- if (ret < 0) {
+- return ret;
+- }
+- return (size_t)ret >= sz;
++ return ret;
+ } /* int ssnprintf */
+
+ char *ssnprintf_alloc(char const *format, ...) /* {{{ */