diff --git a/osbuild-composer.spec b/osbuild-composer.spec index 5a412af1d..96be53b58 100644 --- a/osbuild-composer.spec +++ b/osbuild-composer.spec @@ -78,6 +78,11 @@ 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. +%undefine gomodulesmode +%endif # Set the commit hash so that composer can report what source version # was used to build it. This has to be set explicitly when calling rpmbuild,