Fix agl-service-* databroker dependencies 70/30870/3
authorScott Murray <scott.murray@konsulko.com>
Tue, 25 Mar 2025 19:59:23 +0000 (15:59 -0400)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 1 Apr 2025 19:54:47 +0000 (19:54 +0000)
Install refactored versions of the agl-service-* systemd units
with the databroker dependencies as override drop-ins in separate
packages, to fix the gateway demo usecase.

Bug-AGL: SPEC-5395

Change-Id: I858d27d5bd2f517323d85bc671f51938b17e43ff
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/30902
Tested-by: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
(cherry picked from commit 92564a7ca85329e81560a4331d52a9e8a064a87e)
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/30870
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-agl-kvm-demo/recipes-platform/images/agl-kvm-demo-flutter-preconfigured-gateway.bb
meta-agl-kvm-demo/recipes-platform/images/agl-kvm-demo-flutter-preconfigured.bb
recipes-demo/agl-service-audiomixer/agl-service-audiomixer/agl-service-audiomixer.service [new file with mode: 0644]
recipes-demo/agl-service-audiomixer/agl-service-audiomixer/databroker.conf [new file with mode: 0644]
recipes-demo/agl-service-audiomixer/agl-service-audiomixer_git.bb
recipes-demo/agl-service-hvac/agl-service-hvac/agl-service-hvac.service [new file with mode: 0644]
recipes-demo/agl-service-hvac/agl-service-hvac/databroker.conf [new file with mode: 0644]
recipes-demo/agl-service-hvac/agl-service-hvac_git.bb
recipes-platform/images/agl-ivi-image.bb

index b98f52e..600fe8a 100644 (file)
@@ -7,7 +7,11 @@ SUMMARY = "AGL KVM + gateway preconfigured Flutter demo image"
 IMAGE_FEATURES:remove = "kuksa-val-databroker"
 
 # Not needed if we're not running the databroker
-IMAGE_INSTALL:remove = "kuksa-databroker-agl-demo-cluster"
+IMAGE_INSTALL:remove = " \
+    agl-service-audiomixer-systemd-databroker \
+    agl-service-hvac-systemd-databroker \
+    kuksa-databroker-agl-demo-cluster \
+"
 
 IMAGE_INSTALL += "\
     agl-service-hvac-conf-gateway-demo \
index ac392cb..4eda505 100644 (file)
@@ -19,6 +19,8 @@ IMAGE_FEATURES += " \
 HOST_AUDIO_INSTALL = " \
     packagegroup-agl-ivi-services-platform \
     packagegroup-agl-ivi-multimedia-platform \
+    agl-service-audiomixer-systemd-databroker \
+    agl-service-hvac-systemd-databroker \
     agl-service-radio-conf-kvm-demo \
     packagegroup-pipewire \
     wireplumber-config-agl \
diff --git a/recipes-demo/agl-service-audiomixer/agl-service-audiomixer/agl-service-audiomixer.service b/recipes-demo/agl-service-audiomixer/agl-service-audiomixer/agl-service-audiomixer.service
new file mode 100644 (file)
index 0000000..9a1f92f
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Requires=pipewire.service
+After=pipewire.service
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/agl-service-audiomixer
+Restart=on-failure
+
+[Install]
+WantedBy=default.target
diff --git a/recipes-demo/agl-service-audiomixer/agl-service-audiomixer/databroker.conf b/recipes-demo/agl-service-audiomixer/agl-service-audiomixer/databroker.conf
new file mode 100644 (file)
index 0000000..5dfae5b
--- /dev/null
@@ -0,0 +1,3 @@
+[Unit]
+Requires=kuksa-databroker.service
+After=kuksa-databroker.service
index 9a4e90f..8f591cb 100644 (file)
@@ -23,6 +23,8 @@ SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-audiomixer.g
            file://agl-service-audiomixer.conf.default \
            file://agl-service-audiomixer.conf.gateway-demo \
            file://agl-service-audiomixer.token \
+           file://agl-service-audiomixer.service \
+           file://databroker.conf \
 "
 SRCREV  = "2e7d2c7a4d9c6dd37552c69a896286aa7dacd2c3"
 
@@ -47,6 +49,10 @@ do_install:append() {
     install -m 0644 ${WORKDIR}/agl-service-audiomixer.conf.default ${D}${sysconfdir}/xdg/AGL/
     install -m 0644 ${WORKDIR}/agl-service-audiomixer.conf.gateway-demo ${D}${sysconfdir}/xdg/AGL/
     install -m 0644 ${WORKDIR}/agl-service-audiomixer.token ${D}${sysconfdir}/xdg/AGL/agl-service-audiomixer/
+
+    # Replace the default systemd unit
+    install -m 0644 ${WORKDIR}/agl-service-audiomixer.service ${D}${systemd_system_unitdir}/
+    install -m 0644 -D ${WORKDIR}/databroker.conf ${D}${systemd_system_unitdir}/agl-service-audiomixer.d/databroker.conf
 }
 
 FILES:${PN} += "${systemd_system_unitdir}"
