[1/1] wpa_supplicant - Specify that old and new dbus are incompatible

Message ID 20180218215039.4811-1-pinaraf@pinaraf.info
State New
Headers show
Series
  • [1/1] wpa_supplicant - Specify that old and new dbus are incompatible
Related show

Commit Message

Pierre Feb. 18, 2018, 9:50 p.m.
Building wpa-supplicant with support for both DBus interfaces
generates broken .service files.
Marking old and new DBus incompatible in Config.in makes this
conflict clear.

Signed-off-by: Pierre Ducroquet <pinaraf@pinaraf.info>
---
 package/wpa_supplicant/Config.in | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

Comments

Peter Korsgaard Feb. 28, 2018, 8:38 p.m. | #1
>>>>> "Pierre" == Pierre Ducroquet <pinaraf@pinaraf.info> writes:

 > Building wpa-supplicant with support for both DBus interfaces
 > generates broken .service files.

In what way are they broken? I did a quick test build of 3
configurations:

- Only old
- Only new
- Old and new

and I don't see any difference in the .service files?
Pierre Feb. 28, 2018, 10:55 p.m. | #2
On Wednesday, February 28, 2018 9:38:31 PM CET Peter Korsgaard wrote:
> >>>>> "Pierre" == Pierre Ducroquet <pinaraf@pinaraf.info> writes:
>  > Building wpa-supplicant with support for both DBus interfaces
>  > generates broken .service files.
> 
> In what way are they broken? I did a quick test build of 3
> configurations:
> 
> - Only old
> - Only new
> - Old and new
> 
> and I don't see any difference in the .service files?

It generated a .service file with an empty BusName in the [Service] part of 
the .service.
Since enabling only one interface generated the proper file, I deduced both 
could not be enabled together. Maybe something else in my configuration 
impacted that, I will check that again if you can't reproduce.
Peter Korsgaard March 1, 2018, 7:35 a.m. | #3
>>>>> "Pierre" == Pierre  <pinaraf@pinaraf.info> writes:

 > On Wednesday, February 28, 2018 9:38:31 PM CET Peter Korsgaard wrote:
 >> >>>>> "Pierre" == Pierre Ducroquet <pinaraf@pinaraf.info> writes:
 >> > Building wpa-supplicant with support for both DBus interfaces
 >> > generates broken .service files.
 >> 
 >> In what way are they broken? I did a quick test build of 3
 >> configurations:
 >> 
 >> - Only old
 >> - Only new
 >> - Old and new
 >> 
 >> and I don't see any difference in the .service files?

 > It generated a .service file with an empty BusName in the [Service] part of 
 > the .service.
 > Since enabling only one interface generated the proper file, I deduced both 
 > could not be enabled together. Maybe something else in my configuration 
 > impacted that, I will check that again if you can't reproduce.

Wait, are we talking about dbus service files (that afaik don't take a
BusName directive) or systemd files?

Patch

diff --git a/package/wpa_supplicant/Config.in b/package/wpa_supplicant/Config.in
index 58a074fae8..500df354a2 100644
--- a/package/wpa_supplicant/Config.in
+++ b/package/wpa_supplicant/Config.in
@@ -100,20 +100,33 @@  config BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE
 	help
 	  Install wpa_passphrase command line utility.
 
+config BR2_PACKAGE_WPA_SUPPLICANT_DBUS
+	bool "Enable support for DBus control interface"
+	depends on BR2_PACKAGE_DBUS
+	help
+	 Enable support for DBus control interface
+
+if BR2_PACKAGE_WPA_SUPPLICANT_DBUS
+
+choice
+	prompt "DBus interface"
+
 config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD
-	bool "Enable support for old DBus control interface"
+	bool "Use old DBus control interface"
 	depends on BR2_PACKAGE_DBUS
 	help
 	  Enable support for old DBus control interface
 	  (fi.epitest.hostap.WPASupplicant).
 
 config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW
-	bool "Enable support for new DBus control interface"
+	bool "Use new DBus control interface"
 	depends on BR2_PACKAGE_DBUS
 	help
 	  Enable support for new DBus control interface
 	  (fi.w1.wpa_supplicant1).
 
+endchoice
+
 config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION
 	bool "Introspection support"
 	depends on BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW
@@ -121,3 +134,5 @@  config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION
 	  Add introspection support for new DBus control interface.
 
 endif
+
+endif