package/network-manager: add patches to build with kernel headers 3.2
PATCH v3 1/1 package/network-manager: add patches to build with kernel headers 3.2
From: Petr Vorel <[email protected]>
+ lower kernel headers dependency
According to upstream [1], there is no known minimal kernel-version, nor minimal required feature-set.
Experimentally tested, that 1.0.2 is works with 3.2 kernel headers, even some features will be missing [2].
[1] https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00039.html
[2] https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00041.html
---
Changes v3:
- Lower kernel headers dependency to 3.2
- Preserved original author of 0002-systemd-dhcp-fix-build-with-Linux-3.2.0-headers.patch
- Added Signed-off-by inside both patches.
Changes v2: rewrited patch 0002-systemd-dhcp-fix-build-with-Linux-3.2.0-headers.patch
--- ...anager-fix-build-with-Linux-3.2.0-headers.patch | 30 ++++++++++++++++++ ...d-dhcp-fix-build-with-Linux-3.2.0-headers.patch | 37 ++++++++++++++++++++++ package/network-manager/Config.in | 2 +- 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 package/network-manager/0001-ppp-manager-fix-build-with-Linux-3.2.0-headers.patch create mode 100644 package/network-manager/0002-systemd-dhcp-fix-build-with-Linux-3.2.0-headers.patch
package/network-manager/0001-ppp-manager-fix-build-with-Linux-3.2.0-headers.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 22b99e3bbb2ca33963e839f12ab95314ab8d9ba9 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel <[email protected]> +Date: Fri, 15 May 2015 16:37:20 +0200 +Subject: [PATCH] ppp-manager: fix build with Linux 3.2.0 headers + +Fixes build with Ubuntu 12.04. + +In file included from ppp-manager/nm-ppp-manager.c:42:0: +/usr/include/linux/if_ppp.h:103:16: error: field 'b' has incomplete type +/usr/include/linux/if_ppp.h:108:21: error: field 'b' has incomplete type + +Signed-off-by: Petr Vorel <[email protected]> +--- + src/ppp-manager/nm-ppp-manager.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c +index e27c82b..d410ebf 100644 +--- a/src/ppp-manager/nm-ppp-manager.c ++++ b/src/ppp-manager/nm-ppp-manager.c +@@ -39,6 +39,7 @@ + #ifndef aligned_u64 + #define aligned_u64 unsigned long long __attribute__((aligned(8))) + #endif ++#include <linux/if.h> + #include <linux/if_ppp.h> + + #include "NetworkManagerUtils.h" +-- +2.1.4
package/network-manager/0002-systemd-dhcp-fix-build-with-Linux-3.2.0-headers.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 7f84150e9f6aa7e900d70178e0fc0acc6cfba651 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel <[email protected]> +Date: Fri, 15 May 2015 16:38:10 +0200 +Subject: [PATCH] systemd-dhcp: fix build with Linux 3.2.0 headers + +Fixes build on Ubuntu 12.04. + +systemd/src/libsystemd-network/dhcp-network.c: In function '_bind_raw_socket': +systemd/src/libsystemd-network/dhcp-network.c:75:17: error: 'BPF_XOR' undeclared (first use in this function) +systemd/src/libsystemd-network/dhcp-network.c:75:17: note: each undeclared identifier is reported only once for each function it appears in +make[4]: *** [libsystemd_nm_la-dhcp-network.lo] Error 1 + +(cherry picked from commit 3811a68389b9277533f2eee8372927ca6238653e) + +Signed-off-by: Petr Vorel <[email protected]> +--- + src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h b/src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h +index 6d500f4..f8856a1 100644 +--- a/src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h ++++ b/src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h +@@ -38,6 +38,11 @@ + + #include "nm-logging.h" + ++/* Missing in Linux 3.2.0, in Ubuntu 12.04 */ ++#ifndef BPF_XOR ++#define BPF_XOR 0xa0 ++#endif ++ + static inline guint32 + _slog_level_to_nm (int slevel) + { +-- +2.1.4
package/network-manager/Config.in +1 -1
@@ -2,7 +2,7 @@ config BR2_PACKAGE_NETWORK_MANAGER bool "networkmanager" depends on BR2_USE_MMU # dbus depends on BR2_PACKAGE_HAS_UDEV - depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 depends on BR2_TOOLCHAIN_USES_GLIBC # CLOCK_BOOTTIME, IPTOS_CLASS_* select BR2_PACKAGE_DHCPCD if !BR2_PACKAGE_DHCP_CLIENT select BR2_PACKAGE_DBUS
Signature · 1 line
1.8.0
PATCH v3 1/1 package/network-manager: add patches to build with kernel headers 3.2
Quoted 9 lines · Petr Vorel
From: Petr Vorel <[email protected]>
+ lower kernel headers dependency
According to upstream [1], there is no known minimal kernel-version, nor minimal required feature-set.
Experimentally tested, that 1.0.2 is works with 3.2 kernel headers, even some features will be missing [2].
"works" as in run-time tested?
Quoted 5 lines
[1] https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00039.html
[2] https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00041.htmlSigned-off-by Petr Vorel <[email protected]>
Some questions below though.
Quoted 23 lines
---
Changes v3:
- Lower kernel headers dependency to 3.2
- Preserved original author of 0002-systemd-dhcp-fix-build-with-Linux-3.2.0-headers.patch
- Added Signed-off-by inside both patches.
Changes v2: rewrited patch 0002-systemd-dhcp-fix-build-with-Linux-3.2.0-headers.patch--- ...anager-fix-build-with-Linux-3.2.0-headers.patch | 30 ++++++++++++++++++ ...d-dhcp-fix-build-with-Linux-3.2.0-headers.patch | 37 ++++++++++++++++++++++ package/network-manager/Config.in | 2 +- 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 package/network-manager/0001-ppp-manager-fix-build-with-Linux-3.2.0-headers.patch create mode 100644 package/network-manager/0002-systemd-dhcp-fix-build-with-Linux-3.2.0-headers.patchpackage/network-manager/0001-ppp-manager-fix-build-with-Linux-3.2.0-headers.patch new file +2
-0@@ -0,0 +1,30 @@ +From 22b99e3bbb2ca33963e839f12ab95314ab8d9ba9 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel <[email protected]>
package/network-manager/0001-ppp-manager-fix-build-with-Linux-3.2.0-headers.patch line 12
Quoted 10 lines
package/network-manager/0001-ppp-manager-fix-build-with-Linux-3.2.0-headers.patch new file +10
-0+Date: Fri, 15 May 2015 16:37:20 +0200 +Subject: [PATCH] ppp-manager: fix build with Linux 3.2.0 headers + +Fixes build with Ubuntu 12.04. + +In file included from ppp-manager/nm-ppp-manager.c:42:0: +/usr/include/linux/if_ppp.h:103:16: error: field 'b' has incomplete type +/usr/include/linux/if_ppp.h:108:21: error: field 'b' has incomplete type + +Signed-off-by: Petr Vorel <[email protected]>
Upstream status?
Quoted 18 lines
package/network-manager/0001-ppp-manager-fix-build-with-Linux-3.2.0-headers.patch new file +18
-0+--- + src/ppp-manager/nm-ppp-manager.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c +index e27c82b..d410ebf 100644 +--- a/src/ppp-manager/nm-ppp-manager.c ++++ b/src/ppp-manager/nm-ppp-manager.c +@@ -39,6 +39,7 @@ + #ifndef aligned_u64 + #define aligned_u64 unsigned long long __attribute__((aligned(8))) + #endif ++#include <linux/if.h> + #include <linux/if_ppp.h> + + #include "NetworkManagerUtils.h" +-- +2.1.4
[snip]
package/network-manager/Config.in config BR2_PACKAGE_NETWORK_MANAGER · line 5
Quoted 10 lines
package/network-manager/Config.in +1
-1@@ -2,7 +2,7 @@ config BR2_PACKAGE_NETWORK_MANAGER bool "networkmanager" depends on BR2_USE_MMU # dbus depends on BR2_PACKAGE_HAS_UDEV - depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
Basically it _may_ also work with lower kernel headers but hasn't been tested,
right? Ideally, it would be nice to do a (build-)test with 2.6.34-ish. Or else, you could add a comment saying that it could work with lower headers. The minimal headers version was anyway only introduced to fix an autobuild failure.
Regards,
Arnout
Quoted 4 lines
package/network-manager/Config.in +0
-0depends on BR2_TOOLCHAIN_USES_GLIBC # CLOCK_BOOTTIME, IPTOS_CLASS_* select BR2_PACKAGE_DHCPCD if !BR2_PACKAGE_DHCP_CLIENT select BR2_PACKAGE_DBUS
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH v3 1/1 package/network-manager: add patches to build with kernel headers 3.2
Hi there,
Quoted 4 lines · Petr Vorel
Quoted 1 line
From: Petr Vorel <[email protected]>
"works" as in run-time tested?
I've done some brief tests, I'll do more testing probably this week. Ok, I should have wait and post the patch after more testing. Anyway I need to get it work even on lower kernel than 3.2 (obviously some features will be missing, but NetworkManager cannot crash). Upstream is willing to accept simple patches which fixes behaviour on older kernels.
Quoted 1 line
Upstream status?
Not sure if I understand your question. The patch was taken from upstream.
Quoted 5 lines
package/network-manager/Config.in config BR2_PACKAGE_NETWORK_MANAGER · line 5
Quoted 2 lines
package/network-manager/Config.in +1
-1- depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2Basically it _may_ also work with lower kernel headers but hasn't been tested,
right? Ideally, it would be nice to do a (build-)test with 2.6.34-ish.
Why 2.6.34-ish? The minimum kernel version in toolchain/toolchain-common.in after BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 is 2.6, which is unspecified.
Quoted 2 lines
Or else, you could add a comment saying that it could work with lower headers. The minimal headers version was anyway only introduced to fix an autobuild failure.
Do you mean to keep BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 and mention in "help" lower versions?
Quoted 2 lines
Regards,
Arnout
Kind regards,
Petr
PATCH v3 1/1 package/network-manager: add patches to build with kernel headers 3.2
Quoted 8 lines · Petr Vorel
Hi there,
Quoted 4 lines · Petr Vorel
Quoted 1 line
From: Petr Vorel <[email protected]>
"works" as in run-time tested?
I've done some brief tests, I'll do more testing probably this week. Ok, I should have wait and post the patch after more testing.
No, it's a good idea to already post before that. But then it's also a good
idea to mention that you haven't done runtime testing :-)
Quoted 4 lines
Anyway I need to get it work even on lower
kernel than 3.2 (obviously some features will be missing, but NetworkManager cannot crash). Upstream is willing to accept simple patches which fixes behaviour on older kernels.
Well, it's not strictly necessary to do that, just nice to have.
Quoted 3 lines
Quoted 2 lines
Upstream status?
Not sure if I understand your question. The patch was taken from upstream.
Sorry, my bad, the commit sha is indeed at the beginning of the patch.
Quoted 8 lines
Quoted 6 lines
package/network-manager/Config.in config BR2_PACKAGE_NETWORK_MANAGER · line 5
Quoted 3 lines
package/network-manager/Config.in +1
-1- depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2Basically it _may_ also work with lower kernel headers but hasn't been tested,
right? Ideally, it would be nice to do a (build-)test with 2.6.34-ish.Why 2.6.34-ish? The minimum kernel version in toolchain/toolchain-common.in after
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0is 2.6, which is unspecified.
Indeed, we consider everything pre-3.0 as ancient. 2.6.34 is just a random
pre-3.0 version that I have seen in use recently.
Quoted 5 lines
Quoted 3 lines
Or else, you could add a comment saying that it could work with lower headers. The minimal headers version was anyway only introduced to fix an autobuild failure.
Do you mean to keep
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7and mention in "help" lower versions?
No, I mean: change it to 3.2 and mention in a comment that it might work on
lower versions. Like:
# Tested with 3.2, but may even work with earlier versions depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH v3 1/1 package/network-manager: add patches to build with kernel headers 3.2
In reply to Petr VorelDear Petr Vorel,
Quoted 21 lines · Petr Vorel
From: Petr Vorel <[email protected]>
+ lower kernel headers dependency
According to upstream [1], there is no known minimal kernel-version, nor minimal required feature-set.
Experimentally tested, that 1.0.2 is works with 3.2 kernel headers, even some features will be missing [2].
[1] https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00039.html
[2] https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00041.htmlSigned-off-by Petr Vorel <[email protected]>---
Changes v3:
- Lower kernel headers dependency to 3.2
- Preserved original author of 0002-systemd-dhcp-fix-build-with-Linux-3.2.0-headers.patch
- Added Signed-off-by inside both patches.
Changes v2: rewrited patch 0002-systemd-dhcp-fix-build-with-Linux-3.2.0-headers.patch
Quoted 7 lines
--- ...anager-fix-build-with-Linux-3.2.0-headers.patch | 30 ++++++++++++++++++ ...d-dhcp-fix-build-with-Linux-3.2.0-headers.patch | 37 ++++++++++++++++++++++ package/network-manager/Config.in | 2 +- 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 package/network-manager/0001-ppp-manager-fix-build-with-Linux-3.2.0-headers.patch create mode 100644 package/network-manager/0002-systemd-dhcp-fix-build-with-Linux-3.2.0-headers.patch
Applied after adding a comment in Config.in saying that it may work with older kernel headers than 3.2, as suggested by Arnout.
Of course, when upstream makes a new release with those patches integrated, it would be good if you could send a new Buildroot patch to use this new upstream release.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v3 1/1 package/network-manager: add patches to build with kernel headers 3.2
Dear Thomas Petazzoni,
Quoted 2 lines
Applied after adding a comment in Config.in saying that it may work with older kernel headers than 3.2, as suggested by Arnout.
Thanks.
Quoted 3 lines
Of course, when upstream makes a new release with those patches integrated, it would be good if you could send a new Buildroot patch to use this new upstream release.
Sure, I will.
Kind regards,
Petr