Foxboron / sbctl

:computer: :lock: :key: Secure Boot key manager
MIT License
1.51k stars 87 forks source link

Failing test from vendored go #343

Open photosheep opened 4 months ago

photosheep commented 4 months 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 4 months 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.