All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Stewart <christian@paral.in>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC PATCH v1 3/6] package/docker-containerd: upgrade to go modules
Date: Fri, 05 Apr 2019 03:58:00 -0700	[thread overview]
Message-ID: <877ec8d8hz.fsf@paral.in> (raw)
In-Reply-To: <067385b4-62bb-fcdd-95f2-9f50fb5804e2@mind.be>

Hi Arnout,

Arnout Vandecappelle <arnout@mind.be> writes:
> On 17/03/2019 02:21, Christian Stewart wrote:
>>  DOCKER_CONTAINERD_LDFLAGS = \
>> -	-X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION)
>> +	-X github.com/containerd/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION)
>
>  This looks like a completely independent change. Or is it because we now have a
> go.mod that calls the module containerd/containerd instead of docker/containerd?

This is a fix that could be applied seperately, IIF the root import path
is github.com/containerd/containerd in the current in-tree version (I'd
have to confirm to be sure).

>> +DOCKER_CONTAINERD_BUILD_TARGETS = \
>> +	github.com/containerd/containerd/cmd/ctr \
>> +	github.com/containerd/containerd/cmd/containerd \
>> +	github.com/containerd/containerd/cmd/containerd-shim
>
>  Same question, how is this related to the go modules?

Before, we specified which targets to build using a relative path like
./cmd/dockerd. Now, we can actually specify the fully qualified path to
the "main" package, and the Go tool is smart enough to locate the
correct path inside $(@D). It's also more readable to specify it this
way, and is considered best practice.

>  Would it be possible (and useful) to add those prefixes automatically?

I don't see why. Consider this: I can give you a list of packages:

 - k8s.io/cmd/apiserver
 - k8s.io/cmd/kubectl
 - k8s.io/cmd/kubeadm
 - github.com/containerd/containerd/cmd/ctr

... and all of these can be passed to "go build," which will resolve
them and produce the outputs with the correct binary names (the last
component of the path). It's not that much extra text to leave the
"github.com/containerd/containerd" part in. It's a point of personal
preference at this point though.

Best regards,
Christian

  reply	other threads:[~2019-04-05 10:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-17  1:21 [Buildroot] [RFC PATCH v1 1/6] package/go: implement go modules integration Christian Stewart
2019-03-17  1:21 ` [Buildroot] [RFC PATCH v1 2/6] package/runc: upgrade to go modules Christian Stewart
2019-03-17  1:21 ` [Buildroot] [RFC PATCH v1 3/6] package/docker-containerd: " Christian Stewart
2019-04-05  8:36   ` Arnout Vandecappelle
2019-04-05 10:58     ` Christian Stewart [this message]
2019-03-17  1:21 ` [Buildroot] [RFC PATCH v1 4/6] docker-cli: " Christian Stewart
2019-03-17  1:21 ` [Buildroot] [RFC PATCH v1 5/6] docker-proxy: " Christian Stewart
2019-03-17  1:21 ` [Buildroot] [RFC PATCH v1 6/6] package/docker-engine: " Christian Stewart
2019-03-27 16:50 ` [Buildroot] [RFC PATCH v1 1/6] package/go: implement go modules integration Thomas Petazzoni
2019-03-27 18:36   ` Christian Stewart
2019-04-05  8:32     ` Arnout Vandecappelle
2019-04-05 10:47       ` Christian Stewart
2019-04-05 14:07         ` Arnout Vandecappelle
2019-04-05 17:49           ` Christian Stewart
2019-04-05 21:59             ` Arnout Vandecappelle
2019-04-06  3:13               ` Christian Stewart
2019-04-07 20:17 ` Thomas Petazzoni
2019-04-08  2:04   ` Christian Stewart
2019-04-08  7:02     ` Thomas Petazzoni
2019-04-08  7:06       ` 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=877ec8d8hz.fsf@paral.in \
    --to=christian@paral.in \
    --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.