How do you package Go programs in DEB/RPM files

1,719 views
Skip to first unread message

Vasily Korytov

unread,
Aug 25, 2015, 4:19:14 AM8/25/15
to golang-nuts
Hello,

The question I would to ask from the community is: how do you build RPM/DEB packages of your Go programs.

Go provides a very strong cross-compilation environment, in fact on my workstation I'm able to prepare zipped binary builds.

But the case with Linux is that installing from a package manager is a more solid way to distribute your software.

What's the easiest way, that it's managed nowdays? OBS? Anything else?

Milan P. Stanic

unread,
Aug 25, 2015, 6:16:55 AM8/25/15
to golang-nuts
I don't know for RPM but for DEB you could read:
https://pkg-go.alioth.debian.org/packaging.html
and
https://people.debian.org/~stapelberg/2015/07/27/dh-make-golang.html

If you didn't read these already.

Tristan Colgate

unread,
Aug 25, 2015, 8:37:03 AM8/25/15
to Vasily Korytov, golang-nuts
Hi,
  GOPATH can make things a little tricky if you are trying to avoid any use of go get at build time. I've found it can be quite dependent on the original source repository (does it contain a full GOPAPTH?, or is it properly go-gettable). It can be a lot harder if you don't have any control.

  GoDinstall (https://github.com/tcolgate/godinstall/), includes debianing packaging, that was working last time I tried. For pragmatic reasons it go gets godep during the build, everything else comes from the vendored sources.

  If you aren't a full on debian packaging zealot, then just using fpm might be the best thing (https://github.com/jordansissel/fpm). 

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages