Skip to contentSkip to conversation

docker-moby: fix DOCKER_GITCOMMIT

PATCH In review Martin Jansa 2 participants 3 messages Mar 3, 2020 – Mar 4, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 docker-moby: fix DOCKER_GITCOMMIT

* SRCREV_docker isn't defined in docker-moby recipes at all so it passes unexpanded ${SRCREV_docker} as noticed in error log:

  | ERROR: Execution of 'work/raspberrypi4-oe-linux-gnueabi/docker-moby/19.03.6+git71373c6105e3cbc9702935b96d8ee01214c405e7-r0/temp/run.do_compile.31754' failed with exit code 2:
  |
  | Package devmapper was not found in the pkg-config search path.
  | Perhaps you should add the directory containing `devmapper.pc'
  | to the PKG_CONFIG_PATH environment variable
  | No package 'devmapper' found
  | Removing bundles/
  |
  | ---> Making bundle: dynbinary (in bundles/dynbinary)
  | Building: bundles/dynbinary-daemon/dockerd-19.03.6
  | GOOS="linux" GOARCH="arm" GOARM="7"
  | # runtime/cgo
  | exec: "arm-linux-gnueabihf-gcc": executable file not found in $PATH
  | WARNING: work/raspberrypi4-oe-linux-gnueabi/docker-moby/19.03.6+git71373c6105e3cbc9702935b96d8ee01214c405e7-r0/temp/run.do_compile.31754:1 exit 2 from 'VERSION="19.03.6" DOCKER_GITCOMMIT="${SRCREV_docker}" ./hack/make.sh dynbinary'
  | ERROR: Task (meta-virtualization/recipes-containers/docker/docker-moby.bb:do_compile) failed with exit code '1'

this build issue is somehow caused by recent upgrade:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/commit/?id=f770151b3ff0938bea4972abdd1ee7f6cbc3a074
and this build error is not fixed by this change, but see 2nd to last line which shows DOCKER_GITCOMMIT="${SRCREV_docker}"

---
 recipes-containers/docker/docker-moby.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-containers/docker/docker-moby.bb +2 -2
index b29c4b3..a8c5946 100644
@@ -101,14 +101,14 @@ do_compile() {
 	# this is the unsupported built structure
 	# that doesn't rely on an existing docker
 	# to build this:
-	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" ./hack/make.sh dynbinary
+	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_moby}" ./hack/make.sh dynbinary
 
         # build the cli
 	cd ${S}/src/import/.gopath/src/github.com/docker/cli
 	export CFLAGS=""
 	export LDFLAGS=""
 	export DOCKER_VERSION=${DOCKER_VERSION}
-	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" make dynbinary
+	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_moby}" make dynbinary
 
 	# build the proxy
 	cd ${S}/src/import/.gopath/src/github.com/docker/libnetwork
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 docker-moby: fix build

* apply similar patch to what was applied to docker-ce in:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/commit/recipes-containers/docker?id=e7787cb01be91d3798594687a475d5b085f29ede
it's very similar, but needs to be separate .patch file, because the path to make/.binary is different in docker-ce and docker-moby.

since the recent upgrade:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/commit/?id=f770151b3ff0938bea4972abdd1ee7f6cbc3a074
docker-moby needs the same change or fails like this:

  | ERROR: Execution of 'work/raspberrypi4-oe-linux-gnueabi/docker-moby/19.03.6+git71373c6105e3cbc9702935b96d8ee01214c405e7-r0/temp/run.do_compile.31754' failed with exit code 2:
  |
  | Package devmapper was not found in the pkg-config search path.
  | Perhaps you should add the directory containing `devmapper.pc'
  | to the PKG_CONFIG_PATH environment variable
  | No package 'devmapper' found
  | Removing bundles/
  |
  | ---> Making bundle: dynbinary (in bundles/dynbinary)
  | Building: bundles/dynbinary-daemon/dockerd-19.03.6
  | GOOS="linux" GOARCH="arm" GOARM="7"
  | # runtime/cgo
  | exec: "arm-linux-gnueabihf-gcc": executable file not found in $PATH
  | WARNING: work/raspberrypi4-oe-linux-gnueabi/docker-moby/19.03.6+git71373c6105e3cbc9702935b96d8ee01214c405e7-r0/temp/run.do_compile.31754:1 exit 2 from 'VERSION="19.03.6" DOCKER_GITCOMMIT="${SRCREV_docker}" ./hack/make.sh dynbinary'
  | ERROR: Task (meta-virtualization/recipes-containers/docker/docker-moby.bb:do_compile) failed with exit code '1'
