[meta-virtualization] [PATCH 3/4] runc-docker: respect GOBUILDFLAGS and do not compile recvtty

Bruce Ashfield bruce.ashfield at gmail.com
Mon Aug 5 04:29:58 PDT 2019


On Mon., Aug. 5, 2019, 3:02 a.m. Chen Qi, <Qi.Chen at windriver.com> wrote:

> Previsously, runc uses 'make static' to compile things out, and
> the 0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch removes the
> recvtty target, although that patch does not respect GOBUILDFLAGS
> as its name suggests.
>
> Now we have changed to remove 'static' because we want to have
> systemd support. So we explicitly only compile 'runc' and make
> this target respect 'GOBUILDFLAGS'.
>

No .. actually we won't drop static . So this needs to be reworked to
account for both cases .

Bruce


> Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
> ---
>  .../0001-Makefile-respect-GOBUILDFLAGS.patch  | 28 +++++++++++++++++++
>  ...ld-drop-recvtty-and-use-GOBUILDFLAGS.patch | 22 ---------------
>  recipes-containers/runc/runc-docker_git.bb    |  2 +-
>  recipes-containers/runc/runc.inc              |  2 +-
>  4 files changed, 30 insertions(+), 24 deletions(-)
>  create mode 100644
> recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS.patch
>  delete mode 100644
> recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch
>
> diff --git
> a/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS.patch
> b/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS.patch
> new file mode 100644
> index 0000000..ac9aa3d
> --- /dev/null
> +++
> b/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS.patch
> @@ -0,0 +1,28 @@
> +From 7d6f130ebe427412c41cd11148be6db7711e32c1 Mon Sep 17 00:00:00 2001
> +From: Chen Qi <Qi.Chen at windriver.com>
> +Date: Mon, 5 Aug 2019 13:29:50 +0800
> +Subject: [PATCH] Makefile: respect GOBUILDFLAGS
> +
> +Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
> +
> +Upstream-Status: Inappropriate [OE Specific]
> +---
> + Makefile | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 0f26a1c8..45c6c221 100644
> +--- a/src/import/Makefile
> ++++ b/src/import/Makefile
> +@@ -30,7 +30,7 @@ SHELL := $(shell command -v bash 2>/dev/null)
> + .DEFAULT: runc
> +
> + runc: $(SOURCES)
> +-      $(GO) build -buildmode=pie $(EXTRA_FLAGS) -ldflags "-X
> main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags
> "$(BUILDTAGS)" -o runc .
> ++      $(GO) build $(GOBUILDFLAGS) $(EXTRA_FLAGS) -ldflags "-X
> main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags
> "$(BUILDTAGS)" -o runc .
> +
> + all: runc recvtty
> +
> +--
> +2.17.1
> +
> diff --git
> a/recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch
> b/recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch
> deleted file mode 100644
> index 9ba9957..0000000
> ---
> a/recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -From a9a2b9e72027d0b2357f6dfe8b154762aaa8dd02 Mon Sep 17 00:00:00 2001
> -From: Bruce Ashfield <bruce.ashfield at windriver.com>
> -Date: Thu, 19 Apr 2018 16:39:41 -0400
> -Subject: [PATCH] build: drop recvtty and use GOBUILDFLAGS
> -
> -Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
> ----
> - Makefile | 3 +--
> - 1 file changed, 1 insertion(+), 2 deletions(-)
> -
> -Index: git/src/import/Makefile
> -===================================================================
> ---- git.orig/src/import/Makefile
> -+++ git/src/import/Makefile
> -@@ -41,7 +41,6 @@
> -
> - static: $(SOURCES)
> -       CGO_ENABLED=1 $(GO) build $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo
> osusergo static_build" -installsuffix netgo -ldflags "-w -extldflags
> -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION}
> $(EXTRA_LDFLAGS)" -o runc .
> --      CGO_ENABLED=1 $(GO) build $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo
> osusergo static_build" -installsuffix netgo -ldflags "-w -extldflags
> -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION}
> $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
> -
> - release:
> -       script/release.sh -r release/$(VERSION) -v $(VERSION)
> diff --git a/recipes-containers/runc/runc-docker_git.bb
> b/recipes-containers/runc/runc-docker_git.bb
> index 2bf6222..d4e4d24 100644
> --- a/recipes-containers/runc/runc-docker_git.bb
> +++ b/recipes-containers/runc/runc-docker_git.bb
> @@ -5,8 +5,8 @@ include runc.inc
>  SRCREV_runc-docker = "425e105d5a03fabd737a126ad93d62a9eeede87f"
>  SRC_URI = "git://
> github.com/opencontainers/runc;nobranch=1;name=runc-docker \
>             file://0001-runc-Add-console-socket-dev-null.patch \
> -           file://0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch \
>             file://0001-runc-docker-SIGUSR1-daemonize.patch \
> +           file://0001-Makefile-respect-GOBUILDFLAGS.patch \
>            "
>
>  RUNC_VERSION = "1.0.0-rc8"
> diff --git a/recipes-containers/runc/runc.inc
> b/recipes-containers/runc/runc.inc
> index 1f2f944..fe997f1 100644
> --- a/recipes-containers/runc/runc.inc
> +++ b/recipes-containers/runc/runc.inc
> @@ -54,7 +54,7 @@ do_compile() {
>         export CFLAGS=""
>         export LDFLAGS=""
>
> -       oe_runmake
> +       oe_runmake runc
>  }
>
>  do_install() {
> --
> 2.17.1
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-virtualization/attachments/20190805/09e31aee/attachment.html>


More information about the meta-virtualization mailing list