patch: reorder patches

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Alexandre Derumier 2023-05-16 00:47:07 +02:00 committed by Thomas Lamprecht
parent 3233d1716e
commit 234ce3a0a5
13 changed files with 92 additions and 76 deletions

View File

@ -1,8 +1,8 @@
From e048d4f3c6516c4b7519112de13f79f70d56d44b Mon Sep 17 00:00:00 2001
From 76e402e8b446861adf45f8ece54d616808586b71 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Wed, 16 May 2018 02:11:45 +0200
Subject: [PATCH] don't remove (tap|veth|fwpr) interfaces from bridge on ifup
bridge
Subject: [PATCH 01/12] don't remove (tap|veth|fwpr) interfaces from bridge on
ifup bridge
as proxmox don't defined them in /etc/network/interfaces
@ -13,10 +13,10 @@ Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
1 file changed, 4 insertions(+)
diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
index d990b66..365e87d 100644
index 954e462..ff98b18 100644
--- a/ifupdown2/addons/bridge.py
+++ b/ifupdown2/addons/bridge.py
@@ -439,6 +439,7 @@ class bridge(Addon, moduleBase):
@@ -443,6 +443,7 @@ class bridge(Bridge, moduleBase):
"bridge-ports-condone-regex": {
"help": "bridge ports to ignore/condone when reloading config / removing interfaces",
"required": False,
@ -24,7 +24,7 @@ index d990b66..365e87d 100644
"example": ["bridge-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"]
},
"bridge-vlan-vni-map": {
@@ -1013,6 +1014,9 @@ class bridge(Addon, moduleBase):
@@ -1152,6 +1153,9 @@ class bridge(Bridge, moduleBase):
# up a compiled regex to be used in a match later. This way we try to avoid
# a race condition where an (possibly VM) interface is created after this
# function has been called but before the bridgeports are validated.
@ -35,5 +35,5 @@ index d990b66..365e87d 100644
if get_string:
return bridge_port_condone_regex
--
2.20.1
2.30.2

View File

@ -1,7 +1,7 @@
From a8368f92c36cd810933c3c5319c148976cc65a82 Mon Sep 17 00:00:00 2001
From 1cead3cbb02f7058846a6f7b7a42d875b27ee64a Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Fri, 15 Jun 2018 00:36:03 +0200
Subject: [PATCH 2/7] add dummy mtu, bridgevlanport modules
Subject: [PATCH 02/12] add dummy mtu, bridgevlanport modules
As pve-manager package still provide ifupdown custom bridgevlanport && mtu script,
we can override them with ifupdown2 addon scripts, doing nothing.
@ -10,6 +10,7 @@ we can override them with ifupdown2 addon scripts, doing nothing.
exist with same name)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
etc/network/ifupdown2/addons.conf | 2 ++
ifupdown2/addons/bridgevlanport.py | 17 +++++++++++++++++
@ -19,10 +20,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
create mode 100644 ifupdown2/addons/mtu.py
diff --git a/etc/network/ifupdown2/addons.conf b/etc/network/ifupdown2/addons.conf
index c43d377..e3639a7 100644
index 726d63a..a8f2317 100644
--- a/etc/network/ifupdown2/addons.conf
+++ b/etc/network/ifupdown2/addons.conf
@@ -19,6 +19,8 @@ up,dhcp
@@ -20,6 +20,8 @@ up,dhcp
up,address
up,addressvirtual
up,usercmds
@ -78,5 +79,5 @@ index 0000000..efdf569
+
+ _modinfo = {'mhelp' : 'dummy package to override proxmox script'}
--
2.20.1
2.30.2

View File

@ -1,7 +1,7 @@
From 3daa281c155da9da166627e35114283665f01669 Mon Sep 17 00:00:00 2001
From 397b92e6c2978a7c2f62542ec5560fadba3f296a Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Thu, 13 Jun 2019 14:34:59 +0200
Subject: [PATCH 5/7] don't remove bridge is tap|veth are still plugged
Subject: [PATCH 03/12] don't remove bridge is tap|veth are still plugged
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
@ -10,10 +10,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/ifupdown2/ifupdown/ifupdownmain.py b/ifupdown2/ifupdown/ifupdownmain.py
index 01163e2..b4e1864 100644
index 51f5460..b73c742 100644
--- a/ifupdown2/ifupdown/ifupdownmain.py
+++ b/ifupdown2/ifupdown/ifupdownmain.py
@@ -2191,7 +2191,15 @@ class ifupdownMain:
@@ -2272,7 +2272,15 @@ class ifupdownMain:
# append it to the down list
newifaceobjlist = new_ifaceobjdict.get(ifname)
if not newifaceobjlist:
@ -31,5 +31,5 @@ index 01163e2..b4e1864 100644
# If ifaceobj was present in the old interfaces file,
# and does not have a config in the new interfaces file
--
2.20.1
2.30.2

