Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947353 - >=net-wireless/wpa_supplicant-2.10-r5: several USE-flags are non-functional
Summary: >=net-wireless/wpa_supplicant-2.10-r5: several USE-flags are non-functional
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Rick Farina (Zero_Chaos)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2025-01-02 11:55 UTC by Johannes Penßel
Modified: 2025-02-28 03:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
wpa_supplicant-2.10-r5.ebuild diff (wpa-supplicant.diff,2.86 KB, patch)
2025-01-02 11:55 UTC, Johannes Penßel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Penßel 2025-01-02 11:55:38 UTC
Created attachment 915739 [details, diff]
wpa_supplicant-2.10-r5.ebuild diff

TL;DR: As of net-wireless/wpa-supplicant-2.10-r5, the following USE-flags don't do anything:
fasteap (default on)
hs2-0 (default on)
ps3 (corresponding driver was removed in 2010)
tdls (default on)
uncommon-eap-types (mostly enabled by default, except EAP-EKE)
wimax (breaks ebuild when enabled)

some USE-flags are implicitly overwritten by others, because the Makefile enables the corresponding features anyways:
ap (ignored if USE=mesh or USE=p2p is set)
wps (ignored if USE=p2p is set, except for some extra functionality)

---

The ebuild for wpa_supplicant has several USE-flags that are supposed to control certain features by declaring the corresponding Kconfig-style options in wpa_supplicant's build configuration file. The assumption seems to be that all of these options are disabled by default, but for many, this is not true anymore. In these cases, the USE-flag does not to anything, as the corresponding feature is always enabled. This applies to USE="fasteap hs2-0 tdls" as well as most of the options enabled by USE=uncommon-eap-types, except for CONFIG_EAP_EKE. See the defconfig file for reference:
https://w1.fi/cgit/hostap/tree/wpa_supplicant/defconfig?h=hostap_2_10

USE=ps3 is supposed to enable a driver that was removed in 2010:
https://w1.fi/cgit/hostap/commit/src/drivers?h=hostap_2_0&id=79e4140c6107af3e2142e9362758419b7c399964

USE=wimax is supposed to apply "${P}-generate-libeap-peer.patch", which was dropped in 2016:
https://gitweb.gentoo.org/repo/gentoo.git/commit/net-wireless/wpa_supplicant/files?id=74c2e8e6b45949a08faf1ce175c2961715010379

USE=ap explicitly disables CONFIG_AP if unset, but USE=mesh (which is set by default) or USE=p2p overwrites it via Makefile logic.

Same with USE=wps if USE=p2p is set, except for CONFIG_WPS_ER, CONFIG_WPS_UPNP and CONFIG_WPS_NFC.

https://w1.fi/cgit/hostap/tree/wpa_supplicant/Makefile?h=hostap_2_10

While it would be trivial to restore most of these flags back to functionality, I also suspect this would break some people's wifi. Considering that this seems to have bothered nobody for the last few years and that upstream considers the features ready for prime time, I think it's best to drop USE="fasteap hs2-0 tdls" altogether, leaving these features always enabled. (as well as USE=ps3 and USE=wimax, of course)

Attached is a diff of wpa_supplicant-2.10-r5.ebuild with USE="fasteap hs2-0 tdls ps3 wimax" removed and REQUIRED_USE="mesh? ( ap )\ p2p? ( ap wps )" added. (if these changes look mergeable, I'd be happy to turn this into a PR)
Comment 1 Matt Turner gentoo-dev 2025-02-11 16:51:25 UTC
(In reply to Johannes Penßel from comment #0)
> (if these changes look mergeable, I'd be happy to turn this into a PR)

Please do. I don't think continuing to wait for the maintainer to respond is productive.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-22 23:29:58 UTC
Johannes, could you take a look?
Comment 3 Johannes Penßel 2025-02-23 19:02:36 UTC
PR is up: https://github.com/gentoo/gentoo/pull/40719

Sorry for the radio silence. Unfortunately, I had virtually no spare time over the last few weeks.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-24 00:27:21 UTC
(In reply to Johannes Penßel from comment #3)
> PR is up: https://github.com/gentoo/gentoo/pull/40719
> 
> Sorry for the radio silence. Unfortunately, I had virtually no spare time
> over the last few weeks.

No worries at all - and thank you very much!
Comment 5 Larry the Git Cow gentoo-dev 2025-02-24 00:28:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b228f62582bf973acbe61ee994114781da73fb0

commit 9b228f62582bf973acbe61ee994114781da73fb0
Author:     Johannes Penßel <johannesp@posteo.net>
AuthorDate: 2025-02-23 18:25:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-24 00:25:12 +0000

    net-wireless/wpa_supplicant: drop obsolete USE-flags
    
    The features these flags are supposed to control are either always
    enabled or non-existent. See bugreport for details.
    
    Closes: https://bugs.gentoo.org/947353
    Signed-off-by: Johannes Penßel <johannesp@posteo.net>
    Closes: https://github.com/gentoo/gentoo/pull/40719
    Signed-off-by: Sam James <sam@gentoo.org>

 .../wpa_supplicant/wpa_supplicant-9999.ebuild      | 37 ++--------------------
 1 file changed, 3 insertions(+), 34 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb833b83df6bce5963a43acdf88dc006e8d62d17

commit bb833b83df6bce5963a43acdf88dc006e8d62d17
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-02-24 00:27:16 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-24 00:27:16 +0000

    net-wireless/wpa_supplicant: 2.11-r1 with USE flag fixes from 9999
    
    Let's cut a -r1 with the fixes for bug #947353 from 9999 as wpa_supplicant
    releases are rather infrequent and there's also a (small) risk someone
    missses the edits to 9999 when that next release does eventually happen.
    
    Bug: https://bugs.gentoo.org/947353
    Signed-off-by: Sam James <sam@gentoo.org>

 .../wpa_supplicant/wpa_supplicant-2.11-r1.ebuild   | 446 +++++++++++++++++++++
 1 file changed, 446 insertions(+)