From 133423d532ca75a3fc51e675288d9721d78ffdb0 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 18 May 2022 18:40:15 +0200 Subject: Cherry-pick a couple of fixes from upstream nm-1-38 branch --- .../c-rbtree-fix-alignment-assertion-on-m64k.patch | 56 ++++++++++++++++++++++ ...n-t-require-a-hardware-address-for-DHCPv6.patch | 36 ++++++++++++++ debian/patches/series | 2 + 3 files changed, 94 insertions(+) create mode 100644 debian/patches/c-rbtree-fix-alignment-assertion-on-m64k.patch create mode 100644 debian/patches/device-don-t-require-a-hardware-address-for-DHCPv6.patch (limited to 'debian') diff --git a/debian/patches/c-rbtree-fix-alignment-assertion-on-m64k.patch b/debian/patches/c-rbtree-fix-alignment-assertion-on-m64k.patch new file mode 100644 index 00000000..c00cd520 --- /dev/null +++ b/debian/patches/c-rbtree-fix-alignment-assertion-on-m64k.patch @@ -0,0 +1,56 @@ +From: David Rheinsberg +Date: Wed, 18 May 2022 11:31:45 +0200 +Subject: c-rbtree: fix alignment assertion on m64k + +We want to assert that our alignment-guarantees do not exceed the +guarantees of the system-linker or system-allocator on the target +platform. Hence, we check against max_align_t. This is a lower bound, +but not the exact check we actually want. And as it turns out, on m64k +it is too low. Add a static check against 4-byte alignment for m64k as +a workaround. + +Reported-by: Michael Biebl +Signed-off-by: David Rheinsberg + +https://github.com/c-util/c-rbtree/issues/9 +https://github.com/c-util/c-rbtree/commit/eb778d39694a0f3389f2438bbc45fb21685a047d +(cherry picked from commit 78831d127fa169b26783ccaa6b534edfbb0adad4) +(cherry picked from commit a83c884fb6e13aad783d547691620d43bed4db84) +--- + src/c-rbtree/src/c-rbtree.c | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +diff --git a/src/c-rbtree/src/c-rbtree.c b/src/c-rbtree/src/c-rbtree.c +index 2f0e608..28de4d9 100644 +--- a/src/c-rbtree/src/c-rbtree.c ++++ b/src/c-rbtree/src/c-rbtree.c +@@ -35,12 +35,25 @@ + * CRBNode is 4-byte aligned, so the lower 2 bits are actually unused. We also + * sometimes store a pointer to the root-node, so make sure this one is also 4 + * byte aligned. +- * Note that there are actually some architectures where `max_align_t` is 4, so +- * we do not have much wiggle-room to extend this flag-set. ++ * ++ * Additionally, we want to avoid an alignment that is bigger than the ++ * alignment guaranteed by the system allocator or supported by the system ++ * linker. As there is no standard way to check this, we simply verify against ++ * `alignof(max_align_t)`, as this alignment must be supported by the ++ * toolchain. ++ * ++ * m64k is special here, as it only has a 2-byte max-alignment, but still ++ * guarantees a >=4-byte alignment on allocations. So hard-code the maximum for ++ * it. + */ +-static_assert(alignof(CRBNode) <= alignof(max_align_t), "Invalid RBNode alignment"); ++#ifdef __m68k__ ++# define C_RBTREE_MAX_ALIGN (C_MAX(4, alignof(max_align_t))) ++#else ++# define C_RBTREE_MAX_ALIGN (alignof(max_align_t)) ++#endif ++static_assert(alignof(CRBNode) <= C_RBTREE_MAX_ALIGN, "Invalid RBNode alignment"); + static_assert(alignof(CRBNode) >= 4, "Invalid CRBNode alignment"); +-static_assert(alignof(CRBTree) <= alignof(max_align_t), "Invalid RBTree alignment"); ++static_assert(alignof(CRBTree) <= C_RBTREE_MAX_ALIGN, "Invalid RBTree alignment"); + static_assert(alignof(CRBTree) >= 4, "Invalid CRBTree alignment"); + + /** diff --git a/debian/patches/device-don-t-require-a-hardware-address-for-DHCPv6.patch b/debian/patches/device-don-t-require-a-hardware-address-for-DHCPv6.patch new file mode 100644 index 00000000..09d48282 --- /dev/null +++ b/debian/patches/device-don-t-require-a-hardware-address-for-DHCPv6.patch @@ -0,0 +1,36 @@ +From: Beniamino Galvani +Date: Mon, 16 May 2022 17:53:51 +0200 +Subject: device: don't require a hardware address for DHCPv6 + +DHCPv4 requires a hardware address, while DHCPv6 does not. + +Anyway, the DHCP manager already checks that an address is available +when needed, so drop the check here. + +Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration') + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1228 +(cherry picked from commit 9bc7278da369d9dd69cc7687a5d050dfea793faa) +(cherry picked from commit 1dbcc1c4412de43c6c5def417eef221b84535d7a) +--- + src/core/devices/nm-device.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c +index 70b52b1..9e2c1f9 100644 +--- a/src/core/devices/nm-device.c ++++ b/src/core/devices/nm-device.c +@@ -10117,13 +10117,6 @@ _dev_ipdhcpx_start(NMDevice *self, int addr_family) + + hwaddr = nmp_link_address_get_as_bytes(&pllink->l_address); + +- if (!IS_IPv4) { +- if (!hwaddr) { +- fail_reason = "interface has no MAC address to start DHCPv6"; +- goto out_fail; +- } +- } +- + request_broadcast = FALSE; + if (pllink) { + str = nmp_object_link_udev_device_get_property_value(NMP_OBJECT_UP_CAST(pllink), diff --git a/debian/patches/series b/debian/patches/series index a2d7e06d..cf412f3b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,3 @@ Force-online-state-with-unmanaged-devices.patch +c-rbtree-fix-alignment-assertion-on-m64k.patch +device-don-t-require-a-hardware-address-for-DHCPv6.patch -- cgit 1.3.0-6-gf8a5 From a91f0f62f9ba4c9ee5909d3f0ed8d4d6abfd99d9 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 18 May 2022 23:03:48 +0200 Subject: Install additional config examples found in examples/nm-conf.d/ Closes: #1010889 --- debian/network-manager.examples | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/network-manager.examples b/debian/network-manager.examples index a1fc8a10..aba68cd6 100644 --- a/debian/network-manager.examples +++ b/debian/network-manager.examples @@ -1 +1,2 @@ -debian/tmp/usr/share/doc/NetworkManager/examples/server.conf +usr/share/doc/NetworkManager/examples/server.conf +examples/nm-conf.d/ -- cgit 1.3.0-6-gf8a5 From b3b81846241e51b3e2bfb34c1b5af385cdcdf894 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 18 May 2022 23:05:24 +0200 Subject: Release version 1.38.0-2 to unstable --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ebbfb8a0..d0b455e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +network-manager (1.38.0-2) unstable; urgency=medium + + * Cherry-pick a couple of fixes from upstream nm-1-38 branch + * Install additional config examples found in examples/nm-conf.d/ + (Closes: #1010889) + + -- Michael Biebl Wed, 18 May 2022 23:05:00 +0200 + network-manager (1.38.0-1) unstable; urgency=medium * New upstream version 1.38.0 -- cgit 1.3.0-6-gf8a5 From d6797696304c9468bd8a42b2394aa3f36e0e1012 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 17 Jun 2022 22:05:03 +0200 Subject: New upstream version 1.38.2 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d0b455e6..1f19f538 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.38.2-1) UNRELEASED; urgency=medium + + * New upstream version 1.38.2 + + -- Michael Biebl Fri, 17 Jun 2022 22:05:01 +0200 + network-manager (1.38.0-2) unstable; urgency=medium * Cherry-pick a couple of fixes from upstream nm-1-38 branch -- cgit 1.3.0-6-gf8a5 From b3023be2ea33236143c4cdf56bad1d02e9904ea8 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 17 Jun 2022 22:05:30 +0200 Subject: Rebase patches --- .../c-rbtree-fix-alignment-assertion-on-m64k.patch | 56 ---------------------- ...n-t-require-a-hardware-address-for-DHCPv6.patch | 36 -------------- debian/patches/series | 2 - 3 files changed, 94 deletions(-) delete mode 100644 debian/patches/c-rbtree-fix-alignment-assertion-on-m64k.patch delete mode 100644 debian/patches/device-don-t-require-a-hardware-address-for-DHCPv6.patch (limited to 'debian') diff --git a/debian/patches/c-rbtree-fix-alignment-assertion-on-m64k.patch b/debian/patches/c-rbtree-fix-alignment-assertion-on-m64k.patch deleted file mode 100644 index c00cd520..00000000 --- a/debian/patches/c-rbtree-fix-alignment-assertion-on-m64k.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: David Rheinsberg -Date: Wed, 18 May 2022 11:31:45 +0200 -Subject: c-rbtree: fix alignment assertion on m64k - -We want to assert that our alignment-guarantees do not exceed the -guarantees of the system-linker or system-allocator on the target -platform. Hence, we check against max_align_t. This is a lower bound, -but not the exact check we actually want. And as it turns out, on m64k -it is too low. Add a static check against 4-byte alignment for m64k as -a workaround. - -Reported-by: Michael Biebl -Signed-off-by: David Rheinsberg - -https://github.com/c-util/c-rbtree/issues/9 -https://github.com/c-util/c-rbtree/commit/eb778d39694a0f3389f2438bbc45fb21685a047d -(cherry picked from commit 78831d127fa169b26783ccaa6b534edfbb0adad4) -(cherry picked from commit a83c884fb6e13aad783d547691620d43bed4db84) ---- - src/c-rbtree/src/c-rbtree.c | 21 +++++++++++++++++---- - 1 file changed, 17 insertions(+), 4 deletions(-) - -diff --git a/src/c-rbtree/src/c-rbtree.c b/src/c-rbtree/src/c-rbtree.c -index 2f0e608..28de4d9 100644 ---- a/src/c-rbtree/src/c-rbtree.c -+++ b/src/c-rbtree/src/c-rbtree.c -@@ -35,12 +35,25 @@ - * CRBNode is 4-byte aligned, so the lower 2 bits are actually unused. We also - * sometimes store a pointer to the root-node, so make sure this one is also 4 - * byte aligned. -- * Note that there are actually some architectures where `max_align_t` is 4, so -- * we do not have much wiggle-room to extend this flag-set. -+ * -+ * Additionally, we want to avoid an alignment that is bigger than the -+ * alignment guaranteed by the system allocator or supported by the system -+ * linker. As there is no standard way to check this, we simply verify against -+ * `alignof(max_align_t)`, as this alignment must be supported by the -+ * toolchain. -+ * -+ * m64k is special here, as it only has a 2-byte max-alignment, but still -+ * guarantees a >=4-byte alignment on allocations. So hard-code the maximum for -+ * it. - */ --static_assert(alignof(CRBNode) <= alignof(max_align_t), "Invalid RBNode alignment"); -+#ifdef __m68k__ -+# define C_RBTREE_MAX_ALIGN (C_MAX(4, alignof(max_align_t))) -+#else -+# define C_RBTREE_MAX_ALIGN (alignof(max_align_t)) -+#endif -+static_assert(alignof(CRBNode) <= C_RBTREE_MAX_ALIGN, "Invalid RBNode alignment"); - static_assert(alignof(CRBNode) >= 4, "Invalid CRBNode alignment"); --static_assert(alignof(CRBTree) <= alignof(max_align_t), "Invalid RBTree alignment"); -+static_assert(alignof(CRBTree) <= C_RBTREE_MAX_ALIGN, "Invalid RBTree alignment"); - static_assert(alignof(CRBTree) >= 4, "Invalid CRBTree alignment"); - - /** diff --git a/debian/patches/device-don-t-require-a-hardware-address-for-DHCPv6.patch b/debian/patches/device-don-t-require-a-hardware-address-for-DHCPv6.patch deleted file mode 100644 index 09d48282..00000000 --- a/debian/patches/device-don-t-require-a-hardware-address-for-DHCPv6.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Beniamino Galvani -Date: Mon, 16 May 2022 17:53:51 +0200 -Subject: device: don't require a hardware address for DHCPv6 - -DHCPv4 requires a hardware address, while DHCPv6 does not. - -Anyway, the DHCP manager already checks that an address is available -when needed, so drop the check here. - -Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration') - -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1228 -(cherry picked from commit 9bc7278da369d9dd69cc7687a5d050dfea793faa) -(cherry picked from commit 1dbcc1c4412de43c6c5def417eef221b84535d7a) ---- - src/core/devices/nm-device.c | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c -index 70b52b1..9e2c1f9 100644 ---- a/src/core/devices/nm-device.c -+++ b/src/core/devices/nm-device.c -@@ -10117,13 +10117,6 @@ _dev_ipdhcpx_start(NMDevice *self, int addr_family) - - hwaddr = nmp_link_address_get_as_bytes(&pllink->l_address); - -- if (!IS_IPv4) { -- if (!hwaddr) { -- fail_reason = "interface has no MAC address to start DHCPv6"; -- goto out_fail; -- } -- } -- - request_broadcast = FALSE; - if (pllink) { - str = nmp_object_link_udev_device_get_property_value(NMP_OBJECT_UP_CAST(pllink), diff --git a/debian/patches/series b/debian/patches/series index cf412f3b..a2d7e06d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1 @@ Force-online-state-with-unmanaged-devices.patch -c-rbtree-fix-alignment-assertion-on-m64k.patch -device-don-t-require-a-hardware-address-for-DHCPv6.patch -- cgit 1.3.0-6-gf8a5 From 244686938f775cd9bcf7c20f6ef6e16d30e1998a Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 17 Jun 2022 22:06:04 +0200 Subject: Bump Standards-Version to 4.6.1 --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index f0785bfe..8eec7955 100644 --- a/debian/control +++ b/debian/control @@ -36,7 +36,7 @@ Build-Depends: debhelper-compat (= 13), dbus , python3-dbus , iproute2 , -Standards-Version: 4.6.0 +Standards-Version: 4.6.1 Rules-Requires-Root: no Vcs-Git: https://salsa.debian.org/utopia-team/network-manager.git Vcs-Browser: https://salsa.debian.org/utopia-team/network-manager -- cgit 1.3.0-6-gf8a5 From 0e686132adf52e0a37c4362df3ecf19d3eeb2988 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 18 Jun 2022 21:47:34 +0200 Subject: Use dh-sequence-gir instead of gir addon It is functionally equivalent but avoids modifications to debian/rules. --- debian/control | 1 + debian/rules | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 8eec7955..9b730974 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Uploaders: Michael Biebl , Sjoerd Simons , Aron Xu Build-Depends: debhelper-compat (= 13), + dh-sequence-gir, automake (>= 1.12), pkg-config, intltool, diff --git a/debian/rules b/debian/rules index 1f896f0a..bcb76768 100755 --- a/debian/rules +++ b/debian/rules @@ -9,7 +9,7 @@ export PYTHON=/usr/bin/python3 PPPD_PLUGIN_DIR := $(shell dh_ppp --plugin-dir) %: - dh $@ --with gir,ppp + dh $@ --with ppp autoreconf: gtkdocize --copy -- cgit 1.3.0-6-gf8a5 From b020a0dc29267ec099f631e93f214a0d3549ba40 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 18 Jun 2022 22:26:53 +0200 Subject: Release version 1.38.2-1 to unstable --- debian/changelog | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1f19f538..3be70c6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ -network-manager (1.38.2-1) UNRELEASED; urgency=medium +network-manager (1.38.2-1) unstable; urgency=medium * New upstream version 1.38.2 + * Rebase patches + * Bump Standards-Version to 4.6.1 + * Use dh-sequence-gir instead of gir addon - -- Michael Biebl Fri, 17 Jun 2022 22:05:01 +0200 + -- Michael Biebl Sat, 18 Jun 2022 22:26:35 +0200 network-manager (1.38.0-2) unstable; urgency=medium -- cgit 1.3.0-6-gf8a5