View File

@ -1,7 +1,7 @@
From 1926699b02882bc5ed659d4debce2a0127d2edf0 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Wed, 5 Jun 2019 14:47:05 +0200
Subject: [PATCH 6/7] ifreload: down/up vxlan && vlan interfaces when
Subject: [PATCH 04/12] ifreload: down/up vxlan && vlan interfaces when
ifreload_down_changed=0
almost all attributes of vxlan interfaces can't be updated

View File

@ -1,7 +1,7 @@
From 902cfb815abd85b9813f73c2bb0a5ea0fe70c03c Mon Sep 17 00:00:00 2001
From 3d974bdaed34ce3d05cdbcef271021a80d0ae881 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Mon, 31 Dec 2018 10:49:48 +0100
Subject: [PATCH] config tuning
Subject: [PATCH 05/12] config tuning
multiple_vlan_aware_bridge_support=1
@ -12,10 +12,10 @@ Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/etc/network/ifupdown2/ifupdown2.conf b/etc/network/ifupdown2/ifupdown2.conf
index ecdd94f..c974077 100644
index bc1acb9..4939186 100644
--- a/etc/network/ifupdown2/ifupdown2.conf
+++ b/etc/network/ifupdown2/ifupdown2.conf
@@ -45,7 +45,7 @@ addon_python_modules_support=1
@@ -53,7 +53,7 @@ addon_python_modules_support=1
# By default ifupdown2 only supports a single vlan filtering bridge
# on the system. Set this flag to 1 to support multiple vlan
# filtering bridges
@ -24,12 +24,12 @@ index ecdd94f..c974077 100644
# ifquery check status strings.
# By default `ifquery --check` prints the check and
@@ -88,4 +88,4 @@ adjust_logical_dev_mtu=1
@@ -96,4 +96,4 @@ adjust_logical_dev_mtu=1
# if this directory doesn't exists ifupdown2 will create it
# if directory creation fails or state_dir variable is empty
# state_dir will default to /var/tmp/network/
-state_dir=/var/tmp/network/
+state_dir=/run/network/
--
2.20.1
2.30.2

View File

@ -1,7 +1,7 @@
From e8ce294b4db6039216b72e353a51d1bac0c5313d Mon Sep 17 00:00:00 2001
From 154c536c711de1c09edbd880820da01c5b457a6c Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Thu, 30 Jan 2020 12:48:23 +0100
Subject: [PATCH] networking.service: fix dependencies and ordering
Subject: [PATCH 06/12] networking.service: fix dependencies and ordering
IMPORTANT: DO NOT REMOVE IF UNSURE!
@ -15,11 +15,12 @@ BIG WARNING HERE IS DONE BECAUSE IT WAS ALREADY REMOVED BY MISTAKE
ONCE!!
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
debian/ifupdown2-pre.service | 13 +++++++++++++
debian/ifupdown2.networking.service | 8 ++++++--
debian/ifupdown2.networking.service | 8 +++++---
debian/rules | 1 +
3 files changed, 20 insertions(+), 2 deletions(-)
3 files changed, 19 insertions(+), 3 deletions(-)
create mode 100644 debian/ifupdown2-pre.service
diff --git a/debian/ifupdown2-pre.service b/debian/ifupdown2-pre.service
@ -42,23 +43,22 @@ index 0000000..b129a62
+EnvironmentFile=-/etc/default/networking
+ExecStart=/bin/udevadm settle
diff --git a/debian/ifupdown2.networking.service b/debian/ifupdown2.networking.service
index 32f21f6..a49d1ba 100644
index cdb3065..ee5f17a 100644
--- a/debian/ifupdown2.networking.service
+++ b/debian/ifupdown2.networking.service
@@ -2,8 +2,11 @@
Description=Network initialization
Documentation=man:interfaces(5) man:ifup(8) man:ifdown(8)
DefaultDependencies=no
-Before=shutdown.target
@@ -5,8 +5,9 @@ DefaultDependencies=no
After=local-fs.target network-pre.target
Before=shutdown.target network.target network-online.target
Conflicts=shutdown.target
-Wants=systemd-udev-settle.service
-After=systemd-udev-settle.service
+Requires=ifupdown2-pre.service
+Wants=network.target
+After=local-fs.target network-pre.target systemd-sysctl.service systemd-modules-load.service ifupdown2-pre.service
+Before=network.target shutdown.target network-online.target
[Service]
Type=oneshot
@@ -16,4 +19,5 @@ ExecStop=/usr/share/ifupdown2/sbin/start-networking stop
@@ -19,4 +20,5 @@ ExecStop=/usr/share/ifupdown2/sbin/start-networking stop
ExecReload=/usr/share/ifupdown2/sbin/start-networking reload
[Install]
@ -78,5 +78,5 @@ index ea6f434..fcb304f 100755
override_dh_systemd_start:
--
2.20.1
2.30.2

