All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/wpa_supplicant: fix WPA_SUPPLICANT_CONFIGURE_CMDS
@ 2021-03-16  2:18 Tian Yuanhao
  2021-03-16 10:02 ` Nicolas Cavallari
  2021-03-17  3:37 ` [Buildroot] [PATCH v2 1/1] package/wpa_supplicant: fix wrong config Tian Yuanhao
  0 siblings, 2 replies; 13+ messages in thread
From: Tian Yuanhao @ 2021-03-16  2:18 UTC (permalink / raw)
  To: buildroot

When "BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE=n" and
"BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y" are set,
"CONFIG_CTRL_IFACE_DBUS_NEW" will be enabled by
"-e 's/^#\(CONFIG_CTRL_IFACE_DBUS_NEW\)/\1/'" first, and then disabled
by "-e 's/^\(CONFIG_CTRL_IFACE\)/#\1/'".

Fix it by adding an "=" at the end.

Signed-off-by: Tian Yuanhao <tianyuanhao@aliyun.com>
---
 package/wpa_supplicant/wpa_supplicant.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
index c82db43c1c..7941a00748 100644
--- a/package/wpa_supplicant/wpa_supplicant.mk
+++ b/package/wpa_supplicant/wpa_supplicant.mk
@@ -185,8 +185,8 @@ endif
 
 define WPA_SUPPLICANT_CONFIGURE_CMDS
 	cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG)
-	sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
-		$(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
+	sed -i $(patsubst %,-e 's/^#\(%=\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
+		$(patsubst %,-e 's/^\(%=\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
 		$(patsubst %,-e '1i%=y',$(WPA_SUPPLICANT_CONFIG_SET)) \
 		$(patsubst %,-e %,$(WPA_SUPPLICANT_CONFIG_EDITS)) \
 		$(WPA_SUPPLICANT_CONFIG)
-- 
2.25.1

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

* [Buildroot] [PATCH 1/1] package/wpa_supplicant: fix WPA_SUPPLICANT_CONFIGURE_CMDS
  2021-03-16  2:18 [Buildroot] [PATCH 1/1] package/wpa_supplicant: fix WPA_SUPPLICANT_CONFIGURE_CMDS Tian Yuanhao
@ 2021-03-16 10:02 ` Nicolas Cavallari
  2021-03-17  3:37 ` [Buildroot] [PATCH v2 1/1] package/wpa_supplicant: fix wrong config Tian Yuanhao
  1 sibling, 0 replies; 13+ messages in thread
From: Nicolas Cavallari @ 2021-03-16 10:02 UTC (permalink / raw)
  To: buildroot

On 16/03/2021 03:18, Tian Yuanhao via buildroot wrote:
> When "BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE=n" and
> "BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y" are set,
> "CONFIG_CTRL_IFACE_DBUS_NEW" will be enabled by
> "-e 's/^#\(CONFIG_CTRL_IFACE_DBUS_NEW\)/\1/'" first, and then disabled
> by "-e 's/^\(CONFIG_CTRL_IFACE\)/#\1/'".
> 
> Fix it by adding an "=" at the end.
> 
> Signed-off-by: Tian Yuanhao <tianyuanhao@aliyun.com>
> ---
>   package/wpa_supplicant/wpa_supplicant.mk | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
> index c82db43c1c..7941a00748 100644
> --- a/package/wpa_supplicant/wpa_supplicant.mk
> +++ b/package/wpa_supplicant/wpa_supplicant.mk
> @@ -185,8 +185,8 @@ endif
>   
>   define WPA_SUPPLICANT_CONFIGURE_CMDS
>   	cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG)
> -	sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
> -		$(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
> +	sed -i $(patsubst %,-e 's/^#\(%=\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
> +		$(patsubst %,-e 's/^\(%=\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
>   		$(patsubst %,-e '1i%=y',$(WPA_SUPPLICANT_CONFIG_SET)) \
>   		$(patsubst %,-e %,$(WPA_SUPPLICANT_CONFIG_EDITS)) \
>   		$(WPA_SUPPLICANT_CONFIG)

Unfortunately, this behavior is expected so that all CONFIG_EAP_* 
options can be disabled with CONFIG_DISABLE += CONFIG_EAP

I don't see any immediate solution, other that to stop relying on this 
behavior and list every wpa_supplicant option explicitly, or drop the 
BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE option.

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

* [Buildroot] [PATCH v2 1/1] package/wpa_supplicant: fix wrong config
  2021-03-16  2:18 [Buildroot] [PATCH 1/1] package/wpa_supplicant: fix WPA_SUPPLICANT_CONFIGURE_CMDS Tian Yuanhao
  2021-03-16 10:02 ` Nicolas Cavallari
@ 2021-03-17  3:37 ` Tian Yuanhao
  2021-04-01  1:43   ` Tian Yuanhao
  2021-04-03  2:23   ` [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully Tian Yuanhao
  1 sibling, 2 replies; 13+ messages in thread
From: Tian Yuanhao @ 2021-03-17  3:37 UTC (permalink / raw)
  To: buildroot

When BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE is not set and
BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y, CONFIG_CTRL_IFACE_DBUS_NEW will be
enabled by 's/^#\(CONFIG_CTRL_IFACE_DBUS_NEW\)/\1/' first, and then
disabled by 's/^\(CONFIG_CTRL_IFACE\)/#\1/'.

v2:
  - fix it by adding '\>' after CONFIG_CTRL_IFACE
  - disable CONFIG_CTRL_IFACE_DBUS_INTRO when not enabled

Signed-off-by: Tian Yuanhao <tianyuanhao@aliyun.com>
---
 package/wpa_supplicant/wpa_supplicant.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
index c82db43c1c..c861db3d12 100644
--- a/package/wpa_supplicant/wpa_supplicant.mk
+++ b/package/wpa_supplicant/wpa_supplicant.mk
@@ -135,7 +135,7 @@ WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
 endif
 
 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE),)
-WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE
+WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE\>
 endif
 
 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS),y)
@@ -152,6 +152,8 @@ endef
 
 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION),y)
 WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS_INTRO
