On Monday, 2 November 2020 22:45:09 CET Olivier Lemasle wrote:
I have two questions related to the packaging of Go modules.
1. When a new major version of a Go module is released, breaking backwards
compatibility, the module path should be changed .
According to the Golang Packaging Guidelines, it means updating the goipath
and renaming the package, right? goaltipaths is then set to the old import
Looking for examples of Go packages with such a transition, I found the
opposite: for example gotest.tools was updated to gotest.tools/v3, but
Fedora package golang-gotest  has the following in spec:
%global goipath gotest.tools
%global goaltipaths gotest.tools/v3
Shouldn't it be the opposite?
Yeah, but that imply to redo a review with a rename
Is it required for all Go Fedora packages to be renamed when a new
version is released? It will cause quite a burden if this require a review
request for every upgrade.
For the new package probably yes. For existing package, you could have the
current package bumped to the latest version, and do a compat package for old
versions if necessary.
2. What should be done for multi-module repositories ?
These repositories contain multiple Go modules (each one with its go.mod);
tags are created for each module (with the form path/version).
An example of such a multi-modules repository is
which contains 3 modules;
> - github.com/moby/sys/mount
> - github.com/moby/sys/mountinfo
> - github.com/moby/sys/symlink
For now we don't handle modules. So package the top repo?
I'd like nim advice on this though.
Tags are created for each module ; each module has a different
Current Fedora package golang-github-moby-sys  package it like any other
Go package, but tags do not follow monotonically increasing versions.
I suppose it could be possible to version such a package as if there was no
tagged release (so Version: 0, and git hash in release number).
But it seems perhaps more logical to have a Fedora package for each Go
in the repository, as a project may depend on each module with a
> different version...
> Olivier Lemasle
> FAS: olem
>  https://blog.golang.org/v2-go-modules
>  https://src.fedoraproject.org/rpms/golang-gotest
>  https://github.com/moby/sys/tags
>  https://src.fedoraproject.org/rpms/golang-github-moby-sys
> golang mailing list -- golang(a)lists.fedoraproject.org
> To unsubscribe send an email to golang-leave(a)lists.fedoraproject.org
> Fedora Code of Conduct:
> Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines