diff options
-rw-r--r-- | meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch | 44 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/netplan/netplan/0001-src-parse.c-Initialize-key-to-NULL.patch | 32 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Exclude-.h-files-from-target-rule.patch (renamed from meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch) | 21 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/netplan/netplan_0.100.bb (renamed from meta-networking/recipes-connectivity/netplan/netplan_0.99.bb) | 7 |
4 files changed, 43 insertions, 61 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 index 22ecae3047..af28ba71e7 100644 --- 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 | |||
@@ -1,24 +1,27 @@ | |||
1 | From 0edb96a5f79dcec4f4467193716c2bf015fe5132 Mon Sep 17 00:00:00 2001 | 1 | From e5bd4c3853fb394edc8cbea17fad82ce23bd0fae 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: Wed, 12 Aug 2020 10:38:07 -0700 | 3 | Date: Fri, 27 Nov 2020 12:21:32 -0800 |
4 | Subject: [PATCH 1/2] dbus: Remove unused variabes | 4 | Subject: [PATCH 1/2] dbus: Remove unused variabes |
5 | 5 | ||
6 | This issue is seen when using clang to compile it | ||
7 | |||
8 | Same fix is needed for parse.c and networkd.c, | ||
9 | |||
6 | Fixes | 10 | Fixes |
7 | src/dbus.c:49:23: error: unused variable 'stdout' [-Werror,-Wunused-variable] | 11 | src/dbus.c:49:23: error: unused variable 'stdout' [-Werror,-Wunused-variable] |
8 | g_autofree gchar *stdout = NULL; | 12 | g_autofree gchar *stdout = NULL; |
9 | ^ | 13 | ^ |
10 | 14 | Upstream-Status: Submitted [https://github.com/CanonicalLtd/netplan/pull/175] | |
11 | Upstream-Status: Pending | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
13 | --- | 16 | --- |
14 | src/dbus.c | 3 --- | 17 | src/dbus.c | 3 --- |
15 | 1 file changed, 3 deletions(-) | 18 | src/networkd.c | 1 - |
19 | src/parse.c | 1 - | ||
20 | 3 files changed, 5 deletions(-) | ||
16 | 21 | ||
17 | diff --git a/src/dbus.c b/src/dbus.c | ||
18 | index cb7ec38..a057236 100644 | ||
19 | --- a/src/dbus.c | 22 | --- a/src/dbus.c |
20 | +++ b/src/dbus.c | 23 | +++ b/src/dbus.c |
21 | @@ -45,9 +45,6 @@ static int method_apply(sd_bus_message *m, void *userdata, sd_bus_error *ret_err | 24 | @@ -45,9 +45,6 @@ static int method_apply(sd_bus_message * |
22 | 25 | ||
23 | static int method_info(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { | 26 | static int method_info(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { |
24 | sd_bus_message *reply = NULL; | 27 | sd_bus_message *reply = NULL; |
@@ -28,6 +31,23 @@ index cb7ec38..a057236 100644 | |||
28 | gint exit_status = 0; | 31 | gint exit_status = 0; |
29 | 32 | ||
30 | exit_status = sd_bus_message_new_method_return(m, &reply); | 33 | exit_status = sd_bus_message_new_method_return(m, &reply); |
31 | -- | 34 | --- a/src/networkd.c |
32 | 2.28.0 | 35 | +++ b/src/networkd.c |
33 | 36 | @@ -896,7 +896,6 @@ append_wpa_auth_conf(GString* s, const N | |
37 | static void | ||
38 | write_wpa_unit(const NetplanNetDefinition* def, const char* rootdir) | ||
39 | { | ||
40 | - g_autoptr(GError) err = NULL; | ||
41 | g_autofree gchar *stdouth = NULL; | ||
42 | |||
43 | stdouth = systemd_escape(def->id); | ||
44 | --- a/src/parse.c | ||
45 | +++ b/src/parse.c | ||
46 | @@ -1898,7 +1898,6 @@ handle_wireguard_peers(yaml_document_t* | ||
47 | } | ||
48 | |||
49 | for (yaml_node_item_t *i = node->data.sequence.items.start; i < node->data.sequence.items.top; i++) { | ||
50 | - g_autofree char* addr = NULL; | ||
51 | yaml_node_t *entry = yaml_document_get_node(doc, *i); | ||
52 | assert_type(entry, YAML_MAPPING_NODE); | ||
53 | |||
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 deleted file mode 100644 index a710b1e576..0000000000 --- a/meta-networking/recipes-connectivity/netplan/netplan/0001-src-parse.c-Initialize-key-to-NULL.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
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-Exclude-.h-files-from-target-rule.patch index e736529a8a..cd75d1cb1c 100644 --- 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-Exclude-.h-files-from-target-rule.patch | |||
@@ -1,35 +1,30 @@ | |||
1 | From 1da4451fd3470e6600b027cb78526b440e296f8b Mon Sep 17 00:00:00 2001 | 1 | From 5abb6b8343b5d2633844144979b40f398450b544 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: Wed, 12 Aug 2020 10:47:08 -0700 | 3 | Date: Fri, 27 Nov 2020 12:22:32 -0800 |
4 | Subject: [PATCH 2/2] Makefile: Use first prerquisite only for target rule | 4 | Subject: [PATCH 2/2] Makefile: Exclude .h files from target rule |
5 | 5 | ||
6 | This ensures that src/_features.h is not added to compiler cmdline which | 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 | 7 | can confuse the compilers e.g. clang as it may not like .h as valid input |
8 | complain | 8 | and complain |
9 | 9 | ||
10 | | clang-11: error: cannot specify -o when generating multiple output files | 10 | | clang-11: error: cannot specify -o when generating multiple output files |
11 | | make: *** [Makefile:50: netplan-dbus] Error 1 | 11 | | make: *** [Makefile:50: netplan-dbus] Error 1 |
12 | | make: *** Waiting for unfinished jobs.... | 12 | | make: *** Waiting for unfinished jobs.... |
13 | 13 | ||
14 | Upstream-Status: Pending | 14 | Upstream-Status: Submitted [https://github.com/CanonicalLtd/netplan/pull/175] |
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
16 | --- | 16 | --- |
17 | Makefile | 2 +- | 17 | Makefile | 2 +- |
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
19 | 19 | ||
20 | diff --git a/Makefile b/Makefile | ||
21 | index 4495773..c05dea3 100644 | ||
22 | --- a/Makefile | 20 | --- a/Makefile |
23 | +++ b/Makefile | 21 | +++ b/Makefile |
24 | @@ -47,7 +47,7 @@ generate: libnetplan.so.$(NETPLAN_SOVER) nm.o networkd.o generate.o sriov.o | 22 | @@ -47,7 +47,7 @@ generate: libnetplan.so.$(NETPLAN_SOVER) |
25 | $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ -L. -lnetplan `pkg-config --cflags --libs glib-2.0 gio-2.0 yaml-0.1 uuid` | 23 | $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ -L. -lnetplan `pkg-config --cflags --libs glib-2.0 gio-2.0 yaml-0.1 uuid` |
26 | 24 | ||
27 | netplan-dbus: src/dbus.c src/_features.h | 25 | netplan-dbus: src/dbus.c src/_features.h |
28 | - $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ `pkg-config --cflags --libs libsystemd glib-2.0` | 26 | - $(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` | 27 | + $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(patsubst %.h,,$^) `pkg-config --cflags --libs libsystemd glib-2.0` |
30 | 28 | ||
31 | src/_features.h: src/[^_]*.[hc] | 29 | src/_features.h: src/[^_]*.[hc] |
32 | printf "#include <stddef.h>\nstatic const char *feature_flags[] __attribute__((__unused__)) = {\n" > $@ | 30 | 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.100.bb index 5546f300b3..2f74a22c05 100644 --- a/meta-networking/recipes-connectivity/netplan/netplan_0.99.bb +++ b/meta-networking/recipes-connectivity/netplan/netplan_0.100.bb | |||
@@ -11,14 +11,13 @@ 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 = "85134d13eb1ee5a1a7d139cd74ffa10933d73677" | 14 | SRCREV = "b7d32aebc880f3161b8f97ee56b729c0c54dd0e4" |
15 | PV = "0.99+git${SRCPV}" | 15 | PV = "0.100+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 \ | 19 | file://0001-dbus-Remove-unused-variabes.patch \ |
20 | file://0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch \ | 20 | file://0002-Makefile-Exclude-.h-files-from-target-rule.patch \ |
21 | file://0001-src-parse.c-Initialize-key-to-NULL.patch \ | ||
22 | " | 21 | " |
23 | 22 | ||
24 | DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | 23 | DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |