All of lore.kernel.org
 help / color / mirror / Atom feed
From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC v2 2/4] package/pkg-golang: new package infrastructure
Date: Mon, 23 Oct 2017 18:36:22 +0200	[thread overview]
Message-ID: <CA+TH9Vnmev=8sFC8hNoW-JjCBKOxKiZ7BkZYwajmtBWi1air1w@mail.gmail.com> (raw)
In-Reply-To: <20171021215501.3b3e269f@windsurf>

Dear Thomas,

2017-10-21 21:55 GMT+02:00 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>:
> Hello,
>
> On Mon, 16 Oct 2017 19:08:46 +0200, Angelo Compagnucci wrote:
>> This patch adds a new infrastructure for golang based packages.
>>
>> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
>
> As Christian said, it seems that this infrastructure isn't "general"
> enough to really be useful. We would to see it applied to several
> packages and see that there is a real benefit to several packages to
> apply it.
>
> So I'd be happy to take a go package infrastructure, but it needs to be
> usable by more than one package in a useful way.
>
>> +# Target packages need the Go compiler on the host.
>> +$(2)_DEPENDENCIES += host-go
>> +
>> +#
>> +# go install command doesn't work well when cross compilation is enabled,
>> +# we set the executable output of the compilation to a specific location.
>> +# We set this variable here to be used by packages if needed.
>> +#
>> +$(2)_EXECUTABLE = $$(@D)/gopath/bin/$(1)
>
> This seems to make the assumption that a given package can only install
> a single executable, and that this executable is named after the
> package. It is true for flannel, but what about other Go packages ?

It will be addressed in the respin of the series.

>
>> +# Source files in Go should be uncompressed in a precise folder in the
>> +# hiearchy of GOPATH. It usually resolves around domain/vendor/software.
>> +#
>> +$(1)_src_path ?= $$(call domain,$($(2)_SITE))/$$(firstword $$(subst /, ,$$(call notdomain,$($(2)_SITE))))
>> +$(2)_SRC_PATH  = $$(@D)/gopath/src/$$($(1)_src_path)/$(1)
>
> We don't use lower-case variables in Buildroot, especially if there is
> a variable with the same name upper-case.

Fixed, thanks!

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



-- 
Profile: http://it.linkedin.com/in/compagnucciangelo

  reply	other threads:[~2017-10-23 16:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-16 17:08 [Buildroot] [RFC v2 1/4] package/go: fixing crosscompilation settings Angelo Compagnucci
2017-10-16 17:08 ` [Buildroot] [RFC v2 2/4] package/pkg-golang: new package infrastructure Angelo Compagnucci
2017-10-21 19:55   ` Thomas Petazzoni
2017-10-23 16:36     ` Angelo Compagnucci [this message]
2017-10-16 17:08 ` [Buildroot] [RFC v2 3/4] docs/manual: adding documentation for the golang infrastructure Angelo Compagnucci
2017-10-16 17:08 ` [Buildroot] [RFC v2 4/4] package/flannel: converting to " Angelo Compagnucci
2017-10-21 19:51 ` [Buildroot] [RFC v2 1/4] package/go: fixing crosscompilation settings Thomas Petazzoni
2017-10-22 22:48   ` Peter Korsgaard
2017-10-25  7:41   ` Peter Korsgaard
2017-10-19 16:06 [Buildroot] [RFC, v2, 2/4] package/pkg-golang: new package infrastructure Christian Stewart
2017-10-23 15:50 ` Angelo Compagnucci
2017-10-24  3:24   ` Christian Stewart

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='CA+TH9Vnmev=8sFC8hNoW-JjCBKOxKiZ7BkZYwajmtBWi1air1w@mail.gmail.com' \
    --to=angelo.compagnucci@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.