Hi, On 3/10/19 11:23 PM, Reinhard Tartler wrote: > Source: docker.io > Severity: normal > Control: block 923300 by -1 > > While working on the package 'golang-github-openshift-imagebuilder', I > was running into compilation errors, more specifically, unresolved > dependencies during the build: > > dh_auto_build -O--buildsystem=golang > cd obj-x86_64-linux-gnu && go install > -gcflags=all=\"-trimpath=/<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0\+git20190308.705fe92/obj-x86_64-linux-gnu/src\" > > -asmflags=all=\"-trimpath=/<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0\+git20190308.705fe92/obj-x86_64-linux-gnu/src\" > -v -p 4 github.com/openshift/imagebuilder > github.com/openshift/imagebuilder/cmd/imagebuilder > github.com/openshift/imagebuilder/dockerclient > github.com/openshift/imagebuilder/dockerfile > github.com/openshift/imagebuilder/dockerfile/command > github.com/openshift/imagebuilder/dockerfile/parser > github.com/openshift/imagebuilder/dockerfile/parser/dumper > github.com/openshift/imagebuilder/imageprogress > github.com/openshift/imagebuilder/signal > github.com/openshift/imagebuilder/strslice > src/github.com/openshift/imagebuilder/dockerfile/builder.go:15:2: cannot find > package "github.com/docker/docker/builder" in any of: > /usr/lib/go-1.11/src/github.com/docker/docker/builder (from $GOROOT) > > /<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0+git20190308.705fe92/obj-x86_64-linux-gnu/src/github.com/docker/docker/builder > (from $GOPATH) > src/github.com/openshift/imagebuilder/dockerfile/builder.go:16:2: cannot find > package "github.com/docker/docker/builder/dockerfile/command" in any of: > > /usr/lib/go-1.11/src/github.com/docker/docker/builder/dockerfile/command > (from $GOROOT) > > /<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0+git20190308.705fe92/obj-x86_64-linux-gnu/src/github.com/docker/docker/builder/dockerfile/command > (from $GOPATH) > src/github.com/openshift/imagebuilder/dockerfile/builder.go:17:2: cannot find > package "github.com/docker/docker/builder/dockerfile/parser" in any of: > /usr/lib/go-1.11/src/github.com/docker/docker/builder/dockerfile/parser > (from $GOROOT) > > /<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0+git20190308.705fe92/obj-x86_64-linux-gnu/src/github.com/docker/docker/builder/dockerfile/parser > (from $GOPATH) > src/github.com/openshift/imagebuilder/dockerfile/builder.go:18:2: cannot find > package "github.com/docker/docker/builder/fscache" in any of: > /usr/lib/go-1.11/src/github.com/docker/docker/builder/fscache (from > $GOROOT) > > /<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0+git20190308.705fe92/obj-x86_64-linux-gnu/src/github.com/docker/docker/builder/fscache > (from $GOPATH) > src/github.com/openshift/imagebuilder/dockerfile/builder.go:19:2: cannot find > package "github.com/docker/docker/builder/remotecontext" in any of: > /usr/lib/go-1.11/src/github.com/docker/docker/builder/remotecontext > (from $GOROOT) > > /<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0+git20190308.705fe92/obj-x86_64-linux-gnu/src/github.com/docker/docker/builder/remotecontext > (from $GOPATH) > src/github.com/openshift/imagebuilder/dockerfile/containerbackend.go:10:2: > cannot find package "github.com/docker/docker/container" in any of: > /usr/lib/go-1.11/src/github.com/docker/docker/container (from $GOROOT) > > /<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0+git20190308.705fe92/obj-x86_64-linux-gnu/src/github.com/docker/docker/container > (from $GOPATH) > src/github.com/openshift/imagebuilder/dockerfile/dispatchers.go:25:2: cannot > find package "github.com/docker/docker/image" in any of: > /usr/lib/go-1.11/src/github.com/docker/docker/image (from $GOROOT) > > /<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0+git20190308.705fe92/obj-x86_64-linux-gnu/src/github.com/docker/docker/image > (from $GOPATH) > src/github.com/openshift/imagebuilder/dockerfile/metrics.go:4:2: cannot find > package "github.com/docker/go-metrics" in any of: > /usr/lib/go-1.11/src/github.com/docker/go-metrics (from $GOROOT) > > /<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0+git20190308.705fe92/obj-x86_64-linux-gnu/src/github.com/docker/go-metrics > (from $GOPATH) > src/github.com/openshift/imagebuilder/dockerfile/builder.go:26:2: cannot find > package "github.com/moby/buildkit/session" in any of: > /usr/lib/go-1.11/src/github.com/moby/buildkit/session (from $GOROOT) > > /<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0+git20190308.705fe92/obj-x86_64-linux-gnu/src/github.com/moby/buildkit/session > (from $GOPATH) > src/github.com/openshift/imagebuilder/dockerfile/clientsession.go:9:2: cannot > find package "github.com/moby/buildkit/session/filesync" in any of: > /usr/lib/go-1.11/src/github.com/moby/buildkit/session/filesync (from > $GOROOT) > > /<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0+git20190308.705fe92/obj-x86_64-linux-gnu/src/github.com/moby/buildkit/session/filesync > (from $GOPATH) > dh_auto_build: cd obj-x86_64-linux-gnu && go install > -gcflags=all=\"-trimpath=/<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0\+git20190308.705fe92/obj-x86_64-linux-gnu/src\" > > -asmflags=all=\"-trimpath=/<<BUILDDIR>>/golang-github-openshift-imagebuilder-1.0\+git20190308.705fe92/obj-x86_64-linux-gnu/src\" > -v -p 4 github.com/openshift/imagebuilder > github.com/openshift/imagebuilder/cmd/imagebuilder > github.com/openshift/imagebuilder/dockerclient > github.com/openshift/imagebuilder/dockerfile > github.com/openshift/imagebuilder/dockerfile/command > github.com/openshift/imagebuilder/dockerfile/parser > github.com/openshift/imagebuilder/dockerfile/parser/dumper > github.com/openshift/imagebuilder/imageprogress > github.com/openshift/imagebuilder/signal > github.com/openshift/imagebuilder/strslice returned exit code 1 > make: *** [debian/rules:8: build] Error 1 > > At least some of of the packages that couldn't be found seem to be > included in the 'docker.io' source package, not not being installed into > the binary package 'golang-github-docker-docker-dev': > > github.com/docker/docker/builder > - cf. > https://sources.debian.org/src/docker.io/18.09.1+dfsg1-5/engine/builder/ > > github.com/docker/docker/container > - cf. > https://sources.debian.org/src/docker.io/18.09.1+dfsg1-5/engine/container/ > > github.com/docker/docker/image > - cf. https://sources.debian.org/src/docker.io/18.09.1+dfsg1-5/engine/image/ > > github.com/docker/go-metrics > - cf https://sources.debian.org/src/docker.io/18.09.1+dfsg1-5/go-metrics/ > > github.com/moby/buildkit/session > - cf > https://sources.debian.org/src/docker.io/18.09.1+dfsg1-5/cli/vendor/github.com/moby/buildkit/session/ > > > > As far as I understand the packaging, it seems that all of them could be > easily added to > https://sources.debian.org/src/docker.io/18.09.1+dfsg1-5/debian/golang-github-docker-docker-dev.install > > Is this assumption right? Are there compelling reasons against doing that?
I think you're correct, you should give it a try, and if it works feel free to commit on the docker.io salsa repo. For more details: I think the golang-github-docker-docker-dev package just doesn't receive much attention, so if you build depend on it you'll discover this kind of things :) You will also notice that in the d/control file, the `Depends` for golang-github-docker-docker-dev is quite short. This list is not really maintained either AFAIK, and you might find that some dependencies are missing. Feel free to add them. If you're familiar with go packaging in debian, maybe you've seen that some packages have the same dependency list for their binary package and their -dev package, and both dependency lists kept in sync. This works for small packages, but it doesn't for big, top-level packages like docker.io, that have so many dependencies. If we take all the build depends of docker.io, and add them to the dependency list of golang-github-docker-docker-dev, then we quickly run into circular dependencies. Also packages that build depend on docker.io end up having a huge dependency tree, for no good reason. The core of the issue is that there's no clear distinction between docker "the source code for the binary", and docker "the library for other applications to consume". This distinction in Golang is very blurred, and as a consequence when we package docker we have no idea which part of the code make sense as a library, and which parts of the code don't. So we keep it minimal, until someone like you finds out that some code is missing. Hope this helps! Arnaud