Fix Bug 603
From: Dongxiao Xu <[email protected]>
Hi Saul,
This pull request fixes [BUGID #603], please help to review and pull.
Actually there are two bugs inside:
1) wpa_supplicant is not launched by default.
2) Even if manually launch wpa_supplicant, wifi interface still couldn't be enabled.
Some points to fix this issue:
1) Using new dbus interface in wpa_supplicant: "fi.w1.wpa_supplicant1"
2) Enable nl802.11 support in wpa_supplicant.
3) Fix the dbus-daemon-launch-helper permission issue.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: dxu4/bugfix
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/bugfix
Thanks,
Dongxiao Xu <[email protected]>
---
Dongxiao Xu (2):
wpa-supplicant: change dbus interface
dbus: change owner and mode for dbus-daemon-launch-helper in postinst
.../wpa-supplicant-0.7.3/defconfig-gnutls | 5 +++-- .../wpa-supplicant/wpa-supplicant-0.7.inc | 2 +- .../wpa-supplicant/wpa-supplicant_0.7.3.bb | 2 +- meta/recipes-core/dbus/dbus.inc | 4 +++- meta/recipes-core/dbus/dbus_1.4.1.bb | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-)
PATCH 1/2 wpa-supplicant: change dbus interface
From: Dongxiao Xu <[email protected]>
The new interface "fi.w1.wpa_supplicant1" is used in latest connman, thus change the wpa_supplicant default configuration.
Besides, enable netlink support with libnl 2.0 mode.
[BUGID #603]
--- .../wpa-supplicant-0.7.3/defconfig-gnutls | 5 +++-- .../wpa-supplicant/wpa-supplicant-0.7.inc | 2 +- .../wpa-supplicant/wpa-supplicant_0.7.3.bb | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-)
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.3/defconfig-gnutls +3 -2
@@ -81,7 +81,8 @@ CONFIG_DRIVER_HOSTAP=y CONFIG_DRIVER_WEXT=y # Driver interface for Linux drivers using the nl80211 kernel interface -#CONFIG_DRIVER_NL80211=y +CONFIG_LIBNL20=y +CONFIG_DRIVER_NL80211=y # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) #CONFIG_DRIVER_BSD=y
@@ -404,4 +405,4 @@ CONFIG_PEERKEY=y #LIBS_c += -lbfd -liberty -lz CONFIG_TLS = gnutls CONFIG_GNUTLS_EXTRA=y -CONFIG_CTRL_IFACE_DBUS=y +CONFIG_CTRL_IFACE_DBUS_NEW=y
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc +1 -1
@@ -6,7 +6,7 @@ LICENSE = "GPLv2 | BSD" LIC_FILES_CHKSUM = "file://../COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ file://../README;md5=54cfc88015d3ce83f7156e63c6bb1738 \ file://wpa_supplicant.c;beginline=1;endline=17;md5=acdc5a4b0d6345f21f136eace747260e" -DEPENDS = "gnutls dbus" +DEPENDS = "gnutls dbus libnl" RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli" SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_0.7.3.bb +1 -1
@@ -1,6 +1,6 @@ require wpa-supplicant-0.7.inc -PR = "r3" +PR = "r4" SRC_URI[md5sum] = "f516f191384a9a546e3f5145c08addda" SRC_URI[sha256sum] = "d0cd50caa85346ccc376dcda5ed3c258eef19a93b3cade39d25760118ad59443"
Signature · 1 line
1.6.3.3
PATCH 2/2 dbus: change owner and mode for dbus-daemon-launch-helper in postinst
In reply to Dongxiao XuFrom: Dongxiao Xu <[email protected]>
Add code in dbus postinst to change owner and mode for dbus-daemon-launch-helper.
[BUGID #603]
--- meta/recipes-core/dbus/dbus.inc | 4 +++- meta/recipes-core/dbus/dbus_1.4.1.bb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)
meta/recipes-core/dbus/dbus.inc +3 -1
@@ -53,7 +53,9 @@ pkg_postinst_dbus() { --ingroup "$MESSAGEUSER" "$MESSAGEUSER" grep -q netdev: /etc/group || addgroup netdev - chmod u+s /usr/libexec/dbus-daemon-launch-helper + + chown root:"$MESSAGEUSER" /usr/libexec/dbus-daemon-launch-helper + chmod 4754 /usr/libexec/dbus-daemon-launch-helper # add volatile after new user/grp are created echo "d messagebus messagebus 0755 /var/run/dbus none" > /etc/default/volatiles/99_dbus
meta/recipes-core/dbus/dbus_1.4.1.bb +1 -1
@@ -1,6 +1,6 @@ include dbus.inc -PR = "r0" +PR = "r1" SRC_URI[md5sum] = "99cb057700c0455fb68f8d57902f77ac" SRC_URI[sha256sum] = "caa1a0ded2d0f2e95c1d4ec7e3c8bd44834928c5b0ed41a7189963f3593983bd"
Signature · 1 line
1.6.3.3
Re: [PATCH 1/2] wpa-supplicant: change dbus interface
In reply to Dongxiao XuHello.
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.3/defconfig-gnutls CONFIG_PEERKEY=y · line 408
Quoted 10 lines · Dongxiao Xu
From: Dongxiao Xu <[email protected]>
# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) #CONFIG_DRIVER_BSD=y
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.3/defconfig-gnutls +1
-1@@ -404,4 +405,4 @@ CONFIG_PEERKEY=y #LIBS_c += -lbfd -liberty -lz CONFIG_TLS = gnutls CONFIG_GNUTLS_EXTRA=y -CONFIG_CTRL_IFACE_DBUS=y +CONFIG_CTRL_IFACE_DBUS_NEW=y
Any reason not enable both dbus interfaces? They can happily life next to each other. Thats how I did it in OE.
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc LICENSE = "GPLv2 | BSD" · line 9
Quoted 10 lines
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc +1
-1@@ -6,7 +6,7 @@ LICENSE = "GPLv2 | BSD" LIC_FILES_CHKSUM = "file://../COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ file://../README;md5=54cfc88015d3ce83f7156e63c6bb1738 \ file://wpa_supplicant.c;beginline=1;endline=17;md5=acdc5a4b0d6345f21f136eace747260e" -DEPENDS = "gnutls dbus" +DEPENDS = "gnutls dbus libnl"
Hmm, does poky onl yhave libnl2 recipes or both libnl and libnl2?
If the later you should depend on libnl2 instead. I'm trying to get rid of these libnl mess in OE and getting all packges over to libnl2. Would be great if we could share resources here. The iw package for example can also be switched easily.
I fear I only have time to send patches to poky after the OE release in march. If you want to cherry-pick (if possible) patches that of course fine.
regards
Stefan Schmidt
Re: [PATCH 1/2] wpa-supplicant: change dbus interface
Hi Stefan,
Quoted 5 lines · Stefan Schmidt
Hello.
Quoted 2 lines · Dongxiao Xu
From: Dongxiao Xu <[email protected]>
Quoted 8 lines
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.3/defconfig-gnutls CONFIG_PEERKEY=y · line 408
Quoted 5 lines
# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
#CONFIG_DRIVER_BSD=y @@ -404,4 +405,4 @@CONFIG_PEERKEY=y#LIBS_c +=meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.3/defconfig-gnutls +1
-2-lbfd -liberty -lz CONFIG_TLS = gnutls CONFIG_GNUTLS_EXTRA=y -CONFIG_CTRL_IFACE_DBUS=y +CONFIG_CTRL_IFACE_DBUS_NEW=yAny reason not enable both dbus interfaces? They can happily life next to each other. Thats how I did it in OE.
It is OK for me to enable both options. I will change it in my next pull request.
Quoted 18 lines
Quoted 13 lines
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc index 7865b8f..cd62d8f 100644
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc +0
-0@@ -6,7 +6,7 @@ LICENSE = "GPLv2 | BSD" LIC_FILES_CHKSUM = "file://../COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ file://../README;md5=54cfc88015d3ce83f7156e63c6bb1738 \Quoted 2 lines
file://wpa_supplicant.c;beginline=1;endline=17;md5=acdc5a4b0d6345f21f136eace747260e" -DEPENDS = "gnutls dbus" +DEPENDS = "gnutls dbus libnl"
Hmm, does poky onl yhave libnl2 recipes or both libnl and libnl2?
Quoted 4 lines
If the later you should depend on libnl2 instead. I'm trying to get rid of these libnl mess in OE and getting all packges over to libnl2. Would be great if we could share resources here. The iw package for example can also be switched easily.
Currently, Poky only has libnl2, and recipe name is libnl_2.0.bb, thus I added "libnl" as the wpa_supplicant's DEPENDS.
Something intersting that, though APIs are incompatible between libnl and libnl2, we didn't see build issues except this wpa_supplicant case when upgrading libnl from 1.1 to 2.0.
Could you list some OE packages which need libnl 1.1 as examples? We can check if we have included them in our current Poky build.
Thanks,
Dongxiao
Quoted 11 lines
I fear I only have time to send patches to poky after the OE release in march.
If you want to cherry-pick (if possible) patches that of course fine.regards
Stefan Schmidt
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky
Re: [PATCH 1/2] wpa-supplicant: change dbus interface
Hello.
Quoted 16 lines · Dongxiao
Quoted 5 lines · Stefan Schmidt
Hello.
Quoted 2 lines · Dongxiao Xu
From: Dongxiao Xu <[email protected]>
Quoted 8 lines
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.3/defconfig-gnutls CONFIG_PEERKEY=y · line 408
Quoted 5 lines
# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
#CONFIG_DRIVER_BSD=y @@ -404,4 +405,4 @@CONFIG_PEERKEY=y#LIBS_c +=meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.3/defconfig-gnutls +1
-2-lbfd -liberty -lz CONFIG_TLS = gnutls CONFIG_GNUTLS_EXTRA=y -CONFIG_CTRL_IFACE_DBUS=y +CONFIG_CTRL_IFACE_DBUS_NEW=yAny reason not enable both dbus interfaces? They can happily life next to each other. Thats how I did it in OE.
Quoted 1 line
It is OK for me to enable both options. I will change it in my next pull request.
Thanks.
Quoted 17 lines
Quoted 17 lines
Quoted 12 lines
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc index 7865b8f..cd62d8f 100644
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc +0
-0@@ -6,7 +6,7 @@ LICENSE = "GPLv2 | BSD" LIC_FILES_CHKSUM = "file://../COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ file://../README;md5=54cfc88015d3ce83f7156e63c6bb1738 \Quoted 2 lines
file://wpa_supplicant.c;beginline=1;endline=17;md5=acdc5a4b0d6345f21f136eace747260e" -DEPENDS = "gnutls dbus" +DEPENDS = "gnutls dbus libnl"
Hmm, does poky onl yhave libnl2 recipes or both libnl and libnl2?
Quoted 6 lines
Quoted 4 lines
If the later you should depend on libnl2 instead. I'm trying to get rid of these libnl mess in OE and getting all packges over to libnl2. Would be great if we could share resources here. The iw package for example can also be switched easily.
Currently, Poky only has libnl2, and recipe name is libnl_2.0.bb, thus I added "libnl" as the wpa_supplicant's DEPENDS.
That explains it. So libnl is fine in your case. In OE we have it named libnl2_2.0.bb to not clash with the libnl recipes.
Quoted 2 lines
Something intersting that, though APIs are incompatible between libnl and libnl2, we didn't see build issues except this
wpa_supplicantcase when upgrading libnl from 1.1 to 2.0.
I would expect that Poky does not have any recipes included that only support the old libnl version. See the list below.
Quoted 1 line
Could you list some OE packages which need libnl 1.1 as examples? We can check if we have included them in our current Poky build.
bmon
ibrdtn
lowpan-tools
networkmanager
networkmanager-openvpn
That are the ones that come in mind quickly. The first three are not in Poky (at least as afar as I know). For the networkmanager part I would be interested how you got it working with libnl2.
regards
Stefan Schmidt
Re: [PATCH 1/2] wpa-supplicant: change dbus interface
Quoted 68 lines · Stefan Schmidt
Hello.
Quoted 13 lines · Dongxiao
Quoted 11 lines · Stefan Schmidt
Hello.
Quoted 7 lines · Dongxiao Xu
From: Dongxiao Xu <[email protected]>
# Driver interface for FreeBSD net80211 layer (e.g., Atheros
driver) #CONFIG_DRIVER_BSD=y @@ -404,4 +405,4 @@CONFIG_PEERKEY=y#LIBS_c += -lbfd -liberty -lzCONFIG_TLS= gnutlsCONFIG_GNUTLS_EXTRA=y-CONFIG_CTRL_IFACE_DBUS=y +CONFIG_CTRL_IFACE_DBUS_NEW=yQuoted 5 lines
Quoted 2 lines
Any reason not enable both dbus interfaces? They can happily life next to each other. Thats how I did it in OE.
It is OK for me to enable both options. I will change it in my next pull request.
Thanks.
Quoted 17 lines
Quoted 17 lines
Quoted 10 lines
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc index 7865b8f..cd62d8f 100644 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc
+++
b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.i
+++ nc @@ -6,7 +6,7 @@ LICENSE = "GPLv2 | BSD"LIC_FILES_CHKSUM=Quoted 4 lines
"file://../COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
file://../README;md5=54cfc88015d3ce83f7156e63c6bb1738 \
file://wpa_supplicant.c;beginline=1;endline=17;md5=acdc5a4b0d6345f21f136eace747260e" -DEPENDS = "gnutls dbus" +DEPENDS = "gnutls dbus libnl"Hmm, does poky onl yhave libnl2 recipes or both libnl and libnl2?
Quoted 7 lines
Quoted 4 lines
If the later you should depend on libnl2 instead. I'm trying to get rid of these libnl mess in OE and getting all packges over to libnl2. Would be great if we could share resources here. The iw package for example can also be switched easily.
Currently, Poky only has libnl2, and recipe name is libnl_2.0.bb, thus I added "libnl" as the wpa_supplicant's DEPENDS.
That explains it. So libnl is fine in your case. In OE we have it named libnl2_2.0.bb to not clash with the libnl recipes.
Quoted 3 lines
Something intersting that, though APIs are incompatible between libnl and libnl2, we didn't see build issues except this
wpa_supplicantcase when upgrading libnl from 1.1 to 2.0.I would expect that Poky does not have any recipes included that only support the old libnl version. See the list below.
Quoted 2 lines
Could you list some OE packages which need libnl 1.1 as examples? We can check if we have included them in our current Poky build.
bmon
ibrdtn
lowpan-tools
networkmanager
networkmanager-openvpn
Quoted 3 lines
That are the ones that come in mind quickly. The first three are not in Poky (at least as afar as I know). For the networkmanager part I would be interested how you got it working with libnl2.
Actually networkmanager has beed deprecated and deleted in poky. Now connman is the default network configuration tool.
Thanks,
Dongxiao
Quoted 3 lines
regards
Stefan Schmidt
Re: [PATCH 1/2] wpa-supplicant: change dbus interface
Hello.
Quoted 8 lines · Dongxiao
Quoted 4 lines · Stefan Schmidt
That are the ones that come in mind quickly. The first three are not in Poky (at least as afar as I know). For the networkmanager part I would be interested how you got it working with libnl2.
Actually networkmanager has beed deprecated and deleted in poky. Now connman is the default network configuration tool.
Ah, that explains why you don't have problems with it. :)
regards
Stefan Schmidt