---
 recipes-containers/docker/docker-moby.bb      |  1 +
 ...dcoded-CC-on-cross-compile-docker-ce.patch | 61 +++++++++++++++++++
 2 files changed, 62 insertions(+)
 create mode 100644 recipes-containers/docker/docker-moby/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch
recipes-containers/docker/docker-moby.bb +1 -0
index a8c5946..39bc263 100644
@@ -44,6 +44,7 @@ SRC_URI = "\
 	git://github.com/docker/cli;branch=19.03;name=cli;destsuffix=git/cli \
 	file://docker.init \
 	file://0001-libnetwork-use-GO-instead-of-go.patch \
+        file://0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch \
 	"
 
 require docker.inc
recipes-containers/docker/docker-moby/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch new file +61 -0

61 lines not on this page · raw message

Signature · 1 line
2.20.1
#2 lore raw
In reply to Martin Jansa

In message: [meta-virtualization][PATCH 1/2] docker-moby: fix DOCKER_GITCOMMIT

Quoted 20 lines · on 03/03/2020 Martin Jansa wrote:

* SRCREV_docker isn't defined in docker-moby recipes at all so it passes unexpanded ${SRCREV_docker} as noticed in error log:

  | ERROR: Execution of 'work/raspberrypi4-oe-linux-gnueabi/docker-moby/19.03.6+git71373c6105e3cbc9702935b96d8ee01214c405e7-r0/temp/run.do_compile.31754' failed with exit code 2:
  |
  | Package devmapper was not found in the pkg-config search path.
  | Perhaps you should add the directory containing `devmapper.pc'
  | to the PKG_CONFIG_PATH environment variable
  | No package 'devmapper' found
  | Removing bundles/
  |
  | ---> Making bundle: dynbinary (in bundles/dynbinary)
  | Building: bundles/dynbinary-daemon/dockerd-19.03.6
  | GOOS="linux" GOARCH="arm" GOARM="7"
  | # runtime/cgo
  | exec: "arm-linux-gnueabihf-gcc": executable file not found in $PATH
  | WARNING: work/raspberrypi4-oe-linux-gnueabi/docker-moby/19.03.6+git71373c6105e3cbc9702935b96d8ee01214c405e7-r0/temp/run.do_compile.31754:1 exit 2 from 'VERSION="19.03.6" DOCKER_GITCOMMIT="${SRCREV_docker}" ./hack/make.sh dynbinary'
  | ERROR: Task (meta-virtualization/recipes-containers/docker/docker-moby.bb:do_compile) failed with exit code '1'
Quoted 5 lines

this build issue is somehow caused by recent upgrade:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/commit/?id=f770151b3ff0938bea4972abdd1ee7f6cbc3a074
and this build error is not fixed by this change, but see 2nd to last line which shows DOCKER_GITCOMMIT="${SRCREV_docker}"

.. and even stranger, the x86 builds are unconcerned with this, since runtime testing passed.

Definitely wrong though, and this is merged.

Bruce

Quoted 32 lines
---
 recipes-containers/docker/docker-moby.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-containers/docker/docker-moby.bb +2 -2
index b29c4b3..a8c5946 100644
@@ -101,14 +101,14 @@ do_compile() {
 	# this is the unsupported built structure
 	# that doesn't rely on an existing docker
 	# to build this:
-	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" ./hack/make.sh dynbinary
+	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_moby}" ./hack/make.sh dynbinary
 
         # build the cli
 	cd ${S}/src/import/.gopath/src/github.com/docker/cli
 	export CFLAGS=""
 	export LDFLAGS=""
 	export DOCKER_VERSION=${DOCKER_VERSION}
-	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" make dynbinary
+	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_moby}" make dynbinary
 
 	# build the proxy
 	cd ${S}/src/import/.gopath/src/github.com/docker/libnetwork
Signature · 1 line
2.20.1