Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/8 RFC] package/golang-gb: create gb package to build and fetch go packages
Date: Wed, 1 Jun 2016 22:17:59 +0200	[thread overview]
Message-ID: <20160601221759.0578c1a2@free-electrons.com> (raw)
In-Reply-To: <1454369465-4804-3-git-send-email-ludovic.guegan@gmail.com>

Hello,

On Tue,  2 Feb 2016 00:30:59 +0100, Ludovic Guegan wrote:
> Signed-off-by: Ludovic Guegan <ludovic.guegan@gmail.com>
> ---
>  package/Config.in.host           |  1 +
>  package/golang-gb/Config.in.host |  8 ++++++++
>  package/golang-gb/golang-gb.mk   | 30 ++++++++++++++++++++++++++++++
>  3 files changed, 39 insertions(+)
>  create mode 100644 package/golang-gb/Config.in.host
>  create mode 100644 package/golang-gb/golang-gb.mk
> 
> diff --git a/package/Config.in.host b/package/Config.in.host
> index 0625bd0..2d99d37 100644
> --- a/package/Config.in.host
> +++ b/package/Config.in.host
> @@ -13,6 +13,7 @@ menu "Host utilities"
>  	source "package/genimage/Config.in.host"
>  	source "package/genpart/Config.in.host"
>  	source "package/golang/Config.in.host"
> +	source "package/golang-gb/Config.in.host"
>  	source "package/gptfdisk/Config.in.host"
>  	source "package/imx-usb-loader/Config.in.host"
>  	source "package/jq/Config.in.host"
> diff --git a/package/golang-gb/Config.in.host b/package/golang-gb/Config.in.host
> new file mode 100644
> index 0000000..b84a83f
> --- /dev/null
> +++ b/package/golang-gb/Config.in.host
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_HOST_GOLANG_GB
> +	bool "golang-gb"
> +	depends on BR2_PACKAGE_HOST_GOLANG
> +	help
> +          gb is an alternative build tool for the Go programming language.
> +
> +	  https://getgb.io

I'm completely ignorant about Go. Why do we need this alternative build
tool? The flannel package contributed by Geoff, and the three packages
contributed by Christian don't need this alternative build tool.

What are the benefits of using this as opposed to what Geoff/Christian
are doing in their Go packages?

> +define HOST_GOLANG_GB_EXTRACT_CMDS
> +	mkdir -p $(@D)/src/github.com/constabulary
> +	tar xvaf $(DL_DIR)/golang-gb-$(GOLANG_GB_VERSION).tar.gz -C $(@D)
> +	mv $(@D)/gb-$(GOLANG_GB_VERSION) $(@D)/src/github.com/constabulary/gb

It is not clear why you are doing this here.

> +endef
> +
> +define HOST_GOLANG_GB_BUILD_CMDS
> +	env -i $(GOLANG_GB_ENV) $(GO_HOST_BINARY) install -v github.com/constabulary/gb/cmd/gb
> +	env -i $(GOLANG_GB_ENV) $(GO_HOST_BINARY) install -v github.com/constabulary/gb/cmd/gb-vendor

Why env -i ?

> +endef
> +
> +define HOST_GOLANG_GB_INSTALL_CMDS
> +	$(INSTALL) -m 755 $(@D)/bin/gb $(HOST_DIR)/usr/bin
> +	$(INSTALL) -m 755 $(@D)/bin/gb-vendor $(HOST_DIR)/usr/bin

We normally want:

	$(INSTALL) -D -m 0755 $(@D)/bin/gb $(HOST_DIR)/usr/bin/gb

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2016-06-01 20:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160601221759.0578c1a2@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox