All of lore.kernel.org
 help / color / mirror / Atom feed
* [oe-core][PATCHv2] connman: add PACKAGECONFIG to support iwd
@ 2022-08-24 12:50 Markus Volk
  2022-08-25 12:17 ` Ross Burton
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Volk @ 2022-08-24 12:50 UTC (permalink / raw)
  To: openembedded-core; +Cc: Markus Volk

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta/recipes-connectivity/connman/connman.inc | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 5880ecd5d4..4b0c8a2c9f 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -28,10 +28,15 @@ EXTRA_OECONF += "\
     --enable-tools \
     --disable-polkit \
 "
+# For smooth operation it would be best to start only one wireless daemon at a time.
+# If wpa_supplicant is running, connman will use it preferentially.
+# Select either wpa_supplicant or iwd
+WIRELESS_DAEMON ??= "wpa_supplicant"
 
 PACKAGECONFIG ??= "wispr iptables client\
-                   ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \
+                   ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \
 "
 
 # If you want ConnMan to support VPN, add following statement into
@@ -39,9 +44,13 @@ PACKAGECONFIG ??= "wispr iptables client\
 # PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp"
 
 PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''"
-PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant, wpa-supplicant"
+PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi"
 PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5"
 PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
+PACKAGECONFIG[wpa_supplicant] = ",,wpa-supplicant,wpa-supplicant"
+# iwd would be required as a runtime dependency. it is nevertheless given as a recommendation because the recipe for it
+# is not included in oe-core.
+PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,,iwd"
 PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
 PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
 PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [oe-core][PATCHv2] connman: add PACKAGECONFIG to support iwd
  2022-08-24 12:50 [oe-core][PATCHv2] connman: add PACKAGECONFIG to support iwd Markus Volk
@ 2022-08-25 12:17 ` Ross Burton
  2022-08-25 14:59   ` Quentin Schulz
  2022-08-25 18:36   ` Markus Volk
  0 siblings, 2 replies; 5+ messages in thread
From: Ross Burton @ 2022-08-25 12:17 UTC (permalink / raw)
  To: Markus Volk; +Cc: openembedded-core

On 24 Aug 2022, at 13:50, Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote:
> +# For smooth operation it would be best to start only one wireless daemon at a time.
> +# If wpa_supplicant is running, connman will use it preferentially.
> +# Select either wpa_supplicant or iwd
> +WIRELESS_DAEMON ??= "wpa_supplicant"
> PACKAGECONFIG ??= "wispr iptables client\
> -                   ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \
> +                   ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \
>                    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \
> "

This is over-complicating things.  Why is the wifi daemon a special configuration option?  Just have wpa_supplicant in the default PACKAGECONFIG, and people who want to use iwd can set PACKAGECONFIG.

> +PACKAGECONFIG[wpa_supplicant] = ",,wpa-supplicant,wpa-supplicant"
> +# iwd would be required as a runtime dependency. it is nevertheless given as a recommendation because the recipe for it
> +# is not included in oe-core.
> +PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,,iwd"

This definitely should be RDEPENDS.

Note that if wpa_supplicant and iwd are mutually exclusive, you can express that in the PACKAGECONFIG:

https://docs.yoctoproject.org/ref-manual/variables.html?#term-PACKAGECONFIG

Ross

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [oe-core][PATCHv2] connman: add PACKAGECONFIG to support iwd
  2022-08-25 12:17 ` Ross Burton
@ 2022-08-25 14:59   ` Quentin Schulz
  2022-08-25 15:36     ` Markus Volk
  2022-08-25 18:36   ` Markus Volk
  1 sibling, 1 reply; 5+ messages in thread
From: Quentin Schulz @ 2022-08-25 14:59 UTC (permalink / raw)
  To: Ross Burton, Markus Volk; +Cc: openembedded-core

Hi Ross,

