[arch-general] What's the best way of packaging golang packages?

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Tue Mar 21 10:14:33 UTC 2017


On 2017-03-08 17:13, Iru Cai via arch-general wrote:
> Hi,
> 
> I'm not familiar with go, but I'm trying to use some go programs, caddy for
> example. I read the PKGBUILD of it. It first use `go get' to get the
> dependencies and then do the `go build'.

Yes, that's a bad practice, and the fact that devtools allow network
access during build doesn't help.

How Debian and Fedora handles it (and we should too) is packaging source
code that is later being used by the compiler. Semi-example of that can
be found in go-tools[1] package, except golang.org/x/net should be
effectively a standalone package and a make dependency.

The other way is asking upstream to vendor their dependencies in git
repository so we don't need to handle it at all.

Bartłomiej

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 525 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20170321/4dddf913/attachment.asc>


More information about the arch-general mailing list