sanity-meta-virt and runc improvements
cover sanity-meta-virt and runc improvements
The sanity-meta-virt bbclass is fixed to use a layer-specific name for the skip variable and to only print the warning once if triggered. This has been tested both with and without the skip variable set to "1" in my distro conf and works as expected in both cases.
The runc recipes are simplified. runc-docker is fixed for aarch64 platforms by disabling compilation of the recvtty demo/reference application.
Paul Barker (4):
sanity-meta-virt: Make skip variable name layer specific
sanity-meta-virt: Watch for SanityCheck event
runc-docker: Disable building recvtty
runc: Simplify recipes
classes/sanity-meta-virt.bbclass | 4 ++-- conf/layer.conf | 2 +- .../0001-Disable-building-recvtty.patch | 26 ++++++++++++++++++++++ recipes-containers/runc/runc-docker_git.bb | 11 +++------ recipes-containers/runc/runc-opencontainers_git.bb | 19 ++++------------ recipes-containers/runc/runc.inc | 9 +++++--- 6 files changed, 42 insertions(+), 29 deletions(-) create mode 100644 recipes-containers/runc/runc-docker/0001-Disable-building-recvtty.patch
Signature · 1 line
2.7.4
PATCH 1/4 sanity-meta-virt: Make skip variable name layer specific
The variable used to skip the sanity check should be named in a layer specific way. This will ensure there is no confusion if other layers use a similar sanity check.
--- classes/sanity-meta-virt.bbclass | 2 +- conf/layer.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
classes/sanity-meta-virt.bbclass +1 -1
@@ -1,7 +1,7 @@ addhandler virt_bbappend_distrocheck virt_bbappend_distrocheck[eventmask] = "bb.event.ConfigParsed" python virt_bbappend_distrocheck() { - skip_check = e.data.getVar('SKIP_SANITY_BBAPPEND_CHECK') == "1" + skip_check = e.data.getVar('SKIP_META_VIRT_SANITY_CHECK') == "1" if 'virtualization' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check: bb.warn("You have included the meta-virtualization layer, but \ 'virtualization' has not been enabled in your DISTRO_FEATURES. Some bbappend files \
conf/layer.conf +1 -1
@@ -24,5 +24,5 @@ PREFERRED_PROVIDER_virtual/runc ?= "runc-docker" PREFERRED_PROVIDER_virtual/containerd ?= "containerd-docker" # Sanity check for meta-virtualization layer. -# Setting SKIP_SANITY_BBAPPEND_CHECK to "1" would skip the bbappend files check. +# Setting SKIP_META_VIRT_SANITY_CHECK to "1" would skip the bbappend files check. INHERIT += "sanity-meta-virt"
Signature · 1 line
2.7.4
PATCH 2/4 sanity-meta-virt: Watch for SanityCheck event
In reply to Paul BarkerThe ConfigParsed event is raised multiple times during a build which resulted in the sanity warning appearing up to 4 times per build. Instead we should be watching for the SanityCheck event (this is what the sanity checks in oe-core watch for).
--- classes/sanity-meta-virt.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
classes/sanity-meta-virt.bbclass +1 -1
@@ -1,5 +1,5 @@ addhandler virt_bbappend_distrocheck -virt_bbappend_distrocheck[eventmask] = "bb.event.ConfigParsed" +virt_bbappend_distrocheck[eventmask] = "bb.event.SanityCheck" python virt_bbappend_distrocheck() { skip_check = e.data.getVar('SKIP_META_VIRT_SANITY_CHECK') == "1" if 'virtualization' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check:
Signature · 1 line
2.7.4
PATCH 3/4 runc-docker: Disable building recvtty
In reply to Paul BarkerThe recvtty demo/reference application has cross compilation issues when targeting aarch64 platforms. As it is just a demo application and is not usually used, we can just patch the Makefile to disable building this application.
--- .../0001-Disable-building-recvtty.patch | 26 ++++++++++++++++++++++ recipes-containers/runc/runc-docker_git.bb | 1 + 2 files changed, 27 insertions(+) create mode 100644 recipes-containers/runc/runc-docker/0001-Disable-building-recvtty.patch
recipes-containers/runc/runc-docker/0001-Disable-building-recvtty.patch new file +26 -0
@@ -0,0 +1,26 @@ +From aa2fc7b0eacba61175f083cc8d8adc233bcd0575 Mon Sep 17 00:00:00 2001 +From: Paul Barker <[email protected]> +Date: Thu, 12 Oct 2017 11:34:24 +0000 +Subject: [PATCH] Disable building recvtty + +Signed-off-by: Paul Barker <[email protected]> +Upstream-status: Inappropriate +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 0fcf508..24f47dc 100644 +--- a/src/import/Makefile ++++ b/src/import/Makefile +@@ -38,7 +38,6 @@ contrib/cmd/recvtty/recvtty: $(SOURCES) + + static: $(SOURCES) + CGO_ENABLED=1 $(GO) build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc . +- CGO_ENABLED=1 $(GO) build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty + + release: + @flag_list=(seccomp selinux apparmor static); \ +-- +2.7.4 +
recipes-containers/runc/runc-docker_git.bb +1 -0
@@ -9,6 +9,7 @@ SRC_URI = "git://github.com/docker/runc.git;nobranch=1;name=runc-docker \ file://0003-Update-memory-specs-to-use-int64-not-uint64.patch \ file://0001-runc-Add-console-socket-dev-null.patch \ file://0001-Use-correct-go-cross-compiler.patch \ + file://0001-Disable-building-recvtty.patch \ " GO_IMPORT = "import"
Signature · 1 line
2.7.4
Re: [PATCH 3/4] runc-docker: Disable building recvtty
Quoted 7 lines · Paul Barker
The recvtty demo/reference application has cross compilation issues when targeting aarch64 platforms. As it is just a demo application and is not usually
used, we can just patch theMakefileto disable building this application.Signed-off-by Paul Barker <[email protected]>
Quoted 72 lines
--- .../0001-Disable-building-recvtty.patch | 26 ++++++++++++++++++++++ recipes-containers/runc/runc-docker_git.bb | 1 + 2 files changed, 27 insertions(+) create mode 100644 recipes-containers/runc/runc-
docker/0001-Disable-building-recvtty.patchrecipes-containers/runc/runc-docker/0001-Disable- new file +0
-0building-recvtty.patch
recipes-containers/runc/runc-docker/0001-Disable- new file +19
-0@@ -0,0 +1,26 @@ +From aa2fc7b0eacba61175f083cc8d8adc233bcd0575 Mon Sep 17 00:00:00 2001 +From: Paul Barker <[email protected]> +Date: Thu, 12 Oct 2017 11:34:24 +0000 +Subject: [PATCH] Disable building recvtty + +Signed-off-by: Paul Barker <[email protected]> +Upstream-status: Inappropriate +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 0fcf508..24f47dc 100644 +--- a/src/import/Makefile ++++ b/src/import/Makefile +@@ -38,7 +38,6 @@ contrib/cmd/recvtty/recvtty: $(SOURCES) + + static: $(SOURCES) + CGO_ENABLED=1 $(GO) build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS)cgo
static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc .
+- CGO_ENABLED=1 $(GO) build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS)
cgostatic_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvttyrecipes-containers/runc/runc-docker/0001-Disable- new file +6
-0+ + release: + @flag_list=(seccomp selinux apparmor static); \ +-- +2.7.4 +recipes-containers/runc/runc-docker_git.bb +1
-0@@ -9,6 +9,7 @@ SRC_URI = "git://github.com/docker/runc. git;nobranch=1;name=runc-docker \ file://0003-Update-memory-specs-to-use-int64-not-uint64.patch \ file://0001-runc-Add-console-socket-dev-null.patch \ file://0001-Use-correct-go-cross-compiler.patch \ + file://0001-Disable-building-recvtty.patch \ "
GO_IMPORT= "import"
--
2.7.4--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
PATCH 4/4 runc: Simplify recipes
In reply to Paul Barker* All common settings are merged into the runc.inc file.
* SRC_URI and SRCREV settings are normalised, dropping unnecessary arguments.
* Variables in runc.inc are re-ordered slightly to make things clearer.
* Drop unused EXTRA_FLAGS variable in runc-docker which isn't picked up by the runc Makefile anyway as it isn't exported.
* Drop unnecessary do_compile_prepend in runc-opencontainers as the "vendor/src" symlink is already created in do_compile in runc.inc.
--- 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(-)
recipes-containers/runc/runc-docker_git.bb +2 -8
@@ -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"
recipes-containers/runc/runc-opencontainers_git.bb +4 -15
@@ -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"
recipes-containers/runc/runc.inc +6 -3
@@ -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
Signature · 1 line
2.7.4
Re: [PATCH 4/4] runc: Simplify recipes
Quoted 3 lines · Paul Barker
* All common settings are merged into the runc.inc file.
*
SRC_URIand 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.
Quoted 2 lines
* Variables in runc.inc are re-ordered slightly to make things clearer.
Extra churn. I'd rather leave things be.
Quoted 3 lines
* Drop unused
EXTRA_FLAGSvariable in runc-docker which isn't picked up by the runcMakefileanyway as it isn't exported.
This could be a separate patch.
Quoted 3 lines
* Drop unnecessary
do_compile_prependin runc-opencontainers as the "vendor/src" symlink is already created indo_compilein runc.inc.
As could this.
Bruce
Quoted 102 lines
Signed-off-by Paul Barker <[email protected]>--- 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(-)recipes-containers/runc/runc-docker_git.bb +2
-8@@ -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"recipes-containers/runc/runc-opencontainers_git.bb +4
-15@@ -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"recipes-containers/runc/runc.inc +6
-4@@ -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
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Re: [PATCH 4/4] runc: Simplify recipes
On 12 Oct 2017 6:02 p.m., "Bruce Ashfield" <[email protected]> wrote:
Quoted 3 lines · Paul Barker
* All common settings are merged into the runc.inc file.
*
SRC_URIand 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.
Quoted 2 lines
* Variables in runc.inc are re-ordered slightly to make things clearer.
Extra churn. I'd rather leave things be.
Quoted 2 lines
* Drop unused
EXTRA_FLAGSvariable in runc-docker which isn't picked up
by the
Quoted 1 line
runc
Makefileanyway as it isn't exported.
This could be a separate patch.
Quoted 2 lines
* Drop unnecessary
do_compile_prependin runc-opencontainers as the
"vendor/src"
Quoted 1 line
symlink is already created in
do_compilein runc.inc.
As could this.
Bruce
Quoted 5 lines
Signed-off-by Paul Barker <[email protected]>--- recipes-containers/runc/runc-docker_git.bb | 10 ++-------- recipes-containers/runc/runc-opencontainers_git.bb | 19
++++---------------
Review
Quoted 4 lines
recipes-containers/runc/runc.inc | 9 ++++++--- 3 files changed, 12 insertions(+), 26 deletions(-)(quoted diff) +0
-0
b/recipes-containers/runc/runc-docker_git.bb
recipes-containers/runc/runc-docker_git.bb include runc.inc · line 3
Quoted 6 lines
index 28232d9..b1fb624 100644
recipes-containers/runc/runc-docker_git.bb +0
-0@@ -2,8 +2,8 @@ include runc.inc # Note: this rev is before the required protocol field, update when all
components
recipes-containers/runc/runc-docker_git.bb include runc.inc
Quoted 6 lines
recipes-containers/runc/runc-docker_git.bb +2
-2# 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 \
recipes-containers/runc/runc-docker_git.bb include runc.inc · line 9
Quoted 2 lines
recipes-containers/runc/runc-docker_git.bb +0
-0file://0002-Remove-Platform-as-no-longer-in-OCI-spec.patch \ file://0003-Update-memory-specs-to-use-int64-not-uint64.patch
\
recipes-containers/runc/runc-docker_git.bb SRC_URI = "git://github.com/docker/runc.
Quoted 1 line
recipes-containers/runc/runc-docker_git.bb +0
-0@@ -12,10 +12,4 @@ SRC_URI = "git://github.com/docker/runc.
git;nobranch=1;name=runc-docker \
Review
Quoted 11 lines
recipes-containers/runc/runc-docker_git.bb +0
-6file://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"(quoted diff) +0
-0
b/recipes-containers/runc/runc-opencontainers_git.bb
Quoted 13 lines
index 2cfceea..ea093ee 100644
recipes-containers/runc/runc-opencontainers_git.bb +0
-6@@ -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"
recipes-containers/runc/runc-opencontainers_git.bb line 16
Quoted 10 lines
recipes-containers/runc/runc-opencontainers_git.bb +3
-6-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
recipes-containers/runc/
Quoted 5 lines
recipes-containers/runc/runc-opencontainers_git.bb +1
-3- # this with a symlink. - ln -sfn . "${S}/src/import/vendor/src" -} +RUNC_VERSION = "1.0.0-rc4"recipes-containers/runc/ renamed from recipes-containers/runc/runc.inc +0
-0
runc.inc
recipes-containers/runc/runc.inc HOMEPAGE = "https://github.com/opencontainers/runc" · line 3
Quoted 6 lines
index b1f2ba8..7901bc7 100644
recipes-containers/runc/runc.inc +0
-0@@ -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."
recipes-containers/runc/runc.inc HOMEPAGE = "https://github.com/opencontainers/runc"
Quoted 8 lines
recipes-containers/runc/runc.inc +4
-0+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"
Quoted 8 lines
recipes-containers/runc/runc.inc +1
-1@@ -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"
recipes-containers/runc/runc.inc S = "${WORKDIR}/git"
Quoted 10 lines
recipes-containers/runc/runc.inc +1
-3-do_configure[noexec] = "1" EXTRA_OEMAKE="BUILDTAGS=''" -inherit goarch +do_configure[noexec] = "1" do_compile() { # Set GOPATH. See 'PACKAGERS.md'. Don't rely on --
I'll edit this a bit and resubmit as a couple of smaller commits. Do you want to take 1-3 of this series rather than me resending the whole series?
Re: [PATCH 4/4] runc: Simplify recipes
Quoted 140 lines · Paul Barker
On 12 Oct 2017 6:02 p.m., "Bruce Ashfield" <[email protected]> wrote:
Quoted 4 lines · Paul Barker
* All common settings are merged into the runc.inc file.
*
SRC_URIand 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.
Quoted 2 lines
* Variables in runc.inc are re-ordered slightly to make things clearer.
Extra churn. I'd rather leave things be.
Quoted 4 lines
* Drop unused
EXTRA_FLAGSvariable in runc-docker which isn't picked up by the
runcMakefileanyway as it isn't exported.This could be a separate patch.
Quoted 4 lines
* Drop unnecessary
do_compile_prependin runc-opencontainers as the "vendor/src"
symlink is already created indo_compilein runc.inc.As could this.
Bruce
Quoted 103 lines
Signed-off-by Paul Barker <[email protected]>--- 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(-)recipes-containers/runc/runc-docker_git.bb +0
-0@@ -2,8 +2,8 @@ include runc.inc # Note: this rev is before the required protocol field, update when allcomponents
# have been updated to match.recipes-containers/runc/runc-docker_git.bb +2
-2-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\
recipes-containers/runc/runc-docker_git.bb +0
-6@@ -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"recipes-containers/runc/runc-opencontainers_git.bb +3
-12@@ -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'. Wecan fix
recipes-containers/runc/runc-opencontainers_git.bb +1
-3- # this with a symlink. - ln -sfn . "${S}/src/import/vendor/src" -} +RUNC_VERSION = "1.0.0-rc4"recipes-containers/runc/runc.inc +0
-0@@ -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 containersaccording to the OCI specification."
recipes-containers/runc/runc.inc +4
-0+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"
recipes-containers/runc/runc.inc +2
-3@@ -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"
Quoted 7 lines
recipes-containers/runc/runc.inc S = "${WORKDIR}/git"
Quoted 3 lines
recipes-containers/runc/runc.inc +0
-1do_compile() { # Set GOPATH. See 'PACKAGERS.md'. Don't rely on --I'll edit this a bit and resubmit as a couple of smaller commits. Do you want to take 1-3 of this series rather than me resending the whole series?
Absolutely. Don't resend 1-3, I'll grab them and merge them shortly.
Bruce
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"