* [Buildroot] [PATCH v4] package/wpa_supplicant: Fix systemd service for new DBus bus name
@ 2016-04-13 14:09 Marcin Niestroj
2016-04-13 20:02 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Marcin Niestroj @ 2016-04-13 14:09 UTC (permalink / raw)
To: buildroot
systemd service files were supplied with old DBus bus name. After
service activation systemd was waiting for appearance of specified bus
name to consider it started successfully. However, if wpa_supplicant was
compiled only with new dbus interface name, then systemd didn't notice
configured (old) DBus bus name appearance. In the end service was
considered malfunctioning and it was deactivated.
Add upstreamable patch [1], which updates systemd service BusName
property according to configured DBus interface version.
[1] http://lists.infradead.org/pipermail/hostap/2016-April/035599.html
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Changes v3 -> v4:
* Fix commit description (upstream -> upstreamable)
(suggested by Arnout)
* Add patch reference in hostap mailing list archive
(suggested by Arnout)
Changes v2 -> v3:
* Update subject line and commit description to make the problem more
clear (suggested by Arnout)
* Use upstreamable patch instead of change in buildroot package
makefile (suggested by Arnout)
Changes v1 -> v2:
* Added missing signed-off tag
...ate-service-files-according-to-dbus-inter.patch | 77 ++++++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 package/wpa_supplicant/0007-systemd-Update-service-files-according-to-dbus-inter.patch
diff --git a/package/wpa_supplicant/0007-systemd-Update-service-files-according-to-dbus-inter.patch b/package/wpa_supplicant/0007-systemd-Update-service-files-according-to-dbus-inter.patch
new file mode 100644
index 0000000..59c5450
--- /dev/null
+++ b/package/wpa_supplicant/0007-systemd-Update-service-files-according-to-dbus-inter.patch
@@ -0,0 +1,77 @@
+From b6cea24d6191d9ccdcd1ac38a5322e3da73218db Mon Sep 17 00:00:00 2001
+From: Marcin Niestroj <m.niestroj@grinn-global.com>
+Date: Mon, 11 Apr 2016 13:23:54 +0200
+Subject: [PATCH] systemd: Update service files according to dbus interface
+ version used
+
+systemd service files were supplied with old DBus bus name. After
+service activation systemd was waiting for appearance of specified bus
+name to consider it started successfully. However, if wpa_supplicant was
+compiled only with new dbus interface name, then systemd didn't notice
+configured (old) DBus bus name appearance. In the end service was
+considered malfunctioning and it was deactivated.
+
+Update systemd service BusName property according to supported DBus
+interface version.
+
+Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
+---
+ wpa_supplicant/Makefile | 8 ++++++--
+ wpa_supplicant/systemd/wpa_supplicant.service.in | 4 ++--
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
+index ad9ead9..fbd1b25 100644
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -1374,6 +1374,7 @@ ifndef DBUS_INCLUDE
+ DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
+ endif
+ DBUS_CFLAGS += $(DBUS_INCLUDE)
++DBUS_INTERFACE=fi.epitest.hostap.WPASupplicant
+ endif
+
+ ifdef CONFIG_CTRL_IFACE_DBUS_NEW
+@@ -1399,6 +1400,7 @@ DBUS_OBJS += dbus/dbus_new_introspect.o
+ DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
+ endif
+ DBUS_CFLAGS += $(DBUS_INCLUDE)
++DBUS_INTERFACE=fi.w1.wpa_supplicant1
+ endif
+
+ ifdef DBUS
+@@ -1760,11 +1762,13 @@ else
+ endif
+
+ %.service: %.service.in
+- $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
++ $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' \
++ -e 's|\@DBUS_INTERFACE\@|$(DBUS_INTERFACE)|g' $< >$@
+ @$(E) " sed" $<
+
+ %@.service: %.service.arg.in
+- $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
++ $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' \
++ -e 's|\@DBUS_INTERFACE\@|$(DBUS_INTERFACE)|g' $< >$@
+ @$(E) " sed" $<
+
+ wpa_supplicant.exe: wpa_supplicant
+diff --git a/wpa_supplicant/systemd/wpa_supplicant.service.in b/wpa_supplicant/systemd/wpa_supplicant.service.in
+index ea964ce..bc5d49a 100644
+--- a/wpa_supplicant/systemd/wpa_supplicant.service.in
++++ b/wpa_supplicant/systemd/wpa_supplicant.service.in
+@@ -5,9 +5,9 @@ Wants=network.target
+
+ [Service]
+ Type=dbus
+-BusName=fi.epitest.hostap.WPASupplicant
++BusName=@DBUS_INTERFACE@
+ ExecStart=@BINDIR@/wpa_supplicant -u
+
+ [Install]
+ WantedBy=multi-user.target
+-Alias=dbus-fi.epitest.hostap.WPASupplicant.service
++Alias=dbus-@DBUS_INTERFACE@.service
+--
+2.8.0
+
--
2.8.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v4] package/wpa_supplicant: Fix systemd service for new DBus bus name
2016-04-13 14:09 [Buildroot] [PATCH v4] package/wpa_supplicant: Fix systemd service for new DBus bus name Marcin Niestroj
@ 2016-04-13 20:02 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-04-13 20:02 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 13 Apr 2016 16:09:18 +0200, Marcin Niestroj wrote:
> systemd service files were supplied with old DBus bus name. After
> service activation systemd was waiting for appearance of specified bus
> name to consider it started successfully. However, if wpa_supplicant was
> compiled only with new dbus interface name, then systemd didn't notice
> configured (old) DBus bus name appearance. In the end service was
> considered malfunctioning and it was deactivated.
>
> Add upstreamable patch [1], which updates systemd service BusName
> property according to configured DBus interface version.
>
> [1] http://lists.infradead.org/pipermail/hostap/2016-April/035599.html
>
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> Changes v3 -> v4:
> * Fix commit description (upstream -> upstreamable)
> (suggested by Arnout)
> * Add patch reference in hostap mailing list archive
> (suggested by Arnout)
Applied to master, thanks. Please submit your patch upstream to the
wpa_supplicant developers. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-13 20:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-13 14:09 [Buildroot] [PATCH v4] package/wpa_supplicant: Fix systemd service for new DBus bus name Marcin Niestroj
2016-04-13 20:02 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox