diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-connectivity/netplan')
-rw-r--r-- | meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch | 33 | ||||
-rw-r--r-- | meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-src-parse.c-Initialize-key-to-NULL.patch | 32 | ||||
-rw-r--r-- | meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch | 35 | ||||
-rw-r--r-- | meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.99.bb (renamed from meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb) | 23 |
4 files changed, 113 insertions, 10 deletions
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch new file mode 100644 index 000000000..22ecae304 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch @@ -0,0 +1,33 @@ +From 0edb96a5f79dcec4f4467193716c2bf015fe5132 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 12 Aug 2020 10:38:07 -0700 +Subject: [PATCH 1/2] dbus: Remove unused variabes + +Fixes +src/dbus.c:49:23: error: unused variable 'stdout' [-Werror,-Wunused-variable] +g_autofree gchar *stdout = NULL; +^ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/dbus.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/dbus.c b/src/dbus.c +index cb7ec38..a057236 100644 +--- a/src/dbus.c ++++ b/src/dbus.c +@@ -45,9 +45,6 @@ static int method_apply(sd_bus_message *m, void *userdata, sd_bus_error *ret_err + + static int method_info(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { + sd_bus_message *reply = NULL; +- g_autoptr(GError) err = NULL; +- g_autofree gchar *stdout = NULL; +- g_autofree gchar *stderr = NULL; + gint exit_status = 0; + + exit_status = sd_bus_message_new_method_return(m, &reply); +-- +2.28.0 + diff --git a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-src-parse.c-Initialize-key-to-NULL.patch b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-src-parse.c-Initialize-key-to-NULL.patch new file mode 100644 index 000000000..a710b1e57 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-src-parse.c-Initialize-key-to-NULL.patch @@ -0,0 +1,32 @@ +From 63de116c617a35ff3d54c785b3dfb5378bb07f46 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 12 Aug 2020 22:39:17 -0700 +Subject: [PATCH] src/parse.c: Initialize key to NULL + +Fixes + +src/parse.c:810:22: note: 'key' was declared here +cc1: all warnings being treated as errors + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/parse.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/parse.c b/src/parse.c +index 63a0863..c66277f 100644 +--- a/src/parse.c ++++ b/src/parse.c +@@ -807,7 +807,7 @@ handle_addresses(yaml_document_t* doc, yaml_node_t* node, const void* _, GError* + char* prefix_len; + guint64 prefix_len_num; + yaml_node_t *entry = yaml_document_get_node(doc, *i); +- yaml_node_t *key, *value = NULL; ++ yaml_node_t *key = NULL, *value = NULL; + + if (entry->type != YAML_SCALAR_NODE && entry->type != YAML_MAPPING_NODE) { + return yaml_error(entry, error, "expected either scalar or mapping (check indentation)"); +-- +2.28.0 + diff --git a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch new file mode 100644 index 000000000..e736529a8 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch @@ -0,0 +1,35 @@ +From 1da4451fd3470e6600b027cb78526b440e296f8b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 12 Aug 2020 10:47:08 -0700 +Subject: [PATCH 2/2] Makefile: Use first prerquisite only for target rule + +This ensures that src/_features.h is not added to compiler cmdline which +can confuse the compiler as it may not understand .h as valid input and +complain + +| clang-11: error: cannot specify -o when generating multiple output files +| make: *** [Makefile:50: netplan-dbus] Error 1 +| make: *** Waiting for unfinished jobs.... + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 4495773..c05dea3 100644 +--- a/Makefile ++++ b/Makefile +@@ -47,7 +47,7 @@ generate: libnetplan.so.$(NETPLAN_SOVER) nm.o networkd.o generate.o sriov.o + $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ -L. -lnetplan `pkg-config --cflags --libs glib-2.0 gio-2.0 yaml-0.1 uuid` + + netplan-dbus: src/dbus.c src/_features.h +- $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ `pkg-config --cflags --libs libsystemd glib-2.0` ++ $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< `pkg-config --cflags --libs libsystemd glib-2.0` + + src/_features.h: src/[^_]*.[hc] + printf "#include <stddef.h>\nstatic const char *feature_flags[] __attribute__((__unused__)) = {\n" > $@ +-- +2.28.0 + diff --git a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.99.bb index 9f123c70f..5546f300b 100644 --- a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +++ b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.99.bb @@ -11,26 +11,29 @@ LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" S = "${WORKDIR}/git" -SRCREV = "5d22e9d22c4a3724d27b80b0cd9b898ae8f59d2b" -PV = "0.98+git${SRCPV}" +SRCREV = "85134d13eb1ee5a1a7d139cd74ffa10933d73677" +PV = "0.99+git${SRCPV}" SRC_URI = " \ git://github.com/CanonicalLtd/netplan.git \ + file://0001-dbus-Remove-unused-variabes.patch \ + file://0002-Makefile-Use-first-prerquisite-only-for-target-rule.patch \ + file://0001-src-parse.c-Initialize-key-to-NULL.patch \ " DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid" +RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid libnetplan" inherit pkgconfig systemd TARGET_CC_ARCH += "${LDFLAGS}" -EXTRA_OEMAKE = "generate" +EXTRA_OEMAKE = "generate netplan/_features.py" EXTRA_OEMAKE =+ "${@bb.utils.contains('DISTRO_FEATURES','systemd','netplan-dbus dbus/io.netplan.Netplan.service','',d)}" do_install() { - install -d ${D}${sbindir} ${D}${base_libdir}/netplan ${D}${datadir}/netplan/netplan/cli/commands ${D}${sysconfdir}/netplan + install -d ${D}${sbindir} ${D}${libdir} ${D}${base_libdir}/netplan ${D}${datadir}/netplan/netplan/cli/commands ${D}${sysconfdir}/netplan install -m 755 ${S}/generate ${D}${base_libdir}/netplan/ install -m 644 ${S}/netplan/*.py ${D}${datadir}/netplan/netplan install -m 644 ${S}/netplan/cli/*.py ${D}${datadir}/netplan/netplan/cli @@ -39,7 +42,6 @@ do_install() { ln -srf ${D}${datadir}/netplan/netplan.script ${D}${sbindir}/netplan install -d ${D}/${systemd_unitdir}/system ${D}${systemd_unitdir}/system-generators - install -m 644 ${S}/src/netplan-wpa@.service ${D}${systemd_unitdir}/system/ ln -srf ${D}/${base_libdir}/netplan/generate ${D}${systemd_unitdir}/system-generators if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then @@ -48,12 +50,13 @@ do_install() { install -m 644 ${S}/dbus/io.netplan.Netplan.conf ${D}${datadir}/dbus-1/system.d install -m 644 ${S}/dbus/io.netplan.Netplan.service ${D}${datadir}/dbus-1/system-services fi -} -SYSTEMD_SERVICE_${PN} = "netplan-wpa@.service" -SYSTEMD_AUTO_ENABLE = "disable" + install -m 755 ${S}/libnetplan.so.0.0 ${D}${libdir} + ln -rfs ${D}${libdir}/libnetplan.so.0.0 ${D}${libdir}/libnetplan.so +} -PACKAGES += "${PN}-dbus" +PACKAGES += "${PN}-dbus libnetplan" +FILES_libnetplan = "${libdir}/libnetplan.so.0.0" FILES_${PN} = "${sbindir} ${base_libdir}/netplan/generate ${datadir}/netplan ${sysconfdir}/netplan ${systemd_unitdir}" FILES_${PN}-dbus = "${base_libdir}/netplan/netplan-dbus ${datadir}/dbus-1" |