From 52bc253a7dc783d171b52e66da4aed6881518d1e Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 23 Sep 2024 15:29:35 +0000 Subject: [PATCH] Enable debuginfo This allows the bundled golist binary to be debugged. Resolves: RHEL-38521 --- go-rpm-macros.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go-rpm-macros.spec b/go-rpm-macros.spec index 22ddb11..ec90151 100644 --- a/go-rpm-macros.spec +++ b/go-rpm-macros.spec @@ -27,14 +27,14 @@ Version: 3.6.0 %global golist_version 0.10.4 %if 0%{?bundle_golist} -# do not create debuginfo packages when we add a build section -%global debug_package %{nil} %global golist_builddir golist-%{golist_version} %global golist_goipath pagure.io/golist # where to bundle the golist executable %global golist_execdir %{_libexecdir}/go-rpm-macros # define gobuild to avoid this package requiring itself to build -%define gobuild(o:) GO111MODULE=on go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '${LDFLAGS:-} '" -a -v %{?**}; +%undefine _auto_set_build_flags +%global _dwz_low_mem_die_limit 0 +%define gobuild(o:) GO111MODULE=on go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -v -x -ldflags "${GO_LDFLAGS-${LDFLAGS-}} -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) -compressdwarf=false -linkmode=external -extldflags '%{build_ldflags}'" %{?**}; %else %global debug_package %{nil} %endif