]> git.proxmox.com Git - ifupdown2.git/commitdiff
merge in downstream packaging changes & drop patches
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 20 May 2023 09:46:32 +0000 (11:46 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 20 May 2023 13:48:33 +0000 (15:48 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
19 files changed:
Makefile
debian/ifupdown2-pre.service [new file with mode: 0644]
debian/ifupdown2.networking.service
debian/ifupdown2.postinst
debian/ifupdown2.postrm
debian/ifupdown2.preinst [new file with mode: 0644]
debian/patches/pve/0006-networking.service-fix-dependencies-and-ordering.patch [deleted file]
debian/patches/pve/0006-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch [new file with mode: 0644]
debian/patches/pve/0007-allow-vlan-tag-inside-vxlan-tunnel.patch [new file with mode: 0644]
debian/patches/pve/0007-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch [deleted file]
debian/patches/pve/0008-allow-vlan-tag-inside-vxlan-tunnel.patch [deleted file]
debian/patches/pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch [new file with mode: 0644]
debian/patches/pve/0009-postinst-rm-update-network-config-compatibility.patch [deleted file]
debian/patches/pve/0010-d-rules-drop-now-default-with-systemd.patch [deleted file]
debian/patches/pve/0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch [deleted file]
debian/patches/pve/0012-postinst-reload-network-config-on-first-install.patch [deleted file]
debian/patches/pve/0013-lacp-bond-remove-bond-min-links-0-warning.patch [deleted file]
debian/patches/series
debian/rules

index e99311cc9d3ad1c2c90f9a4de28a1bc50a19c7e7..3067df2f62589499fe51fbcd00f9c51a6ffc4ade 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,10 +18,11 @@ submodule:
 
 buildir: $(BUILDDIR)
 $(BUILDDIR): submodule
-       rm -rf $(BUILDDIR)
-       mkdir $(BUILDDIR)
-       cp -a $(SRCDIR)/* $(BUILDDIR)/
-       cp -R debian/* $(BUILDDIR)/debian/
+       rm -rf $@ $@.tmp
+       cp -a $(SRCDIR)/ $@.tmp/
+       rm -rf $@.tmp/debian
+       cp -a debian $@.tmp/
+       mv $@.tmp $@
 
 .PHONY: deb
 deb: $(DEB)
diff --git a/debian/ifupdown2-pre.service b/debian/ifupdown2-pre.service
new file mode 100644 (file)
index 0000000..b129a62
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=Helper to synchronize boot up for ifupdown
+DefaultDependencies=no
+Wants=systemd-udevd.service
+After=systemd-udev-trigger.service
+Before=network.target
+
+[Service]
+Type=oneshot
+TimeoutSec=180
+RemainAfterExit=yes
+EnvironmentFile=-/etc/default/networking
+ExecStart=/bin/udevadm settle
index cdb30657c1d785dd29673e6ae69cc290858c68f0..ee5f17a928b84ee9572767f145cd91bccddde28f 100644 (file)
@@ -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
 
 [Service]
 Type=oneshot
@@ -19,4 +20,5 @@ ExecStop=/usr/share/ifupdown2/sbin/start-networking stop
 ExecReload=/usr/share/ifupdown2/sbin/start-networking reload
 
 [Install]
-WantedBy=basic.target network.target shutdown.target
+WantedBy=multi-user.target network-online.target
+
index 3689256ac189a5c2d0e4f5c8c95f4f677d364e7b..0137ea8ad466fcad13cbf3669ccffc673178d609 100644 (file)
@@ -85,6 +85,25 @@ postinst_remove_diverts()
     _postinst_remove_diverts "/usr/share/man/man5/interfaces.5.gz"
 }
 
+proxmox_compatibility()
+{
+    perl -e '
+       my $haspve_common; eval { require PVE::INotify; $haspve_common = 1; };
+       exit if !$haspve_common;
+       my $config = PVE::INotify::read_file('interfaces', 1);
+       my $configdata = $config->{data};
+
+       PVE::INotify::write_file('interfaces', $configdata);
+
+       $config = PVE::INotify::read_file('interfaces', 1);
+
+       if (defined($config->{changes})) {
+           #print $config->{changes};
+           print "\nnetwork config changes have been detected for ifupdown2 compatibility.\nSaved in /etc/network/interfaces.new for hot-apply or next reboot.\n\n";
+       }
+    ' || true
+}
+
 case "$1" in
     configure)
         fix_dhclient_file_with_space
@@ -92,6 +111,12 @@ case "$1" in
         process_udev
         chmod +x /usr/share/ifupdown2/__main__.py
         postinst_remove_diverts
+        if [ -f "/tmp/.ifupdown2-first-install" ] && [ ! -e /proxmox_install_mode ]; then
+            proxmox_compatibility
+            echo "Reloading network config on first install"
+            ifreload -a
+            rm  /tmp/.ifupdown2-first-install
+        fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
index 5d90b21d6959c546d5db90c5bc50285e769a6495..fd62294541a23709b2fbea3de8c24a2a0c1cd417 100644 (file)
@@ -25,10 +25,30 @@ process_udev()
     fi
 }
 
+proxmox_compatibility()
+{
+    perl -e '
+        my $haspve_common; eval { require PVE::INotify; $haspve_common = 1; };
+        exit if !$haspve_common;
+        my $config = PVE::INotify::read_file('interfaces', 1);
+        my $configdata = $config->{data};
+
+        PVE::INotify::write_file('interfaces', $configdata);
+
+        $config = PVE::INotify::read_file('interfaces', 1);
+
+        if (defined($config->{changes})) {
+            #print $config->{changes};
+            print "\nnetwork config changes have been detected for ifupdown2 to ifupdown1 switch compatibility.\nSaved in /etc/network/interfaces.new for next reboot\n\n";
+        }
+    ' || true
+}
+
 case "$1" in
     purge|remove|abort-install|disappear)
         process_state_file
         process_udev
+        proxmox_compatibility
     ;;
 
     upgrade|failed-upgrade|abort-upgrade|disappear)
diff --git a/debian/ifupdown2.preinst b/debian/ifupdown2.preinst
new file mode 100644 (file)
index 0000000..aa8653e
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    install)
+        touch /tmp/.ifupdown2-first-install
+        ;;
+
+    upgrade|abort-upgrade)
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+        ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/patches/pve/0006-networking.service-fix-dependencies-and-ordering.patch b/debian/patches/pve/0006-networking.service-fix-dependencies-and-ordering.patch
deleted file mode 100644 (file)
index 48acf09..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-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 06/12] networking.service: fix dependencies and ordering
-
-IMPORTANT: DO NOT REMOVE IF UNSURE!
-
-ONLY IF IFUPDOWN2 FIXED THEIR SERVICE MESS.
-
-THEY CLOSED TWO PULL REQUESTS ALREADY WITHOUT REASON.
-
-SO WE JUST HAVE TO KEEP THIS DOWNSTREAM PATCH!
-
-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/rules                        |  1 +
- 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
-new file mode 100644
-index 0000000..b129a62
---- /dev/null
-+++ b/debian/ifupdown2-pre.service
-@@ -0,0 +1,13 @@
-+[Unit]
-+Description=Helper to synchronize boot up for ifupdown
-+DefaultDependencies=no
-+Wants=systemd-udevd.service
-+After=systemd-udev-trigger.service
-+Before=network.target
-+
-+[Service]
-+Type=oneshot
-+TimeoutSec=180
-+RemainAfterExit=yes
-+EnvironmentFile=-/etc/default/networking
-+ExecStart=/bin/udevadm settle
-diff --git a/debian/ifupdown2.networking.service b/debian/ifupdown2.networking.service
-index cdb3065..ee5f17a 100644
---- a/debian/ifupdown2.networking.service
-+++ b/debian/ifupdown2.networking.service
-@@ -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
- [Service]
- Type=oneshot
-@@ -19,4 +20,5 @@ ExecStop=/usr/share/ifupdown2/sbin/start-networking stop
- ExecReload=/usr/share/ifupdown2/sbin/start-networking reload
- [Install]
--WantedBy=basic.target network.target shutdown.target
-+WantedBy=multi-user.target network-online.target
-+
-diff --git a/debian/rules b/debian/rules
-index ea6f434..fcb304f 100755
---- a/debian/rules
-+++ b/debian/rules
-@@ -15,6 +15,7 @@ override_dh_install:
-       dh_install
-       mkdir -p debian/ifupdown2/lib/systemd/system/
-       install --mode=644 debian/ifup@.service debian/ifupdown2/lib/systemd/system/
-+      install --mode=644 debian/ifupdown2-pre.service debian/ifupdown2/lib/systemd/system/
- override_dh_systemd_start:
--- 
-2.30.2
-
diff --git a/debian/patches/pve/0006-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch b/debian/patches/pve/0006-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
new file mode 100644 (file)
index 0000000..3904561
--- /dev/null
@@ -0,0 +1,35 @@
+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 07/12] openvswitch : ovs-ports-condone-regex : exclude
+ tap|veth|fwln
+
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
+---
+ ifupdown2/addons/openvswitch.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ifupdown2/addons/openvswitch.py b/ifupdown2/addons/openvswitch.py
+index 0a124ba..40fc36a 100644
+--- a/ifupdown2/addons/openvswitch.py
++++ b/ifupdown2/addons/openvswitch.py
+@@ -71,6 +71,7 @@ class openvswitch(Addon, moduleBase):
+             },
+             'ovs-ports-condone-regex': {
+                     "help": "ovs ports to ignore/condone when reloading config / removing interfaces",
++                    "default": "^(tap|veth|fwln)",
+                     "required": False,
+                     "example": ["ovs-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"]
+             },
+@@ -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')
++        if not ovs_port_condone_regex:
++            ovs_port_condone_regex = self.get_attr_default_value('ovs-ports-condone-regex')
+         if ovs_port_condone_regex:
+             if get_string:
+                 return ovs_port_condone_regex
+-- 
+2.30.2
+
diff --git a/debian/patches/pve/0007-allow-vlan-tag-inside-vxlan-tunnel.patch b/debian/patches/pve/0007-allow-vlan-tag-inside-vxlan-tunnel.patch
new file mode 100644 (file)
index 0000000..9ef0bda
--- /dev/null
@@ -0,0 +1,33 @@
+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 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 | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
+index ff98b18..f21424e 100644
+--- a/ifupdown2/addons/bridge.py
++++ b/ifupdown2/addons/bridge.py
+@@ -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])
+-                return
+         vids_int =  utils.ranges_to_ints(vids)
+         try:
+-- 
+2.30.2
+
diff --git a/debian/patches/pve/0007-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch b/debian/patches/pve/0007-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
deleted file mode 100644 (file)
index 3904561..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-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 07/12] openvswitch : ovs-ports-condone-regex : exclude
- tap|veth|fwln
-
-Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
----
- ifupdown2/addons/openvswitch.py | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/ifupdown2/addons/openvswitch.py b/ifupdown2/addons/openvswitch.py
-index 0a124ba..40fc36a 100644
---- a/ifupdown2/addons/openvswitch.py
-+++ b/ifupdown2/addons/openvswitch.py
-@@ -71,6 +71,7 @@ class openvswitch(Addon, moduleBase):
-             },
-             'ovs-ports-condone-regex': {
-                     "help": "ovs ports to ignore/condone when reloading config / removing interfaces",
-+                    "default": "^(tap|veth|fwln)",
-                     "required": False,
-                     "example": ["ovs-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"]
-             },
-@@ -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')
-+        if not ovs_port_condone_regex:
-+            ovs_port_condone_regex = self.get_attr_default_value('ovs-ports-condone-regex')
-         if ovs_port_condone_regex:
-             if get_string:
-                 return ovs_port_condone_regex
--- 
-2.30.2
-
diff --git a/debian/patches/pve/0008-allow-vlan-tag-inside-vxlan-tunnel.patch b/debian/patches/pve/0008-allow-vlan-tag-inside-vxlan-tunnel.patch
deleted file mode 100644 (file)
index 9ef0bda..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-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 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 | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
-index ff98b18..f21424e 100644
---- a/ifupdown2/addons/bridge.py
-+++ b/ifupdown2/addons/bridge.py
-@@ -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])
--                return
-         vids_int =  utils.ranges_to_ints(vids)
-         try:
--- 
-2.30.2
-
diff --git a/debian/patches/pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch b/debian/patches/pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch
new file mode 100644 (file)
index 0000000..089b315
--- /dev/null
@@ -0,0 +1,33 @@
+From df1e76e6bcdca3044ee9d53ddb62a71bedf4b8a6 Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <aderumier@odiso.com>
+Date: Tue, 16 May 2023 00:33:36 +0200
+Subject: [PATCH] lacp bond: remove bond-min-links=0 warning
+
+This is only cumulus specific
+
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
+---
+ ifupdown2/addons/bond.py | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/ifupdown2/addons/bond.py b/ifupdown2/addons/bond.py
+index 74d2cab..4a555cc 100644
+--- a/ifupdown2/addons/bond.py
++++ b/ifupdown2/addons/bond.py
+@@ -610,13 +610,6 @@ class bond(Addon, moduleBase):
+             # if we need to reset the mode to system default
+             ifla_info_data[Link.IFLA_BOND_MODE] = ifla_bond_mode
+-        if ifla_bond_mode == 4:  # 802.3ad
+-            min_links = ifla_info_data.get(Link.IFLA_BOND_MIN_LINKS)
+-            if min_links is None:
+-                min_links = self.cache.get_link_info_data_attribute(ifname, Link.IFLA_BOND_MIN_LINKS)
+-            # get_min_links_nl may return None so we need to strictly check 0
+-            if min_links == 0:
+-                self.logger.warning('%s: attribute bond-min-links is set to \'0\'' % ifname)
+         else:
+             # IFLA_BOND_AD_LACP_RATE and IFLA_BOND_AD_LACP_BYPASS only for 802.3ad mode (4)
+             for nl_attr, attr_name in self._bond_lacp_attrs:
+-- 
+2.30.2
+
diff --git a/debian/patches/pve/0009-postinst-rm-update-network-config-compatibility.patch b/debian/patches/pve/0009-postinst-rm-update-network-config-compatibility.patch
deleted file mode 100644 (file)
index 05aa1ee..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-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 09/12] postinst/rm : update network config compatibility
-
-Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
----
- debian/ifupdown2.postinst | 23 +++++++++++++++++++++++
- debian/ifupdown2.postrm   | 20 ++++++++++++++++++++
- debian/ifupdown2.preinst  | 20 ++++++++++++++++++++
- 3 files changed, 63 insertions(+)
- create mode 100644 debian/ifupdown2.preinst
-
-diff --git a/debian/ifupdown2.postinst b/debian/ifupdown2.postinst
-index 3689256..b7de485 100644
---- a/debian/ifupdown2.postinst
-+++ b/debian/ifupdown2.postinst
-@@ -85,6 +85,25 @@ postinst_remove_diverts()
-     _postinst_remove_diverts "/usr/share/man/man5/interfaces.5.gz"
- }
-+proxmox_compatibility()
-+{
-+    perl -e '
-+      my $haspve_common; eval { require PVE::INotify; $haspve_common = 1; };
-+      exit if !$haspve_common;
-+      my $config = PVE::INotify::read_file('interfaces', 1);
-+      my $configdata = $config->{data};
-+
-+      PVE::INotify::write_file('interfaces', $configdata);
-+
-+      $config = PVE::INotify::read_file('interfaces', 1);
-+
-+      if (defined($config->{changes})) {
-+          #print $config->{changes};
-+          print "\nnetwork config changes have been detected for ifupdown2 compatibility.\nSaved in /etc/network/interfaces.new for hot-apply or next reboot.\n\n";
-+      }
-+    ' || true
-+}
-+
- case "$1" in
-     configure)
-         fix_dhclient_file_with_space
-@@ -92,6 +111,10 @@ case "$1" in
-         process_udev
-         chmod +x /usr/share/ifupdown2/__main__.py
-         postinst_remove_diverts
-+        if [ -f "/tmp/.ifupdown2-first-install" ]; then
-+            proxmox_compatibility
-+            rm  /tmp/.ifupdown2-first-install
-+        fi
-     ;;
-     abort-upgrade|abort-remove|abort-deconfigure)
-diff --git a/debian/ifupdown2.postrm b/debian/ifupdown2.postrm
-index 5d90b21..fd62294 100644
---- a/debian/ifupdown2.postrm
-+++ b/debian/ifupdown2.postrm
-@@ -25,10 +25,30 @@ process_udev()
-     fi
- }
-+proxmox_compatibility()
-+{
-+    perl -e '
-+        my $haspve_common; eval { require PVE::INotify; $haspve_common = 1; };
-+        exit if !$haspve_common;
-+        my $config = PVE::INotify::read_file('interfaces', 1);
-+        my $configdata = $config->{data};
-+
-+        PVE::INotify::write_file('interfaces', $configdata);
-+
-+        $config = PVE::INotify::read_file('interfaces', 1);
-+
-+        if (defined($config->{changes})) {
-+            #print $config->{changes};
-+            print "\nnetwork config changes have been detected for ifupdown2 to ifupdown1 switch compatibility.\nSaved in /etc/network/interfaces.new for next reboot\n\n";
-+        }
-+    ' || true
-+}
-+
- case "$1" in
-     purge|remove|abort-install|disappear)
-         process_state_file
-         process_udev
-+        proxmox_compatibility
-     ;;
-     upgrade|failed-upgrade|abort-upgrade|disappear)
-diff --git a/debian/ifupdown2.preinst b/debian/ifupdown2.preinst
-new file mode 100644
-index 0000000..aa8653e
---- /dev/null
-+++ b/debian/ifupdown2.preinst
-@@ -0,0 +1,20 @@
-+#!/bin/sh
-+set -e
-+
-+case "$1" in
-+    install)
-+        touch /tmp/.ifupdown2-first-install
-+        ;;
-+
-+    upgrade|abort-upgrade)
-+        ;;
-+
-+    *)
-+        echo "postinst called with unknown argument \`$1'" >&2
-+        exit 0
-+        ;;
-+esac
-+
-+#DEBHELPER#
-+
-+exit 0
--- 
-2.30.2
-
diff --git a/debian/patches/pve/0010-d-rules-drop-now-default-with-systemd.patch b/debian/patches/pve/0010-d-rules-drop-now-default-with-systemd.patch
deleted file mode 100644 (file)
index b1a8ab6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-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 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 fcb304f..ec1b214 100755
---- a/debian/rules
-+++ b/debian/rules
-@@ -5,7 +5,7 @@ export PYBUILD_NAME=ifupdown2
- export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/ --install-scripts=/usr/share/
- %:
--      dh $@ --with=python3 --with systemd --buildsystem=pybuild
-+      dh $@ --with=python3 --buildsystem=pybuild
- override_dh_installman:
-       ./ifupdown2/man/genmanpages.sh ./ifupdown2/man ./man
--- 
-2.30.2
-
diff --git a/debian/patches/pve/0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch b/debian/patches/pve/0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch
deleted file mode 100644 (file)
index ac24d3c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-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 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 ec1b214..6539b24 100755
---- a/debian/rules
-+++ b/debian/rules
-@@ -24,5 +24,9 @@ override_dh_systemd_start:
- override_dh_systemd_enable:
-       dh_systemd_enable --name=networking
-+# above are depreacated and won't be used in DH compat level >= 12
-+override_dh_installsystemd:
-+      dh_installsystemd --name=networking --no-start
-+
- override_dh_compress:
-       dh_compress -X.py
--- 
-2.30.2
-
diff --git a/debian/patches/pve/0012-postinst-reload-network-config-on-first-install.patch b/debian/patches/pve/0012-postinst-reload-network-config-on-first-install.patch
deleted file mode 100644 (file)
index d5e94ca..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-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 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 | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/debian/ifupdown2.postinst b/debian/ifupdown2.postinst
-index b7de485..0137ea8 100644
---- a/debian/ifupdown2.postinst
-+++ b/debian/ifupdown2.postinst
-@@ -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
-+        if [ -f "/tmp/.ifupdown2-first-install" ] && [ ! -e /proxmox_install_mode ]; then
-             proxmox_compatibility
-+            echo "Reloading network config on first install"
-+            ifreload -a
-             rm  /tmp/.ifupdown2-first-install
-         fi
-     ;;
--- 
-2.30.2
-
diff --git a/debian/patches/pve/0013-lacp-bond-remove-bond-min-links-0-warning.patch b/debian/patches/pve/0013-lacp-bond-remove-bond-min-links-0-warning.patch
deleted file mode 100644 (file)
index 089b315..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-From df1e76e6bcdca3044ee9d53ddb62a71bedf4b8a6 Mon Sep 17 00:00:00 2001
-From: Alexandre Derumier <aderumier@odiso.com>
-Date: Tue, 16 May 2023 00:33:36 +0200
-Subject: [PATCH] lacp bond: remove bond-min-links=0 warning
-
-This is only cumulus specific
-
-Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
----
- ifupdown2/addons/bond.py | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/ifupdown2/addons/bond.py b/ifupdown2/addons/bond.py
-index 74d2cab..4a555cc 100644
---- a/ifupdown2/addons/bond.py
-+++ b/ifupdown2/addons/bond.py
-@@ -610,13 +610,6 @@ class bond(Addon, moduleBase):
-             # if we need to reset the mode to system default
-             ifla_info_data[Link.IFLA_BOND_MODE] = ifla_bond_mode
--        if ifla_bond_mode == 4:  # 802.3ad
--            min_links = ifla_info_data.get(Link.IFLA_BOND_MIN_LINKS)
--            if min_links is None:
--                min_links = self.cache.get_link_info_data_attribute(ifname, Link.IFLA_BOND_MIN_LINKS)
--            # get_min_links_nl may return None so we need to strictly check 0
--            if min_links == 0:
--                self.logger.warning('%s: attribute bond-min-links is set to \'0\'' % ifname)
-         else:
-             # IFLA_BOND_AD_LACP_RATE and IFLA_BOND_AD_LACP_BYPASS only for 802.3ad mode (4)
-             for nl_attr, attr_name in self._bond_lacp_attrs:
--- 
-2.30.2
-
index ab3863cdeba3496abb20a1697740c021ddba3543..4cfa7976ee17dc9c4aae3772c4ff9a99510b5aef 100644 (file)
@@ -3,12 +3,7 @@ pve/0002-add-dummy-mtu-bridgevlanport-modules.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
-pve/0013-lacp-bond-remove-bond-min-links-0-warning.patch
-upstream/0001-add-ipv6-slaac-support-inet6-auto-accept_ra.patch
\ No newline at end of file
+pve/0006-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
+pve/0007-allow-vlan-tag-inside-vxlan-tunnel.patch
+pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch
+upstream/0001-add-ipv6-slaac-support-inet6-auto-accept_ra.patch
index ea6f43427df57ba5e748e3d4b9dfe0918f2777c2..6539b2489052e69c1b131f444416b7c6e934cb3b 100755 (executable)
@@ -5,7 +5,7 @@ export PYBUILD_NAME=ifupdown2
 export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/ --install-scripts=/usr/share/
 
 %:
-       dh $@ --with=python3 --with systemd --buildsystem=pybuild
+       dh $@ --with=python3 --buildsystem=pybuild
 
 override_dh_installman:
        ./ifupdown2/man/genmanpages.sh ./ifupdown2/man ./man
@@ -15,6 +15,7 @@ override_dh_install:
        dh_install
        mkdir -p debian/ifupdown2/lib/systemd/system/
        install --mode=644 debian/ifup@.service debian/ifupdown2/lib/systemd/system/
+       install --mode=644 debian/ifupdown2-pre.service debian/ifupdown2/lib/systemd/system/
 
 
 override_dh_systemd_start:
@@ -23,5 +24,9 @@ override_dh_systemd_start:
 override_dh_systemd_enable:
        dh_systemd_enable --name=networking
 
+# above are depreacated and won't be used in DH compat level >= 12
+override_dh_installsystemd:
+       dh_installsystemd --name=networking --no-start
+
 override_dh_compress:
        dh_compress -X.py