@@ -55,7 +61,7 @@ RDEPENDS:${PN} += "${PN}-conf"
 
 ALTERNATIVE_LINK_NAME[agl-service-audiomixer.conf] = "${sysconfdir}/xdg/AGL/agl-service-audiomixer.conf"
 
-PACKAGE_BEFORE_PN += "${PN}-conf ${PN}-conf-gateway-demo"
+PACKAGE_BEFORE_PN += "${PN}-conf ${PN}-conf-gateway-demo ${PN}-systemd-databroker"
 
 FILES:${PN}-conf += "${sysconfdir}/xdg/AGL/agl-service-audiomixer.conf.default"
 RDEPENDS:${PN}-conf = "${PN}"
@@ -69,3 +75,5 @@ RPROVIDES:${PN}-conf-gateway-demo = "agl-service-audiomixer.conf"
 ALTERNATIVE:${PN}-conf-gateway-demo = "agl-service-audiomixer.conf"
 ALTERNATIVE_TARGET_${PN}-conf-gateway-demo = "${sysconfdir}/xdg/AGL/agl-service-audiomixer.conf.gateway-demo"
 ALTERNATIVE_PRIORITY_${PN}-conf-gateway-demo = "20"
+
+FILES:${PN}-systemd-databroker += "${systemd_system_unitdir}/agl-service-audiomixer.d/databroker.conf"
diff --git a/recipes-demo/agl-service-hvac/agl-service-hvac/agl-service-hvac.service b/recipes-demo/agl-service-hvac/agl-service-hvac/agl-service-hvac.service
new file mode 100644 (file)
index 0000000..aac8b9b
--- /dev/null
@@ -0,0 +1,7 @@
+[Service]
+Type=simple
+ExecStart=/usr/sbin/agl-service-hvac
+Restart=on-failure
+
+[Install]
+WantedBy=default.target
diff --git a/recipes-demo/agl-service-hvac/agl-service-hvac/databroker.conf b/recipes-demo/agl-service-hvac/agl-service-hvac/databroker.conf
new file mode 100644 (file)
index 0000000..5dfae5b
--- /dev/null
@@ -0,0 +1,3 @@
+[Unit]
+Requires=kuksa-databroker.service
+After=kuksa-databroker.service
index 721cdd7..f7a6eb9 100644 (file)
@@ -21,6 +21,8 @@ SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-hvac;protoco
            file://agl-service-hvac.conf.default \
            file://agl-service-hvac.conf.gateway-demo \
            file://agl-service-hvac.token \
+           file://agl-service-hvac.service \
+           file://databroker.conf \
 "
 SRCREV  = "1f55937667e35fb79dabee0e180787e34a59169a"
 
@@ -45,6 +47,10 @@ do_install:append() {
     install -m 0644 ${WORKDIR}/agl-service-hvac.conf.default ${D}${sysconfdir}/xdg/AGL/
     install -m 0644 ${WORKDIR}/agl-service-hvac.conf.gateway-demo ${D}${sysconfdir}/xdg/AGL/
     install -m 0644 ${WORKDIR}/agl-service-hvac.token ${D}${sysconfdir}/xdg/AGL/agl-service-hvac/
+
+    # Replace the default systemd unit
+    install -m 0644 ${WORKDIR}/agl-service-hvac.service ${D}${systemd_system_unitdir}/
+    install -m 0644 -D ${WORKDIR}/databroker.conf ${D}${systemd_system_unitdir}/agl-service-hvac.d/databroker.conf
 }
 
 FILES:${PN} += "${systemd_system_unitdir}"
@@ -53,7 +59,7 @@ RDEPENDS:${PN} += "${PN}-conf"
 
 ALTERNATIVE_LINK_NAME[agl-service-hvac.conf] = "${sysconfdir}/xdg/AGL/agl-service-hvac.conf"
 
-PACKAGE_BEFORE_PN += "${PN}-conf ${PN}-conf-gateway-demo"
+PACKAGE_BEFORE_PN += "${PN}-conf ${PN}-conf-gateway-demo ${PN}-systemd-databroker"
 
 FILES:${PN}-conf += "${sysconfdir}/xdg/AGL/agl-service-hvac.conf.default"
 RDEPENDS:${PN}-conf = "${PN}"
@@ -68,3 +74,5 @@ ALTERNATIVE:${PN}-conf-gateway-demo = "agl-service-hvac.conf"
 ALTERNATIVE_TARGET_${PN}-conf-gateway-demo = "${sysconfdir}/xdg/AGL/agl-service-hvac.conf.gateway-demo"
 ALTERNATIVE_PRIORITY_${PN}-conf-gateway-demo = "20"
 
+FILES:${PN}-systemd-databroker += "${systemd_system_unitdir}/agl-service-hvac.d/databroker.conf"
+
index 3783db9..8ae8ff9 100644 (file)
@@ -19,6 +19,8 @@ AGL_APPS_INSTALL = ""
 PLATFORM_SERVICES_INSTALL = " \
     packagegroup-agl-ivi-multimedia-platform \
     packagegroup-agl-ivi-services-platform \
+    agl-service-audiomixer-systemd-databroker \
+    agl-service-hvac-systemd-databroker \
 "
 
 IMAGE_INSTALL += " \