From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 1/3] runc: new package
Date: Thu, 26 May 2016 21:12:07 +0200 [thread overview]
Message-ID: <20160526211207.06e27be6@free-electrons.com> (raw)
In-Reply-To: <1464219082-3818-2-git-send-email-christian@paral.in>
Hello,
On Wed, 25 May 2016 16:31:20 -0700, Christian Stewart wrote:
> diff --git a/package/runc/Config.in b/package/runc/Config.in
> new file mode 100644
> index 0000000..99d55d0
> --- /dev/null
> +++ b/package/runc/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_RUNC
> + bool "runc"
> + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
It seems like it uses cgo, so you need a dependency on
BR2_TOOLCHAIN_HAS_THREADS here + the corresponding Config.in comment.
> + help
> + runC is a CLI tool for spawning and running containers
> + according to the OCP specification.
Indentation for the help text is one tab + two spaces.
> +
> + https://github.com/opencontainers/runc
> diff --git a/package/runc/runc.mk b/package/runc/runc.mk
> new file mode 100644
> index 0000000..5032fa4
> --- /dev/null
> +++ b/package/runc/runc.mk
> @@ -0,0 +1,49 @@
> +################################################################################
> +#
> +# runc
> +#
> +################################################################################
> +
> +RUNC_VERSION = v0.1.1
> +RUNC_VERSION_COMMIT = baf6536d6259209c3edfa2b22237af82942d3dfa
Why is this thing needed? I see you use it below, but it seems weird.
> +RUNC_SITE = $(call github,opencontainers,runc,$(RUNC_VERSION))
> +
> +RUNC_LICENSE = Apache-2.0
> +RUNC_LICENSE_FILES = LICENSE
> +
> +RUNC_DEPENDENCIES = host-go
> +
> +RUNC_MAKE_ENV = \
> + GOBIN="$(@D)/bin" \
> + GOPATH="$(@D)/Godeps/_workspace" \
> + GOARCH=$(GO_GOARCH) \
> + CGO_ENABLED=1
I guess you should use HOST_GO_TARGET_ENV, as in
http://patchwork.ozlabs.org/patch/626824/.
> +RUNC_GLDFLAGS = \
> + -X main.gitCommit=$(RUNC_VERSION_COMMIT) \
> + -extldflags '-static'
> +
> +RUNC_GOTAGS = cgo static_build
> +
> +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
> +RUNC_GOTAGS += seccomp
> +RUNC_DEPENDENCIES += libseccomp
> +endif
> +
> +define RUNC_CONFIGURE_CMDS
> + # Put sources at prescribed GOPATH location.
> + export $(RUNC_MAKE_ENV) && \
What is the export doing here?
> + mkdir -p $$GOPATH/src/github.com/opencontainers && \
> + ln -s $(@D) $$GOPATH/src/github.com/opencontainers/runc
There is no need for a && between those lines.
And why is this needed at all? What is this "prescribed GOPATH" thing ?
> +endef
> +
> +define RUNC_BUILD_CMDS
> + cd $(@D) && $(RUNC_MAKE_ENV) $(HOST_DIR)/usr/bin/go \
> + build -v -o $(@D)/bin/runc -tags "$(RUNC_GOTAGS)" -ldflags "$(RUNC_GLDFLAGS)" .
> +endef
> +
> +define RUNC_INSTALL_TARGET_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/bin/runc $(TARGET_DIR)/usr/bin/runc
> +endef
Other than that, looks good to me.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-05-26 19:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 23:31 [Buildroot] [PATCH v3 0/3] Add docker engine support Christian Stewart
2016-05-25 23:31 ` [Buildroot] [PATCH v3 1/3] runc: new package Christian Stewart
2016-05-26 19:12 ` Thomas Petazzoni [this message]
2016-05-26 19:51 ` Geoff Levand
2016-05-26 20:01 ` Thomas Petazzoni
2016-05-26 20:21 ` Christian Stewart
2016-05-27 5:23 ` Thomas Petazzoni
2016-05-25 23:31 ` [Buildroot] [PATCH v3 2/3] docker-containerd: " Christian Stewart
2016-05-26 19:29 ` Thomas Petazzoni
2016-05-26 23:10 ` Christian Stewart
2016-05-25 23:31 ` [Buildroot] [PATCH v3 3/3] docker-engine: " Christian Stewart
2016-05-26 19:34 ` 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=20160526211207.06e27be6@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 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.