This PR contains the new Packaging Guidelines for vendored Golang packages following https://fedoraproject.org/wiki/Changes/GolangPackagesVendoredByDefault. An explicit goal of the guidelines revamp was to make them shorter and more explicit and avoid making them a stand in for proper documentation of Go Vendor Tools and the macros.
Most of the new stuff is guidelines surrounding licensing macros. I also added a section about compiler flags, because this was previously "tribal knowledge" that was not documented. Explanations of the macros used to generate golang-*-devel packages are removed. The walkthrough tutorial section and extensive documentation about the forge macro wrappers were moved to the go-rpm-macros project. They were considered redundant and not appropriate for a guidelines document.
The old Go macros are still the recommended approach to specify upstream source urls and unpack them, as this is what most Go packages already use and what go2rpm generates. But now that we rely on modules mode and more standard upstream tooling, it is again possible to create Guidelines-compliant Go packages without using them 🎉 — and this is also described.
I kept the old Golang guidelines in a separate document. We can remove them once the next phase of the Change proposal is completed and all packages have migrated over.
This PR contains the new Packaging Guidelines for vendored Golang packages following https://fedoraproject.org/wiki/Changes/GolangPackagesVendoredByDefault. An explicit goal of the guidelines revamp was to make them shorter and more explicit and avoid making them a stand in for proper documentation of Go Vendor Tools and the macros.
Most of the new stuff is guidelines surrounding licensing macros. I also added a section about compiler flags, because this was previously "tribal knowledge" that was not documented. Explanations of the macros used to generate
golang-*-develpackages are removed. The walkthrough tutorial section and extensive documentation about the forge macro wrappers were moved to the go-rpm-macros project. They were considered redundant and not appropriate for a guidelines document.The old Go macros are still the recommended approach to specify upstream source urls and unpack them, as this is what most Go packages already use and what go2rpm generates. But now that we rely on modules mode and more standard upstream tooling, it is again possible to create Guidelines-compliant Go packages without using them 🎉 — and this is also described.
I kept the old Golang guidelines in a separate document. We can remove them once the next phase of the Change proposal is completed and all packages have migrated over.
A preview is available at https://fedora.gitlab.io/sigs/go/packaging-guidelines-fork/packaging-guidelines/Golang/. I'll obviously remove the Gitlab CI configuration used to generate the preview before this is merged.