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

Iru Cai mytbk920423 at gmail.com
Wed Mar 8 16:13:59 UTC 2017


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'.

However, I don't think it a good practice. I'm used to the way of
installing the dependency packages first, then install the target package.
Python packages are packaged this way. On the other hand, go packages has
its features. Go programs are compiled to a single binary that do not link
to other go libraries, so they doesn't depend on other go packages.

I also read the Debian Go Packaging document (
https://pkg-go.alioth.debian.org/packaging.html), but I still don't know
when and why we need to make a go package.

I'm also confused when I see node.js packages. I see many of the packages
are built using just an `npm install' so the packaging process will pull a
lot of code, but I think it's better than that in go because the node.js
packages are installed in the user home so that it won't be installed again
when another node.js package needs the same dependency.

Thanks,
Iru

-- 
Please do not send me Microsoft Office/Apple iWork documents. Send
OpenDocument instead! http://fsf.org/campaigns/opendocument/


More information about the arch-general mailing list