https://bugzilla.redhat.com/show_bug.cgi?id=1770147
--- Comment #8 from Robert-André Mauchin zebob.m@gmail.com --- - To expand a bit, your Makefile only contains:
$(BINARY): $(SRCS) go build -o $@
while the %gobuild macro contains Fedora LDFLAGS and also provision for the debuginfo to be correctly generated:
# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12 %ifnarch ppc64 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,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x ; %else GO111MODULE=off \ go build -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,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x ; %endif
- You need to add:
BuildRequires: systemd-rpm-macros
for the SystemD scriptlet to work.
On older Fedora it was:
%{?systemd_requires} BuildRequires: systemd
(Not sure what your CI system is using)