diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-05-09 22:05:56 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-05-17 08:32:26 -0700 |
commit | e7b6b648da153b60f2310744b01140e892bb8dbc (patch) | |
tree | d434c28b9200e8901acf9210aea0d74a37368200 /meta-oe/recipes-extended/collectd | |
parent | 2efc9d3ebf0a1ec41d297347b840bf8519e19472 (diff) | |
download | meta-openembedded-e7b6b648da153b60f2310744b01140e892bb8dbc.tar.gz |
collectd: Upgrade to 5.8.0
Fix build with gcc8 along the way
Forward port existing patches
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/collectd')
-rw-r--r-- | meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch | 33 | ||||
-rw-r--r-- | meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch | 32 | ||||
-rw-r--r-- | meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch | 65 | ||||
-rw-r--r-- | meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch | 80 | ||||
-rw-r--r-- | meta-oe/recipes-extended/collectd/collectd_5.8.0.bb (renamed from meta-oe/recipes-extended/collectd/collectd_5.7.2.bb) | 9 |
5 files changed, 135 insertions, 84 deletions
diff --git a/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch b/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch index 1ceacd8c4..5ee75cb4d 100644 --- a/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch +++ b/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch | |||
@@ -1,28 +1,31 @@ | |||
1 | [PATCH] conditionally check libvirt | 1 | From 385bf1c2ec57942e17ee529e57eef0dcd99904e6 Mon Sep 17 00:00:00 2001 |
2 | From: Roy Li <rongqing.li@windriver.com> | ||
3 | Date: Tue, 1 Sep 2015 17:00:33 +0800 | ||
4 | Subject: [PATCH] [PATCH] conditionally check libvirt | ||
2 | 5 | ||
3 | Upstream-Statue: Pending | 6 | Upstream-Statue: Pending |
4 | 7 | ||
5 | check if libvirt is available only when a user wants to use libvirt | 8 | check if libvirt is available only when a user wants to use libvirt |
6 | 9 | ||
7 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | 10 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
11 | |||
8 | --- | 12 | --- |
9 | configure.ac | 14 ++++++++------ | 13 | configure.ac | 13 ++++++++----- |
10 | 1 file changed, 8 insertions(+), 6 deletions(-) | 14 | 1 file changed, 8 insertions(+), 5 deletions(-) |
11 | 15 | ||
12 | Index: collectd-5.7.1/configure.ac | 16 | diff --git a/configure.ac b/configure.ac |
13 | =================================================================== | 17 | index 101d6f9f..a7eca97d 100644 |
14 | --- collectd-5.7.1.orig/configure.ac | 18 | --- a/configure.ac |
15 | +++ collectd-5.7.1/configure.ac | 19 | +++ b/configure.ac |
16 | @@ -5556,12 +5556,14 @@ else | 20 | @@ -5758,11 +5758,14 @@ else |
17 | with_libxml2="no (pkg-config doesn't know libxml-2.0)" | 21 | with_libxml2="no (pkg-config doesn't know libxml-2.0)" |
18 | fi | 22 | fi |
19 | 23 | ||
20 | -$PKG_CONFIG --exists libvirt 2>/dev/null | 24 | -$PKG_CONFIG --exists libvirt 2>/dev/null |
21 | -if test "$?" = "0" | 25 | -if test $? = 0; then |
22 | -then | 26 | - with_libvirt="yes" |
23 | - with_libvirt="yes" | ||
24 | -else | 27 | -else |
25 | - with_libvirt="no (pkg-config doesn't know libvirt)" | 28 | - with_libvirt="no (pkg-config doesn't know libvirt)" |
26 | +if test "x$enable_libvirt" = "xyes"; then | 29 | +if test "x$enable_libvirt" = "xyes"; then |
27 | + $PKG_CONFIG --exists libvirt 2>/dev/null | 30 | + $PKG_CONFIG --exists libvirt 2>/dev/null |
28 | + if test "$?" = "0" | 31 | + if test "$?" = "0" |
@@ -32,5 +35,5 @@ Index: collectd-5.7.1/configure.ac | |||
32 | + with_libvirt="no (pkg-config doesn't know libvirt)" | 35 | + with_libvirt="no (pkg-config doesn't know libvirt)" |
33 | + fi | 36 | + fi |
34 | fi | 37 | fi |
35 | if test "x$with_libxml2" = "xyes" | 38 | |
36 | then | 39 | if test "x$with_libxml2" = "xyes"; then |
diff --git a/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch b/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch index 5069a639c..d2c726800 100644 --- a/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch +++ b/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From b459c55e4968321e5a82272cb39aa69d4054990f Mon Sep 17 00:00:00 2001 | 1 | From b0a64db90a24469e36978c748417ebe456b34d59 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 22 Apr 2017 11:54:57 -0700 | 3 | Date: Sat, 22 Apr 2017 11:54:57 -0700 |
4 | Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler | 4 | Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler |
@@ -14,35 +14,26 @@ client.c:834:23: error: '%s' directive output may be truncated writing up to 102 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
15 | 15 | ||
16 | --- | 16 | --- |
17 | configure.ac | 3 +- | 17 | configure.ac | 1 + |
18 | m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++ | 18 | m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++ |
19 | 2 files changed, 76 insertions(+), 1 deletion(-) | 19 | 2 files changed, 75 insertions(+) |
20 | create mode 100644 m4/ax_check_compile_flag.m4 | 20 | create mode 100644 m4/ax_check_compile_flag.m4 |
21 | 21 | ||
22 | diff --git a/configure.ac b/configure.ac | 22 | diff --git a/configure.ac b/configure.ac |
23 | index 8854542..edb8cfb 100644 | 23 | index a7eca97d..560eb988 100644 |
24 | --- a/configure.ac | 24 | --- a/configure.ac |
25 | +++ b/configure.ac | 25 | +++ b/configure.ac |
26 | @@ -4,7 +4,6 @@ AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)]) | 26 | @@ -6794,6 +6794,7 @@ if test "x$enable_werror" != "xno"; then |
27 | AC_CONFIG_SRCDIR(src/target_set.c) | 27 | AM_CFLAGS="$AM_CFLAGS -Werror" |
28 | AC_CONFIG_HEADERS(src/config.h) | 28 | AM_CXXFLAGS="$AM_CXXFLAGS -Werror" |
29 | AC_CONFIG_AUX_DIR([libltdl/config]) | ||
30 | - | ||
31 | dnl older automake's default of ARFLAGS=cru is noisy on newer binutils; | ||
32 | dnl we don't really need the 'u' even in older toolchains. Then there is | ||
33 | dnl older libtool, which spelled it AR_FLAGS | ||
34 | @@ -6688,6 +6687,8 @@ then | ||
35 | AM_CFLAGS="$AM_CFLAGS -Werror" | ||
36 | AM_CXXFLAGS="$AM_CXXFLAGS -Werror" | ||
37 | fi | 29 | fi |
38 | +AX_CHECK_COMPILE_FLAG([-Werror -Werror=format-truncation],[AM_CFLAGS="$AM_CFLAGS -Wno-error=format-truncation" AM_CXXFLAGS="$AM_CXXFLAGS -Wno-error=format-truncation"]) | 30 | +AX_CHECK_COMPILE_FLAG([-Werror -Werror=format-truncation],[AM_CFLAGS="$AM_CFLAGS -Wno-error=format-truncation" AM_CXXFLAGS="$AM_CXXFLAGS -Wno-error=format-truncation"]) |
39 | + | 31 | |
40 | AC_SUBST([AM_CFLAGS]) | 32 | AC_SUBST([AM_CFLAGS]) |
41 | AC_SUBST([AM_CXXFLAGS]) | 33 | AC_SUBST([AM_CXXFLAGS]) |
42 | |||
43 | diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 | 34 | diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 |
44 | new file mode 100644 | 35 | new file mode 100644 |
45 | index 0000000..dcabb92 | 36 | index 00000000..dcabb92a |
46 | --- /dev/null | 37 | --- /dev/null |
47 | +++ b/m4/ax_check_compile_flag.m4 | 38 | +++ b/m4/ax_check_compile_flag.m4 |
48 | @@ -0,0 +1,74 @@ | 39 | @@ -0,0 +1,74 @@ |
@@ -120,6 +111,3 @@ index 0000000..dcabb92 | |||
120 | + [m4_default([$3], :)]) | 111 | + [m4_default([$3], :)]) |
121 | +AS_VAR_POPDEF([CACHEVAR])dnl | 112 | +AS_VAR_POPDEF([CACHEVAR])dnl |
122 | +])dnl AX_CHECK_COMPILE_FLAGS | 113 | +])dnl AX_CHECK_COMPILE_FLAGS |
123 | -- | ||
124 | 2.13.4 | ||
125 | |||
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 new file mode 100644 index 000000000..b12690b32 --- /dev/null +++ b/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From d65e48b68076d5b304e6d865967003ae1fea0e6c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 9 May 2018 21:45:38 -0700 | ||
4 | Subject: [PATCH] Disable new gcc8 warnings | ||
5 | |||
6 | GCC seems to be not able to detect the checks for size are | ||
7 | already in place | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | Upstream-Status: Submitted [https://github.com/collectd/collectd/pull/2768] | ||
12 | src/libcollectdclient/network_parse.c | 7 +++++++ | ||
13 | src/write_sensu.c | 7 +++++++ | ||
14 | 2 files changed, 14 insertions(+) | ||
15 | |||
16 | diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c | ||
17 | index 2365ab0a..79e6ed96 100644 | ||
18 | --- a/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) { | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | +#pragma GCC diagnostic push | ||
25 | +#if __GNUC__ == 8 | ||
26 | +#pragma GCC diagnostic ignored "-Wstringop-truncation" | ||
27 | +#endif | ||
28 | + | ||
29 | static int parse_string(void *payload, size_t payload_size, char *out, | ||
30 | size_t out_size) { | ||
31 | char *in = payload; | ||
32 | @@ -175,6 +180,8 @@ static int parse_string(void *payload, size_t payload_size, char *out, | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | +#pragma GCC diagnostic pop | ||
37 | + | ||
38 | static int parse_identifier(uint16_t type, void *payload, size_t payload_size, | ||
39 | lcc_value_list_t *state) { | ||
40 | char buf[LCC_NAME_LEN]; | ||
41 | diff --git a/src/write_sensu.c b/src/write_sensu.c | ||
42 | index ce23e654..63e1f599 100644 | ||
43 | --- a/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, /* {{{ */ | ||
46 | return ret_str; | ||
47 | } /* }}} char *sensu_value_to_json */ | ||
48 | |||
49 | +#pragma GCC diagnostic push | ||
50 | +#if __GNUC__ == 8 | ||
51 | +#pragma GCC diagnostic ignored "-Wstringop-overflow" | ||
52 | +#pragma GCC diagnostic ignored "-Wstringop-truncation" | ||
53 | +#endif | ||
54 | /* | ||
55 | * Uses replace_str2() implementation from | ||
56 | * http://creativeandcritical.net/str-replace-c/ | ||
57 | @@ -631,6 +636,8 @@ static char *replace_str(const char *str, const char *old, /* {{{ */ | ||
58 | return ret; | ||
59 | } /* }}} char *replace_str */ | ||
60 | |||
61 | +#pragma GCC diagnostic pop | ||
62 | + | ||
63 | static char *replace_json_reserved(const char *message) /* {{{ */ | ||
64 | { | ||
65 | char *msg = replace_str(message, "\\", "\\\\"); | ||
diff --git a/meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch b/meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch index 1fde6a071..f12b16cb9 100644 --- a/meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch +++ b/meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch | |||
@@ -1,43 +1,37 @@ | |||
1 | Index: collectd-5.7.1/configure.ac | 1 | From d9b954bd9d0b084d9a1f5159a9f0c45802a51809 Mon Sep 17 00:00:00 2001 |
2 | =================================================================== | 2 | From: Paul Eggleton <paul.eggleton@linux.intel.com> |
3 | --- collectd-5.7.1.orig/configure.ac | 3 | Date: Mon, 22 Apr 2013 16:28:16 +0000 |
4 | +++ collectd-5.7.1/configure.ac | 4 | |
5 | @@ -2305,7 +2305,7 @@ AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([ | 5 | --- |
6 | with_libgcrypt="yes" | 6 | configure.ac | 8 ++++---- |
7 | else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config" | 7 | 1 file changed, 4 insertions(+), 4 deletions(-) |
8 | then | 8 | |
9 | - with_libgcrypt_config="$withval/bin/gcrypt-config" | 9 | diff --git a/configure.ac b/configure.ac |
10 | + with_libgcrypt_config="$withval/bin/pkg-config" | 10 | index e869a6a0..101d6f9f 100644 |
11 | with_libgcrypt="yes" | 11 | --- a/configure.ac |
12 | else if test -d "$withval" | 12 | +++ b/configure.ac |
13 | then | 13 | @@ -2514,20 +2514,20 @@ AC_ARG_WITH([libgcrypt], |
14 | @@ -2313,12 +2313,12 @@ AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([ | 14 | if test -f "$withval" && test -x "$withval"; then |
15 | GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib" | 15 | with_libgcrypt_config="$withval" |
16 | with_libgcrypt="yes" | 16 | with_libgcrypt="yes" |
17 | else | 17 | - else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"; then |
18 | - with_libgcrypt_config="gcrypt-config" | 18 | - with_libgcrypt_config="$withval/bin/gcrypt-config" |
19 | + with_libgcrypt_config="pkg-config" | 19 | + else if test -f "$withval/bin/pkg-config" && test -x "$withval/bin/pkg-config"; then |
20 | with_libgcrypt="$withval" | 20 | + with_libgcrypt_config="$withval/bin/pkg-config" |
21 | fi; fi; fi | 21 | with_libgcrypt="yes" |
22 | ], | 22 | else if test -d "$withval"; then |
23 | [ | 23 | GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include" |
24 | - with_libgcrypt_config="libgcrypt-config" | 24 | GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib" |
25 | + with_libgcrypt_config="pkg-config" | 25 | with_libgcrypt="yes" |
26 | with_libgcrypt="yes" | 26 | else |
27 | ]) | 27 | - with_libgcrypt_config="gcrypt-config" |
28 | 28 | + with_libgcrypt_config="pkg-config" | |
29 | @@ -2326,12 +2326,12 @@ if test "x$with_libgcrypt" = "xyes" && t | 29 | with_libgcrypt="$withval" |
30 | then | 30 | fi; fi; fi |
31 | if test "x$GCRYPT_CPPFLAGS" = "x" | 31 | ], |
32 | then | 32 | [ |
33 | - GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null` | 33 | - with_libgcrypt_config="libgcrypt-config" |
34 | + GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags libgcrypt 2>/dev/null` | 34 | + with_libgcrypt_config="libpkg-config" |
35 | fi | 35 | with_libgcrypt="yes" |
36 | 36 | ] | |
37 | if test "x$GCRYPT_LIBS" = "x" | 37 | ) |
38 | then | ||
39 | - GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null` | ||
40 | + GCRYPT_LIBS=`"$with_libgcrypt_config" --lib libgcrypt 2>/dev/null` | ||
41 | fi | ||
42 | fi | ||
43 | |||
diff --git a/meta-oe/recipes-extended/collectd/collectd_5.7.2.bb b/meta-oe/recipes-extended/collectd/collectd_5.8.0.bb index c156ea19c..92b619e22 100644 --- a/meta-oe/recipes-extended/collectd/collectd_5.7.2.bb +++ b/meta-oe/recipes-extended/collectd/collectd_5.8.0.bb | |||
@@ -12,9 +12,10 @@ SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \ | |||
12 | file://0001-conditionally-check-libvirt.patch \ | 12 | file://0001-conditionally-check-libvirt.patch \ |
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 | " | 15 | file://0005-Disable-new-gcc8-warnings.patch \ |
16 | SRC_URI[md5sum] = "5da2b69c286a064db35c6cc1e758b039" | 16 | " |
17 | SRC_URI[sha256sum] = "9d20a0221569a8d6b80bbc52b86e5e84965f5bafdbf5dfc3790e0fed0763e592" | 17 | SRC_URI[md5sum] = "a841159323624f18bf03198e9f5aa364" |
18 | SRC_URI[sha256sum] = "b06ff476bbf05533cb97ae6749262cc3c76c9969f032bd8496690084ddeb15c9" | ||
18 | 19 | ||
19 | inherit autotools pythonnative update-rc.d pkgconfig systemd | 20 | inherit autotools pythonnative update-rc.d pkgconfig systemd |
20 | 21 | ||
@@ -62,7 +63,7 @@ do_install_append() { | |||
62 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/collectd | 63 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/collectd |
63 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/collectd | 64 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/collectd |
64 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/collectd | 65 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/collectd |
65 | 66 | install -Dm 0640 ${B}/src/collectd.conf ${D}${sysconfdir}/collectd.conf | |
66 | # Fix configuration file to allow collectd to start up | 67 | # Fix configuration file to allow collectd to start up |
67 | sed -i 's!^#FQDNLookup[ \t]*true!FQDNLookup false!g' ${D}${sysconfdir}/collectd.conf | 68 | sed -i 's!^#FQDNLookup[ \t]*true!FQDNLookup false!g' ${D}${sysconfdir}/collectd.conf |
68 | 69 | ||