From 56bf07d3b011c7edf963dd95d007f1815e06c682 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Tue, 29 Aug 2023 22:13:04 -0500 Subject: [PATCH] SetupBootkit: use the ovmf-vars.fd that shipped with bootkit Instead of relying on the host to have a reasonable one. At least on ubuntu jammy, right now those are the same thing. Signed-off-by: Serge Hallyn --- pkg/trust/artifacts.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/trust/artifacts.go b/pkg/trust/artifacts.go index 11f446b..4ba822a 100644 --- a/pkg/trust/artifacts.go +++ b/pkg/trust/artifacts.go @@ -267,10 +267,11 @@ func SetupBootkit(keysetName, bootkitVersion string) error { dbGuid := strings.TrimSpace(string(dbGuidBytes)) outFile := filepath.Join(destDir, "ovmf-vars.fd") + plainvars := filepath.Join(bDir, "ovmf", "ovmf-vars.fd") cmd = []string{ "virt-fw-vars", - "--input=/usr/share/OVMF/OVMF_VARS.fd", - "--output", outFile, + "--input=" + plainvars, + "--output=" + outFile, "--secure-boot", "--no-microsoft", "--set-pk", pkGuid, filepath.Join(keysetPath, "uefi-pk", "cert.pem"), "--add-kek", kekGuid, filepath.Join(keysetPath, "uefi-kek", "cert.pem"),