diff options
Diffstat (limited to 'meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan')
4 files changed, 166 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch new file mode 100644 index 0000000000..cabceae84d --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch @@ -0,0 +1,32 @@ +From 0ea11f520a8b4453e60eaf0679b9feb757024422 Mon Sep 17 00:00:00 2001 +From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> +Date: Fri, 25 Dec 2020 11:41:43 +0900 +Subject: [PATCH] don't fail if GLOB_BRACE is not defined + +Upstream-Status: Pending + +Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> +--- + src/util.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/util.c b/src/util.c +index 36eb896a..ee13ec44 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -35,6 +35,12 @@ + #include "names.h" + #include "yaml-helpers.h" + ++/* Don't fail if the standard library ++ * doesn't provide brace expansion */ ++#ifndef GLOB_BRACE ++#define GLOB_BRACE 0 ++#endif ++ + GHashTable* + wifi_frequency_24; + +-- +2.25.1 + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-drop-unnecessary-build-dependencies.patch b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-drop-unnecessary-build-dependencies.patch new file mode 100644 index 0000000000..4f385e917a --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-drop-unnecessary-build-dependencies.patch @@ -0,0 +1,58 @@ +From d3aa30f5cd7ba375e006a755752acbcfcd619452 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Wed, 6 Mar 2024 19:27:15 +0800 +Subject: [PATCH] meson.build: drop unnecessary build dependencies + +The pytest and pycoverage are required by meson test but not for +building. Mark them as 'required: false' to get rid of unnecessary +build dependencies. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + meson.build | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 9556836a..30f33fe2 100644 +--- a/meson.build ++++ b/meson.build +@@ -25,8 +25,8 @@ bash_completions_dir = completions.get_variable(pkgconfig: 'completionsdir', def + # Order: Fedora/Mageia/openSUSE || Debian/Ubuntu + pyflakes = find_program('pyflakes-3', 'pyflakes3', required: false) + pycodestyle = find_program('pycodestyle-3', 'pycodestyle', 'pep8', required: false) +-pytest = find_program('pytest-3', 'pytest3') # also requires the pytest-cov plugin +-pycoverage = find_program('coverage-3', 'python3-coverage') ++pytest = find_program('pytest-3', 'pytest3', required: false) # also requires the pytest-cov plugin ++pycoverage = find_program('coverage-3', 'python3-coverage', required: false) + pandoc = find_program('pandoc', required: false) + find = find_program('find') + +@@ -75,6 +75,7 @@ if get_option('unit_testing') + endif + + #FIXME: exclude doc/env/ ++if pyflakes.found() and pycodestyle.found() + test('linting', + pyflakes, + timeout: 100, +@@ -91,7 +92,9 @@ test('legacy-tests', + find_program('tests/cli_legacy.py'), + timeout: 600, + env: test_env) ++endif + #TODO: split out dbus tests into own test() instance, to run in parallel ++if pycoverage.found() + test('unit-tests', + pycoverage, + args: ['run', '-a', '-m', 'pytest', '-s', '-v', '--cov-append', meson.current_source_dir()], +@@ -143,4 +146,5 @@ if get_option('b_coverage') + priority: -99, # run last + is_parallel: false) + endif ++endif + +-- +2.25.1 + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-networkd.c-define-scope-specific-to-case-statement.patch b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-networkd.c-define-scope-specific-to-case-statement.patch new file mode 100644 index 0000000000..9f01108a20 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-networkd.c-define-scope-specific-to-case-statement.patch @@ -0,0 +1,47 @@ +From 6e3dd61bf90a7ca8c36c5b95943cbff7c1ad3c2d Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Wed, 6 Mar 2024 16:12:31 +0800 +Subject: [PATCH] networkd.c: define scope specific to case statement + +Per [1], define a scope specific to case statement to fix build with +clang. + +Fixes: +../git/src/networkd.c:544:13: error: expected expression + 544 | gchar* first = g_strcmp0(def->id, def->veth_peer_link->id) < 0 ? def->id : def->veth_peer_link->id; + | ^ +../git/src/networkd.c:545:17: error: use of undeclared identifier 'first' + 545 | if (first != def->id) { + | ^ + +[1] https://stackoverflow.com/questions/92396/why-cant-variables-be-declared-in-a-switch-statement + +Upstream-Status: Pending + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + src/networkd.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/networkd.c b/src/networkd.c +index 25121c48..5eb9c0fe 100644 +--- a/src/networkd.c ++++ b/src/networkd.c +@@ -541,12 +541,14 @@ write_netdev_file(const NetplanNetDefinition* def, const char* rootdir, const ch + * and, if the selected name is the name of the netdef being written, we generate + * the .netdev file. Otherwise we skip the netdef. + */ ++ { + gchar* first = g_strcmp0(def->id, def->veth_peer_link->id) < 0 ? def->id : def->veth_peer_link->id; + if (first != def->id) { + g_string_free(s, TRUE); + return; + } + g_string_append_printf(s, "Kind=veth\n\n[Peer]\nName=%s\n", def->veth_peer_link->id); ++ } + break; + + case NETPLAN_DEF_TYPE_TUNNEL: +-- +2.25.1 + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0002-meson.build-do-not-use-Werror.patch b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0002-meson.build-do-not-use-Werror.patch new file mode 100644 index 0000000000..663a80ecde --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0002-meson.build-do-not-use-Werror.patch @@ -0,0 +1,29 @@ +From 668ee79f39614ad758edd44c42b8b0eff57877cf Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Sun, 3 Oct 2021 21:52:16 +0200 +Subject: [PATCH] meson.build: do not use -Werror + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 30f33fe2..0b214795 100644 +--- a/meson.build ++++ b/meson.build +@@ -4,7 +4,7 @@ project('netplan', 'c', + default_options: [ + 'c_std=c99', + 'warning_level=2', +- 'werror=true', ++ 'werror=false', + ], + meson_version: '>= 0.61.0', + ) +-- +2.25.1 + |