Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wpad-mesh-wolfssl gets automatically deselected in menuconfig due to a bug in hostapd Makefile #125

Open
ilario opened this issue Nov 10, 2020 · 6 comments

Comments

@ilario
Copy link
Member

ilario commented Nov 10, 2020

I am reporting this also on OpenWrt side, as it looks like a menuconfig bug rather than a suboptimal way on how to use it.

Selecting at the same time wpad-basic and wpad-mesh-wolfssl causes a clash of files installation in the compilation process. For this reason the deselection of wpad-basic has been suggested in 6e08d3e

wpad-mesh-wolfssl can be selected in menuconfig and wpad-basic deselected, until here everything ok.

Then when closing and opening again menuconfig, wpad-mesh-wolfssl is not visible
Screenshot from 2020-11-10 12-12-51
.

But when wpad-basic (or something else) is selected, wpad-mesh-wolfssl appears and is actually selected (as it should be).

Screenshot from 2020-11-10 12-14-45

The wpad-mesh-wolfssl package is categorized as being inside wpad-mesh-openssl, which makes no sense.

Screenshot from 2020-11-10 12-45-36

And all of this happens even if the definitions of wpad-basic, wpad-mesh-openssl and wpad-mesh-wolfssl are substantially identical (extracted from here):

wpad-basic
  [identical part removed]
  VARIANT:=wpad-basic

wpad-mesh-openssl
  [identical part removed]
  DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
  PROVIDES+=wpa-supplicant-mesh wpad-mesh
  DEPENDS+=+libopenssl
  VARIANT:=wpad-mesh-openssl

wpad-mesh-wolfssl
  [identical part removed]
  DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
  PROVIDES+=wpa-supplicant-mesh wpad-mesh
  DEPENDS+=+libwolfssl
  VARIANT:=wpad-mesh-wolfssl

This looks like a bug in some of the Config.in files used by make menuconfig.
Just to support this, I exchanged the order in which wpad-mesh-openssl and wpad-mesh-wolfssl are defined in tmp/.config-package.in and now wpad-mesh-wolfssl and wpad-mesh-openssl are at the same hierarchical level. Makes no sense.

@ilario
Copy link
Member Author

ilario commented Nov 10, 2020

The report on OpenWrt side is here: https://bugs.openwrt.org/index.php?do=details&task_id=3441

@ilario
Copy link
Member Author

ilario commented Nov 11, 2020

Additional scenario that makes this issue more annoying:

  1. open menuconfig
  2. select wpad-mesh-wolfssl and deselect wpad-basic
  3. close and save
  4. my .config is like this: http://sprunge.us/3fE1sU
  5. open menuconfig
  6. close and save
  7. my .config changed and wpad-mesh-wolfssl is not selected anymore, see it here: http://sprunge.us/FGQgeY

This means that every time I modify something in the menuconfig, I have to select again the wpad-mesh-wolfssl package.

@aparcar @spiccinini @dangowrt any insight?

@AndyMcSchopf
Copy link

Hey Ilario I can confirm this, had the same struggle but didn't look deeper into that. Thanks for addressing this to OpenWRT Team!

@ilario
Copy link
Member Author

ilario commented Nov 17, 2020

I looked into this and is caused by how the conflicting packages lists are defined, incrementally across the Makefile.
Here the full comment: https://bugs.openwrt.org/index.php?do=details&task_id=3441#comments

@ilario
Copy link
Member Author

ilario commented Nov 18, 2020

In short what happens is that the definition of two variables is evolving through the Makefile (as implemented in openwrt/openwrt@3838b16 by @mkresin) and this creates an asymmetry that ends up in the menuconfig misbehaviour.

$HOSTAPD_PROVIDERS inside wpad-mesh-openssl is hostapd hostapd-basic hostapd-mini hostapd-openssl hostapd-wolfssl wpad

$HOSTAPD_PROVIDERS inside wpad-mesh-wolfssl is hostapd hostapd-basic hostapd-mini hostapd-openssl hostapd-wolfssl wpad wpad-mesh-openssl

$SUPPLICANT_PROVIDERS inside wpad-mesh-openssl is wpad

$SUPPLICANT_PROVIDERS inside wpad-mesh-wolfssl is wpad wpad-mesh-openssl

@mkresin @nbd168 do you think it's possible to find another way to solve the "conflicts hell"?

@ilario
Copy link
Member Author

ilario commented Nov 24, 2020

Another message revealing this issue: menuconfig says:

tmp/.config-package.in:139918:error: recursive dependency detected!
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
tmp/.config-package.in:139918:	symbol PACKAGE_wpad-mesh-wolfssl is selected by PACKAGE_wpad-mesh-wolfssl

ping @mkresin @nbd168

I agree that the current solution is clean but does not work well enough, so an alternative I can think of is defining a list of all the "providers" and then using CONFLICTS:=$(filter-out package_name, $(providers_list)).
This is similar to the "conflicts hell" situation before @mkresin but I cannot find a different solution.

@ilario ilario changed the title Best way to select wpad-mesh-wolfssl and deselect wpad-basic in menuconfig wpad-mesh-wolfssl gets automatically deselected in menuconfig due to a bug in hostapd Makefile Mar 24, 2021
ilario referenced this issue in openwrt/openwrt Mar 24, 2021
Add each variant to the matching PROVIDERS variables after evaluating
the respective hostapd*, wpad* and wpa* variant.

Each package providing the same feature will automatically conflict with
all prior packages providing the same feature.

This way we can handle the conflicts automatically without introducing
recursive dependencies.

Signed-off-by: Mathias Kresin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants