From patchwork Sat Mar 23 18:53:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alibek Omarov X-Patchwork-Id: 41416 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: 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 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.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(-) -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 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"