gofed / go-macros

Rpm mechanics for Go packaging
4 stars 7 forks source link

allow supplying additional -tags arguments to %gobuild #22

Closed decathorpe closed 6 years ago

decathorpe commented 6 years ago

At the moment, the -tags argument in the %gobuild macro is hard-coded to -tags=rpm_crashtraceback.

It would be nice to be able to supply additional tags, for example syncthing expects to be compiled with a noupgrade tag when built for distro packages.

Solving this with an additional GOTAGS environment variable (similarly to how LDFLAGS are read from the environment, too, if the variable is defined) would be easiest, I think.

ingvagabund commented 6 years ago

https://github.com/gofed/go-macros/commit/2988b6a24c32c4f10208f7cbac737b0d3ed71d6e

ingvagabund commented 6 years ago

Available in f27+ now as part of go-compilers-1-27.fc27, go-compilers-1-27.fc28 and go-compilers-1-27.fc29.

decathorpe commented 6 years ago

Thanks! I think I can now finally stop patching the upstream syncthing build system.

ingvagabund commented 6 years ago

@decathorpe lemme know if it works for you :)