summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2024-09-15 20:51:50 +0800
committerKhem Raj <raj.khem@gmail.com>2024-09-15 07:46:44 -0700
commit0a28a9ef22cbb9d532be97340d5668e8687cca87 (patch)
tree21d738bee2d13381289482f93d8c6d1144556c6b
parent043a6e8182398dff099f405aa35f24b6a72886b4 (diff)
downloadmeta-openembedded-0a28a9ef22cbb9d532be97340d5668e8687cca87.tar.gz
netplan: upgrade 1.0.1 -> 1.1
ChangeLog: https://github.com/canonical/netplan/releases/tag/1.1 * Drop the following patches as the issues have been fixed upstream: 0001-meson.build-drop-unnecessary-build-dependencies.patch 0001-networkd.c-define-scope-specific-to-case-statement.patch * Set build option -Dtesting=false to skip testing. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-do-not-use-Werror.patch (renamed from meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0002-meson.build-do-not-use-Werror.patch)0
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-drop-unnecessary-build-dependencies.patch58
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-networkd.c-define-scope-specific-to-case-statement.patch47
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.1.bb (renamed from meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.0.1.bb)10
4 files changed, 4 insertions, 111 deletions
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/0001-meson.build-do-not-use-Werror.patch
index 663a80ecde..663a80ecde 100644
--- 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/0001-meson.build-do-not-use-Werror.patch
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
deleted file mode 100644
index 860451d972..0000000000
--- a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-drop-unnecessary-build-dependencies.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1From 6a1a24eb0f30002a4b0049d6cf38d3f2bc3c0209 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Wed, 6 Mar 2024 19:27:15 +0800
4Subject: [PATCH] meson.build: drop unnecessary build dependencies
5
6The pytest and pycoverage are required by meson test but not for
7building. Mark them as 'required: false' to get rid of unnecessary
8build dependencies.
9
10Upstream-Status: Inappropriate [oe specific]
11
12Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
13---
14 meson.build | 8 ++++++--
15 1 file changed, 6 insertions(+), 2 deletions(-)
16
17diff --git a/meson.build b/meson.build
18index b29174de..09421d99 100644
19--- a/meson.build
20+++ b/meson.build
21@@ -25,8 +25,8 @@ bash_completions_dir = completions.get_variable(pkgconfig: 'completionsdir', def
22 # Order: Fedora/Mageia/openSUSE || Debian/Ubuntu
23 pyflakes = find_program('pyflakes-3', 'pyflakes3', required: false)
24 pycodestyle = find_program('pycodestyle-3', 'pycodestyle', 'pep8', required: false)
25-pytest = find_program('pytest-3', 'pytest3') # also requires the pytest-cov plugin
26-pycoverage = find_program('coverage-3', 'python3-coverage')
27+pytest = find_program('pytest-3', 'pytest3', required: false) # also requires the pytest-cov plugin
28+pycoverage = find_program('coverage-3', 'python3-coverage', required: false)
29 pandoc = find_program('pandoc', required: false)
30 find = find_program('find')
31
32@@ -75,6 +75,7 @@ if get_option('unit_testing')
33 endif
34
35 #FIXME: exclude doc/env/
36+if pyflakes.found() and pycodestyle.found()
37 test('linting',
38 pyflakes,
39 timeout: 100,
40@@ -91,7 +92,9 @@ test('legacy-tests',
41 find_program('tests/cli_legacy.py'),
42 timeout: 900,
43 env: test_env)
44+endif
45 #TODO: split out dbus tests into own test() instance, to run in parallel
46+if pycoverage.found()
47 test('unit-tests',
48 pycoverage,
49 args: ['run', '-a', '-m', 'pytest', '-s', '-v', '--cov-append', meson.current_source_dir()],
50@@ -143,4 +146,5 @@ if get_option('b_coverage')
51 priority: -99, # run last
52 is_parallel: false)
53 endif
54+endif
55
56--
572.25.1
58
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
deleted file mode 100644
index 9f01108a20..0000000000
--- a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-networkd.c-define-scope-specific-to-case-statement.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From 6e3dd61bf90a7ca8c36c5b95943cbff7c1ad3c2d Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Wed, 6 Mar 2024 16:12:31 +0800
4Subject: [PATCH] networkd.c: define scope specific to case statement
5
6Per [1], define a scope specific to case statement to fix build with
7clang.
8
9Fixes:
10../git/src/networkd.c:544:13: error: expected expression
11 544 | gchar* first = g_strcmp0(def->id, def->veth_peer_link->id) < 0 ? def->id : def->veth_peer_link->id;
12 | ^
13../git/src/networkd.c:545:17: error: use of undeclared identifier 'first'
14 545 | if (first != def->id) {
15 | ^
16
17[1] https://stackoverflow.com/questions/92396/why-cant-variables-be-declared-in-a-switch-statement
18
19Upstream-Status: Pending
20
21Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
22---
23 src/networkd.c | 2 ++
24 1 file changed, 2 insertions(+)
25
26diff --git a/src/networkd.c b/src/networkd.c
27index 25121c48..5eb9c0fe 100644
28--- a/src/networkd.c
29+++ b/src/networkd.c
30@@ -541,12 +541,14 @@ write_netdev_file(const NetplanNetDefinition* def, const char* rootdir, const ch
31 * and, if the selected name is the name of the netdef being written, we generate
32 * the .netdev file. Otherwise we skip the netdef.
33 */
34+ {
35 gchar* first = g_strcmp0(def->id, def->veth_peer_link->id) < 0 ? def->id : def->veth_peer_link->id;
36 if (first != def->id) {
37 g_string_free(s, TRUE);
38 return;
39 }
40 g_string_append_printf(s, "Kind=veth\n\n[Peer]\nName=%s\n", def->veth_peer_link->id);
41+ }
42 break;
43
44 case NETPLAN_DEF_TYPE_TUNNEL:
45--
462.25.1
47
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.0.1.bb b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.1.bb
index 2b1a4ffdab..40d72caa0e 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.0.1.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.1.bb
@@ -14,15 +14,13 @@ inherit meson pkgconfig systemd python3targetconfig features_check
14 14
15REQUIRED_DISTRO_FEATURES = "systemd" 15REQUIRED_DISTRO_FEATURES = "systemd"
16 16
17SRC_URI = "git://github.com/CanonicalLtd/netplan.git;branch=stable/1.0;protocol=https \ 17SRC_URI = "git://github.com/CanonicalLtd/netplan.git;branch=main;protocol=https \
18 file://0001-meson.build-drop-unnecessary-build-dependencies.patch \ 18 file://0001-meson.build-do-not-use-Werror.patch \
19 file://0002-meson.build-do-not-use-Werror.patch \
20 " 19 "
21 20
22SRC_URI:append:libc-musl = " file://0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch" 21SRC_URI:append:libc-musl = " file://0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch"
23SRC_URI:append:toolchain-clang = " file://0001-networkd.c-define-scope-specific-to-case-statement.patch"
24 22
25SRCREV = "3a7516aadaf864ee9d04727977d3d9fd1bccbbda" 23SRCREV = "d27f32305f7f06de449b32239a89969e6ff2be31"
26 24
27S = "${WORKDIR}/git" 25S = "${WORKDIR}/git"
28 26
@@ -30,7 +28,7 @@ DEPENDS = "glib-2.0 libyaml util-linux-libuuid \
30 systemd python3-cffi-native \ 28 systemd python3-cffi-native \
31 " 29 "
32 30
33EXTRA_OEMESON = "-Dunit_testing=false" 31EXTRA_OEMESON = "-Dtesting=false -Dunit_testing=false"
34 32
35RDEPENDS:${PN} = "python3-core python3-netifaces python3-pyyaml \ 33RDEPENDS:${PN} = "python3-core python3-netifaces python3-pyyaml \
36 python3-dbus python3-rich python3-cffi \ 34 python3-dbus python3-rich python3-cffi \