osmo-*: Fix systemd services to run against old systemd

Change-Id: I821249615c7bc593cd5a68b1a9c48fe787016e87
Related: SYS#6340
diff --git a/recipes-osmocom/osmo-gbproxy/osmo-gbproxy.inc b/recipes-osmocom/osmo-gbproxy/osmo-gbproxy.inc
index 1add0b9..aff20fa 100644
--- a/recipes-osmocom/osmo-gbproxy/osmo-gbproxy.inc
+++ b/recipes-osmocom/osmo-gbproxy/osmo-gbproxy.inc
@@ -5,7 +5,7 @@
 
 DEPENDS = "libosmocore"
 
-INC_PR="r0.${META_TELEPHONY_OSMO_INC}"
+INC_PR="r1.${META_TELEPHONY_OSMO_INC}"
 
 inherit autotools pkgconfig systemd
 
@@ -14,6 +14,12 @@
     "
 PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir},--without-systemdsystemunitdir"
 
+# StateDirectory requires systemd >= v235, but poky pyro ships with v232 (SYS#6340):
+do_install_append() {
+	sed -i '/^StateDirectory=/d' "${D}${systemd_system_unitdir}/${PN}.service"
+	sed -i '/^WorkingDirectory=/d' "${D}${systemd_system_unitdir}/${PN}.service"
+}
+
 SYSTEMD_SERVICE_osmo-gbproxy = "osmo-gbproxy.service"
 
 CONFFILES_osmo-gbproxy = "${sysconfdir}/osmocom/osmo-gbproxy.cfg"