+else
+WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE_DBUS_INTRO
 endif
 
 else
-- 
2.25.1

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

* [Buildroot] [PATCH v2 1/1] package/wpa_supplicant: fix wrong config
  2021-03-17  3:37 ` [Buildroot] [PATCH v2 1/1] package/wpa_supplicant: fix wrong config Tian Yuanhao
@ 2021-04-01  1:43   ` Tian Yuanhao
  2021-04-02  9:08     ` Nicolas Cavallari
  2021-04-03  2:23   ` [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully Tian Yuanhao
  1 sibling, 1 reply; 13+ messages in thread
From: Tian Yuanhao @ 2021-04-01  1:43 UTC (permalink / raw)
  To: buildroot

Hi Nicolas,

In my opinion, the two options CONFIG_CTRL_IFACE and 
CONFIG_CTRL_IFACE_DBUS_NEW are not directly related except for their 
similar names. It should be correct now. Could you please test it?

Regards,
Yuanhao

On 2021/3/17 ??11:37, Tian Yuanhao wrote:
 > When BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE is not set and
 > BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y, CONFIG_CTRL_IFACE_DBUS_NEW will be
 > enabled by 's/^#\(CONFIG_CTRL_IFACE_DBUS_NEW\)/\1/' first, and then
 > disabled by 's/^\(CONFIG_CTRL_IFACE\)/#\1/'.
 >
 > v2:
 >?? - fix it by adding '\>' after CONFIG_CTRL_IFACE
 >?? - disable CONFIG_CTRL_IFACE_DBUS_INTRO when not enabled
 >
 > Signed-off-by: Tian Yuanhao <tianyuanhao@aliyun.com>
 > ---
 >? package/wpa_supplicant/wpa_supplicant.mk | 4 +++-
 >? 1 file changed, 3 insertions(+), 1 deletion(-)
 >
 > diff --git a/package/wpa_supplicant/wpa_supplicant.mk 
b/package/wpa_supplicant/wpa_supplicant.mk
 > index c82db43c1c..c861db3d12 100644
 > --- a/package/wpa_supplicant/wpa_supplicant.mk
 > +++ b/package/wpa_supplicant/wpa_supplicant.mk
 > @@ -135,7 +135,7 @@ WPA_SUPPLICANT_CONFIG_EDITS += 
's/\#\(CONFIG_TLS=\).*/\1internal/'
 >? endif
 >
 >? ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE),)
 > -WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE
 > +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE\>
 >? endif
 >
 >? ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS),y)
 > @@ -152,6 +152,8 @@ endef
 >
 >? ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION),y)
 >? WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS_INTRO
 > +else
 > +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE_DBUS_INTRO
 >? endif
 >
 >? else
 >

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

