summaryrefslogtreecommitdiff
path: root/google-guest-agent.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-03-20 09:40:01 +0000
committerCoprDistGit <infra@openeuler.org>2026-03-20 09:40:01 +0000
commitf266752373f3cbcb8843f36616ead52367cd14ee (patch)
tree4206804feb7572e0ed9a085f4377613d9c5a8d48 /google-guest-agent.spec
parent36dcaaba9a1106adea160479eaae523f92a96776 (diff)
automatic import of google-guest-agent
Diffstat (limited to 'google-guest-agent.spec')
-rw-r--r--google-guest-agent.spec11
1 files changed, 7 insertions, 4 deletions
diff --git a/google-guest-agent.spec b/google-guest-agent.spec
index c1a4e77..ddef508 100644
--- a/google-guest-agent.spec
+++ b/google-guest-agent.spec
@@ -21,7 +21,7 @@
%endif
%define _version 20260309.00
-%define _go /usr/bin/go
+%define _go /usr/local/go/bin/go
%define _gopath /tmp
Name: google-guest-agent
@@ -44,7 +44,7 @@ BuildArch: %{_arch}
BuildRequires: systemd
%endif
-BuildRequires: go
+BuildRequires: curl
Obsoletes: python-google-compute-engine, python3-google-compute-engine
@@ -52,6 +52,10 @@ Obsoletes: python-google-compute-engine, python3-google-compute-engine
Contains the Google guest agent binary.
%prep
+curl -L -o /tmp/go.tar.gz https://go.dev/dl/go1.25.0.linux-amd64.tar.gz
+rm -rf /usr/local/go
+tar -C /usr/local -xzf /tmp/go.tar.gz
+rm -f /tmp/go.tar.gz
%if 0%{?build_plugin_manager}
%autosetup -a 1
@@ -59,9 +63,8 @@ Contains the Google guest agent binary.
%autosetup
%endif
-find . -name "go.mod" -exec sed -i 's/^go 1\.[0-9]\+$/go 1.21/' {} \;
-
%build
+export GOROOT=/usr/local/go
export GOPROXY=https://goproxy.cn,direct
export GOSUMDB=sum.golang.org