From 5e2ae296c5783e8bebc1da17813fcc93eec6b4cd Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Mon, 14 Nov 2022 11:24:14 +0800 Subject: [PATCH] spec: support loongarch64 --- skopeo.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/skopeo.spec b/skopeo.spec index a4862fb..ac1e06e 100644 --- a/skopeo.spec +++ b/skopeo.spec @@ -1,10 +1,15 @@ +%define anolis_release .0.1 %global with_check 0 +%ifnarch loongarch64 +%define pie_mode -buildmode pie +%endif + %if 0%{?rhel} > 7 && ! 0%{?fedora} %define gobuild(o:) \ -go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**}; +go build %{?!pie_mode} -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**}; %else -%define gobuild(o:) GO111MODULE=off 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 '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v %{?**}; +%define gobuild(o:) GO111MODULE=off go build %{?!pie_mode} -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v %{?**}; %endif %global import_path github.com/containers/%{name} @@ -15,7 +20,7 @@ go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl Epoch: 2 Name: skopeo Version: 1.9.1 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} Summary: Inspect container images and repositories on registries License: ASL 2.0 URL: https://%{import_path} @@ -121,6 +126,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %{_datadir}/%{name}/test %changelog +* Mon Nov 14 2022 Liwei Ge - 2:1.9.1-1.0.1 +- Support loongarch64 platform + * Wed Jul 27 2022 Jindrich Novy - 2:1.9.1-1 - update to https://github.com/containers/skopeo/releases/tag/v1.9.1 - Related: #2061390 -- Gitee