Merge "Modify go package to be compatible with golang 1.16.6"
This commit is contained in:
commit
829a3ad6ed
@ -25,7 +25,11 @@ URL: https://github.com/helm/chartmuseum
|
|||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
BuildRequires: pkgconfig(libseccomp)
|
BuildRequires: pkgconfig(libseccomp)
|
||||||
BuildRequires: pkgconfig(libsystemd-journal)
|
BuildRequires: pkgconfig(libsystemd-journal)
|
||||||
BuildRequires: golang >= 1.10.0
|
|
||||||
|
# Build with our own prefered golang, not 1.11 from CentOS
|
||||||
|
# BuildRequires: golang >= 1.10.0
|
||||||
|
BuildRequires: golang >= 1.13.0
|
||||||
|
|
||||||
BuildRequires: rsync
|
BuildRequires: rsync
|
||||||
BuildRequires: go-md2man
|
BuildRequires: go-md2man
|
||||||
BuildRequires: go-bindata
|
BuildRequires: go-bindata
|
||||||
|
@ -20,7 +20,11 @@ Packager: StarlingX
|
|||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
BuildRequires: pkgconfig(libseccomp)
|
BuildRequires: pkgconfig(libseccomp)
|
||||||
BuildRequires: pkgconfig(libsystemd-journal)
|
BuildRequires: pkgconfig(libsystemd-journal)
|
||||||
BuildRequires: golang >= 1.12.16
|
|
||||||
|
# Build with our own prefered golang
|
||||||
|
# BuildRequires: golang >= 1.12.16
|
||||||
|
BuildRequires: golang >= 1.13
|
||||||
|
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
BuildRequires: rsync
|
BuildRequires: rsync
|
||||||
BuildRequires: go-md2man
|
BuildRequires: go-md2man
|
||||||
@ -60,6 +64,7 @@ rm -rf %{CONTAINERD_DIR}
|
|||||||
mkdir -p %{CONTAINERD_DIR}
|
mkdir -p %{CONTAINERD_DIR}
|
||||||
cp -a %{_builddir}/src/containerd/* %{CONTAINERD_DIR}/
|
cp -a %{_builddir}/src/containerd/* %{CONTAINERD_DIR}/
|
||||||
pushd %{CONTAINERD_DIR}
|
pushd %{CONTAINERD_DIR}
|
||||||
|
go env -w GO111MODULE=auto
|
||||||
make
|
make
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -52,8 +52,11 @@ Obsoletes: docker-registry <= 0.9.1-5
|
|||||||
|
|
||||||
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
|
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
|
||||||
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
|
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
|
||||||
|
|
||||||
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
|
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
|
||||||
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
# Build with our own prefered golang, not 1.11 from CentOS
|
||||||
|
# BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
||||||
|
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang >= 1.13}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{summary}
|
%{summary}
|
||||||
@ -223,6 +226,7 @@ sed -i 's/elliptic.P224(), //' vendor/golang.org/x/crypto/ocsp/ocsp.go
|
|||||||
mkdir -p src/github.com/%{project}
|
mkdir -p src/github.com/%{project}
|
||||||
ln -s ../../../ src/%{import_path}
|
ln -s ../../../ src/%{import_path}
|
||||||
export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath}
|
export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath}
|
||||||
|
go env -w GO111MODULE=auto
|
||||||
%gobuild -o bin/registry %{import_path}/cmd/registry
|
%gobuild -o bin/registry %{import_path}/cmd/registry
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
@ -34,8 +34,11 @@ Source2: %{system_name}.conf
|
|||||||
|
|
||||||
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
|
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
|
||||||
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:x86_64 aarch64 ppc64le s390x}
|
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:x86_64 aarch64 ppc64le s390x}
|
||||||
|
|
||||||
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
|
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
|
||||||
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
# Build with our own prefered golang, not 1.11 from CentOS
|
||||||
|
# BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
||||||
|
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang >= 1.13}
|
||||||
|
|
||||||
Obsoletes: etcd3 < 3.0.15
|
Obsoletes: etcd3 < 3.0.15
|
||||||
Provides: etcd3 = %{version}-%{release}
|
Provides: etcd3 = %{version}-%{release}
|
||||||
@ -64,6 +67,7 @@ mkdir -p src/github.com/coreos
|
|||||||
ln -s ../../../ src/github.com/coreos/etcd
|
ln -s ../../../ src/github.com/coreos/etcd
|
||||||
|
|
||||||
export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath}
|
export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath}
|
||||||
|
go env -w GO111MODULE=auto
|
||||||
|
|
||||||
export LDFLAGS="-X %{import_path}/version.GitSHA=%{shortcommit} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')"
|
export LDFLAGS="-X %{import_path}/version.GitSHA=%{shortcommit} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')"
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@
|
|||||||
%global kube_version 1.18.1
|
%global kube_version 1.18.1
|
||||||
%global kube_git_version v%{kube_version}
|
%global kube_git_version v%{kube_version}
|
||||||
|
|
||||||
|
%global go_version 1.13.9
|
||||||
|
%global go_path /usr/lib/golang-%{go_version}-%{go_version}/bin
|
||||||
|
|
||||||
# Needed otherwise "version_ldflags=$(kube::version_ldflags)" doesn't work
|
# Needed otherwise "version_ldflags=$(kube::version_ldflags)" doesn't work
|
||||||
%global _buildshell /bin/bash
|
%global _buildshell /bin/bash
|
||||||
%global _checkshell /bin/bash
|
%global _checkshell /bin/bash
|
||||||
@ -765,7 +768,7 @@ building other packages which use %{project}/%{repo}.
|
|||||||
Summary: %{summary} - for running unit tests
|
Summary: %{summary} - for running unit tests
|
||||||
|
|
||||||
# below Rs used for testing
|
# below Rs used for testing
|
||||||
Requires: golang >= 1.13.4
|
Requires: golang-%{go_version}
|
||||||
Requires: etcd >= 2.0.9
|
Requires: etcd >= 2.0.9
|
||||||
Requires: hostname
|
Requires: hostname
|
||||||
Requires: rsync
|
Requires: rsync
|
||||||
@ -778,7 +781,8 @@ Requires: NetworkManager
|
|||||||
%package master
|
%package master
|
||||||
Summary: Kubernetes services for master host
|
Summary: Kubernetes services for master host
|
||||||
|
|
||||||
BuildRequires: golang >= 1.13.4
|
# Build with the recommended golang for this Kubernetes version
|
||||||
|
BuildRequires: golang-%{go_version}
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
BuildRequires: rsync
|
BuildRequires: rsync
|
||||||
BuildRequires: go-md2man
|
BuildRequires: go-md2man
|
||||||
@ -802,7 +806,7 @@ Requires: docker-ce
|
|||||||
%endif
|
%endif
|
||||||
Requires: conntrack-tools
|
Requires: conntrack-tools
|
||||||
|
|
||||||
BuildRequires: golang >= 1.13.4
|
BuildRequires: golang-%{go_version}
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
BuildRequires: rsync
|
BuildRequires: rsync
|
||||||
BuildRequires: go-md2man
|
BuildRequires: go-md2man
|
||||||
@ -828,7 +832,7 @@ Kubernetes tool for standing up clusters
|
|||||||
%package client
|
%package client
|
||||||
Summary: Kubernetes client tools
|
Summary: Kubernetes client tools
|
||||||
|
|
||||||
BuildRequires: golang >= 1.13.4
|
BuildRequires: golang-%{go_version}
|
||||||
BuildRequires: go-bindata
|
BuildRequires: go-bindata
|
||||||
|
|
||||||
%description client
|
%description client
|
||||||
@ -873,6 +877,7 @@ mv $(ls | grep -v "^src$") src/k8s.io/kubernetes/.
|
|||||||
###############
|
###############
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
export PATH=%{go_path}:$PATH
|
||||||
export PBR_VERSION=%{version}
|
export PBR_VERSION=%{version}
|
||||||
pushd src/k8s.io/kubernetes/
|
pushd src/k8s.io/kubernetes/
|
||||||
export KUBE_GIT_TREE_STATE="clean"
|
export KUBE_GIT_TREE_STATE="clean"
|
||||||
@ -880,6 +885,9 @@ export KUBE_GIT_COMMIT=%{commit}
|
|||||||
export KUBE_GIT_VERSION=%{kube_git_version}
|
export KUBE_GIT_VERSION=%{kube_git_version}
|
||||||
export KUBE_EXTRA_GOPATH=$(pwd)/Godeps/_workspace
|
export KUBE_EXTRA_GOPATH=$(pwd)/Godeps/_workspace
|
||||||
|
|
||||||
|
# Verify the go version we will build against
|
||||||
|
go version
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1392922#c1
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1392922#c1
|
||||||
%ifarch ppc64le
|
%ifarch ppc64le
|
||||||
export GOLDFLAGS='-linkmode=external'
|
export GOLDFLAGS='-linkmode=external'
|
||||||
|
@ -14,7 +14,10 @@ URL: unknown
|
|||||||
BuildArch: x86_64
|
BuildArch: x86_64
|
||||||
Source: %name-%version.tar.gz
|
Source: %name-%version.tar.gz
|
||||||
|
|
||||||
BuildRequires: golang
|
# Build with our own prefered golang, not 1.11 from CentOS
|
||||||
|
# BuildRequires: golang
|
||||||
|
BuildRequires: golang >= 1.13
|
||||||
|
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
Requires: kubernetes-node
|
Requires: kubernetes-node
|
||||||
Summary: Kubernetes device plugin for isolcpus
|
Summary: Kubernetes device plugin for isolcpus
|
||||||
|
Loading…
Reference in New Issue
Block a user