Skip to content

Commit

Permalink
Merge pull request moby#48307 from thaJeztah/migrate_userns
Browse files Browse the repository at this point in the history
migrate to github.com/moby/sys/userns
  • Loading branch information
thaJeztah authored Aug 8, 2024
2 parents f3cf935 + 7b0ef10 commit 2269acc
Show file tree
Hide file tree
Showing 27 changed files with 233 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ linters-settings:
- pkg: "github.com/containerd/containerd/log"
desc: The logs package has moved to a separate module, https://github.com/containerd/log
- pkg: "github.com/containerd/containerd/pkg/userns"
desc: Use github.com/moby/sys/user/userns instead.
desc: Use github.com/moby/sys/userns instead.
- pkg: "github.com/opencontainers/runc/libcontainer/userns"
desc: Use github.com/moby/sys/user/userns instead.
desc: Use github.com/moby/sys/userns instead.
revive:
rules:
# FIXME make sure all packages have a description. Currently, there's many packages without.
Expand Down
2 changes: 1 addition & 1 deletion daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ import (
resolverconfig "github.com/moby/buildkit/util/resolver/config"
"github.com/moby/buildkit/util/tracing"
"github.com/moby/locker"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"github.com/pkg/errors"
"go.etcd.io/bbolt"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/btrfs/btrfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
"github.com/docker/docker/pkg/parsers"
units "github.com/docker/go-units"
"github.com/moby/sys/mount"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/copy/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"github.com/docker/docker/pkg/pools"
"github.com/docker/docker/pkg/system"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"golang.org/x/sys/unix"
)

Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/docker/docker/pkg/parsers/kernel"
"github.com/moby/locker"
"github.com/moby/sys/mount"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/overlay2/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/containerd/containerd/mount"
"github.com/docker/docker/daemon/graphdriver/overlayutils"
"github.com/docker/docker/pkg/system"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/overlay2/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
units "github.com/docker/go-units"
"github.com/moby/locker"
"github.com/moby/sys/mount"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"github.com/opencontainers/selinux/go-selinux/label"
"golang.org/x/sys/unix"
)
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/overlayutils/overlayutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/containerd/log"
"github.com/docker/docker/daemon/graphdriver"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/overlayutils/userxattr.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/containerd/containerd/mount"
"github.com/containerd/log"
"github.com/docker/docker/pkg/parsers/kernel"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
)

// NeedsUserXAttr returns whether overlayfs should be mounted with the "userxattr" mount option.
Expand Down
2 changes: 1 addition & 1 deletion daemon/oci_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/moby/sys/mount"
"github.com/moby/sys/mountinfo"
"github.com/moby/sys/user"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"github.com/opencontainers/runc/libcontainer/cgroups"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion pkg/archive/archive_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/docker/docker/pkg/system"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/archive/archive_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/docker/docker/pkg/system"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"golang.org/x/sys/unix"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
Expand Down
2 changes: 1 addition & 1 deletion pkg/archive/archive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/docker/docker/pkg/idtools"
"github.com/docker/docker/pkg/ioutils"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
"gotest.tools/v3/skip"
Expand Down
2 changes: 1 addition & 1 deletion pkg/archive/archive_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"testing"

"github.com/docker/docker/pkg/system"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"golang.org/x/sys/unix"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
Expand Down
2 changes: 1 addition & 1 deletion pkg/chrootarchive/diff_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"

"github.com/docker/docker/pkg/archive"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
)

// applyLayerHandler parses a diff in the standard layer format from `layer`, and
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sync"

"github.com/containerd/log"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/sysinfo/cgroup2_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/containerd/cgroups/v3"
cgroupsV2 "github.com/containerd/cgroups/v3/cgroup2"
"github.com/containerd/log"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
)

func newV2(options ...Opt) *SysInfo {
Expand Down
2 changes: 1 addition & 1 deletion plugin/v2/plugin_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/docker/docker/internal/rootless/mountopts"
"github.com/docker/docker/internal/sliceutil"
"github.com/docker/docker/oci"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion quota/projectquota.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import (
"unsafe"

"github.com/containerd/log"
"github.com/moby/sys/user/userns"
"github.com/moby/sys/userns"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)
Expand Down
3 changes: 2 additions & 1 deletion vendor.mod
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ require (
github.com/moby/sys/sequential v0.6.0
github.com/moby/sys/signal v0.7.1
github.com/moby/sys/symlink v0.3.0
github.com/moby/sys/user v0.2.0
github.com/moby/sys/user v0.3.0
github.com/moby/sys/userns v0.1.0
github.com/moby/term v0.5.0
github.com/morikuni/aec v1.0.0
github.com/opencontainers/go-digest v1.0.0
Expand Down
6 changes: 4 additions & 2 deletions vendor.sum
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,10 @@ github.com/moby/sys/signal v0.7.1 h1:PrQxdvxcGijdo6UXXo/lU/TvHUWyPhj7UOpSo8tuvk0
github.com/moby/sys/signal v0.7.1/go.mod h1:Se1VGehYokAkrSQwL4tDzHvETwUZlnY7S5XtQ50mQp8=
github.com/moby/sys/symlink v0.3.0 h1:GZX89mEZ9u53f97npBy4Rc3vJKj7JBDj/PN2I22GrNU=
github.com/moby/sys/symlink v0.3.0/go.mod h1:3eNdhduHmYPcgsJtZXW1W4XUJdZGBIkttZ8xKqPUJq0=
github.com/moby/sys/user v0.2.0 h1:OnpapJsRp25vkhw8TFG6OLJODNh/3rEwRWtJ3kakwRM=
github.com/moby/sys/user v0.2.0/go.mod h1:RYstrcWOJpVh+6qzUqp2bU3eaRpdiQeKGlKitaH0PM8=
github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo=
github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs=
github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g=
github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
Expand Down
202 changes: 202 additions & 0 deletions vendor/github.com/moby/sys/userns/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Loading

0 comments on commit 2269acc

Please sign in to comment.