diff mbox series

[1/1] package/wpa_supplicant: fix libwpa_client.so build

Message ID 20220303191945.3952450-1-geomatsi@gmail.com
State Accepted
Headers show
Series [1/1] package/wpa_supplicant: fix libwpa_client.so build | expand

Commit Message

Sergey Matyukevich March 3, 2022, 7:19 p.m. UTC
Build target libwpa_client.so is not built regardless of whether the
option CONFIG_BUILD_WPA_CLIENT_SO is set or not. Add patch that
fixes wpa_supplicant build regression.

Fixes:
http://autobuild.buildroot.net/results/001981339f3b895ecd9208a747a0e47d07c9583a/
http://autobuild.buildroot.net/results/318f9ecd4060d34cc8385891b56d0a0e6275f2c9/

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---

Hi all,

Note that the patch has been posted to hostapd mailing list
and discussed, but not yet accepted:

https://patchwork.ozlabs.org/project/hostap/patch/20220222085219.3996729-1-geomatsi@gmail.com/

Regards,
Sergey

 ...le-options-for-libwpa_client.so-and-.patch | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 package/wpa_supplicant/0001-build-re-enable-options-for-libwpa_client.so-and-.patch

Comments

Yegor Yefremov March 4, 2022, 8:48 a.m. UTC | #1
Hi Sergey, all,

On Thu, Mar 3, 2022 at 8:19 PM Sergey Matyukevich <geomatsi@gmail.com> wrote:
>
> Build target libwpa_client.so is not built regardless of whether the
> option CONFIG_BUILD_WPA_CLIENT_SO is set or not. Add patch that
> fixes wpa_supplicant build regression.
>
> Fixes:
> http://autobuild.buildroot.net/results/001981339f3b895ecd9208a747a0e47d07c9583a/
> http://autobuild.buildroot.net/results/318f9ecd4060d34cc8385891b56d0a0e6275f2c9/
>
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>

Tested-by: Yegor Yefremov <yegorslists@googlemail.com>

The patch was already merged upstream.

Yegor

