golang-github-containerd-containerd-dev is missing depends that breaks unrelated packages

Bug #1998847 reported by Reinhard Tartler
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
containerd (Ubuntu)
Fix Released
Undecided
Lucas Kanashiro
golang-github-containerd-stargz-snapshotter (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

for instance when building the package golang-github-containerd-stargz-snapshotter we see:

src/github.com/containerd/containerd/cmd/ctr/commands/tasks/metrics.go:26:2: cannot find package "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats" in any of:
 /usr/lib/go-1.19/src/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats (from $GOPATH)
src/github.com/containerd/containerd/cmd/ctr/commands/tasks/metrics.go:27:2: cannot find package "github.com/containerd/cgroups/stats/v1" in any of:
 /usr/lib/go-1.19/src/github.com/containerd/cgroups/stats/v1 (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/containerd/cgroups/stats/v1 (from $GOPATH)
src/github.com/containerd/containerd/cmd/ctr/commands/tasks/metrics.go:28:2: cannot find package "github.com/containerd/cgroups/v2/stats" in any of:
 /usr/lib/go-1.19/src/github.com/containerd/cgroups/v2/stats (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/containerd/cgroups/v2/stats (from $GOPATH)
src/github.com/containerd/containerd/cio/io_unix.go:31:2: cannot find package "github.com/containerd/fifo" in any of:
 /usr/lib/go-1.19/src/github.com/containerd/fifo (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/containerd/fifo (from $GOPATH)
src/github.com/containerd/containerd/namespaces/ttrpc.go:22:2: cannot find package "github.com/containerd/ttrpc" in any of:
 /usr/lib/go-1.19/src/github.com/containerd/ttrpc (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/containerd/ttrpc (from $GOPATH)
src/github.com/containerd/containerd/api/services/events/v1/events.pb.go:9:2: cannot find package "github.com/containerd/typeurl" in any of:
 /usr/lib/go-1.19/src/github.com/containerd/typeurl (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/containerd/typeurl (from $GOPATH)
src/github.com/containerd/containerd/events/exchange/exchange.go:32:2: cannot find package "github.com/docker/go-events" in any of:
 /usr/lib/go-1.19/src/github.com/docker/go-events (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/docker/go-events (from $GOPATH)
src/github.com/containerd/containerd/api/services/introspection/v1/introspection.pb.go:10:2: cannot find package "github.com/gogo/googleapis/google/rpc" in any of:
 /usr/lib/go-1.19/src/github.com/gogo/googleapis/google/rpc (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/gogo/googleapis/google/rpc (from $GOPATH)
src/github.com/containerd/containerd/api/services/containers/v1/containers.pb.go:9:2: cannot find package "github.com/gogo/protobuf/proto" in any of:
 /usr/lib/go-1.19/src/github.com/gogo/protobuf/proto (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/gogo/protobuf/proto (from $GOPATH)
src/github.com/containerd/containerd/api/services/containers/v1/containers.pb.go:10:2: cannot find package "github.com/gogo/protobuf/sortkeys" in any of:
 /usr/lib/go-1.19/src/github.com/gogo/protobuf/sortkeys (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/gogo/protobuf/sortkeys (from $GOPATH)
src/github.com/containerd/containerd/api/services/containers/v1/containers.pb.go:11:2: cannot find package "github.com/gogo/protobuf/types" in any of:
 /usr/lib/go-1.19/src/github.com/gogo/protobuf/types (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/gogo/protobuf/types (from $GOPATH)
src/github.com/containerd/containerd/services/introspection/local.go:33:2: cannot find package "github.com/google/uuid" in any of:
 /usr/lib/go-1.19/src/github.com/google/uuid (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/google/uuid (from $GOPATH)
src/github.com/containerd/containerd/remotes/docker/status.go:25:2: cannot find package "github.com/moby/locker" in any of:
 /usr/lib/go-1.19/src/github.com/moby/locker (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/moby/locker (from $GOPATH)
src/github.com/containerd/containerd/oci/spec_opts.go:39:2: cannot find package "github.com/opencontainers/runc/libcontainer/user" in any of:
 /usr/lib/go-1.19/src/github.com/opencontainers/runc/libcontainer/user (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/opencontainers/runc/libcontainer/user (from $GOPATH)
src/github.com/containerd/containerd/container.go:41:2: cannot find package "github.com/opencontainers/selinux/go-selinux/label" in any of:
 /usr/lib/go-1.19/src/github.com/opencontainers/selinux/go-selinux/label (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/opencontainers/selinux/go-selinux/label (from $GOPATH)
src/github.com/containerd/containerd/client.go:67:2: cannot find package "google.golang.org/grpc/credentials/insecure" in any of:
 /usr/lib/go-1.19/src/google.golang.org/grpc/credentials/insecure (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/google.golang.org/grpc/credentials/insecure (from $GOPATH)
src/github.com/containerd/containerd/runtime/opts/opts_linux.go:22:2: cannot find package "github.com/containerd/cgroups" in any of:
 /usr/lib/go-1.19/src/github.com/containerd/cgroups (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/containerd/cgroups (from $GOPATH)
src/github.com/containerd/containerd/runtime/opts/opts_linux.go:23:2: cannot find package "github.com/containerd/cgroups/v2" in any of:
 /usr/lib/go-1.19/src/github.com/containerd/cgroups/v2 (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/containerd/cgroups/v2 (from $GOPATH)
src/github.com/containerd/containerd/sys/reaper/reaper_unix.go:29:2: cannot find package "github.com/containerd/go-runc" in any of:
 /usr/lib/go-1.19/src/github.com/containerd/go-runc (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/containerd/go-runc (from $GOPATH)
src/github.com/containerd/containerd/pkg/netns/netns_linux.go:43:2: cannot find package "github.com/containernetworking/plugins/pkg/ns" in any of:
 /usr/lib/go-1.19/src/github.com/containernetworking/plugins/pkg/ns (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/containernetworking/plugins/pkg/ns (from $GOPATH)
src/github.com/containerd/containerd/pkg/progress/humaans.go:23:2: cannot find package "github.com/docker/go-units" in any of:
 /usr/lib/go-1.19/src/github.com/docker/go-units (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/docker/go-units (from $GOPATH)
src/github.com/containerd/containerd/pkg/runtimeoptions/v1/api.pb.go:8:2: cannot find package "github.com/gogo/protobuf/gogoproto" in any of:
 /usr/lib/go-1.19/src/github.com/gogo/protobuf/gogoproto (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/gogo/protobuf/gogoproto (from $GOPATH)
src/github.com/containerd/stargz-snapshotter/fs/remote/resolver.go:49:2: cannot find package "github.com/hashicorp/go-retryablehttp" in any of:
 /usr/lib/go-1.19/src/github.com/hashicorp/go-retryablehttp (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/github.com/hashicorp/go-retryablehttp (from $GOPATH)
src/github.com/containerd/containerd/metadata/boltutil/helpers.go:25:2: cannot find package "go.etcd.io/bbolt" in any of:
 /usr/lib/go-1.19/src/go.etcd.io/bbolt (from $GOROOT)
 /<<PKGBUILDDIR>>/_build/src/go.etcd.io/bbolt (from $GOPATH)

Revision history for this message
Reinhard Tartler (siretart) wrote :
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for reporting this bug Reinhard. I know we already had some discussions about the container ecosystem in Ubuntu and the way we ship those packages is not optimal for reverse dependencies but unfortunately is the best way to keep backporting them to old releases.

Since the library package is in universe, we could add those runtime dependencies to it without needing a promotion. The problem is when we backport the package to old releases, then those packages might not be available. As I do the backport I can take the burden to check those runtime dependencies availability when backporting it.

Reinhard, are you aware of other packages in the same situation?

Changed in containerd (Ubuntu):
status: New → Triaged
Changed in golang-github-containerd-stargz-snapshotter (Ubuntu):
status: New → Triaged
tags: added: update-excuse
Changed in containerd (Ubuntu):
assignee: nobody → Lucas Kanashiro (lucaskanashiro)
tags: added: server-todo
Revision history for this message
Reinhard Tartler (siretart) wrote :
Revision history for this message
Reinhard Tartler (siretart) wrote :

> Since the library package is in universe, we could add those runtime dependencies to it without needing a promotion. The problem is when we backport the package to old releases, then those packages might not be available. As I do the backport I can take the burden to check those runtime dependencies availability when backporting it.

So you are essetially shifting the burden to other packages in universe, requiring a constant toil with merging changes from Debian. That doesn't sound like a great tradeoff to me.

> Reinhard, are you aware of other packages in the same situation?
I'll let you know as I come aware of them

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote : Re: [Bug 1998847] Re: golang-github-containerd-containerd-dev is missing depends that breaks unrelated packages

Em 6 de dezembro de 2022 19:54:58 BRT, Reinhard Tartler <email address hidden> escreveu:
>
>So you are essetially shifting the burden to other packages in universe,
>requiring a constant toil with merging changes from Debian. That doesn't
>sound like a great tradeoff to me.

No, I think you did not understand me well, I said we could add those dependencies to the containerd library package because it is in universe. I did not say to add those dependencies to the affected packages.

>
>> Reinhard, are you aware of other packages in the same situation?
>I'll let you know as I come aware of them

Thank you.

Revision history for this message
Reinhard Tartler (siretart) wrote :

> No, I think you did not understand me well, I said we could add those dependencies to the containerd library package because it is in universe.

Ah, thanks for the clarificaiton, I think I indeed misunderstood you initially.

If I get you right, then these lines:

https://salsa.debian.org/go-team/packages/containerd/-/blob/debian/sid/debian/control#L102-139

should be copied to https://git.launchpad.net/ubuntu/+source/containerd/tree/debian/control#n35 and it would make the library package usable.

Revision history for this message
Benjamin Drung (bdrung) wrote :

As part of my +1 maintenance shift I looked at golang-github-containers-psgo which lead to golang-github-containerd-stargz-snapshotter.

Attached the tested patch for containerd. This includes two patches from Debian to make it work with the packages in the archive. golang-github-containerd-stargz-snapshotter missed a dependency. I uploaded golang-github-containerd-stargz-snapshotter 0.12.0-2 to Debian unstable. I successfully tested this version to build against the patched containerd.

tags: added: patch
Benjamin Drung (bdrung)
Changed in golang-github-containerd-stargz-snapshotter (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package containerd - 1.6.12-0ubuntu2

---------------
containerd (1.6.12-0ubuntu2) lunar; urgency=medium

  * Add unvendored dependencies to golang-github-containerd-containerd-dev.
    Ideally containerd should be unvendored like in Debian. (LP: #1998847)

 -- Benjamin Drung <email address hidden> Tue, 13 Dec 2022 11:52:06 +0100

Changed in containerd (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.