]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
mkosi/run: pass through LD_LIBRARY_PATH 4100/head
authorMaximilian Bosch <maximilian@mbosch.me>
Mon, 29 Dec 2025 17:06:18 +0000 (18:06 +0100)
committerMaximilian Bosch <maximilian@mbosch.me>
Tue, 30 Dec 2025 14:09:20 +0000 (15:09 +0100)
The sandbox expects that the host has a `libseccomp.so` in its global
search-path (usually `/usr/lib`). However, that path doesn't exist on
NixOS. Another standard way of passing lookup paths to `dlopen()` is
using LD_LIBRARY_PATH which is now passed through to the sandbox.

mkosi/run.py

index c2d6182a93ddfa1c8f330a9984c9728c34e48489..c0acd565c4bcfd65b175edd131eee268f4938519 100644 (file)
@@ -262,7 +262,7 @@ def spawn(
     if "TMPDIR" in os.environ:
         env["TMPDIR"] = os.environ["TMPDIR"]
 
-    for e in ("SYSTEMD_LOG_LEVEL", "SYSTEMD_LOG_LOCATION"):
+    for e in ("SYSTEMD_LOG_LEVEL", "SYSTEMD_LOG_LOCATION", "LD_LIBRARY_PATH"):
         if e in os.environ:
             env[e] = os.environ[e]