summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/collectd
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-12-17 18:18:37 -0800
committerKhem Raj <raj.khem@gmail.com>2018-12-18 22:15:59 -0800
commit014b90ee43b0b74086b4da3e3c9fcd0a5ecd830d (patch)
tree6b766f738ecb1428eb2d20f18909eaa4083c925e /meta-oe/recipes-extended/collectd
parentba604d99ae80b3e0fb908f4de8f1ac9008b7336f (diff)
downloadmeta-openembedded-014b90ee43b0b74086b4da3e3c9fcd0a5ecd830d.tar.gz
collectd: Upgrade to 5.8.1 release
Fix build with gcc9 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/collectd')
-rw-r--r--meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch18
-rw-r--r--meta-oe/recipes-extended/collectd/collectd/0006-libcollectdclient-Fix-string-overflow-errors.patch31
-rw-r--r--meta-oe/recipes-extended/collectd/collectd_5.8.1.bb (renamed from meta-oe/recipes-extended/collectd/collectd_5.8.0.bb)5
3 files changed, 43 insertions, 11 deletions
diff --git a/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch b/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch
index b12690b32..13510cdea 100644
--- a/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch
+++ b/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch
@@ -1,4 +1,4 @@
1From d65e48b68076d5b304e6d865967003ae1fea0e6c Mon Sep 17 00:00:00 2001 1From f82f8faf9942f51e9c3c773b56574652695bef5a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 May 2018 21:45:38 -0700 3Date: Wed, 9 May 2018 21:45:38 -0700
4Subject: [PATCH] Disable new gcc8 warnings 4Subject: [PATCH] Disable new gcc8 warnings
@@ -7,17 +7,17 @@ GCC seems to be not able to detect the checks for size are
7already in place 7already in place
8 8
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
10--- 11---
11Upstream-Status: Submitted [https://github.com/collectd/collectd/pull/2768]
12 src/libcollectdclient/network_parse.c | 7 +++++++ 12 src/libcollectdclient/network_parse.c | 7 +++++++
13 src/write_sensu.c | 7 +++++++ 13 src/write_sensu.c | 7 +++++++
14 2 files changed, 14 insertions(+) 14 2 files changed, 14 insertions(+)
15 15
16diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c 16diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c
17index 2365ab0a..79e6ed96 100644 17index aa753ce..fef43a9 100644
18--- a/src/libcollectdclient/network_parse.c 18--- a/src/libcollectdclient/network_parse.c
19+++ b/src/libcollectdclient/network_parse.c 19+++ b/src/libcollectdclient/network_parse.c
20@@ -163,6 +163,11 @@ static int parse_int(void *payload, size_t payload_size, uint64_t *out) { 20@@ -148,6 +148,11 @@ static int parse_int(void *payload, size_t payload_size, uint64_t *out) {
21 return 0; 21 return 0;
22 } 22 }
23 23
@@ -29,7 +29,7 @@ index 2365ab0a..79e6ed96 100644
29 static int parse_string(void *payload, size_t payload_size, char *out, 29 static int parse_string(void *payload, size_t payload_size, char *out,
30 size_t out_size) { 30 size_t out_size) {
31 char *in = payload; 31 char *in = payload;
32@@ -175,6 +180,8 @@ static int parse_string(void *payload, size_t payload_size, char *out, 32@@ -160,6 +165,8 @@ static int parse_string(void *payload, size_t payload_size, char *out,
33 return 0; 33 return 0;
34 } 34 }
35 35
@@ -39,22 +39,22 @@ index 2365ab0a..79e6ed96 100644
39 lcc_value_list_t *state) { 39 lcc_value_list_t *state) {
40 char buf[LCC_NAME_LEN]; 40 char buf[LCC_NAME_LEN];
41diff --git a/src/write_sensu.c b/src/write_sensu.c 41diff --git a/src/write_sensu.c b/src/write_sensu.c
42index ce23e654..63e1f599 100644 42index bd7a56d..6cb59d5 100644
43--- a/src/write_sensu.c 43--- a/src/write_sensu.c
44+++ b/src/write_sensu.c 44+++ b/src/write_sensu.c
45@@ -569,6 +569,11 @@ static char *sensu_value_to_json(struct sensu_host const *host, /* {{{ */ 45@@ -570,6 +570,11 @@ static char *sensu_value_to_json(struct sensu_host const *host, /* {{{ */
46 return ret_str; 46 return ret_str;
47 } /* }}} char *sensu_value_to_json */ 47 } /* }}} char *sensu_value_to_json */
48 48
49+#pragma GCC diagnostic push 49+#pragma GCC diagnostic push
50+#if __GNUC__ == 8 50+#if __GNUC__ > 7
51+#pragma GCC diagnostic ignored "-Wstringop-overflow" 51+#pragma GCC diagnostic ignored "-Wstringop-overflow"
52+#pragma GCC diagnostic ignored "-Wstringop-truncation" 52+#pragma GCC diagnostic ignored "-Wstringop-truncation"
53+#endif 53+#endif
54 /* 54 /*
55 * Uses replace_str2() implementation from 55 * Uses replace_str2() implementation from
56 * http://creativeandcritical.net/str-replace-c/ 56 * http://creativeandcritical.net/str-replace-c/
57@@ -631,6 +636,8 @@ static char *replace_str(const char *str, const char *old, /* {{{ */ 57@@ -632,6 +637,8 @@ static char *replace_str(const char *str, const char *old, /* {{{ */
58 return ret; 58 return ret;
59 } /* }}} char *replace_str */ 59 } /* }}} char *replace_str */
60 60
diff --git a/meta-oe/recipes-extended/collectd/collectd/0006-libcollectdclient-Fix-string-overflow-errors.patch b/meta-oe/recipes-extended/collectd/collectd/0006-libcollectdclient-Fix-string-overflow-errors.patch
new file mode 100644
index 000000000..3ed652f71
--- /dev/null
+++ b/meta-oe/recipes-extended/collectd/collectd/0006-libcollectdclient-Fix-string-overflow-errors.patch
@@ -0,0 +1,31 @@
1From 98719ea7f717750c790a1f9384ea8d0117e7f52d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 17 Dec 2018 18:15:05 -0800
4Subject: [PATCH] libcollectdclient: Fix string overflow errors
5
6Ensure that string has a space for ending null char
7
8Upstream-Status: Pending
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/libcollectdclient/network_parse.c | 6 +++---
13 1 file changed, 3 insertions(+), 3 deletions(-)
14
15diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c
16index fef43a9..6d65266 100644
17--- a/src/libcollectdclient/network_parse.c
18+++ b/src/libcollectdclient/network_parse.c
19@@ -169,9 +169,9 @@ static int parse_string(void *payload, size_t payload_size, char *out,
20
21 static int parse_identifier(uint16_t type, void *payload, size_t payload_size,
22 lcc_value_list_t *state) {
23- char buf[LCC_NAME_LEN];
24-
25- if (parse_string(payload, payload_size, buf, sizeof(buf)) != 0)
26+ char buf[LCC_NAME_LEN+1];
27+ buf[LCC_NAME_LEN] = '\0';
28+ if (parse_string(payload, payload_size, buf, LCC_NAME_LEN) != 0)
29 return EINVAL;
30
31 switch (type) {
diff --git a/meta-oe/recipes-extended/collectd/collectd_5.8.0.bb b/meta-oe/recipes-extended/collectd/collectd_5.8.1.bb
index df9fa233c..6dff18c16 100644
--- a/meta-oe/recipes-extended/collectd/collectd_5.8.0.bb
+++ b/meta-oe/recipes-extended/collectd/collectd_5.8.1.bb
@@ -13,9 +13,10 @@ SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \
13 file://0001-fix-to-build-with-glibc-2.25.patch \ 13 file://0001-fix-to-build-with-glibc-2.25.patch \
14 file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ 14 file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
15 file://0005-Disable-new-gcc8-warnings.patch \ 15 file://0005-Disable-new-gcc8-warnings.patch \
16 file://0006-libcollectdclient-Fix-string-overflow-errors.patch \
16 " 17 "
17SRC_URI[md5sum] = "a841159323624f18bf03198e9f5aa364" 18SRC_URI[md5sum] = "bfce96c42cede5243028510bcc57c1e6"
18SRC_URI[sha256sum] = "b06ff476bbf05533cb97ae6749262cc3c76c9969f032bd8496690084ddeb15c9" 19SRC_URI[sha256sum] = "e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da"
19 20
20inherit autotools pythonnative update-rc.d pkgconfig systemd 21inherit autotools pythonnative update-rc.d pkgconfig systemd
21 22