Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 1/7] package/go: implement go modules integration
Date: Thu, 13 Aug 2020 23:45:01 +0200	[thread overview]
Message-ID: <20200813234501.138cc5ec@windsurf.home> (raw)
In-Reply-To: <20200813213220.260112-1-christian@paral.in>

Hello Christian,

I think this sort of series would greatly benefit from having a
detailed cover letter. I believe one of the reason why this series has
been stalled for so much time is because none of the Buildroot
maintainers are very familiar with the overall Go ecosystem. So in some
sense, you need to educate us: explain how it was working before, what
are the changes, what are the possible solutions, which one you have
chosen and why, etc.

That would _tremendously_ help to move forward with this series, which
we really need to get merged soon.

Thanks!

Thomas

On Thu, 13 Aug 2020 14:32:14 -0700
Christian Stewart <christian@paral.in> wrote:

> The Go compiler needs to know the "import path" to the root of package source
> repositories. Previously, this was done by creating a fake _gopath in the build
> directory and symlinking the package source into that path.
> 
> Go has deprecated the GOPATH mechanism in favor of a new approach - Modules -
> which specifies the root import path (and dependencies) in a "go.mod" file.
> 
> This commit moves Buildroot to use the new go.mod approach. Both host and target
> Go packages compile correctly with small tweaks adjusting the build target
> specifier.
> 
> Note: the Go module system will NOT download sources from the Internet due to
> GOPROXY=off and -mod=vendor. All Buildroot packages currently have "vendor"
> directories included with dependencies' source code.
> 
> The environment variables passed to Go during host and target package
> compilation have been fixed to correctly pass CC, CXX, CFLAGS, and so on.
> 
> Reference: https://github.com/golang/go/wiki/Modules
> 
> Signed-off-by: Christian Stewart <christian@paral.in>
> 
> v2 -> v3:
> 
>  - cjs: cleaned up spelling and moved extract hook to configure step
>  - cjs: applied fixes from vincent fazio related to host packages
> 
> v3 -> v4:
> 
>  - cjs: clean up HOST and TARGET variables passed to Go
>  - cjs: fix all CXXflags, cgo env vars to be consistent/correct
>  - cjs: document / explain the difference from GOPATH
> 
> Signed-off-by: Christian Stewart <christian@paral.in>
> ---
>  package/go/go.mk      | 55 +++++++++++++++++++++++++--------
>  package/pkg-golang.mk | 71 +++++++++++++++++++++----------------------
>  2 files changed, 76 insertions(+), 50 deletions(-)


Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  parent reply	other threads:[~2020-08-13 21:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 21:32 [Buildroot] [PATCH v4 1/7] package/go: implement go modules integration Christian Stewart
2020-08-13 21:32 ` [Buildroot] [PATCH v4 2/7] package/runc: remove unnecessary workspace identifier Christian Stewart
2020-08-13 21:32 ` [Buildroot] [PATCH v4 3/7] package/docker-containerd: fix go-module package identifier/targets Christian Stewart
2020-08-29 13:01   ` [Buildroot] [PATCH v4 3/7] package/docker-containerd: fix go-module package identifier/target Thomas Petazzoni
2020-08-13 21:32 ` [Buildroot] [PATCH v4 4/7] package/docker-engine: fix go-module package identifier Christian Stewart
2020-08-13 21:32 ` [Buildroot] [PATCH v4 5/7] package/docker-cli: " Christian Stewart
2020-08-13 21:32 ` [Buildroot] [PATCH v4 6/7] package/docker-proxy: " Christian Stewart
2020-08-13 21:32 ` [Buildroot] [PATCH v4 7/7] package/mender-artifact: fix go-module package build target Christian Stewart
2020-08-13 21:45 ` Thomas Petazzoni [this message]
2020-08-13 21:52   ` [Buildroot] [PATCH v4 1/7] package/go: implement go modules integration Christian Stewart
2020-08-28 18:30 ` Christian Stewart
2020-08-29  8:57 ` Arnout Vandecappelle
2020-08-29 12:59 ` Thomas Petazzoni
2020-08-29 17:32   ` Christian Stewart
2020-08-29 18:40     ` Thomas Petazzoni
2020-08-29 13:04 ` 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=20200813234501.138cc5ec@windsurf.home \
    --to=thomas.petazzoni@bootlin.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