From: Daan De Meyer Date: Sat, 2 Nov 2024 17:55:51 +0000 (+0100) Subject: Always mount in /usr/share/factory from the host in relaxed sandbox X-Git-Tag: v25~188^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09497d0b15e2f7ec4e06813b4f7a8d26d237a7b6;p=thirdparty%2Fmkosi.git Always mount in /usr/share/factory from the host in relaxed sandbox If we're using /etc from the host, also use /usr/share/factory from the host to account for symlinks from /etc into /usr/share/factory. --- diff --git a/mkosi/run.py b/mkosi/run.py index 7dbeba096..549f076a4 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -537,6 +537,11 @@ def sandbox_cmd( else: cmdline += ["--bind", p, p] + # /etc might be full of symlinks to /usr/share/factory, so make sure we use /usr/share/factory + # from the host and not from the tools tree. + if tools != Path("/") and (factory := Path("/usr/share/factory")).exists(): + cmdline += ["--bind", factory, factory] + if home := current_home_dir(): cmdline += ["--bind", home, home] else: