English Finnish
You SHOULD package releases in priority. Please reward the projects that make an effort to identify stable code states. Only fall back to commits when the project does not release, when the release is more than six months old, or if you absolutely need one of the changes of a later commit. In the later cases please inform the project politely of the reason you needed to give up on their official releases. Promoting releases is a way to limit incompatible commit hell.
Go Language Architectures
To compile on various architectures, golang and gcc-go compilers are available. The golang compiler currently supports x86, x86_64, ppc64le, ppc64 (partially, see upstream issue#13192), s390x, armv7hl and aarch64.
Binaries SHOULD set ExclusiveArch so that we only attempt to build packages on those arches. This is now automatically added by the `+%gometa+` macro by leveraging the `+%{go_arches}+` macro.
Packages MUST have `+BuildRequires: go-rpm-macros+`.
This is automated by the `+%gometa+` macro.
Automatic Dependency Generation
Most of the `+golang-*+` packages are source code only. The `+*-devel+` sub-package that includes the source code should explicitly have provides for the golang imports that it includes. These provides are automatically deduced from import paths.
Binary builds that include these imports will use them in BuildRequires, for example:
BuildRequires: golang(github.com/gorilla/context)
Bundled or unbundled
At the moment golang projects packaged in Fedora SHOULD be unbundled by default. It means projects are built from dependencies packaged in Fedora.
For some project it can be reasonable to build from bundled dependencies. Every bundling needs a proper justification.
The BuildRequires of the project contains the dependencies needed by unit tests and binaries.
You can gather them manually with `golist`. For example:[[manual_br]]
export GOPATH=/home/user/go
export goipath="github.com/sirupsen/logrus"
go get $goipath
(sort -u | xargs -I{} echo "BuildRequires: golang({})") <<< "$(
golist --imported --package-path $goipath --skip-self
golist --imported --package-path $goipath --skip-self --tests
BuildRequires: golang(github.com/stretchr/testify/assert)
BuildRequires: golang(github.com/stretchr/testify/require)
BuildRequires: golang(golang.org/x/crypto/ssh/terminal)