Skip to content

Commit dce0b5a

Browse files
committed
migrate to github.com/moby/sys/userns
Commit 8437c56 migrated the use of the userns package to the github.com/moby/sys/user module. After further discussion with maintainers, it was decided to move the userns package to a separate module, as it has no direct relation with "user" operations (other than having "user" in its name). This patch migrates our code to use the new module. Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 9776047) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 65f7d07 commit dce0b5a

File tree

25 files changed

+235
-25
lines changed

25 files changed

+235
-25
lines changed

archive/tar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"syscall"
3030
"time"
3131

32-
"github.com/moby/sys/user/userns"
32+
"github.com/moby/sys/userns"
3333

3434
"github.com/containerd/containerd/archive/tarheader"
3535
"github.com/containerd/containerd/pkg/epoch"

archive/tar_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"strings"
2828
"syscall"
2929

30-
"github.com/moby/sys/user/userns"
30+
"github.com/moby/sys/userns"
3131
"golang.org/x/sys/unix"
3232

3333
"github.com/containerd/continuity/fs"

diff/apply/apply_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"os"
2424
"strings"
2525

26-
"github.com/moby/sys/user/userns"
26+
"github.com/moby/sys/userns"
2727
"golang.org/x/sys/unix"
2828

2929
"github.com/containerd/containerd/archive"

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ require (
4848
github.com/moby/sys/sequential v0.5.0
4949
github.com/moby/sys/signal v0.7.0
5050
github.com/moby/sys/symlink v0.2.0
51-
github.com/moby/sys/user v0.2.0
51+
github.com/moby/sys/user v0.3.0
52+
github.com/moby/sys/userns v0.1.0
5253
github.com/opencontainers/go-digest v1.0.0
5354
github.com/opencontainers/image-spec v1.1.0
5455
github.com/opencontainers/runtime-spec v1.1.0

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,10 @@ github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn
545545
github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
546546
github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc=
547547
github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs=
548-
github.com/moby/sys/user v0.2.0 h1:OnpapJsRp25vkhw8TFG6OLJODNh/3rEwRWtJ3kakwRM=
549-
github.com/moby/sys/user v0.2.0/go.mod h1:RYstrcWOJpVh+6qzUqp2bU3eaRpdiQeKGlKitaH0PM8=
548+
github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo=
549+
github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs=
550+
github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g=
551+
github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
550552
github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo=
551553
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
552554
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=

integration/client/go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ require (
5252
github.com/moby/sys/mountinfo v0.6.2 // indirect
5353
github.com/moby/sys/sequential v0.5.0 // indirect
5454
github.com/moby/sys/signal v0.7.0 // indirect
55-
github.com/moby/sys/user v0.2.0 // indirect
55+
github.com/moby/sys/user v0.3.0 // indirect
56+
github.com/moby/sys/userns v0.1.0 // indirect
5657
github.com/opencontainers/selinux v1.11.0 // indirect
5758
github.com/pelletier/go-toml v1.9.5 // indirect
5859
github.com/pkg/errors v0.9.1 // indirect

integration/client/go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,8 +1820,10 @@ github.com/moby/sys/signal v0.6.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn
18201820
github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI=
18211821
github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg=
18221822
github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs=
1823-
github.com/moby/sys/user v0.2.0 h1:OnpapJsRp25vkhw8TFG6OLJODNh/3rEwRWtJ3kakwRM=
1824-
github.com/moby/sys/user v0.2.0/go.mod h1:RYstrcWOJpVh+6qzUqp2bU3eaRpdiQeKGlKitaH0PM8=
1823+
github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo=
1824+
github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs=
1825+
github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g=
1826+
github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
18251827
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A=
18261828
github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw=
18271829
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=

mount/mount_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"strings"
2727
"time"
2828

29-
"github.com/moby/sys/user/userns"
29+
"github.com/moby/sys/userns"
3030
"golang.org/x/sys/unix"
3131
)
3232

oci/utils_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"os"
2525
"path/filepath"
2626

27-
"github.com/moby/sys/user/userns"
27+
"github.com/moby/sys/userns"
2828
specs "github.com/opencontainers/runtime-spec/specs-go"
2929
"golang.org/x/sys/unix"
3030
)

oci/utils_unix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"runtime"
2626
"testing"
2727

28-
"github.com/moby/sys/user/userns"
28+
"github.com/moby/sys/userns"
2929
"github.com/stretchr/testify/assert"
3030
)
3131

0 commit comments

Comments
 (0)