diff --git a/oci-seccomp-bpf-hook.spec b/oci-seccomp-bpf-hook.spec index e81e3f9..d46dcc4 100644 --- a/oci-seccomp-bpf-hook.spec +++ b/oci-seccomp-bpf-hook.spec @@ -1,22 +1,17 @@ -%global with_devel 0 -%global with_bundled 1 -%global with_debug 1 %global with_check 0 -%global with_unit_test 0 -%if 0%{?with_debug} %global _find_debuginfo_dwz_opts %{nil} %global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif + +# https://bugzilla.redhat.com/show_bug.cgi?id=1904567 +%global _lto_cflags %%{nil} %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 -x %{?**}; +go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**}; %else %if ! 0%{?gobuild:1} -%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 -x %{?**}; +%define gobuild(o:) GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -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 %endif @@ -29,12 +24,12 @@ go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl %global import_path %{provider_prefix} %global git0 https://%{provider}.%{provider_tld}/%{project}/%{repo} -# use the same arch definitions as present in the bcc package -ExclusiveArch: x86_64 %{power64} aarch64 s390x armv7hl +# https://fedoraproject.org/wiki/PackagingDrafts/Go#Go_Language_Architectures +ExclusiveArch: %{go_arches} Name: oci-seccomp-bpf-hook Version: 1.2.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: OCI Hook to generate seccomp json files based on EBF syscalls used by container License: ASL 2.0 URL: %{git0} @@ -87,7 +82,7 @@ popd %{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} GOMD2MAN=go-md2man -C docs install-nobuild %check -%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel} +%if 0%{?with_check} # Since we aren't packaging up the vendor directory we need to link # back to it somehow. Hack it up so that we can add the vendor # directory from BUILD dir as a gopath to be searched when executing @@ -115,6 +110,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %{_mandir}/man1/%{name}.1* %changelog +* Tue Dec 08 2020 Jindrich Novy - 1.2.0-5 +- use go_arches macro + * Fri Oct 02 2020 Jindrich Novy - 1.2.0-4 - use the same arch definitions as present in the bcc package diff --git a/sources b/sources index 4632587..92f5ee6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v1.2.0.tar.gz) = 9d686380bd250278b038660fa13085801396493bcfd71754d943840ad9af47f6206c33515b4a876460c67e8e2092fe22493d1c64acafff9d24585cb713c0b888 +29d8b671edb3cb74f821f60f3b9ea3d1 v1.2.0.tar.gz