at master 34 lines 1.2 kB view raw
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2From: Moritz Sanft <58110325+msanft@users.noreply.github.com> 3Date: Tue, 3 Sep 2024 09:00:34 +0200 4Subject: [PATCH] Fix library resolving 5 6As ctypes doesn't do lookups in the Nix store for libraries, we supply the exact paths. 7 8Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> 9--- 10 mkosi/sandbox.py | 4 ++-- 11 1 file changed, 2 insertions(+), 2 deletions(-) 12 13diff --git a/mkosi/sandbox.py b/mkosi/sandbox.py 14index c79b48739f3d7127375274bc0b1ef3463cae9032..1d7ad421f4534e25c6456c3a169ea9189668aefd 100755 15--- a/mkosi/sandbox.py 16+++ b/mkosi/sandbox.py 17@@ -92,7 +92,7 @@ class cap_user_data_t(ctypes.Structure): 18 ] 19 20 21-libc = ctypes.CDLL(None, use_errno=True) 22+libc = ctypes.CDLL("@LIBC@", use_errno=True) 23 24 libc.syscall.restype = ctypes.c_long 25 libc.unshare.argtypes = (ctypes.c_int,) 26@@ -221,7 +221,7 @@ def seccomp_suppress(*, chown: bool = False, sync: bool = False) -> None: 27 if not chown and not sync: 28 return 29 30- libseccomp = ctypes.CDLL("libseccomp.so.2") 31+ libseccomp = ctypes.CDLL("@LIBSECCOMP@") 32 if libseccomp is None: 33 raise FileNotFoundError("libseccomp.so.2") 34