* [Buildroot] [PATCH v2 1/1] package/wpa_supplicant: fix wrong config
  2021-04-01  1:43   ` Tian Yuanhao
@ 2021-04-02  9:08     ` Nicolas Cavallari
  0 siblings, 0 replies; 13+ messages in thread
From: Nicolas Cavallari @ 2021-04-02  9:08 UTC (permalink / raw)
  To: buildroot

On 01/04/2021 03:43, Tian Yuanhao wrote:
> Hi Nicolas,
> 
> In my opinion, the two options CONFIG_CTRL_IFACE and 
> CONFIG_CTRL_IFACE_DBUS_NEW are not directly related except for their 
> similar names. It should be correct now. Could you please test it?

It works, you can add my Tested-By.

However, the maintainers will probably ask you to :
- Put the changelog below the "---" line, so that it does not appear in 
the commit message
- Maybe do one change at a time. The fix to disable CTRL_IFACE and the 
fix to disable CTRL_IFACE_DBUS_INTRO are two separate things that maybe 
should be in two patches.

> On 2021/3/17 ??11:37, Tian Yuanhao wrote:
>> When BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE is not set and
>> BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y, CONFIG_CTRL_IFACE_DBUS_NEW will be
>> enabled by 's/^#\(CONFIG_CTRL_IFACE_DBUS_NEW\)/\1/' first, and then
>> disabled by 's/^\(CONFIG_CTRL_IFACE\)/#\1/'.
>>
>> v2:
>> ?? - fix it by adding '\>' after CONFIG_CTRL_IFACE
>> ?? - disable CONFIG_CTRL_IFACE_DBUS_INTRO when not enabled
>>
>> Signed-off-by: Tian Yuanhao <tianyuanhao@aliyun.com>
>> ---
>> ? package/wpa_supplicant/wpa_supplicant.mk | 4 +++-
>> ? 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/package/wpa_supplicant/wpa_supplicant.mk 

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

* [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully
  2021-03-17  3:37 ` [Buildroot] [PATCH v2 1/1] package/wpa_supplicant: fix wrong config Tian Yuanhao
  2021-04-01  1:43   ` Tian Yuanhao
@ 2021-04-03  2:23   ` Tian Yuanhao
  2021-04-03  7:01     ` Yann E. MORIN
  1 sibling, 1 reply; 13+ messages in thread
From: Tian Yuanhao @ 2021-04-03  2:23 UTC (permalink / raw)
  To: buildroot

When BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE is not set and
BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y, CONFIG_CTRL_IFACE_DBUS_NEW will be
enabled by 's/^#\(CONFIG_CTRL_IFACE_DBUS_NEW\)/\1/' first, and then
disabled by 's/^\(CONFIG_CTRL_IFACE\)/#\1/'.

CONFIG_CTRL_IFACE_DBUS_NEW does not depend on CONFIG_CTRL_IFACE, except
for using it as a prefix. Fix this wrong behavior by adding '\>' after
CONFIG_CTRL_IFACE.

Signed-off-by: Tian Yuanhao <tianyuanhao@aliyun.com>
Tested-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
---

v1 -> v2:
  - only handle CONFIG_CTRL_IFACE

v2 -> v3:
  - rewrite commit message
---
 package/wpa_supplicant/wpa_supplicant.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
index c82db43c1c..80d75a57c7 100644
--- a/package/wpa_supplicant/wpa_supplicant.mk
+++ b/package/wpa_supplicant/wpa_supplicant.mk
@@ -135,7 +135,7 @@ WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
 endif
 
 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE),)
-WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE
+WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE\>
 endif
 
 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS),y)
-- 
2.25.1

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

