[meta-virtualization] [PATCH 4/4] runc: Simplify recipes

Bruce Ashfield bruce.ashfield at gmail.com
Thu Oct 12 10:02:27 PDT 2017


On Thu, Oct 12, 2017 at 12:49 PM, Paul Barker <pbarker at toganlabs.com> wrote:
> * All common settings are merged into the runc.inc file.
>
> * SRC_URI and SRCREV settings are normalised, dropping unnecessary arguments.

I'm going to keep the named SRCREVs, since we very often have multiple different
git upstreams in a single build. You'll see that in my new recipes
that I've been
adding.

It does no harm, so it stays.

>
> * Variables in runc.inc are re-ordered slightly to make things clearer.

Extra churn. I'd rather leave things be.

>
> * Drop unused EXTRA_FLAGS variable in runc-docker which isn't picked up by the
>   runc Makefile anyway as it isn't exported.

This could be a separate patch.

>
> * Drop unnecessary do_compile_prepend in runc-opencontainers as the "vendor/src"
>   symlink is already created in do_compile in runc.inc.

As could this.

Bruce

>
> Signed-off-by: Paul Barker <pbarker at toganlabs.com>
> ---
>  recipes-containers/runc/runc-docker_git.bb         | 10 ++--------
>  recipes-containers/runc/runc-opencontainers_git.bb | 19 ++++---------------
>  recipes-containers/runc/runc.inc                   |  9 ++++++---
>  3 files changed, 12 insertions(+), 26 deletions(-)
>
> diff --git a/recipes-containers/runc/runc-docker_git.bb b/recipes-containers/runc/runc-docker_git.bb
> index 28232d9..b1fb624 100644
> --- a/recipes-containers/runc/runc-docker_git.bb
> +++ b/recipes-containers/runc/runc-docker_git.bb
> @@ -2,8 +2,8 @@ include runc.inc
>
>  # Note: this rev is before the required protocol field, update when all components
>  #       have been updated to match.
> -SRCREV_runc-docker = "9d6821d1b53908e249487741eccd567249ca1d99"
> -SRC_URI = "git://github.com/docker/runc.git;nobranch=1;name=runc-docker \
> +SRCREV = "9d6821d1b53908e249487741eccd567249ca1d99"
> +SRC_URI = "git://github.com/docker/runc.git \
>             file://0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch \
>             file://0002-Remove-Platform-as-no-longer-in-OCI-spec.patch \
>             file://0003-Update-memory-specs-to-use-int64-not-uint64.patch \
> @@ -12,10 +12,4 @@ SRC_URI = "git://github.com/docker/runc.git;nobranch=1;name=runc-docker \
>             file://0001-Disable-building-recvtty.patch \
>            "
>
> -GO_IMPORT = "import"
> -
> -EXTRA_FLAGS = "-v -x -work"
> -
>  RUNC_VERSION = "1.0.0-rc3"
> -PROVIDES += "virtual/runc"
> -RPROVIDES_${PN} = "virtual/runc"
> diff --git a/recipes-containers/runc/runc-opencontainers_git.bb b/recipes-containers/runc/runc-opencontainers_git.bb
> index 2cfceea..ea093ee 100644
> --- a/recipes-containers/runc/runc-opencontainers_git.bb
> +++ b/recipes-containers/runc/runc-opencontainers_git.bb
> @@ -1,19 +1,8 @@
>  include runc.inc
>
>  SRCREV = "2e7cfe036e2c6dc51ccca6eb7fa3ee6b63976dcd"
> -SRC_URI = " \
> -    git://github.com/opencontainers/runc;branch=master \
> -    file://0001-Use-correct-go-cross-compiler.patch \
> -    "
> -RUNC_VERSION = "1.0.0-rc4"
> -PROVIDES += "virtual/runc"
> -RPROVIDES_${PN} = "virtual/runc"
> -
> -GO_IMPORT = "import"
> +SRC_URI = "git://github.com/opencontainers/runc \
> +           file://0001-Use-correct-go-cross-compiler.patch \
> +          "
>
> -do_compile_prepend() {
> -       # Go looks in a src directory under any directory in GOPATH but
> -       # runc-opencontainers uses 'vendor' instead of 'vendor/src'. We can fix
> -       # this with a symlink.
> -       ln -sfn . "${S}/src/import/vendor/src"
> -}
> +RUNC_VERSION = "1.0.0-rc4"
> diff --git a/recipes-containers/runc/runc.inc b/recipes-containers/runc/runc.inc
> index b1f2ba8..7901bc7 100644
> --- a/recipes-containers/runc/runc.inc
> +++ b/recipes-containers/runc/runc.inc
> @@ -2,6 +2,10 @@ HOMEPAGE = "https://github.com/opencontainers/runc"
>  SUMMARY = "runc container cli tools"
>  DESCRIPTION = "runc is a CLI tool for spawning and running containers according to the OCI specification."
>
> +PROVIDES += "virtual/runc"
> +RPROVIDES_${PN} = "virtual/runc"
> +RRECOMMENDS_${PN} = "lxc docker"
> +
>  # Apache-2.0 for containerd
>  LICENSE = "Apache-2.0"
>  LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
> @@ -11,14 +15,13 @@ S = "${WORKDIR}/git"
>  PV = "${RUNC_VERSION}+git${SRCREV}"
>
>  inherit go
> -RRECOMMENDS_${PN} = "lxc docker"
> +GO_IMPORT = "import"
>
>  LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
>
> -do_configure[noexec] = "1"
>  EXTRA_OEMAKE="BUILDTAGS=''"
>
> -inherit goarch
> +do_configure[noexec] = "1"
>
>  do_compile() {
>         # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


More information about the meta-virtualization mailing list