From 34102e753f32727e9845b865ee6e5ccca9cbf698 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Tue, 10 Aug 2021 11:04:57 -0400 Subject: [PATCH] Make build of registry_token_server compatible with golang 1.16.6 Most packages will compile using the new default golang version (1.16.6). For some packages it is a transparent change, but those reliant on the old GOPATH method require the addition of ... go env -w GO111MODULE=auto ... to their build instruction to restore GOPATH compatibility. Story: 2008972 Task: 42984 Depends-On: https://review.opendev.org/c/starlingx/compile/+/804123 Signed-off-by: Scott Little Change-Id: Iffd5d335891fda513997171b41596b0c63d0f752 --- registry-token-server/centos/registry-token-server.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/registry-token-server/centos/registry-token-server.spec b/registry-token-server/centos/registry-token-server.spec index ea45205..c0d2135 100644 --- a/registry-token-server/centos/registry-token-server.spec +++ b/registry-token-server/centos/registry-token-server.spec @@ -23,7 +23,9 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -BuildRequires: golang >= 1.6 +# Build with our own prefered golang, not 1.11 from CentOS +# BuildRequires: golang >= 1.6 +BuildRequires: golang >= 1.13 ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}} %description @@ -48,6 +50,7 @@ mkdir -p _build/src/github.com/gophercloud && mv gophercloud-gophercloud _build/ mkdir -p ./_build/src/ ln -s $(pwd) ./_build/src/registry-token-server export GOPATH=$(pwd)/_build:%{gopath} +go env -w GO111MODULE=auto cd ./_build/src/registry-token-server %gobuild -o bin/registry-token-server registry-token-server