SPEC: unconditionally undefine gomodulesmode

Unconditionally undefine `gomodulesmode` rpm macro, which by default
disables the Go modules information in the binary. It used to be defined
only on Fedora, but it is now defined on RHEL.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2025-02-12 08:32:31 +01:00 committed by Tomáš Hozza
parent 25e8bb1202
commit 758870fb15

View file

@ -85,11 +85,10 @@ export PATH=$PWD/_bin${PATH:+:$PATH}
export GOPATH=$GO_BUILD_PATH:%{gopath}
export GOFLAGS+=" -mod=vendor"
%endif
%if 0%{?fedora}
# Fedora disables Go modules by default, but we want to use them.
# Undefine the macro which disables it to use the default behavior.
# Fedora and RHEL versions disable Go modules by default, but we want to use them.
# Unconditionally undefine the macro which disables it to use the default behavior.
%undefine gomodulesmode
%endif
# btrfs-progs-devel is not available on RHEL
%if 0%{?rhel}