diff options
5 files changed, 45 insertions, 25 deletions
diff --git a/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch b/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch new file mode 100644 index 00000000..94cbb4cb --- /dev/null +++ b/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From d2c47a973f354ffd505bb4e809c59e57b543726d Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Tue, 6 Aug 2019 19:01:45 +0800 | ||
4 | Subject: [PATCH] Makefile: respect GOBUILDFLAGS for runc and remove recvtty | ||
5 | from static | ||
6 | |||
7 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
8 | --- | ||
9 | Makefile | 3 +-- | ||
10 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/Makefile b/Makefile | ||
13 | index 0f26a1c8..a0c6b40b 100644 | ||
14 | --- a/src/import/Makefile | ||
15 | +++ b/src/import/Makefile | ||
16 | @@ -30,7 +30,7 @@ SHELL := $(shell command -v bash 2>/dev/null) | ||
17 | .DEFAULT: runc | ||
18 | |||
19 | runc: $(SOURCES) | ||
20 | - $(GO) build -buildmode=pie $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc . | ||
21 | + $(GO) build $(GOBUILDFLAGS) $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc . | ||
22 | |||
23 | all: runc recvtty | ||
24 | |||
25 | @@ -41,7 +41,6 @@ contrib/cmd/recvtty/recvtty: $(SOURCES) | ||
26 | |||
27 | static: $(SOURCES) | ||
28 | 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 . | ||
29 | - 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 | ||
30 | |||
31 | release: | ||
32 | script/release.sh -r release/$(VERSION) -v $(VERSION) | ||
33 | -- | ||
34 | 2.17.1 | ||
35 | |||
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 9ba99571..00000000 --- a/recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | From a9a2b9e72027d0b2357f6dfe8b154762aaa8dd02 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | Date: Thu, 19 Apr 2018 16:39:41 -0400 | ||
4 | Subject: [PATCH] build: drop recvtty and use GOBUILDFLAGS | ||
5 | |||
6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
7 | --- | ||
8 | Makefile | 3 +-- | ||
9 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
10 | |||
11 | Index: git/src/import/Makefile | ||
12 | =================================================================== | ||
13 | --- git.orig/src/import/Makefile | ||
14 | +++ git/src/import/Makefile | ||
15 | @@ -41,7 +41,6 @@ | ||
16 | |||
17 | static: $(SOURCES) | ||
18 | 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 . | ||
19 | - 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 | ||
20 | |||
21 | release: | ||
22 | 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 2bf62224..c9f460b2 100644 --- a/recipes-containers/runc/runc-docker_git.bb +++ b/recipes-containers/runc/runc-docker_git.bb | |||
@@ -5,7 +5,7 @@ include runc.inc | |||
5 | SRCREV_runc-docker = "425e105d5a03fabd737a126ad93d62a9eeede87f" | 5 | SRCREV_runc-docker = "425e105d5a03fabd737a126ad93d62a9eeede87f" |
6 | SRC_URI = "git://github.com/opencontainers/runc;nobranch=1;name=runc-docker \ | 6 | SRC_URI = "git://github.com/opencontainers/runc;nobranch=1;name=runc-docker \ |
7 | file://0001-runc-Add-console-socket-dev-null.patch \ | 7 | file://0001-runc-Add-console-socket-dev-null.patch \ |
8 | file://0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch \ | 8 | file://0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch \ |
9 | file://0001-runc-docker-SIGUSR1-daemonize.patch \ | 9 | file://0001-runc-docker-SIGUSR1-daemonize.patch \ |
10 | " | 10 | " |
11 | 11 | ||
diff --git a/recipes-containers/runc/runc-opencontainers_git.bb b/recipes-containers/runc/runc-opencontainers_git.bb index 76ab7941..361bc94b 100644 --- a/recipes-containers/runc/runc-opencontainers_git.bb +++ b/recipes-containers/runc/runc-opencontainers_git.bb | |||
@@ -3,5 +3,6 @@ include runc.inc | |||
3 | SRCREV = "652297c7c7e6c94e8d064ad5916c32891a6fd388" | 3 | SRCREV = "652297c7c7e6c94e8d064ad5916c32891a6fd388" |
4 | SRC_URI = " \ | 4 | SRC_URI = " \ |
5 | git://github.com/opencontainers/runc;branch=master \ | 5 | git://github.com/opencontainers/runc;branch=master \ |
6 | file://0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch \ | ||
6 | " | 7 | " |
7 | RUNC_VERSION = "1.0.0-rc8" | 8 | RUNC_VERSION = "1.0.0-rc8" |
diff --git a/recipes-containers/runc/runc.inc b/recipes-containers/runc/runc.inc index 46fd09dc..41ea41be 100644 --- a/recipes-containers/runc/runc.inc +++ b/recipes-containers/runc/runc.inc | |||
@@ -14,8 +14,10 @@ inherit go | |||
14 | inherit goarch | 14 | inherit goarch |
15 | inherit pkgconfig | 15 | inherit pkgconfig |
16 | 16 | ||
17 | PACKAGECONFIG ??= "" | 17 | PACKAGECONFIG ??= "static" |
18 | PACKAGECONFIG[seccomp] = "seccomp,,libseccomp" | 18 | PACKAGECONFIG[seccomp] = "seccomp,,libseccomp" |
19 | # This PACKAGECONFIG serves the purpose of whether building runc as static or not | ||
20 | PACKAGECONFIG[static] = "" | ||
19 | 21 | ||
20 | PROVIDES += "virtual/runc" | 22 | PROVIDES += "virtual/runc" |
21 | RPROVIDES_${PN} = "virtual/runc" | 23 | RPROVIDES_${PN} = "virtual/runc" |
@@ -54,7 +56,11 @@ do_compile() { | |||
54 | export CFLAGS="" | 56 | export CFLAGS="" |
55 | export LDFLAGS="" | 57 | export LDFLAGS="" |
56 | 58 | ||
57 | oe_runmake static | 59 | if ${@bb.utils.contains('PACKAGECONFIG', 'static', 'true', 'false', d)}; then |
60 | oe_runmake static | ||
61 | else | ||
62 | oe_runmake runc | ||
63 | fi | ||
58 | } | 64 | } |
59 | 65 | ||
60 | do_install() { | 66 | do_install() { |