View File

@ -1,7 +1,8 @@
From cfe5feada5532830a53031138c471541ebec813d Mon Sep 17 00:00:00 2001
From 014e11b7f0eaeb901ada42eaf7a0cc257d85885c Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Sun, 17 May 2020 15:46:36 +0200
Subject: [PATCH] openvswitch : ovs-ports-condone-regex : exclude tap|veth|fwln
Subject: [PATCH 07/12] openvswitch : ovs-ports-condone-regex : exclude
tap|veth|fwln
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
@ -9,10 +10,10 @@ Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
1 file changed, 3 insertions(+)
diff --git a/ifupdown2/addons/openvswitch.py b/ifupdown2/addons/openvswitch.py
index 468d7df..48beef3 100644
index 0a124ba..40fc36a 100644
--- a/ifupdown2/addons/openvswitch.py
+++ b/ifupdown2/addons/openvswitch.py
@@ -65,6 +65,7 @@ class openvswitch(Addon, moduleBase):
@@ -71,6 +71,7 @@ class openvswitch(Addon, moduleBase):
},
'ovs-ports-condone-regex': {
"help": "ovs ports to ignore/condone when reloading config / removing interfaces",
@ -20,7 +21,7 @@ index 468d7df..48beef3 100644
"required": False,
"example": ["ovs-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"]
},
@@ -101,6 +102,8 @@ class openvswitch(Addon, moduleBase):
@@ -116,6 +117,8 @@ class openvswitch(Addon, moduleBase):
def _get_ovs_port_condone_regex(self, ifaceobj, get_string = False):
ovs_port_condone_regex = ifaceobj.get_attr_value_first('ovs-ports-condone-regex')
@ -30,5 +31,5 @@ index 468d7df..48beef3 100644
if get_string:
return ovs_port_condone_regex
--
2.20.1
2.30.2

View File

