Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot]  [PATCH 0/8 RFC] Adding a Go package infrastructure
@ 2016-02-01 23:30 Ludovic Guegan
  2016-02-01 23:30 ` [Buildroot] [PATCH 1/8 RFC] package/golang: create Go 1.5 host compiler package Ludovic Guegan
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Ludovic Guegan @ 2016-02-01 23:30 UTC (permalink / raw)
  To: buildroot

Hi everyone,

I would like to have your feedbacks about this serie of patches which
experiments with Go packages.

There are two related issues when packaging Go programs:

1. The Go community have not come up with a prefered way to package Go
applications. Here is a quick overview of the situation:
https://github.com/golang/go/wiki/PackageManagementTools

2. Often Go packages have dependencies that are not well expressed
with Buildroot packages. For example, the go program
github.com/rapidloop/rtop depends on golang.org/x/crypto/ssh but not
on golang.org/x/crypto/ssh/terminal.

In this serie of patch, I experiment with gb (http://getgb.io) a tool
from Dave Cheney which focuses on reproducable builds.

Dependencies are expressed using a macro (fetch-golang-package) to
fetch them consistently. See patches 6 to 8 for examples.

The general idea is the following: GOPATH is set to $(@D) and the
dependencies are downloaded into $(@D)/vendor.

You may wonder, why using gb? Well, I found gb easy to use and mature
enough for the task. It is an implementation detail which is invisible
to golang-package .mk files.

If the direction is correct, i will continue to experiement with mixed
package that have Go code and Makefiles.

Patch 1 to 2
  Host packages needed to fetch and build Go packages.

Patch 3
  Allow custom extraction location.

Patch 4 and 5
  Introduce a golang-package infrastructure.

Patch 6 to 8
  Examples of golang-packages, just for illustration. 


Your feedback is highly appreciated!


Regards,

Ludovic


Ludovic Guegan (8):
  package/golang: create Go 1.5 host compiler package
  package/golang-gb: create gb package to build and fetch go packages
  package/pkg-generic.mk: allow custom extract directory
  package/pkg-golang.mk: infrastructure for Go packages
  docs/manual: documents the golang-package infrastructure
  package/rtop: add rtop package in Go
  package/embd: add embd package (embedded programming framework)
  package/bolt: add bolt package (persistent key-value store)

 docs/manual/adding-packages-generic.txt |   3 +
 docs/manual/adding-packages-golang.txt  |  73 +++++++++++++++
 package/Config.in                       |   3 +
 package/Config.in.host                  |   2 +
 package/Makefile.in                     |   1 +
 package/bolt/Config.in                  |   7 ++
 package/bolt/bolt.hash                  |   1 +
 package/bolt/bolt.mk                    |  13 +++
 package/embd/Config.in                  |   8 ++
 package/embd/embd.hash                  |   1 +
 package/embd/embd.mk                    |  16 ++++
 package/golang-gb/Config.in.host        |   8 ++
 package/golang-gb/golang-gb.mk          |  30 ++++++
 package/golang/Config.in.host           |   7 ++
 package/golang/golang.hash              |   2 +
 package/golang/golang.mk                |  72 +++++++++++++++
 package/pkg-generic.mk                  |  12 ++-
 package/pkg-golang.mk                   | 156 ++++++++++++++++++++++++++++++++
 package/rtop/Config.in                  |   8 ++
 package/rtop/rtop.hash                  |   1 +
 package/rtop/rtop.mk                    |  16 ++++
 support/scripts/pkg-stats               |  11 +++
 22 files changed, 449 insertions(+), 2 deletions(-)
 create mode 100644 docs/manual/adding-packages-golang.txt
 create mode 100644 package/bolt/Config.in
 create mode 100644 package/bolt/bolt.hash
 create mode 100644 package/bolt/bolt.mk
 create mode 100644 package/embd/Config.in
 create mode 100644 package/embd/embd.hash
 create mode 100644 package/embd/embd.mk
 create mode 100644 package/golang-gb/Config.in.host
 create mode 100644 package/golang-gb/golang-gb.mk
 create mode 100644 package/golang/Config.in.host
 create mode 100644 package/golang/golang.hash
 create mode 100644 package/golang/golang.mk
 create mode 100644 package/pkg-golang.mk
 create mode 100644 package/rtop/Config.in
 create mode 100644 package/rtop/rtop.hash
 create mode 100644 package/rtop/rtop.mk

-- 
2.7.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-06-01 20:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-01 23:30 [Buildroot] [PATCH 0/8 RFC] Adding a Go package infrastructure Ludovic Guegan
2016-02-01 23:30 ` [Buildroot] [PATCH 1/8 RFC] package/golang: create Go 1.5 host compiler package Ludovic Guegan
2016-02-01 23:30 ` [Buildroot] [PATCH 2/8 RFC] package/golang-gb: create gb package to build and fetch go packages Ludovic Guegan
2016-06-01 20:17   ` Thomas Petazzoni
2016-02-01 23:31 ` [Buildroot] [PATCH 3/8 RFC] package/pkg-generic.mk: allow custom extract directory Ludovic Guegan
2016-06-01 20:19   ` Thomas Petazzoni
2016-02-01 23:31 ` [Buildroot] [PATCH 4/8 RFC] package/pkg-golang.mk: infrastructure for Go packages Ludovic Guegan
2016-06-01 20:26   ` Thomas Petazzoni
2016-02-01 23:31 ` [Buildroot] [PATCH 5/8 RFC] docs/manual: documents the golang-package infrastructure Ludovic Guegan
2016-06-01 20:28   ` Thomas Petazzoni
2016-02-01 23:31 ` [Buildroot] [PATCH 6/8 RFC] package/rtop: add rtop package in Go Ludovic Guegan
2016-02-01 23:31 ` [Buildroot] [PATCH 7/8 RFC] package/embd: add embd package (embedded programming framework) Ludovic Guegan
2016-02-01 23:31 ` [Buildroot] [PATCH 8/8 RFC] package/bolt: add bolt package (persistent key-value store) Ludovic Guegan
2016-06-01 20:14 ` [Buildroot] [PATCH 0/8 RFC] Adding a Go package infrastructure Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox