summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Shadura <andrew.shadura@collabora.co.uk>2019-11-01 15:10:16 +0100
committerAndrej Shadura <andrew.shadura@collabora.co.uk>2019-11-01 15:10:16 +0100
commitff114e72f2ff90f4ed45cc0cbf049d3149484a2d (patch)
treebfe82d396c9aa40fa9eba6ca21fec3fa0e32521d
parent491bb1b84d5144b35a33aca4e141956d6cfbe843 (diff)
Cherry-pick upstream commits
-rw-r--r--debian/patches/0001-Refresh-devices-after-restarting-backends-some-new-d.patch27
-rw-r--r--debian/patches/0002-Makefile-fix-escaping-in-_features.h-103.patch25
-rw-r--r--debian/patches/0003-Honor-LDFLAGS-when-building-netplan-dbus-105.patch27
-rw-r--r--debian/patches/series3
4 files changed, 82 insertions, 0 deletions
diff --git a/debian/patches/0001-Refresh-devices-after-restarting-backends-some-new-d.patch b/debian/patches/0001-Refresh-devices-after-restarting-backends-some-new-d.patch
new file mode 100644
index 0000000..c26c545
--- /dev/null
+++ b/debian/patches/0001-Refresh-devices-after-restarting-backends-some-new-d.patch
@@ -0,0 +1,27 @@
+From 521a69554d2c29df7e9674ec874d5a29a13b9fdd Mon Sep 17 00:00:00 2001
+From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
+Date: Tue, 27 Aug 2019 13:11:27 -0400
+Subject: [PATCH 1/3] Refresh devices after restarting backends, some new
+ devices might appear
+
+---
+ netplan/cli/commands/apply.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/netplan/cli/commands/apply.py b/netplan/cli/commands/apply.py
+index 3e7019d..30a5013 100644
+--- a/netplan/cli/commands/apply.py
++++ b/netplan/cli/commands/apply.py
+@@ -118,6 +118,9 @@ class NetplanApply(utils.NetplanCommand):
+ else:
+ logging.debug('no netplan generated NM configuration exists')
+
++ # Refresh devices now; restarting a backend might have made something appear.
++ devices = netifaces.interfaces()
++
+ # evaluate config for extra steps we need to take (like renaming)
+ # for now, only applies to non-virtual (real) devices.
+ config_manager.parse()
+--
+2.20.1
+
diff --git a/debian/patches/0002-Makefile-fix-escaping-in-_features.h-103.patch b/debian/patches/0002-Makefile-fix-escaping-in-_features.h-103.patch
new file mode 100644
index 0000000..818b392
--- /dev/null
+++ b/debian/patches/0002-Makefile-fix-escaping-in-_features.h-103.patch
@@ -0,0 +1,25 @@
+From 43d80a655a450b9855b14477f1c921e5ebc05281 Mon Sep 17 00:00:00 2001
+From: Kexy Biscuit <kexybiscuit@outlook.com>
+Date: Thu, 3 Oct 2019 04:37:18 +0800
+Subject: [PATCH 2/3] Makefile: fix escaping in _features.h (#103)
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index d89eb26..c9921ed 100644
+--- a/Makefile
++++ b/Makefile
+@@ -36,7 +36,7 @@ netplan-dbus: src/dbus.c src/_features.h
+ $(CC) $(BUILDFLAGS) $(CFLAGS) -o $@ $^ `pkg-config --cflags --libs libsystemd glib-2.0`
+
+ src/_features.h: src/[^_]*.[hc]
+- echo "#include <stddef.h>\nstatic const char *feature_flags[] __attribute__((__unused__)) = {" > $@
++ printf "#include <stddef.h>\nstatic const char *feature_flags[] __attribute__((__unused__)) = {\n" > $@
+ awk 'match ($$0, /netplan-feature:.*/ ) { $$0=substr($$0, RSTART, RLENGTH); print "\""$$2"\"," }' $^ >> $@
+ echo "NULL, };" >> $@
+
+--
+2.20.1
+
diff --git a/debian/patches/0003-Honor-LDFLAGS-when-building-netplan-dbus-105.patch b/debian/patches/0003-Honor-LDFLAGS-when-building-netplan-dbus-105.patch
new file mode 100644
index 0000000..b94a549
--- /dev/null
+++ b/debian/patches/0003-Honor-LDFLAGS-when-building-netplan-dbus-105.patch
@@ -0,0 +1,27 @@
+From a5397e60df489dcbbb476e610b08e01ed6aaecbf Mon Sep 17 00:00:00 2001
+From: Conrad Hoffmann <1226676+bitfehler@users.noreply.github.com>
+Date: Fri, 4 Oct 2019 00:21:22 +0200
+Subject: [PATCH 3/3] Honor LDFLAGS when building netplan-dbus (#105)
+
+This is a follow-up to #91, not sure how I missed this, sorry about
+that.
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index c9921ed..e3db52d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -33,7 +33,7 @@ generate: src/generate.[hc] src/parse.[hc] src/util.[hc] src/networkd.[hc] src/n
+ $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.c, $^) `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) -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.20.1
+
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..7fd63d2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+0001-Refresh-devices-after-restarting-backends-some-new-d.patch
+0002-Makefile-fix-escaping-in-_features.h-103.patch
+0003-Honor-LDFLAGS-when-building-netplan-dbus-105.patch