Foxboron / sbctl

:computer: :lock: :key: Secure Boot key manager
MIT License
1.44k stars 81 forks source link

Failing test from vendored go #343

Open photosheep opened 1 month ago

photosheep commented 1 month ago

The latest (0.15.0+) update runs into breaking tests when vendoring.

[   10s] go test -v ./...
[   10s] # github.com/google/go-tpm-tools/simulator/internal
[   10s] vendor/github.com/google/go-tpm-tools/simulator/internal/internal_cgo.go:44:11: fatal error: Platform.h: No such file or directory
[   10s]    44 | // #include "Platform.h"
[   10s]       |           ^~~~~~~~~~~~
[   10s] compilation terminated.

I've fixed this by manually cloning v0.4.4 of go-tpm-tools and copying the simulator directory over to our vendor tarball. It seems as though a set of files are missed.

I'm not sure if this is the appropriate place but I've never encountered this issue before when packaging Go apps. Thanks!

Foxboron commented 1 month ago

Right, internal_cgo.go should call pkg-config or have some way to figure out the relative path of the vendor folder. I don't think this is a sbctl bug strictly speaking.