Useful on highly resource constrained embedded systems where DBus is an extra
dependency. Tested to build with and without ` dbus ` in PACKAGECONFIG.

DBus interface is left enabled by default to preserve old behavior.

Signed-off-by: Alibek Omarov < a1ba.oma...@gmail.com >
---
.../wpa-supplicant/ wpa-suppli cant_2.10.bb ( http://wpa-supplicant_2.10.bb ) | 
21 +++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-connectivity/wp
a-supplicant/ wpa-supplicant_2. 10.bb ( http://wpa-supplicant_2.10.bb )
b/meta/recipes-connectivity/wp a-supplicant/ wpa-supplicant_2. 10.bb ( 
http://wpa-supplicant_2.10.bb )
index 46604045da..dec904b12d 100644
--- a/meta/recipes-connectivity/wp a-supplicant/ wpa-supplicant_2. 10.bb ( 
http://wpa-supplicant_2.10.bb )
+++ b/meta/recipes-connectivity/wp a-supplicant/ wpa-supplicant_2. 10.bb ( 
http://wpa-supplicant_2.10.bb )
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM =
"file://COPYING;md5=5ebcb90236 d1ad640558c3d3cd3035df \

file://README;beginline=1;endl ine=56;md5=e3d2f6c2948991e37c1 ca4960de84747
\

file://wpa_supplicant/wpa_supp licant.c;beginline=1;endline= 
12;md5=76306a95306fee9a976b0ac 1be70f705"

-DEPENDS = " dbus libnl"
+DEPENDS = "libnl"

SRC_URI = " http://w1.fi/releases/wpa_sup plicant-${PV}.tar.gz ( 
http://w1.fi/releases/wpa_supplicant-$%7BPV%7D.tar.gz ) \
file://wpa-supplicant.sh \
@@ -25,9 +25,10 @@ S = "${WORKDIR}/wpa_supplicant-${P V}"

inherit pkgconfig systemd

-PACKAGECONFIG ?= "openssl"
+PACKAGECONFIG ?= "openssl dbus "
PACKAGECONFIG[gnutls] = ",,gnutls libgcrypt"
PACKAGECONFIG[openssl] = ",,openssl"
+PACKAGECONFIG[ dbus ] = ",, dbus "

CVE_PRODUCT = "wpa_supplicant"

@@ -46,6 +47,12 @@ do_configure () {
-e 's/\(^CONFIG_SAE=\)/#\1/' wpa_supplicant/.config
fi

+       if [ "${@bb.utils.contains('PACKAGE CONFIG',' dbus ','true','false', 
d)}"
= "false" ]; then
+               sed -i -e 's/\(^CONFIG_CTRL_IFACE_DBUS_N EW=\)/#\1/' \
+                       -e 's/\(^CONFIG_CTRL_IFACE_DBUS_I NTRO=\)/#\1/'
wpa_supplicant/.config
+       fi
+
+
# For rebuild
rm -f wpa_supplicant/*.d wpa_supplicant/ dbus /*.d
}
@@ -72,10 +79,12 @@ do_install () {
install -m 755 ${WORKDIR}/wpa-supplicant.sh
${D}${sysconfdir}/network/if-p re-up.d/wpa-supplicant
ln -sf ../if-pre-up.d/wpa-supplicant
${D}${sysconfdir}/network/if-p ost-down.d/wpa-supplicant

-       install -d ${D}/${sysconfdir}/ dbus -1/syst em.d
-       install -m 644
${S}/wpa_supplicant/ dbus / dbus - wpa_supplicant.conf
${D}/${sysconfdir}/ dbus -1/syst em.d
-       install -d ${D}/${datadir}/ dbus -1/system- services
-       install -m 644 ${S}/wpa_supplicant/ dbus /*.ser vice
${D}/${datadir}/ dbus -1/system- services
+       if ${@bb.utils.contains('PACKAGEC ONFIG',' dbus ','true','false', d)}; 
then
+               install -d ${D}/${sysconfdir}/ dbus -1/syst em.d
+               install -m 644
${S}/wpa_supplicant/ dbus / dbus - wpa_supplicant.conf
${D}/${sysconfdir}/ dbus -1/syst em.d
+               install -d ${D}/${datadir}/ dbus -1/system- services
+               install -m 644 ${S}/wpa_supplicant/ dbus /*.ser vice
${D}/${datadir}/ dbus -1/system- services
+       fi

if ${@bb.utils.contains('DISTRO_F EATURES','systemd','true','fal se',d)};
then
install -d ${D}/${systemd_system_unitdir}
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197467): 
https://lists.openembedded.org/g/openembedded-core/message/197467
Mute This Topic: https://lists.openembedded.org/mt/105108062/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to