Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51B52C54E58 for ; Sat, 23 Mar 2024 18:53:20 +0000 (UTC) Subject: [PATCH RESEND] wpa-supplicant: add support for building without DBus To: openembedded-core@lists.openembedded.org From: "Alibek Omarov" X-Originating-Location: Helsinki, Uusimaa, FI (135.181.76.187) X-Originating-Platform: Linux Firefox 116 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Sat, 23 Mar 2024 11:53:13 -0700 Message-ID: Content-Type: multipart/alternative; boundary="6XsfRwYXv1S9nVoqGqcz" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 23 Mar 2024 18:53:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/197467 --6XsfRwYXv1S9nVoqGqcz Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Useful on highly resource constrained embedded systems where DBus is an ext= ra 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.omarov@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 =3D "file://COPYING;md5=3D5ebcb90236 d1ad640558c3d3cd3035df \ file://README;beginline=3D1;endl ine=3D56;md5=3De3d2f6c2948991e37c1 ca4960d= e84747 \ file://wpa_supplicant/wpa_supp licant.c;beginline=3D1;endline=3D 12;md5=3D7= 6306a95306fee9a976b0ac 1be70f705" -DEPENDS =3D " dbus libnl" +DEPENDS =3D "libnl" SRC_URI =3D " http://w1.fi/releases/wpa_sup plicant-${PV}.tar.gz ( http://w= 1.fi/releases/wpa_supplicant-$%7BPV%7D.tar.gz ) \ file://wpa-supplicant.sh \ @@ -25,9 +25,10 @@ S =3D "${WORKDIR}/wpa_supplicant-${P V}" inherit pkgconfig systemd -PACKAGECONFIG ?=3D "openssl" +PACKAGECONFIG ?=3D "openssl dbus " PACKAGECONFIG[gnutls] =3D ",,gnutls libgcrypt" PACKAGECONFIG[openssl] =3D ",,openssl" +PACKAGECONFIG[ dbus ] =3D ",, dbus " CVE_PRODUCT =3D "wpa_supplicant" @@ -46,6 +47,12 @@ do_configure () { -e 's/\(^CONFIG_SAE=3D\)/#\1/' wpa_supplicant/.config fi +=C2=A0 =C2=A0 =C2=A0 =C2=A0if [ "${@bb.utils.contains('PACKAGE CONFIG',' d= bus ','true','false', d)}" =3D "false" ]; then +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sed -i -e 's/\(^CON= FIG_CTRL_IFACE_DBUS_N EW=3D\)/#\1/' \ +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0-e 's/\(^CONFIG_CTRL_IFACE_DBUS_I NTRO=3D\)/#\1/' wpa_supplicant/.config +=C2=A0 =C2=A0 =C2=A0 =C2=A0fi + + # 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 -=C2=A0 =C2=A0 =C2=A0 =C2=A0install -d ${D}/${sysconfdir}/ dbus -1/syst em.= d -=C2=A0 =C2=A0 =C2=A0 =C2=A0install -m 644 ${S}/wpa_supplicant/ dbus / dbus - wpa_supplicant.conf ${D}/${sysconfdir}/ dbus -1/syst em.d -=C2=A0 =C2=A0 =C2=A0 =C2=A0install -d ${D}/${datadir}/ dbus -1/system- ser= vices -=C2=A0 =C2=A0 =C2=A0 =C2=A0install -m 644 ${S}/wpa_supplicant/ dbus /*.ser= vice ${D}/${datadir}/ dbus -1/system- services +=C2=A0 =C2=A0 =C2=A0 =C2=A0if ${@bb.utils.contains('PACKAGEC ONFIG',' dbus= ','true','false', d)}; then +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0install -d ${D}/${s= ysconfdir}/ dbus -1/syst em.d +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0install -m 644 ${S}/wpa_supplicant/ dbus / dbus - wpa_supplicant.conf ${D}/${sysconfdir}/ dbus -1/syst em.d +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0install -d ${D}/${d= atadir}/ dbus -1/system- services +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0install -m 644 ${S}= /wpa_supplicant/ dbus /*.ser vice ${D}/${datadir}/ dbus -1/system- services +=C2=A0 =C2=A0 =C2=A0 =C2=A0fi if ${@bb.utils.contains('DISTRO_F EATURES','systemd','true','fal se',d)}; then install -d ${D}/${systemd_system_unitdir} -- 2.34.1 --6XsfRwYXv1S9nVoqGqcz Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Useful on highly resource constrained embedded systems where DBus is an extra
dependency. Tested to build with and with= out `dbus` in PACKAGECONFIG.

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

Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.co= m>
---
 .../wpa-supplicant/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
