From d63507ed08943eb12d9fde1dd24d0820a62bc89c Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Mon, 3 Feb 2020 09:23:09 -0500 Subject: [PATCH] no debuginfo for centos Signed-off-by: Lokesh Mandvekar --- skopeo.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/skopeo.spec b/skopeo.spec index 173ce72..dda14b1 100644 --- a/skopeo.spec +++ b/skopeo.spec @@ -3,10 +3,10 @@ %global with_unit_test 0 %global with_check 0 -%if 0%{?fedora} > 28 -%global with_debug 0 -%else +%if 0%{?fedora} %global with_debug 1 +%else +%global with_debug 0 %endif %if 0%{?with_debug} @@ -16,6 +16,10 @@ %global debug_package %{nil} %endif +%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 %{?**}; +%endif + %global provider github %global provider_tld com %global project containers