From b57f87fb9ae514a2c0bf0825d8c410af48b05b3f Mon Sep 17 00:00:00 2001 From: Maximilian Brune Date: Tue, 12 Sep 2023 16:20:17 +0200 Subject: [PATCH] sbom/Makefile.inc: Change GOPATH This changes the path where go installs its packages. Now the packages are not installed in the users home directory anymore. This solution is not perfect though, since offline build are still not possible, because go will fetch the packages at build time. -modcacherw will create the go files with rw permissions, otherwise coreboot is not able to delete the files afterwards (make distclean). Signed-off-by: Maximilian Brune Change-Id: I2a35369628454057ea4758cd1225e57f07cb71c8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77780 Tested-by: build bot (Jenkins) Reviewed-by: Martin L Roth --- src/sbom/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbom/Makefile.inc b/src/sbom/Makefile.inc index 21e2fa4e18..7783f092c3 100644 --- a/src/sbom/Makefile.inc +++ b/src/sbom/Makefile.inc @@ -99,7 +99,7 @@ $(build-dir): $(build-dir)/goswid: | $(build-dir) echo " SBOM building goswid tool" cd util/goswid; \ - GO111MODULE=on go build -o $(abspath $@) ./cmd/goswid + GOPATH=$(abspath build/go) GO111MODULE=on go build -modcacherw -o $(abspath $@) ./cmd/goswid ## Generate all .json files