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 <scott.little@windriver.com> Change-Id: Iffd5d335891fda513997171b41596b0c63d0f752
This commit is contained in:
parent
7592010c7a
commit
34102e753f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user