From bf8b3d5c0e1055de86f1e97f1544dd5fb4c04e34 Mon Sep 17 00:00:00 2001
From: j1nx
Date: Sat, 2 Sep 2023 11:58:28 +0000
Subject: [PATCH] [ALL] Switch mycroft tmp mount to real /dev/shm tempfs which
is actually what shm is made for.
---
.../etc/containers/systemd/users/ovos_audio.container | 2 +-
.../etc/containers/systemd/users/ovos_cli.container | 2 +-
.../etc/containers/systemd/users/ovos_core.container | 2 +-
.../etc/containers/systemd/users/ovos_listener.container | 2 +-
.../etc/containers/systemd/users/ovos_messagebus.container | 4 ++--
.../etc/containers/systemd/users/ovos_phal.container | 2 +-
.../etc/containers/systemd/users/ovos_phal_admin.container | 2 +-
buildroot-external/rootfs-overlay/home/ovos/ovos/tmp/.empty | 0
8 files changed, 8 insertions(+), 8 deletions(-)
delete mode 100644 buildroot-external/rootfs-overlay/home/ovos/ovos/tmp/.empty
diff --git a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_audio.container b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_audio.container
index 01c45d40..9872de34 100644
--- a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_audio.container
+++ b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_audio.container
@@ -21,7 +21,7 @@ Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
Environment=XDG_RUNTIME_DIR=%t
AddDevice=/dev/snd
Volume=%h/ovos/config:/home/ovos/.config/mycroft
-Volume=%h/ovos/tmp:/tmp/mycroft
+Volume=/dev/shm:/tmp
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=%t/bus:/run/user/1000/bus:ro
Volume=ovos_tts_cache:/home/ovos/.cache/mycroft
diff --git a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_cli.container b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_cli.container
index 1178bb99..3d90f669 100644
--- a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_cli.container
+++ b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_cli.container
@@ -12,7 +12,7 @@ Network=host
Timezone=local
UserNS=keep-id:uid=%U,gid=%G
Volume=%h/ovos/config:/home/ovos/.config/mycroft
-Volume=%h/ovos/tmp:/tmp/mycroft
+Volume=/dev/shm:/tmp
[Service]
TimeoutStartSec=900
diff --git a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_core.container b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_core.container
index 0bed446f..268c79d5 100644
--- a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_core.container
+++ b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_core.container
@@ -20,7 +20,7 @@ UserNS=keep-id:uid=%U,gid=%G
Environment=XDG_RUNTIME_DIR=%t
AddDevice=/dev/snd
Volume=%h/ovos/config:/home/ovos/.config/mycroft
-Volume=%h/ovos/tmp:/tmp/mycroft
+Volume=/dev/shm:/tmp
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=ovos_nltk:/home/ovos/nltk_data
Volume=%h/ovos/share:/home/ovos/.local/share/mycroft
diff --git a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_listener.container b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_listener.container
index 79500cf0..ec75143d 100644
--- a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_listener.container
+++ b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_listener.container
@@ -20,7 +20,7 @@ UserNS=keep-id:uid=%U,gid=%G
Environment=XDG_RUNTIME_DIR=%t
AddDevice=/dev/snd
Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro
-Volume=%h/ovos/tmp:/tmp/mycroft
+Volume=/dev/shm:/tmp
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=ovos_listener_records:/home/ovos/.local/share/mycroft/listener
Volume=ovos_models:/home/ovos/.local/share/precise-lite
diff --git a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_messagebus.container b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_messagebus.container
index 0c11231e..be2431de 100644
--- a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_messagebus.container
+++ b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_messagebus.container
@@ -12,11 +12,11 @@ Network=host
Timezone=local
UserNS=keep-id:uid=%U,gid=%G
Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro
-Volume=%h/ovos/tmp:/tmp/mycroft
+Volume=/dev/shm:/tmp
[Service]
TimeoutStartSec=900
-Restart=unless-stopped
+Restart=always
[Install]
WantedBy=multi-user.target default.target
diff --git a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_phal.container b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_phal.container
index 60f7297b..dea32246 100644
--- a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_phal.container
+++ b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_phal.container
@@ -18,7 +18,7 @@ UserNS=keep-id:uid=%U,gid=%G
Environment=XDG_RUNTIME_DIR=%t
AddDevice=/dev/snd
Volume=%h/ovos/config:/home/ovos/.config/mycroft
-Volume=%h/ovos/tmp:/tmp/mycroft
+Volume=/dev/shm:/tmp
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
[Service]
diff --git a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_phal_admin.container b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_phal_admin.container
index 92c90e14..990e5ca1 100644
--- a/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_phal_admin.container
+++ b/buildroot-external/rootfs-overlay/etc/containers/systemd/users/ovos_phal_admin.container
@@ -14,7 +14,7 @@ Network=host
Timezone=local
UserNS=keep-id:uid=%U,gid=%G
Volume=%h/ovos/config:/home/ovos/.config/mycroft
-Volume=%h/ovos/tmp:/tmp/mycroft
+Volume=/dev/shm:/tmp
Volume=/sys:/sys:ro
Volume=/dev:/dev:ro
diff --git a/buildroot-external/rootfs-overlay/home/ovos/ovos/tmp/.empty b/buildroot-external/rootfs-overlay/home/ovos/ovos/tmp/.empty
deleted file mode 100644
index e69de29b..00000000