Remove User= and Group= from systemd service files
Service files of Osmocom programs will have User= and Group= in the
future, so these don't run as root. It was decided that for OE-based
systems, we will still run them as root for now.
Related: OS#5684, OS#4107
Change-Id: I68a8fba034aeb0e2923b2958b8d6842410d8b23c
diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc b/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc
index 0f1f28d..34454b1 100644
--- a/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc
+++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc
@@ -3,7 +3,7 @@
HOMEPAGE = "https://osmocom.org/projects/libosmo-sccp"
LICENSE = "AGPLv3"
-INC_PR="r2.${META_TELEPHONY_OSMO_INC}"
+INC_PR="r3.${META_TELEPHONY_OSMO_INC}"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
@@ -18,10 +18,14 @@
# access symbols not starting with osmo_*
EXTRA_OECONF_remove = "--disable-static"
-# StateDirectory requires systemd >= v235, but poky pyro ships with v232 (SYS#6340):
do_install_append() {
+ # StateDirectory requires systemd >= v235, but poky pyro ships with v232 (SYS#6340):
sed -i '/^StateDirectory=/d' "${D}${systemd_system_unitdir}/osmo-stp.service"
sed -i '/^WorkingDirectory=/d' "${D}${systemd_system_unitdir}/osmo-stp.service"
+
+ # Run as root (OS#5684):
+ sed -i '/^User=/d' "${D}${systemd_system_unitdir}/osmo-stp.service"
+ sed -i '/^Group=/d' "${D}${systemd_system_unitdir}/osmo-stp.service"
}
PACKAGES =+ "osmo-stp"