@ -1,24 +1,26 @@
From 14a29c0ef26946a4721103a943249d5c3e74a865 Mon Sep 17 00:00:00 2001
From 779d3700fb583b87b03ad2b12d55442058e7d79b Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Mon, 21 Sep 2020 08:47:25 +0200
Subject: [PATCH] allow vlan tag inside vxlan tunnel
Subject: [PATCH 08/12] allow vlan tag inside vxlan tunnel
Cumulus forbid it, but it's totally valid.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
ifupdown2/addons/bridge.py | 5 -----
1 file changed, 5 deletions(-)
ifupdown2/addons/bridge.py | 7 -------
1 file changed, 7 deletions(-)
diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
index f9c789d..72c7a2f 100644
index ff98b18..f21424e 100644
--- a/ifupdown2/addons/bridge.py
+++ b/ifupdown2/addons/bridge.py
@@ -1602,11 +1602,6 @@ class bridge(Bridge, moduleBase):
@@ -1718,13 +1718,6 @@ class bridge(Bridge, moduleBase):
because kernel does honor vid info flags during deletes.
"""
- if not isbridge and (bportifaceobj.link_kind & ifaceLinkKind.VXLAN and not bportifaceobj.link_privflags & ifaceLinkPrivFlags.SINGLE_VXLAN):
- self.config_check_bridge_vni_svi_limit(bportifaceobj, ifaceobj_getfunc, pvid)
-
- if not vids or not pvid or len(vids) > 1 or vids[0] != pvid:
- self._error_vxlan_in_vlan_aware_br(bportifaceobj,
- bportifaceobj.upperifaces[0])

View File

@ -1,7 +1,7 @@
From 723bfd8e3ed7a6140a411260a4881ed886efc829 Mon Sep 17 00:00:00 2001
From 2fe84449da923d01de8bbed84f4f8ce15548225f Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Fri, 21 Feb 2020 10:01:59 +0100
Subject: [PATCH] postinst/rm : update network config compatibility
Subject: [PATCH 09/12] postinst/rm : update network config compatibility
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
@ -12,7 +12,7 @@ Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
create mode 100644 debian/ifupdown2.preinst
diff --git a/debian/ifupdown2.postinst b/debian/ifupdown2.postinst
index 3689256..5162109 100644
index 3689256..b7de485 100644
--- a/debian/ifupdown2.postinst
+++ b/debian/ifupdown2.postinst
@@ -85,6 +85,25 @@ postinst_remove_diverts()
@ -114,5 +114,5 @@ index 0000000..aa8653e
+
+exit 0
--
2.20.1
2.30.2

View File

@ -1,15 +1,16 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From fb44a9192381498ec4f0fbf89c717d07c8fb5dc2 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Mon, 24 May 2021 12:32:46 +0200
Subject: [PATCH] d/rules: drop now default "with=systemd"
Subject: [PATCH 10/12] d/rules: drop now default "with=systemd"
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
debian/rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/rules b/debian/rules
index ea6f434..dfd25f7 100755
index fcb304f..ec1b214 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,7 @@ export PYBUILD_NAME=ifupdown2
@ -21,3 +22,6 @@ index ea6f434..dfd25f7 100755
override_dh_installman:
./ifupdown2/man/genmanpages.sh ./ifupdown2/man ./man
--
2.30.2

View File

@ -1,18 +1,20 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From ff810060d779488ba093bfad67b6cd36071ebdfd Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Tue, 25 May 2021 10:34:16 +0200
Subject: [PATCH] d/rules: add dh_installsystemd override for compat >= 12
Subject: [PATCH 11/12] d/rules: add dh_installsystemd override for compat >=
12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
debian/rules | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/debian/rules b/debian/rules
index ea6f434..6ab542a 100755
index ec1b214..6539b24 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,5 +23,9 @@ override_dh_systemd_start:
@@ -24,5 +24,9 @@ override_dh_systemd_start:
override_dh_systemd_enable:
dh_systemd_enable --name=networking
@ -22,3 +24,6 @@ index ea6f434..6ab542a 100755
+
override_dh_compress:
dh_compress -X.py
--
2.30.2

View File

@ -1,18 +1,20 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From 9f8dfcaf862738b7439d5b0cb0d76dc24c3b50bc Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Tue, 6 Jul 2021 13:11:24 +0200
Subject: [PATCH] postinst: reload network config on first install
Subject: [PATCH 12/12] postinst: reload network config on first install
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
debian/ifupdown2.postinst | 2 ++
1 file changed, 2 insertions(+)
debian/ifupdown2.postinst | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/debian/ifupdown2.postinst b/debian/ifupdown2.postinst
index b7de485..eaade7c 100644
index b7de485..0137ea8 100644
--- a/debian/ifupdown2.postinst
+++ b/debian/ifupdown2.postinst
@@ -113,7 +113,9 @@ case "$1" in
@@ -111,8 +111,10 @@ case "$1" in
process_udev
chmod +x /usr/share/ifupdown2/__main__.py
postinst_remove_diverts
- if [ -f "/tmp/.ifupdown2-first-install" ]; then

21
debian/patches/series vendored
View File

@ -1,12 +1,13 @@
pve/0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch
pve/0002-add-dummy-mtu-bridgevlanport-modules.patch
pve/0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
pve/0006-config-tuning.patch
pve/0007-networking.service-fix-dependencies-and-ordering.patch
pve/0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
pve/0009-allow-vlan-tag-inside-vxlan-tunnel.patch
pve/0010-postinst-rm-update-network-config-compatibility.patch
pve/0011-d-rules-drop-now-default-with-systemd.patch
pve/0012-d-rules-add-dh_installsystemd-override-for-compat-12.patch
pve/0013-postinst-reload-network-config-on-first-install.patch
pve/0003-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
pve/0004-ifreload-down-up-vxlan-vlan-interfaces-when-ifreload.patch
pve/0005-config-tuning.patch
pve/0006-networking.service-fix-dependencies-and-ordering.patch
pve/0007-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
pve/0008-allow-vlan-tag-inside-vxlan-tunnel.patch
pve/0009-postinst-rm-update-network-config-compatibility.patch
pve/0010-d-rules-drop-now-default-with-systemd.patch
pve/0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch
pve/0012-postinst-reload-network-config-on-first-install.patch