#22 rpm/macros.d: Make disabling Go modules configurable for %gobuild and %gotest
Merged by ngompa. Opened by ngompa.
ngompa/go-rpm-macros add-gomodules-mode-configuration  into  master

Download 22.patch

Having this unconditionally disabled without some way to change it
causes more heartache for downstream users than necessary.

It doesn't hurt to make it default to disable it while providing a
way for downstream users who need the Go module features (e.g. in COPR)
to be able to use them.

I know we have this flag set elsewhere in our macros, but I'm not sure how to make that a control everywhere. Moreover, I really only need it for %gobuild and %gotest...

rebased onto 57c70068bc04eede3a3f579bd065945e36b31ebd

@ngompa: please stay coherent with the exising macros and do not use __ prefixing

Apart from that, why not, but enabling modules will break things right and left, so it’s a fire yourself in the foot setting

(go commands will start downloading right and left, go packahe naming resolution will fail because modules have special rules for versions in the import path, etc)

rebased onto df8452a5df762d8df1e871a103bc05a58c24cb8d

(go commands will start downloading right and left, go packahe naming resolution will fail because modules have special rules for versions in the import path, etc)

I'm aware of this, but if I'm only using %gobuild and %gotest in a package build that allows downloads and such (or has vendored modules), it should be fine.

@ngompa: please stay coherent with the exising macros and do not use __ prefixing

I dropped the prefix.

Pull-Request has been merged by ngompa

Metadata