b/meta/recipes-connect= ivity/wpa-supplicant/wpa-supplican= t_2.10.bb
index 46604045da..dec904b12d 100644
--- a/me= ta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.10.bb
+++ b/meta/recipes-connectivity= /wpa-supplicant/wpa-supplicant_2.<= wbr />10.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM =3D
"file://COPY= ING;md5=3D5ebcb90236d1ad640558c3d3cd3035df \

file://READM= E;beginline=3D1;endline=3D56;md5=3De3d2f6c2948991e37c1ca4960d= e84747
\

file://wpa_supplicant/wpa_supplicant.c;begi= nline=3D1;endline=3D12;md5=3D76306a95306fee9a976b0ac1be70f705= "

-DEPENDS =3D "dbus libnl"
+DEPE= NDS =3D "libnl"

 SRC_URI =3D "http://w1.fi/relea= ses/wpa_supplicant-${PV}.tar.gz \
      &nbs= p;     file://wpa-supplicant.sh \
@@ -25,9 +25,10 @@ S =3D "= ${WORKDIR}/wpa_supplicant-${PV}"

 inherit pkgconfig = systemd

-PACKAGECONFIG ?=3D "openssl"
+PACKAGECONFIG ?=3D "= openssl dbus"
 PACKAGECONFIG[gnutls] = =3D ",,gnutls libgcrypt"
 PACKAGECONFIG[openssl] =3D ",,openssl"<= br />+PACKAGECONFIG[dbus] =3D ",,dbus"

 CVE_PRODUCT =3D "wpa_supplicant"

@@ -46,6 +47,12 @@ do_configure () {
        &nb= sp;       -e 's/\(^CONFIG_SAE=3D\)/#\1/' wpa_supplicant/.con= fig
        fi

+      &n= bsp;if [ "${@bb.utils.contains('PACKAGECONFIG','d= bus','true','false',d)}"
=3D "false" ]; then
+ = ;              sed -i -e 's/\(^CONFIG_CT= RL_IFACE_DBUS_NEW=3D\)/#\1/' \
+        &nb= sp;              -e 's/\(^CONFIG_CTRL_IF= ACE_DBUS_INTRO=3D\)/#\1/'
wpa_supplicant/.config
+  &= nbsp;    fi
+
+
        # For = rebuild
        rm -f wpa_supplicant/*.d wpa_suppl= icant/dbus/*.d
 }
@@ -72,10 +79,12= @@ do_install () {
        install -m 755 ${WORKD= IR}/wpa-supplicant.sh
${D}${sysconfdir}/network/if-pre-up.d/wpa= -supplicant
        ln -sf ../if-pre-up.d/wpa-supp= licant
${D}${sysconfdir}/network/if-post-down.d/wpa-supplicant<= br />
-       install -d ${D}/${sysconfdir}/dbus-1/system.d
-       = ;install -m 644
${S}/wpa_supplicant/dbus/dbus-wpa_supplicant.conf
${D}/${sysconfd= ir}/dbus-1/system.d
-    &n= bsp;  install -d ${D}/${datadir}/dbus-1/syst= em-services
-       install -m 644 ${S}/wpa= _supplicant/dbus/*.service
${D}/${dat= adir}/dbus-1/system-services
+  =      if ${@bb.utils.contains('PACKAGECONFIG','dbus','true','false',d)}; then
+   = ;            install -d ${D}/${sysconfdir}/dbus-1/system.d
+      &= nbsp;        install -m 644
${S}/wpa_supplicant/dbus/dbus-wpa_supp= licant.conf
${D}/${sysconfdir}/dbus-1/system.d
+               inst= all -d ${D}/${datadir}/dbus-1/system-servi= ces
+               install -m= 644 ${S}/wpa_supplicant/dbus/*.service${D}/${datadir}/dbus-1/system-services<= br />+       fi

        = if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};
then
              =   install -d ${D}/${systemd_system_unitdir}
--
2.34.1
--6XsfRwYXv1S9nVoqGqcz--