[Fedora-packaging] Packaging Go libraries for Fedora
Richard W.M. Jones
rjones at redhat.com
Mon Jul 1 13:39:11 UTC 2013
(The same topic came up on this list about a month ago, with no
Fedora 18+ now has a proper Go compiler, and if you get the
version in updates-testing, it's even a working Go compiler :-)
Go seems to have a "unique" approach to packaging libraries. It looks
as if everything revolves around there being a Go compiler + lots of
bundled libraries that come with that Go compiler. On Fedora this
gets installed into %_libdir/golang.
But for libraries that aren't bundled with the Go compiler, it looks
like the Go designers intended you to keep them in your home directory:
This is of course not so great from a packaging/security/updates
point of view.
Now as far as I can tell, we can just ignore the $GOPATH stuff, and
instead drop files into the right places in %_libdir/golang. It works
in my single, limited experiment, but I've no idea if this is the
Right Thing to do.
I think we should leave the $GOPATH environment variable alone. If
users want to install things in their home directory too, they can set
up $GOPATH and the directory structure themselves.
Thoughts on this? (especially from anyone who knows what they're
talking about, which is not necessarily me ...)
I have a small cgo library which I'd like to package for Fedora, so
this discussion is not entirely theoretical.
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
More information about the packaging