* [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully
  2021-04-03  2:23   ` [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully Tian Yuanhao
@ 2021-04-03  7:01     ` Yann E. MORIN
  2021-04-03  7:49       ` Tian Yuanhao
  0 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2021-04-03  7:01 UTC (permalink / raw)
  To: buildroot

Tian, All,

On 2021-04-02 19:23 -0700, Tian Yuanhao via buildroot spake thusly:
> When BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE is not set and
> BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y, CONFIG_CTRL_IFACE_DBUS_NEW will be
> enabled by 's/^#\(CONFIG_CTRL_IFACE_DBUS_NEW\)/\1/' first, and then
> disabled by 's/^\(CONFIG_CTRL_IFACE\)/#\1/'.
> 
> CONFIG_CTRL_IFACE_DBUS_NEW does not depend on CONFIG_CTRL_IFACE, except
> for using it as a prefix. Fix this wrong behavior by adding '\>' after
> CONFIG_CTRL_IFACE.
> 
> Signed-off-by: Tian Yuanhao <tianyuanhao@aliyun.com>
> Tested-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
> ---
> 
> v1 -> v2:
>   - only handle CONFIG_CTRL_IFACE
> 
> v2 -> v3:
>   - rewrite commit message
> ---
>  package/wpa_supplicant/wpa_supplicant.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
> index c82db43c1c..80d75a57c7 100644
> --- a/package/wpa_supplicant/wpa_supplicant.mk
> +++ b/package/wpa_supplicant/wpa_supplicant.mk
> @@ -135,7 +135,7 @@ WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
>  endif
>  
>  ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE),)
> -WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE
> +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE\>

Yes,m this is a tchnically correct change, that will fix this once
issue.

However, it singles out this one configuration item among all the
others, because it is the only one to have this trailing word-boundary
marker.

And in fact, I think we should ensure this whole-word match for all the
configurationtiems in a generic way, i.e. in the expansion, later:

    diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
    index 96f0596bfe..001eccbfef 100644
    --- a/package/wpa_supplicant/wpa_supplicant.mk
    +++ b/package/wpa_supplicant/wpa_supplicant.mk
    @@ -188,8 +188,8 @@ endif
     
     define WPA_SUPPLICANT_CONFIGURE_CMDS
     	cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG)
    -	sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
    -		$(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
    +	sed -i $(patsubst %,-e 's/^#\(%\>\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
    +		$(patsubst %,-e 's/^\(%\>\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
     		$(patsubst %,-e '1i%=y',$(WPA_SUPPLICANT_CONFIG_SET)) \
     		$(patsubst %,-e %,$(WPA_SUPPLICANT_CONFIG_EDITS)) \
     		$(WPA_SUPPLICANT_CONFIG)

Thoughts?

Regards,
Yann E. MORIN.

>  endif
>  
>  ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS),y)
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully
  2021-04-03  7:01     ` Yann E. MORIN
@ 2021-04-03  7:49       ` Tian Yuanhao
  2021-04-06 20:10         ` Arnout Vandecappelle
  0 siblings, 1 reply; 13+ messages in thread
From: Tian Yuanhao @ 2021-04-03  7:49 UTC (permalink / raw)
  To: buildroot

Hi Yann,

On 4/3/21 12:01 AM, Yann E. MORIN wrote:
> Tian, All,
>
> On 2021-04-02 19:23 -0700, Tian Yuanhao via buildroot spake thusly:
>> When BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE is not set and
>> BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y, CONFIG_CTRL_IFACE_DBUS_NEW will be
>> enabled by 's/^#\(CONFIG_CTRL_IFACE_DBUS_NEW\)/\1/' first, and then
>> disabled by 's/^\(CONFIG_CTRL_IFACE\)/#\1/'.
>>
>> CONFIG_CTRL_IFACE_DBUS_NEW does not depend on CONFIG_CTRL_IFACE, except
>> for using it as a prefix. Fix this wrong behavior by adding '\>' after
>> CONFIG_CTRL_IFACE.
>>
>> Signed-off-by: Tian Yuanhao <tianyuanhao@aliyun.com>
>> Tested-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
>> ---
>>
>> v1 -> v2:
>>    - only handle CONFIG_CTRL_IFACE
>>
>> v2 -> v3:
>>    - rewrite commit message
>> ---
>>   package/wpa_supplicant/wpa_supplicant.mk | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
>> index c82db43c1c..80d75a57c7 100644
>> --- a/package/wpa_supplicant/wpa_supplicant.mk
>> +++ b/package/wpa_supplicant/wpa_supplicant.mk
>> @@ -135,7 +135,7 @@ WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
>>   endif
>>   
>>   ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE),)
>> -WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE
>> +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE\>
> Yes,m this is a tchnically correct change, that will fix this once
> issue.
>
> However, it singles out this one configuration item among all the
> others, because it is the only one to have this trailing word-boundary
> marker.
>
> And in fact, I think we should ensure this whole-word match for all the
> configurationtiems in a generic way, i.e. in the expansion, later:
>
>      diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
>      index 96f0596bfe..001eccbfef 100644
>      --- a/package/wpa_supplicant/wpa_supplicant.mk
>      +++ b/package/wpa_supplicant/wpa_supplicant.mk
>      @@ -188,8 +188,8 @@ endif
>       
>       define WPA_SUPPLICANT_CONFIGURE_CMDS
>       	cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG)
>      -	sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
>      -		$(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
>      +	sed -i $(patsubst %,-e 's/^#\(%\>\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
>      +		$(patsubst %,-e 's/^\(%\>\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
>       		$(patsubst %,-e '1i%=y',$(WPA_SUPPLICANT_CONFIG_SET)) \
>       		$(patsubst %,-e %,$(WPA_SUPPLICANT_CONFIG_EDITS)) \
>       		$(WPA_SUPPLICANT_CONFIG)
>
> Thoughts?
>
> Regards,
> Yann E. MORIN.

I did this in v1 [1], but Nicolas pointed out that it is by design.

At the moment, only CONFIG_CTRL_IFACE and CONFIG_CTRL_IFACE_DBUS_??? are 
irrelevant, and other options with the same prefix are related. So only 
CONFIG_CTRL_IFACE should be handled.

[1]: 
http://patchwork.ozlabs.org/project/buildroot/patch/20210316021804.3790808-1-tianyuanhao at aliyun.com/

Regards,
Yuanhao

>
>>   endif
>>   
>>   ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS),y)
>> -- 
>> 2.25.1
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully
  2021-04-03  7:49       ` Tian Yuanhao
@ 2021-04-06 20:10         ` Arnout Vandecappelle
  2021-04-07  7:22           ` Peter Korsgaard
  2021-04-07 21:47           ` Yann E. MORIN
  0 siblings, 2 replies; 13+ messages in thread
From: Arnout Vandecappelle @ 2021-04-06 20:10 UTC (permalink / raw)
  To: buildroot



On 03/04/2021 09:49, Tian Yuanhao via buildroot wrote:
> Hi Yann,
> 
> On 4/3/21 12:01 AM, Yann E. MORIN wrote:
>> Tian, All,
>>
>> On 2021-04-02 19:23 -0700, Tian Yuanhao via buildroot spake thusly:
>>> When BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE is not set and
>>> BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y, CONFIG_CTRL_IFACE_DBUS_NEW will be
>>> enabled by 's/^#\(CONFIG_CTRL_IFACE_DBUS_NEW\)/\1/' first, and then
>>> disabled by 's/^\(CONFIG_CTRL_IFACE\)/#\1/'.
>>>
>>> CONFIG_CTRL_IFACE_DBUS_NEW does not depend on CONFIG_CTRL_IFACE, except
>>> for using it as a prefix. Fix this wrong behavior by adding '\>' after
>>> CONFIG_CTRL_IFACE.
>>>
>>> Signed-off-by: Tian Yuanhao <tianyuanhao@aliyun.com>
>>> Tested-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
>>> ---
>>>
>>> v1 -> v2:
>>> ?? - only handle CONFIG_CTRL_IFACE
>>>
>>> v2 -> v3:
>>> ?? - rewrite commit message
>>> ---
>>> ? package/wpa_supplicant/wpa_supplicant.mk | 2 +-
>>> ? 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/package/wpa_supplicant/wpa_supplicant.mk
>>> b/package/wpa_supplicant/wpa_supplicant.mk
>>> index c82db43c1c..80d75a57c7 100644
>>> --- a/package/wpa_supplicant/wpa_supplicant.mk
>>> +++ b/package/wpa_supplicant/wpa_supplicant.mk
>>> @@ -135,7 +135,7 @@ WPA_SUPPLICANT_CONFIG_EDITS +=
>>> 's/\#\(CONFIG_TLS=\).*/\1internal/'
>>> ? endif
>>> ? ? ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE),)
>>> -WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE
>>> +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE\>
>> Yes,m this is a tchnically correct change, that will fix this once
>> issue.
>>
>> However, it singles out this one configuration item among all the
>> others, because it is the only one to have this trailing word-boundary
>> marker.
>>
>> And in fact, I think we should ensure this whole-word match for all the
>> configurationtiems in a generic way, i.e. in the expansion, later:
>>
>> ???? diff --git a/package/wpa_supplicant/wpa_supplicant.mk
>> b/package/wpa_supplicant/wpa_supplicant.mk
>> ???? index 96f0596bfe..001eccbfef 100644
>> ???? --- a/package/wpa_supplicant/wpa_supplicant.mk
>> ???? +++ b/package/wpa_supplicant/wpa_supplicant.mk
>> ???? @@ -188,8 +188,8 @@ endif
>> ????? ????? define WPA_SUPPLICANT_CONFIGURE_CMDS
>> ????????? cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG)
>> ???? -??? sed -i $(patsubst %,-e
>> 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
>> ???? -??????? $(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
>> ???? +??? sed -i $(patsubst %,-e
>> 's/^#\(%\>\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
>> ???? +??????? $(patsubst %,-e
>> 's/^\(%\>\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
>> ????????????? $(patsubst %,-e '1i%=y',$(WPA_SUPPLICANT_CONFIG_SET)) \
>> ????????????? $(patsubst %,-e %,$(WPA_SUPPLICANT_CONFIG_EDITS)) \
>> ????????????? $(WPA_SUPPLICANT_CONFIG)
>>
>> Thoughts?
>>
>> Regards,
>> Yann E. MORIN.
> 
> I did this in v1 [1], but Nicolas pointed out that it is by design.

 Nicolas is right. However, it's a bad design :-)

 To fix this, we can simply use "CONFIG_EAP_[A-Z0-9_]*" to disable all the EAP
options. I think EAP is the only one in that situation, but I haven't checked
all config options. There's also CONFIG_DPP that matches CONFIG_DPP2, but I
don't think that's actually intentional...

 So I think indeed the better solution is to change the patsubst lines.

 However, that's a much bigger change which requires a bit of testing and
double-checking (and deciding what to do with e.g. DPP2). So for now, I've
applied this patch, thanks. This patch can be backported to the stable branches.
A follow-up patch that cleans up the patsubst lines would be much appreciated.

 Regards,
 Arnout


> 
> At the moment, only CONFIG_CTRL_IFACE and CONFIG_CTRL_IFACE_DBUS_??? are
> irrelevant, and other options with the same prefix are related. So only
> CONFIG_CTRL_IFACE should be handled.
> 
> [1]:
> http://patchwork.ozlabs.org/project/buildroot/patch/20210316021804.3790808-1-tianyuanhao at aliyun.com/
> 
> 
> Regards,
> Yuanhao
> 
>>
>>> ? endif
>>> ? ? ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS),y)
>>> --?
>>> 2.25.1
>>>
>>> _______________________________________________
>>> buildroot mailing list
>>> buildroot at busybox.net
>>> http://lists.busybox.net/mailman/listinfo/buildroot
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully
  2021-04-06 20:10         ` Arnout Vandecappelle
@ 2021-04-07  7:22           ` Peter Korsgaard
  2021-04-07  7:32             ` Arnout Vandecappelle
  2021-04-07 21:47           ` Yann E. MORIN
  1 sibling, 1 reply; 13+ messages in thread
From: Peter Korsgaard @ 2021-04-07  7:22 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

Hi,

 >  To fix this, we can simply use "CONFIG_EAP_[A-Z0-9_]*" to disable all the EAP
 > options. I think EAP is the only one in that situation, but I haven't checked
 > all config options. There's also CONFIG_DPP that matches CONFIG_DPP2, but I
 > don't think that's actually intentional...

 >  So I think indeed the better solution is to change the patsubst lines.

 >  However, that's a much bigger change which requires a bit of testing and
 > double-checking (and deciding what to do with e.g. DPP2). So for now, I've
 > applied this patch, thanks. This patch can be backported to the stable branches.

We only added disabling logic post-2021.02, so it only affects master.

Should the disabling logic (and this patch) be backported to 2021.02.x?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully
  2021-04-07  7:22           ` Peter Korsgaard
@ 2021-04-07  7:32             ` Arnout Vandecappelle
  2021-04-07  8:44               ` Peter Korsgaard
  0 siblings, 1 reply; 13+ messages in thread
From: Arnout Vandecappelle @ 2021-04-07  7:32 UTC (permalink / raw)
  To: buildroot



On 07/04/2021 09:22, Peter Korsgaard wrote:
>>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
> 
> Hi,
> 
>  >  To fix this, we can simply use "CONFIG_EAP_[A-Z0-9_]*" to disable all the EAP
>  > options. I think EAP is the only one in that situation, but I haven't checked
>  > all config options. There's also CONFIG_DPP that matches CONFIG_DPP2, but I
>  > don't think that's actually intentional...
> 
>  >  So I think indeed the better solution is to change the patsubst lines.
> 
>  >  However, that's a much bigger change which requires a bit of testing and
>  > double-checking (and deciding what to do with e.g. DPP2). So for now, I've
>  > applied this patch, thanks. This patch can be backported to the stable branches.
> 
> We only added disabling logic post-2021.02, so it only affects master.
> 
> Should the disabling logic (and this patch) be backported to 2021.02.x?

 I applied it to next at the time, not to master, so I guess that was for a
reason :-)

 I don't like putting this kind of risky changes on the stable branch. Since a
follow-up patch was needed, it clearly was indeed risky. The first patch of that
series was kind of a fix because it made sure that the wpa_supplicant build
actually corresponds to the Buildroot configuration. The patch that introduced
the CTRL_IFACE issue however was really a feature patch.

 So no, no backporting needed.

 Regards,
 Arnout

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

* [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully
  2021-04-07  7:32             ` Arnout Vandecappelle
@ 2021-04-07  8:44               ` Peter Korsgaard
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2021-04-07  8:44 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

Hi,

 >> We only added disabling logic post-2021.02, so it only affects master.
 >> 
 >> Should the disabling logic (and this patch) be backported to 2021.02.x?

 >  I applied it to next at the time, not to master, so I guess that was for a
 > reason :-)

 >  I don't like putting this kind of risky changes on the stable branch. Since a
 > follow-up patch was needed, it clearly was indeed risky. The first patch of that
 > series was kind of a fix because it made sure that the wpa_supplicant build
 > actually corresponds to the Buildroot configuration. The patch that introduced
 > the CTRL_IFACE issue however was really a feature patch.

 >  So no, no backporting needed.

Ok, good.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully
  2021-04-06 20:10         ` Arnout Vandecappelle
  2021-04-07  7:22           ` Peter Korsgaard
@ 2021-04-07 21:47           ` Yann E. MORIN
  1 sibling, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2021-04-07 21:47 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2021-04-06 22:10 +0200, Arnout Vandecappelle spake thusly:
> On 03/04/2021 09:49, Tian Yuanhao via buildroot wrote:
> > On 4/3/21 12:01 AM, Yann E. MORIN wrote:
> >> On 2021-04-02 19:23 -0700, Tian Yuanhao via buildroot spake thusly:
[--SNIP--]
> >>> diff --git a/package/wpa_supplicant/wpa_supplicant.mk
> >>> b/package/wpa_supplicant/wpa_supplicant.mk
> >>> index c82db43c1c..80d75a57c7 100644
> >>> --- a/package/wpa_supplicant/wpa_supplicant.mk
> >>> +++ b/package/wpa_supplicant/wpa_supplicant.mk
> >>> @@ -135,7 +135,7 @@ WPA_SUPPLICANT_CONFIG_EDITS +=
> >>> 's/\#\(CONFIG_TLS=\).*/\1internal/'
> >>> ? endif
> >>> ? ? ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE),)
> >>> -WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE
> >>> +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE\>
> >> Yes,m this is a tchnically correct change, that will fix this once
> >> issue.
> >>
> >> However, it singles out this one configuration item among all the
> >> others, because it is the only one to have this trailing word-boundary
> >> marker.
> >>
> >> And in fact, I think we should ensure this whole-word match for all the
> >> configurationtiems in a generic way, i.e. in the expansion, later:
> >>
> >> ???? diff --git a/package/wpa_supplicant/wpa_supplicant.mk
> >> b/package/wpa_supplicant/wpa_supplicant.mk
> >> ???? index 96f0596bfe..001eccbfef 100644
> >> ???? --- a/package/wpa_supplicant/wpa_supplicant.mk
> >> ???? +++ b/package/wpa_supplicant/wpa_supplicant.mk
> >> ???? @@ -188,8 +188,8 @@ endif
> >> ????? ????? define WPA_SUPPLICANT_CONFIGURE_CMDS
> >> ????????? cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG)
> >> ???? -??? sed -i $(patsubst %,-e
> >> 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
> >> ???? -??????? $(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
> >> ???? +??? sed -i $(patsubst %,-e
> >> 's/^#\(%\>\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
> >> ???? +??????? $(patsubst %,-e
> >> 's/^\(%\>\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
> >> ????????????? $(patsubst %,-e '1i%=y',$(WPA_SUPPLICANT_CONFIG_SET)) \
> >> ????????????? $(patsubst %,-e %,$(WPA_SUPPLICANT_CONFIG_EDITS)) \
> >> ????????????? $(WPA_SUPPLICANT_CONFIG)
[--SNIP--]
> > I did this in v1 [1], but Nicolas pointed out that it is by design.
[--SNIP--]
>  Nicolas is right. However, it's a bad design :-)

I was about to say the same.

>  To fix this, we can simply use "CONFIG_EAP_[A-Z0-9_]*" to disable all the EAP
> options. I think EAP is the only one in that situation, but I haven't checked
> all config options. There's also CONFIG_DPP that matches CONFIG_DPP2, but I
> don't think that's actually intentional...
> 
>  So I think indeed the better solution is to change the patsubst lines.
> 
>  However, that's a much bigger change which requires a bit of testing and
> double-checking (and deciding what to do with e.g. DPP2). So for now, I've
> applied this patch, thanks. This patch can be backported to the stable branches.
> A follow-up patch that cleans up the patsubst lines would be much appreciated.

I think we should have *all* options be comprehensive, and that the
patsubst should not unintentionally catch anything that was not explicit
requested.

If an option wants to match with just a prefix, it can add a '.*'
at the end, or as Arnout suggested, a more specific pattern, like
'[[:digit:]]+' to match one or more digits...

So yes, please, could you look into providing a follow-up patch that
does that?

Regards,
Yann E. MORIN.

>  Regards,
>  Arnout
> 
> 
> > 
> > At the moment, only CONFIG_CTRL_IFACE and CONFIG_CTRL_IFACE_DBUS_??? are
> > irrelevant, and other options with the same prefix are related. So only
> > CONFIG_CTRL_IFACE should be handled.
> > 
> > [1]:
> > http://patchwork.ozlabs.org/project/buildroot/patch/20210316021804.3790808-1-tianyuanhao at aliyun.com/
> > 
> > 
> > Regards,
> > Yuanhao
> > 
> >>
> >>> ? endif
> >>> ? ? ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS),y)
> >>> --?
> >>> 2.25.1
> >>>
> >>> _______________________________________________
> >>> buildroot mailing list
> >>> buildroot at busybox.net
> >>> http://lists.busybox.net/mailman/listinfo/buildroot
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2021-04-07 21:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16  2:18 [Buildroot] [PATCH 1/1] package/wpa_supplicant: fix WPA_SUPPLICANT_CONFIGURE_CMDS Tian Yuanhao
2021-03-16 10:02 ` Nicolas Cavallari
2021-03-17  3:37 ` [Buildroot] [PATCH v2 1/1] package/wpa_supplicant: fix wrong config Tian Yuanhao
2021-04-01  1:43   ` Tian Yuanhao
2021-04-02  9:08     ` Nicolas Cavallari
2021-04-03  2:23   ` [Buildroot] [PATCH v3 1/1] package/wpa_supplicant: handle CONFIG_CTRL_IFACE carefully Tian Yuanhao
2021-04-03  7:01     ` Yann E. MORIN
2021-04-03  7:49       ` Tian Yuanhao
2021-04-06 20:10         ` Arnout Vandecappelle
2021-04-07  7:22           ` Peter Korsgaard
2021-04-07  7:32             ` Arnout Vandecappelle
2021-04-07  8:44               ` Peter Korsgaard
2021-04-07 21:47           ` Yann E. MORIN

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.