diff --git a/skopeo.spec b/skopeo.spec index a4862fb40f4f749929c8a5413f13977427a0c678..ac1e06e8587ba13643996b994bde22728e0e9b74 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