On 8/25/22 14:17, Ross Burton wrote:
> On 24 Aug 2022, at 13:50, Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote:
>> +# For smooth operation it would be best to start only one wireless daemon at a time.
>> +# If wpa_supplicant is running, connman will use it preferentially.
>> +# Select either wpa_supplicant or iwd
>> +WIRELESS_DAEMON ??= "wpa_supplicant"
>> PACKAGECONFIG ??= "wispr iptables client\
>> -                   ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \
>> +                   ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \
>>                     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
>> +                   ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \
>> "
> 
> This is over-complicating things.  Why is the wifi daemon a special configuration option?  Just have wpa_supplicant in the default PACKAGECONFIG, and people who want to use iwd can set PACKAGECONFIG.
> 
>> +PACKAGECONFIG[wpa_supplicant] = ",,wpa-supplicant,wpa-supplicant"
>> +# iwd would be required as a runtime dependency. it is nevertheless given as a recommendation because the recipe for it
>> +# is not included in oe-core.
>> +PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,,iwd"
> 
> This definitely should be RDEPENDS.
> 
> Note that if wpa_supplicant and iwd are mutually exclusive, you can express that in the PACKAGECONFIG:
> 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.yoctoproject.org_ref-2Dmanual_variables.html-3F-23term-2DPACKAGECONFIG&d=DwIFAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=8HjNGWSBnokVx86ZXb1HGtJWTl97isWyKhlw05xayeDV2PeizRV-8Et7M2oILR6A&s=SRukmgE6s_F_GQ3lRKUJZhJHBYIoHdF3lYfYPaNoS8E&e=
> 

 From the comment " For smooth operation it would be best to start only 
one wireless daemon at a time." I gathered that both can be enabled at once.

If we had --disable-wifi in PACKAGECONFIG[iwd] or 
PACKAGECONFIG[wpa_supplicant], we would be forced to have both or none 
since it would be part of the PACKAGECONFIG_CONFARGS if one is disabled.

If support for both at once is not supported by connman, then the wifi 
PACKAGECONFIG is unnecessary indeed.

Cheers,
Quentin


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [oe-core][PATCHv2] connman: add PACKAGECONFIG to support iwd
  2022-08-25 14:59   ` Quentin Schulz
@ 2022-08-25 15:36     ` Markus Volk
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Volk @ 2022-08-25 15:36 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: Ross Burton, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

Am Do, 25. Aug 2022 um 16:59:58 +0200 schrieb Quentin Schulz 
<quentin.schulz@theobroma-systems.com>:
> From the comment " For smooth operation it would be best to start 
> only one wireless daemon at a time." I gathered that both can be 
> enabled at once.

Correct. Connman doesn't really care if both wpa_supplicant and iwd are 
running. It's just that it then defaults to using wpa_supplicant. So to 
have a working out-of-box experience for iwd, you would either have to 
make them mutually exclusive, or change the Connman default 
configuration for iwd during installation.

I made this additional configure option to try to make it more visible 
that a decision should be made here. Additionally, the wireless daemon 
could be selected in a nicer way from a bbappend or e.g. local.conf.

If wpa_supplicant is preset in PACKAGECONFIG, we would always have to 
do a PACKAGECONFIG:remove for it.

For example, if we override this option in local.conf or distro.conf, 
we can make this decision visible to other recipes that might depend on 
this setting.


[-- Attachment #2: Type: text/html, Size: 1296 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [oe-core][PATCHv2] connman: add PACKAGECONFIG to support iwd
  2022-08-25 12:17 ` Ross Burton
  2022-08-25 14:59   ` Quentin Schulz
@ 2022-08-25 18:36   ` Markus Volk
  1 sibling, 0 replies; 5+ messages in thread
From: Markus Volk @ 2022-08-25 18:36 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

Am Do, 25. Aug 2022 um 12:17:06 +0000 schrieb Ross Burton 
<ross.burton@arm.com>:
> Note that if wpa_supplicant and iwd are mutually exclusive, you can 
> express that in the PACKAGECONFIG:

I didn't want to make the decision whether wpa_supplicant and iwd 
should be mutually exclusive. Although I think mixed operation is 
nonsensical, it will probably be possible with the appropriate 
configuration.

Just let me know if you want me to add it as rconflict in PACKAGECONFIG


[-- Attachment #2: Type: text/html, Size: 674 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-25 18:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 12:50 [oe-core][PATCHv2] connman: add PACKAGECONFIG to support iwd Markus Volk
2022-08-25 12:17 ` Ross Burton
2022-08-25 14:59   ` Quentin Schulz
2022-08-25 15:36     ` Markus Volk
2022-08-25 18:36   ` Markus Volk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.