Skip to contentSkip to conversation

dbus/data: use prefix in gpio-manager.service

PATCH Applied David Lechner 2 participants 2 messages Feb 16 – Feb 17 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dbus/data: use prefix in gpio-manager.service

Change the gpio-manager.service file to gpio-manager.service.in template and use @prefix@ in the ExecStart line. This way, when make install is used to install the service file, it points to the same path where the binary is actually installed.

---
 configure.ac                                                | 1 +
 dbus/data/.gitignore                                        | 4 ++++
 dbus/data/{gpio-manager.service => gpio-manager.service.in} | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)
 create mode 100644 dbus/data/.gitignore
 rename dbus/data/{gpio-manager.service => gpio-manager.service.in} (96%)
configure.ac +1 -0
index ffa712e..61a010f 100644
@@ -325,6 +325,7 @@ if test "x$with_systemd" = xtrue
 then
 	PKG_CHECK_VAR([systemdsystemunitdir], [systemd], [systemdsystemunitdir], [],
 		      AC_MSG_ERROR([systemdsystemunitdir not found - needed to enable systemd support]))
+	AC_CONFIG_FILES([dbus/data/gpio-manager.service])
 fi
 
 if test "x$cross_compiling" = xno
dbus/data/.gitignore new file +4 -0
new file mode 100644
index 0000000..94e73a8
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: CC0-1.0
+# SPDX-FileCopyrightText: 2026 David Lechner <[email protected]>
+
+gpio-manager.service
dbus/data/gpio-manager.service.in renamed from dbus/data/gpio-manager.service +1 -1
similarity index 96%
rename from dbus/data/gpio-manager.service
rename to dbus/data/gpio-manager.service.in
index f93a6fa..f4270e1 100644
@@ -7,7 +7,7 @@ Description=Centralized GPIO manager daemon
 [Service]
 Type=dbus
 BusName=io.gpiod1
-ExecStart=/usr/bin/gpio-manager
+ExecStart=@prefix@/bin/gpio-manager
 Restart=always
 User=gpio-manager
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 6 lines · David Lechner

Change the gpio-manager.service file to gpio-manager.service.in template and use @prefix@ in the ExecStart line. This way, when make install is used to install the service file, it points to the same path where the binary is actually installed.

Applied, thanks!

[1/1] dbus/data: use prefix in gpio-manager.service

      https://git.kernel.org/brgl/c/ec908dafcdb8fde8eacc168adfb176bc6412ae32

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>