From 23a94cc1db3aac42c3dba135e89acb367be8a781 Mon Sep 17 00:00:00 2001
From: j1nx
Date: Sun, 18 Feb 2024 19:14:55 +0000
Subject: [PATCH] [All] Switch back to ovos-messagebus and configured shared
volums as such
---
.../package/ovos-containers/ovos-containers.mk | 1 +
.../containers/systemd/ovos-audio.container | 16 ++++++++--------
.../ovos-audio.container.d/Mycroft.conf | 2 +-
.../containers/systemd/ovos-cli.container | 6 +++---
.../systemd/ovos-cli.container.d/Mycroft.conf | 2 +-
.../containers/systemd/ovos-core.container | 18 +++++++++---------
.../systemd/ovos-core.container.d/Mycroft.conf | 2 +-
.../systemd/ovos-gui-shell.container | 8 ++++----
.../ovos-gui-shell.container.d/Mycroft.conf | 2 +-
.../systemd/ovos-gui-websocket.container | 14 +++++++-------
.../Mycroft.conf | 2 +-
.../systemd/ovos-listener-dinkum.container | 16 ++++++++--------
.../Mycroft.conf | 2 +-
.../systemd/ovos-messagebus.container | 6 +++---
.../ovos-messagebus.container.d/Enabled.conf | 2 ++
.../ovos-messagebus.container.d/Mycroft.conf | 2 +-
.../containers/systemd/ovos-phal.container | 14 +++++++-------
.../systemd/ovos-phal.container.d/Mycroft.conf | 2 +-
.../lib/systemd/system-preset/10-ovos.preset | 2 +-
19 files changed, 61 insertions(+), 58 deletions(-)
create mode 100644 buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container.d/Enabled.conf
diff --git a/buildroot-external/package/ovos-containers/ovos-containers.mk b/buildroot-external/package/ovos-containers/ovos-containers.mk
index cc042af0..73fd5f23 100644
--- a/buildroot-external/package/ovos-containers/ovos-containers.mk
+++ b/buildroot-external/package/ovos-containers/ovos-containers.mk
@@ -11,6 +11,7 @@ OVOS_CONTAINERS_SITE = $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/ovos-containers
OVOS_CONTAINERS_SITE_METHOD = local
OVOS_CONTAINERS_IMAGES = ovos-phal \
+ ovos-messagebus \
ovos-listener-dinkum \
ovos-audio \
ovos-core \
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-audio.container b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-audio.container
index 5728a14d..155cd5e8 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-audio.container
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-audio.container
@@ -5,10 +5,10 @@ After=network-online.target
Wants=network-online.target
Wants=pipewire.service
After=pipewire.service
-Wants=ovos-bus-server.service
-After=ovos-bus-server.service
-#Wants=ovos-messagebus.service
-#After=ovos-messagebus.service
+#Wants=ovos-bus-server.service
+#After=ovos-bus-server.service
+Wants=ovos-messagebus.service
+After=ovos-messagebus.service
Wants=ovos-phal.service
After=ovos-phal.service
@@ -25,12 +25,12 @@ UserNS=keep-id:uid=%U,gid=%G
SecurityLabelDisable=true
EnvironmentFile=%h/.config/containers/env
AddDevice=/dev/snd
-Volume=%h/ovos/config:/home/ovos/.config/mycroft
-Volume=%h/ovos/tmp:/tmp
+Volume=%h/ovos/config:/home/ovos/.config/mycroft:z
+Volume=%h/ovos/tmp:/tmp:z
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=%t/bus:/run/user/1000/bus:ro
-Volume=ovos_local_state:/home/ovos/.local/state/mycroft
-Volume=ovos_tts_cache:/home/ovos/.cache/mycroft
+Volume=ovos_local_state:/home/ovos/.local/state/mycroft:z
+Volume=ovos_tts_cache:/home/ovos/.cache/mycroft:z
Volume=ovos_venv_audio:/home/ovos/.venv
[Service]
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-audio.container.d/Mycroft.conf b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-audio.container.d/Mycroft.conf
index 858277eb..c8df6dea 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-audio.container.d/Mycroft.conf
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-audio.container.d/Mycroft.conf
@@ -1,2 +1,2 @@
[Container]
-Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro
+Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro,z
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-cli.container b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-cli.container
index 53fbad2b..0adedebd 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-cli.container
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-cli.container
@@ -15,9 +15,9 @@ Network=host
Timezone=local
UserNS=keep-id:uid=%U,gid=%G
SecurityLabelDisable=true
-Volume=%h/ovos/config:/home/ovos/.config/mycroft
-Volume=%h/ovos/tmp:/tmp
-Volume=ovos_local_state:/home/ovos/.local/state/mycroft
+Volume=%h/ovos/config:/home/ovos/.config/mycroft:z
+Volume=%h/ovos/tmp:/tmp:z
+Volume=ovos_local_state:/home/ovos/.local/state/mycroft:z
[Service]
TimeoutStartSec=900
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-cli.container.d/Mycroft.conf b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-cli.container.d/Mycroft.conf
index 858277eb..c8df6dea 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-cli.container.d/Mycroft.conf
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-cli.container.d/Mycroft.conf
@@ -1,2 +1,2 @@
[Container]
-Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro
+Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro,z
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-core.container b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-core.container
index 02ccf9de..c3149715 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-core.container
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-core.container
@@ -5,10 +5,10 @@ After=network-online.target
Wants=network-online.target
Wants=pipewire.service
After=pipewire.service
-Wants=ovos-bus-server.service
-After=ovos-bus-server.service
-#Wants=ovos-messagebus.service
-#After=ovos-messagebus.service
+#Wants=ovos-bus-server.service
+#After=ovos-bus-server.service
+Wants=ovos-messagebus.service
+After=ovos-messagebus.service
Wants=ovos-phal.service
After=ovos-phal.service
@@ -25,13 +25,13 @@ UserNS=keep-id:uid=%U,gid=%G
SecurityLabelDisable=true
EnvironmentFile=%h/.config/containers/env
AddDevice=/dev/snd
-Volume=%h/ovos/config:/home/ovos/.config/mycroft
-Volume=%h/ovos/tmp:/tmp
+Volume=%h/ovos/config:/home/ovos/.config/mycroft:z
+Volume=%h/ovos/tmp:/tmp:z
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
-Volume=ovos_local_state:/home/ovos/.local/state/mycroft
-Volume=ovos_nltk:/home/ovos/nltk_data
+Volume=ovos_local_state:/home/ovos/.local/state/mycroft:z
+Volume=ovos_nltk:/home/ovos/nltk_data:z
Volume=ovos_venv_core:/home/ovos/.venv
-Volume=%h/ovos/share:/home/ovos/.local/share/mycroft
+Volume=%h/ovos/share:/home/ovos/.local/share/mycroft:z
[Service]
TimeoutStartSec=900
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-core.container.d/Mycroft.conf b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-core.container.d/Mycroft.conf
index 858277eb..c8df6dea 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-core.container.d/Mycroft.conf
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-core.container.d/Mycroft.conf
@@ -1,2 +1,2 @@
[Container]
-Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro
+Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro,z
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-shell.container b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-shell.container
index ee434697..f1ae7246 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-shell.container
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-shell.container
@@ -27,12 +27,12 @@ EnvironmentFile=%h/.config/containers/env
AddDevice=/dev/snd
AddDevice=/dev/dri
AddDevice=/dev/input
-Volume=%h/ovos/config:/home/ovos/.config/mycroft
-Volume=%h/ovos/tmp:/tmp
+Volume=%h/ovos/config:/home/ovos/.config/mycroft:z
+Volume=%h/ovos/tmp:/tmp:z
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=%t/bus:/run/user/1000/bus:ro
-Volume=%h/ovos/share:/home/ovos/.local/share/mycroft
-Volume=ovos_gui_files:/home/ovos/.cache/gui_files
+Volume=%h/ovos/share:/home/ovos/.local/share/mycroft:z
+Volume=ovos_gui_files:/home/ovos/.cache/gui_files:z
Volume=/run/udev/data:/run/udev/data:ro
[Service]
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-shell.container.d/Mycroft.conf b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-shell.container.d/Mycroft.conf
index 858277eb..c8df6dea 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-shell.container.d/Mycroft.conf
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-shell.container.d/Mycroft.conf
@@ -1,2 +1,2 @@
[Container]
-Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro
+Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro,z
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-websocket.container b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-websocket.container
index c8c3c880..dbface3d 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-websocket.container
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-websocket.container
@@ -3,10 +3,10 @@ Description=OpenVoiceOS GUI Websocket Service
After=local-fs.target
After=network-online.target
Wants=network-online.target
-Wants=ovos-bus-server.service
-After=ovos-bus-server.service
-#Wants=ovos-messagebus.service
-#After=ovos-messagebus.service
+#Wants=ovos-bus-server.service
+#After=ovos-bus-server.service
+Wants=ovos-messagebus.service
+After=ovos-messagebus.service
[Container]
ContainerName=ovos-gui-websocket
@@ -19,9 +19,9 @@ Network=host
Timezone=local
UserNS=keep-id:uid=%U,gid=%G
SecurityLabelDisable=true
-Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro
-Volume=%h/ovos/tmp:/tmp
-Volume=ovos_gui_files:/home/ovos/.cache/ovos_gui_file_server
+Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro,z
+Volume=%h/ovos/tmp:/tmp:z
+Volume=ovos_gui_files:/home/ovos/.cache/ovos_gui_file_server:z
[Service]
TimeoutStartSec=900
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-websocket.container.d/Mycroft.conf b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-websocket.container.d/Mycroft.conf
index 858277eb..c8df6dea 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-websocket.container.d/Mycroft.conf
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-gui-websocket.container.d/Mycroft.conf
@@ -1,2 +1,2 @@
[Container]
-Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro
+Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro,z
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-listener-dinkum.container b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-listener-dinkum.container
index 11915dd6..a64643f0 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-listener-dinkum.container
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-listener-dinkum.container
@@ -5,10 +5,10 @@ After=network-online.target
Wants=network-online.target
Wants=pipewire.service
After=pipewire.service
-Wants=ovos-bus-server.service
-After=ovos-bus-server.service
-#Wants=ovos-messagebus.service
-#After=ovos-messagebus.service
+#Wants=ovos-bus-server.service
+#After=ovos-bus-server.service
+Wants=ovos-messagebus.service
+After=ovos-messagebus.service
Wants=ovos-phal.service
After=ovos-phal.service
@@ -25,11 +25,11 @@ UserNS=keep-id:uid=%U,gid=%G
SecurityLabelDisable=true
EnvironmentFile=%h/.config/containers/env
AddDevice=/dev/snd
-Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro
-Volume=%h/ovos/tmp:/tmp
+Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro,z
+Volume=%h/ovos/tmp:/tmp:z
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
-Volume=ovos_listener_records:/home/ovos/.local/share/mycroft/listener
-Volume=ovos_local_state:/home/ovos/.local/state/mycroft
+Volume=ovos_listener_records:/home/ovos/.local/share/mycroft/listener:z
+Volume=ovos_local_state:/home/ovos/.local/state/mycroft:z
Volume=ovos_models:/home/ovos/.local/share/precise-lite
Volume=ovos_vosk:/home/ovos/.local/share/vosk
Volume=ovos_venv_listener:/home/ovos/.venv
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-listener-dinkum.container.d/Mycroft.conf b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-listener-dinkum.container.d/Mycroft.conf
index 858277eb..c8df6dea 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-listener-dinkum.container.d/Mycroft.conf
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-listener-dinkum.container.d/Mycroft.conf
@@ -1,2 +1,2 @@
[Container]
-Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro
+Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro,z
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container
index 8ba6bb18..1c92f8b0 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container
@@ -15,9 +15,9 @@ Network=host
Timezone=local
UserNS=keep-id:uid=%U,gid=%G
SecurityLabelDisable=true
-Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro
-Volume=ovos_local_state:/home/ovos/.local/state/mycroft
-Volume=%h/ovos/tmp:/tmp
+Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro,z
+Volume=ovos_local_state:/home/ovos/.local/state/mycroft:z
+Volume=%h/ovos/tmp:/tmp:z
[Service]
TimeoutStartSec=900
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container.d/Enabled.conf b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container.d/Enabled.conf
new file mode 100644
index 00000000..979447d0
--- /dev/null
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container.d/Enabled.conf
@@ -0,0 +1,2 @@
+[Install]
+WantedBy=multi-user.target default.target
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container.d/Mycroft.conf b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container.d/Mycroft.conf
index 858277eb..c8df6dea 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container.d/Mycroft.conf
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-messagebus.container.d/Mycroft.conf
@@ -1,2 +1,2 @@
[Container]
-Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro
+Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro,z
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-phal.container b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-phal.container
index 68f3d9e4..8cf9dc23 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-phal.container
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-phal.container
@@ -5,10 +5,10 @@ After=network-online.target
Wants=network-online.target
Wants=pipewire.service
After=pipewire.service
-Wants=ovos-bus-server.service
-After=ovos-bus-server.service
-#Wants=ovos-messagebus.service
-#After=ovos-messagebus.service
+#Wants=ovos-bus-server.service
+#After=ovos-bus-server.service
+Wants=ovos-messagebus.service
+After=ovos-messagebus.service
[Container]
ContainerName=ovos-phal
@@ -23,9 +23,9 @@ UserNS=keep-id:uid=%U,gid=%G
SecurityLabelDisable=true
EnvironmentFile=%h/.config/containers/env
AddDevice=/dev/snd
-Volume=%h/ovos/config:/home/ovos/.config/mycroft
-Volume=ovos_local_state:/home/ovos/.local/state/mycroft
-Volume=%h/ovos/tmp:/tmp
+Volume=%h/ovos/config:/home/ovos/.config/mycroft:z
+Volume=ovos_local_state:/home/ovos/.local/state/mycroft:z
+Volume=%h/ovos/tmp:/tmp:z
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=ovos_venv_phal:/home/ovos/.venv
diff --git a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-phal.container.d/Mycroft.conf b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-phal.container.d/Mycroft.conf
index 858277eb..c8df6dea 100644
--- a/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-phal.container.d/Mycroft.conf
+++ b/buildroot-external/rootfs-overlay/home/ovos/.config/containers/systemd/ovos-phal.container.d/Mycroft.conf
@@ -1,2 +1,2 @@
[Container]
-Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro
+Volume=/etc/mycroft/mycroft.conf:/etc/mycroft/mycroft.conf:ro,z
diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/10-ovos.preset b/buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/10-ovos.preset
index 0555d8fd..86f918e1 100644
--- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/10-ovos.preset
+++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/10-ovos.preset
@@ -8,8 +8,8 @@ enable ovos-splash-start.service
enable ovos-splash-systemd.service
enable mglru.service
enable connectivity-check.service
-enable ovos-bus-server.service
+disable ovos-bus-server.service
disable ovos-splash-quit.service
disable pipewire.service
disable pipewire-pulse.service