diff --git a/containerd.spec b/containerd.spec index 95c152c9b805e8cee4db6f07704134be8efac5ef..dedba20944b2c5b84958a3ad63ac01cde302280f 100644 --- a/containerd.spec +++ b/containerd.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 # Generated by go2rpm # arm support not fully implemented: not implemented %ifnarch %{arm} @@ -40,7 +40,11 @@ export GO111MODULE=auto } %define gobuild(o:) %{expand: %global _dwz_low_mem_die_limit 0 +%ifarch loongarch64 +go build -mod=mod -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x %{?**}; +%else go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x %{?**}; +%endif } Name: %{goname} @@ -88,6 +92,14 @@ rm -rf cmd/protoc-gen-gogoctrd %gobuildroot export LDFLAGS="-X %{goipath}/version.Version=%{version}" export BUILDTAGS="no_btrfs" +go env -w GOPROXY=https://goproxy.cn,direct +%ifarch loongarch64 +go get -u golang.org/x/sys +go get -u golang.org/x/net +go get -u go.etcd.io/bbolt +go mod tidy +go mod vendor +%endif for cmd in cmd/* ; do %gobuild -o _bin/$(basename $cmd) %{goipath}/$cmd done @@ -140,6 +152,9 @@ install -D -p -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/containerd/config.toml %{_bindir}/containerd-stress %changelog +* Tue Jun 4 2024 Wenlong Zhang - 1.5.9-2 +- fix build error for loongarch64 + * Fri May 27 2022 Zhongling He - 1.5.9-1 - Update to containerd v1.5.9