From c611e633ef181a50a6254d3c01b9309411249587 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Tue, 2 Apr 2024 10:43:30 +0000 Subject: [PATCH] app-admin/google-guest-agent: Depend on coreos-go for x-compile support Signed-off-by: Jeremi Piotrowski --- .../google-guest-agent-20240314.00.ebuild | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/google-guest-agent/google-guest-agent-20240314.00.ebuild b/sdk_container/src/third_party/coreos-overlay/app-admin/google-guest-agent/google-guest-agent-20240314.00.ebuild index c3cf46b3ee..03f8c986f7 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/google-guest-agent/google-guest-agent-20240314.00.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/google-guest-agent/google-guest-agent-20240314.00.ebuild @@ -12,7 +12,9 @@ # EAPI=7 -inherit go-module systemd +# Flatcar: inherit coreos-go-depend +COREOS_GO_VERSION=go1.21 +inherit coreos-go-depend go-module systemd DESCRIPTION="Google Guest Agent" HOMEPAGE="https://github.com/GoogleCloudPlatform/guest-agent" @@ -35,15 +37,22 @@ PATCHES=( "${FILESDIR}/20231016.00-create-hostkey-and-instanceID-dirs.patch" ) +# Flatcar: export GO variables +src_prepare() { + go_export + default +} + src_compile() { export GOTRACEBACK="crash" - GO=$(tc-getGO) pushd google_guest_agent || die - CGO_ENABLED=0 ${GO} build -ldflags="-s -w -X main.version=${PV}" \ + # Flatcar: switch to EGO + CGO_ENABLED=0 ${EGO} build -ldflags="-s -w -X main.version=${PV}" \ -mod=readonly || die popd || die pushd google_metadata_script_runner || die - CGO_ENABLED=0 ${GO} build -ldflags="-s -w -X main.version=${PV}" \ + # Flatcar: switch to EGO + CGO_ENABLED=0 ${EGO} build -ldflags="-s -w -X main.version=${PV}" \ -mod=readonly || die popd || die }