mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-30 00:50:00 +00:00
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>
This commit is contained in:
-58
@@ -1,58 +0,0 @@
|
||||
From 6a1a24eb0f30002a4b0049d6cf38d3f2bc3c0209 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 b29174de..09421d99 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: 900,
|
||||
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
|
||||
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
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
|
||||
|
||||
+4
-6
@@ -14,15 +14,13 @@ inherit meson pkgconfig systemd python3targetconfig features_check
|
||||
|
||||
REQUIRED_DISTRO_FEATURES = "systemd"
|
||||
|
||||
SRC_URI = "git://github.com/CanonicalLtd/netplan.git;branch=stable/1.0;protocol=https \
|
||||
file://0001-meson.build-drop-unnecessary-build-dependencies.patch \
|
||||
file://0002-meson.build-do-not-use-Werror.patch \
|
||||
SRC_URI = "git://github.com/CanonicalLtd/netplan.git;branch=main;protocol=https \
|
||||
file://0001-meson.build-do-not-use-Werror.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:libc-musl = " file://0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch"
|
||||
SRC_URI:append:toolchain-clang = " file://0001-networkd.c-define-scope-specific-to-case-statement.patch"
|
||||
|
||||
SRCREV = "3a7516aadaf864ee9d04727977d3d9fd1bccbbda"
|
||||
SRCREV = "d27f32305f7f06de449b32239a89969e6ff2be31"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -30,7 +28,7 @@ DEPENDS = "glib-2.0 libyaml util-linux-libuuid \
|
||||
systemd python3-cffi-native \
|
||||
"
|
||||
|
||||
EXTRA_OEMESON = "-Dunit_testing=false"
|
||||
EXTRA_OEMESON = "-Dtesting=false -Dunit_testing=false"
|
||||
|
||||
RDEPENDS:${PN} = "python3-core python3-netifaces python3-pyyaml \
|
||||
python3-dbus python3-rich python3-cffi \
|
||||
Reference in New Issue
Block a user