Skip to contentSkip to conversation

connman: upgrade to 1.34

PATCH In review Maxin B. John 2 participants 4 messages May 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 connman: upgrade to 1.34

1.33 -> 1.34

1. Refreshed 0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch
2. Removed upstreamed patch:
0003-stats-Fix-bad-file-descriptor-initialisation.patch
3. Provided PACKAGECONFIGs for nftables and iptables support
4. Add new patch to fix build with nftables:

     0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch
---
 meta/recipes-connectivity/connman/connman.inc      |   5 +-
 ...x-compile-on-musl-with-kernel-4.9-headers.patch |  37 ++++++--
 ...ll-nftables-fix-build-with-libnftnl-1.0.7.patch |  72 +++++++++++++++
 ...ts-Fix-bad-file-descriptor-initialisation.patch | 102 ---------------------
 .../connman/{connman_1.33.bb => connman_1.34.bb}   |   6 +-
 5 files changed, 106 insertions(+), 116 deletions(-)
 create mode 100644 meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch
 delete mode 100644 meta/recipes-connectivity/connman/connman/0003-stats-Fix-bad-file-descriptor-initialisation.patch
 rename meta/recipes-connectivity/connman/{connman_1.33.bb => connman_1.34.bb} (70%)
meta/recipes-connectivity/connman/connman.inc +4 -1
index 64a5418..cc2d469 100644
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
 
 inherit autotools pkgconfig systemd update-rc.d bluetooth
 
-DEPENDS  = "dbus glib-2.0 ppp iptables readline"
+DEPENDS  = "dbus glib-2.0 ppp readline"
 
 INC_PR = "r20"
 
@@ -33,6 +33,7 @@ EXTRA_OECONF += "\
 PACKAGECONFIG ??= "wispr \
                    ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
+                   iptables \
 "
 
 # If you want ConnMan to support VPN, add following statement into
@@ -50,6 +51,8 @@ PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2t
 PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
 # WISPr support for logging into hotspots, requires TLS
 PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
+PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,nftables,nftables"
+PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"
 
 INITSCRIPT_NAME = "connman"
 INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
meta/recipes-connectivity/connman/connman/0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch +27 -10
index bf3b86d..da5756e 100644
@@ -1,4 +1,4 @@
-From c8bfad4ee9d2c505c00ccbb8b2139543b5ad6fcb Mon Sep 17 00:00:00 2001
+From 594b67df7ca923d13265906a71fbbf748273a5f5 Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <[email protected]>
 Date: Mon, 23 Jan 2017 17:41:39 +0200
 Subject: [PATCH] Fix compile on musl with kernel 4.9 headers
@@ -7,12 +7,15 @@ Kernel headers break when musl defines IFF_LOWER_UP. While
 waiting for more proper fix in musl, add a hack to connman.
 
 Upstream-Status: Inappropriate [Workaround]
+
 Signed-off-by: Jussi Kukkonen <[email protected]>
+Signed-off-by: Maxin B. John <[email protected]>
 ---
- src/6to4.c     | 4 ++++
- src/firewall.c | 4 ++++
- src/iptables.c | 4 ++++
- 3 files changed, 12 insertions(+)
+ src/6to4.c              | 4 ++++
+ src/firewall-iptables.c | 4 ++++
+ src/firewall-nftables.c | 3 +++
+ src/iptables.c          | 4 ++++
+ 4 files changed, 15 insertions(+)
 
 diff --git a/src/6to4.c b/src/6to4.c
 index 71a2882..1938afb 100644
@@ -29,10 +32,10 @@ index 71a2882..1938afb 100644
  #include <errno.h>
  #include <stdio.h>
  #include <stdlib.h>
-diff --git a/src/firewall.c b/src/firewall.c
-index c440df6..c83def9 100644
---- a/src/firewall.c
-+++ b/src/firewall.c
+diff --git a/src/firewall-iptables.c b/src/firewall-iptables.c
+index 45943a8..e04bb91 100644
+--- a/src/firewall-iptables.c
++++ b/src/firewall-iptables.c
 @@ -23,6 +23,10 @@
  #include <config.h>
  #endif
@@ -44,6 +47,20 @@ index c440df6..c83def9 100644
  #include <errno.h>
  
  #include <xtables.h>
+diff --git a/src/firewall-nftables.c b/src/firewall-nftables.c
+index 2503ee2..583d1c4 100644
+--- a/src/firewall-nftables.c
++++ b/src/firewall-nftables.c
+@@ -30,6 +30,9 @@
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++/* hack to make sure kernel headers understand that libc (musl)
++   does define IFF_LOWER_UP et al. */
++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
+
+ #include <stdlib.h>
+ #include <time.h>
 diff --git a/src/iptables.c b/src/iptables.c
 index 82e3ac4..46ad9e2 100644
 --- a/src/iptables.c
@@ -60,5 +77,5 @@ index 82e3ac4..46ad9e2 100644
  #include <stdlib.h>
  #include <stdio.h>
 -- 
-2.1.4
+2.4.0
 
meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch new file +72 -0

72 lines not on this page · raw message

meta/recipes-connectivity/connman/connman/0003-stats-Fix-bad-file-descriptor-initialisation.patch deleted +0 -102

102 lines not on this page · raw message

meta/recipes-connectivity/connman/connman_1.34.bb renamed from meta/recipes-connectivity/connman/connman_1.33.bb +3 -3
similarity index 70%
rename from meta/recipes-connectivity/connman/connman_1.33.bb
rename to meta/recipes-connectivity/connman/connman_1.34.bb
index 4129b05..5d0f242 100644
@@ -2,15 +2,15 @@ require connman.inc
 
 SRC_URI  = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
             file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
+            file://0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch \
             file://connman \
             file://no-version-scripts.patch \
             file://includes.patch \
-            file://0003-stats-Fix-bad-file-descriptor-initialisation.patch \
             "
 SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch \
                              file://0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch"
 
-SRC_URI[md5sum] = "c51903fd3e7a6a371d12ac5d72a1fa01"
-SRC_URI[sha256sum] = "bc8946036fa70124d663136f9f6b6238d897ca482782df907b07a428b09df5a0"
+SRC_URI[md5sum] = "e200028702c831d5f535d20d61e608ef"
+SRC_URI[sha256sum] = "a9a0808c729c1f348fc36d8cecb52d19b72bc34cb411c502608cb0e0190fc71e"
 
 RRECOMMENDS_${PN} = "connman-conf"
Signature · 1 line
2.4.0
#1 lore raw

meta/recipes-connectivity/connman/connman.inc PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2t · line 55

Quoted 3 lines · Maxin B. John
meta/recipes-connectivity/connman/connman.inc +2 -0
+PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,nftables,nftables"
+PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"

What happens if neither iptables or nftables is specified?

Ross

#2 lore raw

Hi Ross,

Quoted 5 lines · Ross
Quoted 4 lines · Maxin B. John

+PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,nftables,nftables" +PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"

What happens if neither iptables or nftables is specified?

In that case, build fails with " Xtables library is required".

We have provided "iptables" as the default choice in PACKAGECONFIG though.

Quoted 1 line

Ross

Best Regards,
Maxin

#3 lore raw
Quoted 4 lines · Maxin B. John

In that case, build fails with " Xtables library is required".

We have provided "iptables" as the default choice in PACKAGECONFIG though.

Cool, as long as it fails in a deterministic way. :)

Ross