aports/community/qbootctl/systemd-service.patch
2025-12-07 23:34:47 +01:00

53 lines
1.5 KiB
Diff

Patch-Source: https://github.com/linux-msm/qbootctl/pull/5
---
From cc0282305d6137df60f9a39aa880568443d5a1f5 Mon Sep 17 00:00:00 2001
From: Achill Gilgenast <achill@achill.org>
Date: Mon, 17 Nov 2025 15:14:49 +0100
Subject: [PATCH] build: Add systemd system service
Oriented at the postmarketOS service: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/blob/master/extra-repos/systemd/systemd-services/system-qbootctl.service
Allows packaging the service file in a $pkgname-systemd subpackage in
Alpine.
Signed-off-by: Achill Gilgenast <achill@achill.org>
---
meson.build | 8 ++++++++
qbootctl.service.in | 11 +++++++++++
2 files changed, 19 insertions(+)
create mode 100644 qbootctl.service.in
diff --git a/meson.build b/meson.build
index 8fdd116..b884f59 100644
--- a/meson.build
+++ b/meson.build
@@ -23,3 +23,11 @@ executable('qbootctl', src,
install: true,
c_args: [],
)
+
+configure_file(
+ input: 'qbootctl.service.in',
+ output: 'qbootctl.service',
+ configuration: { 'bindir': get_option('prefix') / 'bin' },
+ install: true,
+ install_dir: get_option('prefix') / 'lib' / 'systemd' / 'system',
+)
diff --git a/qbootctl.service.in b/qbootctl.service.in
new file mode 100644
index 0000000..a1fc7fc
--- /dev/null
+++ b/qbootctl.service.in
@@ -0,0 +1,11 @@
+[Unit]
+Description=Qualcomm boot slot ctrl mark boot successful
+
+[Service]
+ExecStart=@bindir@/qbootctl -m
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+# FIXME: maybe do this a bit later on
+WantedBy=multi-user.target