diff options
| author | Khem Raj <raj.khem@gmail.com> | 2020-08-12 10:10:01 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2020-08-13 22:32:07 -0700 |
| commit | 18e85358d3d6d7e8c0866266d307820c05990fa5 (patch) | |
| tree | 77df2b355fbf5903011ff53d0658070e6fabae5c /meta-networking | |
| parent | b66dc11366b77e201cf699da98617e214385a810 (diff) | |
| download | meta-openembedded-18e85358d3d6d7e8c0866266d307820c05990fa5.tar.gz | |
netplan: Update to latest to fix build with -fno-common
Add patches to fix build with clang-11
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
4 files changed, 104 insertions, 1 deletions
diff --git a/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch b/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch new file mode 100644 index 0000000000..22ecae3047 --- /dev/null +++ b/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From 0edb96a5f79dcec4f4467193716c2bf015fe5132 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 12 Aug 2020 10:38:07 -0700 | ||
| 4 | Subject: [PATCH 1/2] dbus: Remove unused variabes | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | src/dbus.c:49:23: error: unused variable 'stdout' [-Werror,-Wunused-variable] | ||
| 8 | g_autofree gchar *stdout = NULL; | ||
| 9 | ^ | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | src/dbus.c | 3 --- | ||
| 15 | 1 file changed, 3 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/src/dbus.c b/src/dbus.c | ||
| 18 | index cb7ec38..a057236 100644 | ||
| 19 | --- a/src/dbus.c | ||
| 20 | +++ b/src/dbus.c | ||
| 21 | @@ -45,9 +45,6 @@ static int method_apply(sd_bus_message *m, void *userdata, sd_bus_error *ret_err | ||
| 22 | |||
| 23 | static int method_info(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { | ||
| 24 | sd_bus_message *reply = NULL; | ||
| 25 | - g_autoptr(GError) err = NULL; | ||
| 26 | - g_autofree gchar *stdout = NULL; | ||
| 27 | - g_autofree gchar *stderr = NULL; | ||
| 28 | gint exit_status = 0; | ||
| 29 | |||
| 30 | exit_status = sd_bus_message_new_method_return(m, &reply); | ||
| 31 | -- | ||
| 32 | 2.28.0 | ||
| 33 | |||
diff --git a/meta-networking/recipes-connectivity/netplan/netplan/0001-src-parse.c-Initialize-key-to-NULL.patch b/meta-networking/recipes-connectivity/netplan/netplan/0001-src-parse.c-Initialize-key-to-NULL.patch new file mode 100644 index 0000000000..a710b1e576 --- /dev/null +++ b/meta-networking/recipes-connectivity/netplan/netplan/0001-src-parse.c-Initialize-key-to-NULL.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 63de116c617a35ff3d54c785b3dfb5378bb07f46 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 12 Aug 2020 22:39:17 -0700 | ||
| 4 | Subject: [PATCH] src/parse.c: Initialize key to NULL | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | |||
| 8 | src/parse.c:810:22: note: 'key' was declared here | ||
| 9 | cc1: all warnings being treated as errors | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | src/parse.c | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/src/parse.c b/src/parse.c | ||
| 18 | index 63a0863..c66277f 100644 | ||
| 19 | --- a/src/parse.c | ||
| 20 | +++ b/src/parse.c | ||
| 21 | @@ -807,7 +807,7 @@ handle_addresses(yaml_document_t* doc, yaml_node_t* node, const void* _, GError* | ||
| 22 | char* prefix_len; | ||
| 23 | guint64 prefix_len_num; | ||
| 24 | yaml_node_t *entry = yaml_document_get_node(doc, *i); | ||
| 25 | - yaml_node_t *key, *value = NULL; | ||
| 26 | + yaml_node_t *key = NULL, *value = NULL; | ||
| 27 | |||
| 28 | if (entry->type != YAML_SCALAR_NODE && entry->type != YAML_MAPPING_NODE) { | ||
| 29 | return yaml_error(entry, error, "expected either scalar or mapping (check indentation)"); | ||
| 30 | -- | ||
| 31 | 2.28.0 | ||
| 32 | |||
diff --git a/meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch b/meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch new file mode 100644 index 0000000000..e736529a8a --- /dev/null +++ b/meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 1da4451fd3470e6600b027cb78526b440e296f8b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 12 Aug 2020 10:47:08 -0700 | ||
| 4 | Subject: [PATCH 2/2] Makefile: Use first prerquisite only for target rule | ||
| 5 | |||
| 6 | This ensures that src/_features.h is not added to compiler cmdline which | ||
| 7 | can confuse the compiler as it may not understand .h as valid input and | ||
| 8 | complain | ||
| 9 | |||
| 10 | | clang-11: error: cannot specify -o when generating multiple output files | ||
| 11 | | make: *** [Makefile:50: netplan-dbus] Error 1 | ||
| 12 | | make: *** Waiting for unfinished jobs.... | ||
| 13 | |||
| 14 | Upstream-Status: Pending | ||
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 16 | --- | ||
| 17 | Makefile | 2 +- | ||
| 18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/Makefile b/Makefile | ||
| 21 | index 4495773..c05dea3 100644 | ||
| 22 | --- a/Makefile | ||
| 23 | +++ b/Makefile | ||
| 24 | @@ -47,7 +47,7 @@ generate: libnetplan.so.$(NETPLAN_SOVER) nm.o networkd.o generate.o sriov.o | ||
| 25 | $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ -L. -lnetplan `pkg-config --cflags --libs glib-2.0 gio-2.0 yaml-0.1 uuid` | ||
| 26 | |||
| 27 | netplan-dbus: src/dbus.c src/_features.h | ||
| 28 | - $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ `pkg-config --cflags --libs libsystemd glib-2.0` | ||
| 29 | + $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< `pkg-config --cflags --libs libsystemd glib-2.0` | ||
| 30 | |||
| 31 | src/_features.h: src/[^_]*.[hc] | ||
| 32 | printf "#include <stddef.h>\nstatic const char *feature_flags[] __attribute__((__unused__)) = {\n" > $@ | ||
| 33 | -- | ||
| 34 | 2.28.0 | ||
| 35 | |||
diff --git a/meta-networking/recipes-connectivity/netplan/netplan_0.99.bb b/meta-networking/recipes-connectivity/netplan/netplan_0.99.bb index 67ccddf6ab..5546f300b3 100644 --- a/meta-networking/recipes-connectivity/netplan/netplan_0.99.bb +++ b/meta-networking/recipes-connectivity/netplan/netplan_0.99.bb | |||
| @@ -11,11 +11,14 @@ LICENSE = "GPLv3" | |||
| 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 12 | 12 | ||
| 13 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
| 14 | SRCREV = "1ccf7e0e3a7a91edbbe3f9f0669c8bbab8248cd1" | 14 | SRCREV = "85134d13eb1ee5a1a7d139cd74ffa10933d73677" |
| 15 | PV = "0.99+git${SRCPV}" | 15 | PV = "0.99+git${SRCPV}" |
| 16 | 16 | ||
| 17 | SRC_URI = " \ | 17 | SRC_URI = " \ |
| 18 | git://github.com/CanonicalLtd/netplan.git \ | 18 | git://github.com/CanonicalLtd/netplan.git \ |
| 19 | file://0001-dbus-Remove-unused-variabes.patch \ | ||
| 20 | file://0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch \ | ||
| 21 | file://0001-src-parse.c-Initialize-key-to-NULL.patch \ | ||
| 19 | " | 22 | " |
| 20 | 23 | ||
| 21 | DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | 24 | DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
