diff mbox series

tools/mpris-proxy: Add systemd user unit

Message ID 3548acb9bee2d1d8e0bd8e650a8557241e9e76ca.1725373981.git.agx@sigxcpu.org (mailing list archive)
State Accepted
Commit daa86e06c376d6e92bb0d1e2f1edb649974bfcbd
Headers show
Series tools/mpris-proxy: Add systemd user unit | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Guido Günther Sept. 3, 2024, 2:33 p.m. UTC
That way it will be started automatically which is convenient on phones.
Distributions can then decide part of which install the unit should be.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
---
 Makefile.am                  |  3 +++
 Makefile.obexd               |  3 +--
 Makefile.tools               |  3 +++
 configure.ac                 |  9 +++++++++
 tools/mpris-proxy.service.in | 13 +++++++++++++
 5 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 tools/mpris-proxy.service.in

Comments

bluez.test.bot@gmail.com Sept. 3, 2024, 4:43 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=886341

---Test result---

Test Summary:
CheckPatch                    PASS      0.42 seconds
GitLint                       PASS      0.32 seconds
BuildEll                      PASS      24.86 seconds
BluezMake                     PASS      1731.77 seconds
MakeCheck                     PASS      13.77 seconds
MakeDistcheck                 PASS      185.79 seconds
CheckValgrind                 PASS      252.14 seconds
CheckSmatch                   PASS      354.89 seconds
bluezmakeextell               PASS      119.61 seconds
IncrementalBuild              PASS      1480.65 seconds
ScanBuild                     PASS      996.74 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Sept. 9, 2024, 5:30 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue,  3 Sep 2024 16:33:15 +0200 you wrote:
> That way it will be started automatically which is convenient on phones.
> Distributions can then decide part of which install the unit should be.
> 
> Signed-off-by: Guido Günther <agx@sigxcpu.org>
> ---
>  Makefile.am                  |  3 +++
>  Makefile.obexd               |  3 +--
>  Makefile.tools               |  3 +++
>  configure.ac                 |  9 +++++++++
>  tools/mpris-proxy.service.in | 13 +++++++++++++
>  5 files changed, 29 insertions(+), 2 deletions(-)
>  create mode 100644 tools/mpris-proxy.service.in

Here is the summary with links:
  - tools/mpris-proxy: Add systemd user unit
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=daa86e06c376

You are awesome, thank you!
diff mbox series

Patch

diff --git a/Makefile.am b/Makefile.am
index 46a8cfb..976c272 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,6 +49,9 @@  if SYSTEMD
 systemdsystemunitdir = $(SYSTEMD_SYSTEMUNITDIR)
 systemdsystemunit_DATA = src/bluetooth.service
 
+systemduserunitdir = $(SYSTEMD_USERUNITDIR)
+systemduserunit_DATA =
+
 dbussystembusdir = $(DBUS_SYSTEMBUSDIR)
 dbussystembus_DATA = src/org.bluez.service
 endif
diff --git a/Makefile.obexd b/Makefile.obexd
index b7e9f2d..4cdce73 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
@@ -2,8 +2,7 @@ 
 if OBEX
 
 if SYSTEMD
-systemduserunitdir = $(SYSTEMD_USERUNITDIR)
-systemduserunit_DATA = obexd/src/obex.service
+systemduserunit_DATA += obexd/src/obex.service
 
 dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
 dbussessionbus_DATA = obexd/src/org.bluez.obex.service
diff --git a/Makefile.tools b/Makefile.tools
index f4f9e82..dea399f 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -332,6 +332,9 @@  tools_hex2hcd_SOURCES = tools/hex2hcd.c
 
 tools_mpris_proxy_SOURCES = tools/mpris-proxy.c
 tools_mpris_proxy_LDADD = gdbus/libgdbus-internal.la $(GLIB_LIBS) $(DBUS_LIBS)
+if SYSTEMD
+systemduserunit_DATA += tools/mpris-proxy.service
+endif
 
 tools_gatt_service_SOURCES = tools/gatt-service.c
 tools_gatt_service_LDADD = gdbus/libgdbus-internal.la \
diff --git a/configure.ac b/configure.ac
index d31eb16..6332645 100644
--- a/configure.ac
+++ b/configure.ac
@@ -428,6 +428,14 @@  fi
 #
 # Otherwise we'll end up with literal references in the final binaries or
 # manuals, which is not something we really want.
+#
+pkgbindir="${bindir}"
+if (test "$bindir" = '${exec_prefix}/bin'); then
+	pkgbindir="${exec_prefix}/bin"
+else
+	pkgbindir="${bindir}"
+fi
+AC_SUBST(PKGBINDIR, "${pkgbindir}")
 
 if (test "$libexecdir" = '${exec_prefix}/libexec'); then
 	pkglibexecdir="${exec_prefix}/libexec/bluetooth"
@@ -496,5 +504,6 @@  AC_CONFIG_FILES(
 	src/bluetoothd.rst
 	src/bluetooth.service
 	tools/bluetooth-logger.service
+	tools/mpris-proxy.service
 )
 AC_OUTPUT
diff --git a/tools/mpris-proxy.service.in b/tools/mpris-proxy.service.in
new file mode 100644
index 0000000..5307490
--- /dev/null
+++ b/tools/mpris-proxy.service.in
@@ -0,0 +1,13 @@ 
+[Unit]
+Description=Bluetooth mpris proxy
+Documentation=man:mpris-proxy(1)
+
+Wants=dbus.socket
+After=dbus.socket
+
+[Service]
+Type=simple
+ExecStart=@PKGBINDIR@/mpris-proxy
+
+[Install]
+WantedBy=default.target