From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Subject: [PATCH 3/4] host/rootfs: clean up obsolete tmp dirs on VM exit
Date: Sat, 13 Dec 2025 17:16:36 +0100 [thread overview]
Message-ID: <20251213161637.510752-3-hi@alyssa.is> (raw)
In-Reply-To: <20251213161637.510752-1-hi@alyssa.is>
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
host/rootfs/image/usr/bin/run-appimage | 7 +++++--
host/rootfs/image/usr/bin/run-flatpak | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/host/rootfs/image/usr/bin/run-appimage b/host/rootfs/image/usr/bin/run-appimage
index f62844f8..de851c52 100755
--- a/host/rootfs/image/usr/bin/run-appimage
+++ b/host/rootfs/image/usr/bin/run-appimage
@@ -57,7 +57,10 @@ if {
mount --bind -- $diskdir disk
}
-importas -Siu id
+multisubstitute {
+ importas -Siu diskdir
+ importas -Siu id
+}
piperw 4 3
background {
@@ -76,4 +79,4 @@ fdclose 3
if { s6-instance-delete /run/service/vm-services $id }
if { umount -R /run/vm/by-id/${id}/ns }
-rm -r /run/vm/by-id/${id} /run/configs/${id}
+rm -r -- $diskdir /run/vm/by-id/${id} /run/configs/${id}
diff --git a/host/rootfs/image/usr/bin/run-flatpak b/host/rootfs/image/usr/bin/run-flatpak
index 9a7ffa33..b47204c9 100755
--- a/host/rootfs/image/usr/bin/run-flatpak
+++ b/host/rootfs/image/usr/bin/run-flatpak
@@ -55,7 +55,10 @@ if {
mount --bind -- $diskdir /run/fs/${id}/disk
}
-importas -Siu id
+multisubstitute {
+ importas -Siu diskdir
+ importas -Siu id
+}
if {
piperw 4 3
@@ -75,4 +78,4 @@ if {
if { s6-instance-delete -- /run/service/vm-services $id }
if { umount -R /run/vm/by-id/${id}/ns }
-rm -r /run/vm/by-id/${id} /run/configs/${id}
+rm -r -- $diskdir /run/vm/by-id/${id} /run/configs/${id}
--
2.51.0
next prev parent reply other threads:[~2025-12-13 16:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-13 16:16 [PATCH 1/4] host/rootfs: make fs root directories shared Alyssa Ross
2025-12-13 16:16 ` [PATCH 2/4] host/rootfs: give VMs a disk-backed directory Alyssa Ross
2025-12-13 16:16 ` Alyssa Ross [this message]
2025-12-13 16:16 ` [PATCH 4/4] host/rootfs: clean up obsolete tmp dirs on mount Alyssa Ross
2025-12-13 20:37 ` Demi Marie Obenour
2025-12-13 20:43 ` Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251213161637.510752-3-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).