> ---
>
> Hi all,
>
> Note that the patch has been posted to hostapd mailing list
> and discussed, but not yet accepted:
>
> https://patchwork.ozlabs.org/project/hostap/patch/20220222085219.3996729-1-geomatsi@gmail.com/
>
> Regards,
> Sergey
>
>  ...le-options-for-libwpa_client.so-and-.patch | 68 +++++++++++++++++++
>  1 file changed, 68 insertions(+)
>  create mode 100644 package/wpa_supplicant/0001-build-re-enable-options-for-libwpa_client.so-and-.patch
>
> diff --git a/package/wpa_supplicant/0001-build-re-enable-options-for-libwpa_client.so-and-.patch b/package/wpa_supplicant/0001-build-re-enable-options-for-libwpa_client.so-and-.patch
> new file mode 100644
> index 0000000000..156d0e7e2c
> --- /dev/null
> +++ b/package/wpa_supplicant/0001-build-re-enable-options-for-libwpa_client.so-and-.patch
> @@ -0,0 +1,68 @@
> +From e6a6a4e3df52cc60425fcd037d3ec68a38f948ce Mon Sep 17 00:00:00 2001
> +From: Sergey Matyukevich <geomatsi@gmail.com>
> +Date: Sun, 20 Feb 2022 10:12:28 +0300
> +Subject: [PATCH] build: re-enable options for libwpa_client.so and wpa_passphrase
> +
> +Commit a41a29192e5d ("build: Pull common fragments into a build.rules
> +file") introduced regression into wpa_supplicant build process. Build
> +target libwpa_client.so is not built regardless of whether the option
> +CONFIG_BUILD_WPA_CLIENT_SO is set or not. This happens because config
> +option is used before it is imported from the configuration file.
> +Moving its usage after including build.rules does not help: variable
> +ALL is processed by build.rules and further changes are not applied.
> +Similarly, option CONFIG_NO_WPA_PASSPHRASE also does not work as
> +expected: wpa_passphrase is always built regardless of whether the
> +option is set or not.
> +
> +This commit re-enables options adding both build targets to _all
> +dependencies.
> +
> +Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
> +---
> + wpa_supplicant/Makefile | 19 ++++++++++++-------
> + 1 file changed, 12 insertions(+), 7 deletions(-)
> +
> +diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
> +index cb66defac..e384cc6b8 100644
> +--- a/wpa_supplicant/Makefile
> ++++ b/wpa_supplicant/Makefile
> +@@ -1,24 +1,29 @@
> + BINALL=wpa_supplicant wpa_cli
> +
> +-ifndef CONFIG_NO_WPA_PASSPHRASE
> +-BINALL += wpa_passphrase
> +-endif
> +-
> + ALL = $(BINALL)
> + ALL += systemd/wpa_supplicant.service
> + ALL += systemd/wpa_supplicant@.service
> + ALL += systemd/wpa_supplicant-nl80211@.service
> + ALL += systemd/wpa_supplicant-wired@.service
> + ALL += dbus/fi.w1.wpa_supplicant1.service
> +-ifdef CONFIG_BUILD_WPA_CLIENT_SO
> +-ALL += libwpa_client.so
> +-endif
> +
> + EXTRA_TARGETS=dynamic_eap_methods
> +
> + CONFIG_FILE=.config
> + include ../src/build.rules
> +
> ++ifdef CONFIG_BUILD_WPA_CLIENT_SO
> ++# add the dependency this way to allow CONFIG_BUILD_WPA_CLIENT_SO
> ++# being set in the config which is read by build.rules
> ++_all: libwpa_client.so
> ++endif
> ++
> ++ifndef CONFIG_NO_WPA_PASSPHRASE
> ++# add the dependency this way to allow CONFIGNO_WPA_PASSPHRASE
> ++# being set in the config which is read by build.rules
> ++_all: wpa_passphrase
> ++endif
> ++
> + ifdef LIBS
> + # If LIBS is set with some global build system defaults, clone those for
> + # LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well.
> +--
> +2.35.1
> +
> --
> 2.35.1
>
Peter Korsgaard March 7, 2022, 7:33 p.m. UTC | #2
>>>>> "Sergey" == Sergey Matyukevich <geomatsi@gmail.com> writes:

 > Build target libwpa_client.so is not built regardless of whether the
 > option CONFIG_BUILD_WPA_CLIENT_SO is set or not. Add patch that
 > fixes wpa_supplicant build regression.

 > Fixes:
 > http://autobuild.buildroot.net/results/001981339f3b895ecd9208a747a0e47d07c9583a/
 > http://autobuild.buildroot.net/results/318f9ecd4060d34cc8385891b56d0a0e6275f2c9/

 > Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
 > ---

 > Hi all,

 > Note that the patch has been posted to hostapd mailing list
 > and discussed, but not yet accepted:

 > https://patchwork.ozlabs.org/project/hostap/patch/20220222085219.3996729-1-geomatsi@gmail.com/

I see that in the mean time it has been applied, great!

Committed, thanks.
diff mbox series

Patch

diff --git a/package/wpa_supplicant/0001-build-re-enable-options-for-libwpa_client.so-and-.patch b/package/wpa_supplicant/0001-build-re-enable-options-for-libwpa_client.so-and-.patch
new file mode 100644
index 0000000000..156d0e7e2c
--- /dev/null
+++ b/package/wpa_supplicant/0001-build-re-enable-options-for-libwpa_client.so-and-.patch
@@ -0,0 +1,68 @@ 
+From e6a6a4e3df52cc60425fcd037d3ec68a38f948ce Mon Sep 17 00:00:00 2001
+From: Sergey Matyukevich <geomatsi@gmail.com>
+Date: Sun, 20 Feb 2022 10:12:28 +0300
+Subject: [PATCH] build: re-enable options for libwpa_client.so and wpa_passphrase
+
+Commit a41a29192e5d ("build: Pull common fragments into a build.rules
+file") introduced regression into wpa_supplicant build process. Build
+target libwpa_client.so is not built regardless of whether the option
+CONFIG_BUILD_WPA_CLIENT_SO is set or not. This happens because config
+option is used before it is imported from the configuration file.
+Moving its usage after including build.rules does not help: variable
+ALL is processed by build.rules and further changes are not applied.
+Similarly, option CONFIG_NO_WPA_PASSPHRASE also does not work as
+expected: wpa_passphrase is always built regardless of whether the
+option is set or not.
+
+This commit re-enables options adding both build targets to _all
+dependencies.
+
+Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
+---
+ wpa_supplicant/Makefile | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
+index cb66defac..e384cc6b8 100644
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -1,24 +1,29 @@
+ BINALL=wpa_supplicant wpa_cli
+ 
+-ifndef CONFIG_NO_WPA_PASSPHRASE
+-BINALL += wpa_passphrase
+-endif
+-
+ ALL = $(BINALL)
+ ALL += systemd/wpa_supplicant.service
+ ALL += systemd/wpa_supplicant@.service
+ ALL += systemd/wpa_supplicant-nl80211@.service
+ ALL += systemd/wpa_supplicant-wired@.service
+ ALL += dbus/fi.w1.wpa_supplicant1.service
+-ifdef CONFIG_BUILD_WPA_CLIENT_SO
+-ALL += libwpa_client.so
+-endif
+ 
+ EXTRA_TARGETS=dynamic_eap_methods
+ 
+ CONFIG_FILE=.config
+ include ../src/build.rules
+ 
++ifdef CONFIG_BUILD_WPA_CLIENT_SO
++# add the dependency this way to allow CONFIG_BUILD_WPA_CLIENT_SO
++# being set in the config which is read by build.rules
++_all: libwpa_client.so
++endif
++
++ifndef CONFIG_NO_WPA_PASSPHRASE
++# add the dependency this way to allow CONFIGNO_WPA_PASSPHRASE
++# being set in the config which is read by build.rules
++_all: wpa_passphrase
++endif
++
+ ifdef LIBS
+ # If LIBS is set with some global build system defaults, clone those for
+ # LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well.
+-- 
+2.35.1
+