]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Make sure the private tmpfs in bwrap() doesn't hide workspace
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 10 Aug 2023 10:31:22 +0000 (12:31 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 10 Aug 2023 10:36:03 +0000 (12:36 +0200)
The workspace might be in /tmp so we need to make sure we mount it
first before we mount the workspace so that the workspace is on top
of the private tmpfs.

mkosi/run.py

index 0fdab9a52c17abe99677ca3220ad5d54e8946d3a..431fb70419ad1ffa71125c01b524d30784b0d81e 100644 (file)
@@ -267,6 +267,7 @@ def bwrap(
         "--ro-bind", "/var", "/var",
         "--ro-bind", "/run", "/run",
         "--bind", "/var/tmp", "/var/tmp",
+        "--tmpfs", "/tmp",
         "--bind", Path.cwd(), Path.cwd(),
         "--chdir", Path.cwd(),
         "--unshare-pid",
@@ -277,7 +278,6 @@ def bwrap(
         "--proc", "/proc",
         "--dev", "/dev",
         "--ro-bind", "/sys", "/sys",
-        "--tmpfs", "/tmp",
         "--setenv", "SYSTEMD_OFFLINE", one_zero(network),
     ]