DevHeads.net

New Go Packaging Guidelines landed in rawhide (koji) today

Hi,

Fedora’s new Go packaging macros landed in rawhide (koji) today.

The corresponding Fedora Go packaging conventions are therefore
EFFECTIVE for new rawhide builds. For the first time in Fedora’s
history, we will be able to perform Go package builds conforming to an
approved Fedora Packaging Guideline.

Packaging documentation:
<a href="https://eclipseo.fedorapeople.org/guidelines/packaging-guidelines/Golang/" title="https://eclipseo.fedorapeople.org/guidelines/packaging-guidelines/Golang/">https://eclipseo.fedorapeople.org/guidelines/packaging-guidelines/Golang/</a>
and approval: <a href="https://pagure.io/packaging-committee/issue/382" title="https://pagure.io/packaging-committee/issue/382">https://pagure.io/packaging-committee/issue/382</a>
The go-rpm-templates package provides more complete info.

F31 change page:
<a href="https://fedoraproject.org/wiki/Changes/Adopt_new_Go_Packaging_Guidelines" title="https://fedoraproject.org/wiki/Changes/Adopt_new_Go_Packaging_Guidelines">https://fedoraproject.org/wiki/Changes/Adopt_new_Go_Packaging_Guidelines</a>
and approval: <a href="https://pagure.io/fesco/issue/2120" title="https://pagure.io/fesco/issue/2120">https://pagure.io/fesco/issue/2120</a>

While the guidelines will feel familiar to anyone who created a Fedora
Go packages in the last two years, they DO include a backwards-
incompatible change. Making GOPATH manipulation robust required moving
the corresponding logic to %prep with a new %goprep macro.

Therefore, existing specs are expected to fail without the addition of
the %goprep call.

This is of course not the end of the road, just a key step.

It opens the way to a mass cleanup and refresh of the Fedora Go stack.
<a href="https://pagure.io/packaging-committee/issue/901" title="https://pagure.io/packaging-committee/issue/901">https://pagure.io/packaging-committee/issue/901</a>

A preview of this refresh is available here:
<a href="https://copr.fedorainfracloud.org/coprs/eclipseo/golang-ng/builds/" title="https://copr.fedorainfracloud.org/coprs/eclipseo/golang-ng/builds/">https://copr.fedorainfracloud.org/coprs/eclipseo/golang-ng/builds/</a>

Enormous thanks to
– Robert-André Mauchin (eclipseo) for the gigantic work done reviewing
updating and cleaning-up all those packages, and to
– Elliott Sales de Andrade (Qulogic), that picked up maintenance of
golist and fixed many of its long-standing bugs and limitations.

Many thanks to the mock, rpm and redhat-rpm-config maintainers,
that integrated the changes, we built upon (Igor Gnatenko, Florian
Festi, Miroslav Suchý, Panu Matilainen)

The macro set supports Go DynamicBuildRequires
<a href="https://fedoraproject.org/wiki/Changes/DynamicBuildRequires" title="https://fedoraproject.org/wiki/Changes/DynamicBuildRequires">https://fedoraproject.org/wiki/Changes/DynamicBuildRequires</a>

They will be usable in mock as soon as rpm 4.15 lands
<a href="https://fedoraproject.org/wiki/Changes/RPM-4.15" title="https://fedoraproject.org/wiki/Changes/RPM-4.15">https://fedoraproject.org/wiki/Changes/RPM-4.15</a>

Use in koji or copr will have to wait for the corresponding refresh
buldsystem-side. So this part of the change is a technology preview for
now.

Best regards,