From: Daan De Meyer Date: Fri, 4 Oct 2024 19:49:47 +0000 (+0200) Subject: Make sure swtpm is run in a scope, not swtpm_setup X-Git-Tag: v25~236^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef5722547ebd34c8d46f1852d4b3f3c762b8777b;p=thirdparty%2Fmkosi.git Make sure swtpm is run in a scope, not swtpm_setup --- diff --git a/mkosi/qemu.py b/mkosi/qemu.py index cdb6501c4..260afe3eb 100644 --- a/mkosi/qemu.py +++ b/mkosi/qemu.py @@ -262,10 +262,6 @@ def start_swtpm(config: Config) -> Iterator[Path]: sandbox=config.sandbox( binary="swtpm_setup", options=["--bind", state, state], - setup=scope_cmd( - name=f"mkosi-swtpm-{config.machine_or_name()}", - description=f"swtpm for {config.machine_or_name()}", - ), ), stdout=None if ARG_DEBUG.get() else subprocess.DEVNULL, ) # fmt: skip @@ -284,7 +280,14 @@ def start_swtpm(config: Config) -> Iterator[Path]: with spawn( cmdline, pass_fds=(sock.fileno(),), - sandbox=config.sandbox(binary="swtpm", options=["--bind", state, state]), + sandbox=config.sandbox( + binary="swtpm", + options=["--bind", state, state], + setup=scope_cmd( + name=f"mkosi-swtpm-{config.machine_or_name()}", + description=f"swtpm for {config.machine_or_name()}", + ), + ), ) as proc: yield path proc.terminate()