From 9b244a539b6f4671d3c8f22492f8cd47ab722ee9 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 27 Apr 2020 19:56:30 +0000 Subject: [PATCH] qemu: Ensure tmpdir is allocated for swtpm FCOS pipeline is seeing `swtpm/` directory in the working dir: https://github.com/coreos/coreos-assembler/pull/1399#issuecomment-620179231 I didn't reproduce but this should fix it. --- mantle/platform/qemu.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mantle/platform/qemu.go b/mantle/platform/qemu.go index e0b30ed9e9..d28b7f79c4 100644 --- a/mantle/platform/qemu.go +++ b/mantle/platform/qemu.go @@ -988,6 +988,10 @@ func (builder *QemuBuilder) Exec() (*QemuInstance, error) { // Handle Software TPM if builder.Swtpm && builder.supportsSwtpm() { + err = builder.ensureTempdir() + if err != nil { + return nil, err + } swtpmSock := filepath.Join(builder.tempdir, "swtpm-sock") swtpmdir := filepath.Join(builder.tempdir, "swtpm") if err := os.Mkdir(swtpmdir, 0755); err != nil {