Skip to content

Commit

Permalink
Relocate containerd-shim-runsc-v1 deps from shim/ to shim/v1.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 725052687
  • Loading branch information
milantracy authored and gvisor-bot committed Feb 13, 2025
1 parent c8d5afe commit 8da9815
Show file tree
Hide file tree
Showing 48 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ go_path(
# binaries have been factored into a cli package, which is
# a good practice in any case.
"//runsc/cli",
"//shim/cli",
"//shim/v1/cli",
"//webhook/pkg/cli",
"//tools/checklocks",

Expand Down
4 changes: 2 additions & 2 deletions nogo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ global:
- "panic recovered: .*types/sizes.go:82: assertion failed"
exclude:
# Generated: exempt all.
- pkg/shim/runtimeoptions/runtimeoptions_cri.go
- pkg/shim/runtimeoptions/v14/runtimeoptions_cri.go
- pkg/shim/v1/runtimeoptions/runtimeoptions_cri.go
- pkg/shim/v1/runtimeoptions/v14/runtimeoptions_cri.go
analyzers:
asmdecl:
generated: # Enabled.
Expand Down
6 changes: 3 additions & 3 deletions pkg/shim/BUILD → pkg/shim/v1/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ package(
)

go_library(
name = "shim",
name = "v1",
srcs = ["service.go"],
visibility = ["//shim:__subpackages__"],
deps = [
"//pkg/cleanup",
"//pkg/shim/extension",
"//pkg/shim/runsc",
"//pkg/shim/v1/extension",
"//pkg/shim/v1/runsc",
"//pkg/sync",
"@com_github_containerd_containerd//namespaces:go_default_library",
"@com_github_containerd_containerd//runtime/v2/shim:go_default_library",
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions pkg/shim/proc/BUILD → pkg/shim/v1/proc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ go_library(
deps = [
"//pkg/atomicbitops",
"//pkg/cleanup",
"//pkg/shim/extension",
"//pkg/shim/runsccmd",
"//pkg/shim/utils",
"//pkg/shim/v1/extension",
"//pkg/shim/v1/runsccmd",
"//pkg/shim/v1/utils",
"@com_github_containerd_console//:go_default_library",
"@com_github_containerd_containerd//mount:go_default_library",
"@com_github_containerd_containerd//pkg/stdio:go_default_library",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/containerd/console"
"github.com/containerd/errdefs"
runc "github.com/containerd/go-runc"
"gvisor.dev/gvisor/pkg/shim/extension"
"gvisor.dev/gvisor/pkg/shim/v1/extension"
)

type deletedState struct{}
Expand Down
4 changes: 2 additions & 2 deletions pkg/shim/proc/exec.go → pkg/shim/v1/proc/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
specs "github.com/opencontainers/runtime-spec/specs-go"
"golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/cleanup"
"gvisor.dev/gvisor/pkg/shim/extension"
"gvisor.dev/gvisor/pkg/shim/runsccmd"
"gvisor.dev/gvisor/pkg/shim/v1/extension"
"gvisor.dev/gvisor/pkg/shim/v1/runsccmd"
)

type execProcess struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"

"github.com/containerd/console"
"gvisor.dev/gvisor/pkg/shim/extension"
"gvisor.dev/gvisor/pkg/shim/v1/extension"
)

type execState interface {
Expand Down
6 changes: 3 additions & 3 deletions pkg/shim/proc/init.go → pkg/shim/v1/proc/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import (
runc "github.com/containerd/go-runc"
specs "github.com/opencontainers/runtime-spec/specs-go"
"golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/shim/extension"
"gvisor.dev/gvisor/pkg/shim/runsccmd"
"gvisor.dev/gvisor/pkg/shim/utils"
"gvisor.dev/gvisor/pkg/shim/v1/extension"
"gvisor.dev/gvisor/pkg/shim/v1/runsccmd"
"gvisor.dev/gvisor/pkg/shim/v1/utils"
)

const statusStopped = "stopped"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
runc "github.com/containerd/go-runc"
"golang.org/x/sys/unix"

"gvisor.dev/gvisor/pkg/shim/extension"
"gvisor.dev/gvisor/pkg/shim/v1/extension"
)

type stateTransition int
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/shim/proc/utils.go → pkg/shim/v1/proc/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"time"

"gvisor.dev/gvisor/pkg/shim/runsccmd"
"gvisor.dev/gvisor/pkg/shim/v1/runsccmd"
)

const (
Expand Down
14 changes: 7 additions & 7 deletions pkg/shim/runsc/BUILD → pkg/shim/v1/runsc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ go_library(
visibility = ["//pkg/shim:__subpackages__"],
deps = [
"//pkg/cleanup",
"//pkg/shim/extension",
"//pkg/shim/proc",
"//pkg/shim/runsccmd",
"//pkg/shim/runtimeoptions",
"//pkg/shim/runtimeoptions/v14",
"//pkg/shim/utils",
"//pkg/shim/v1/extension",
"//pkg/shim/v1/proc",
"//pkg/shim/v1/runsccmd",
"//pkg/shim/v1/runtimeoptions",
"//pkg/shim/v1/runtimeoptions/v14",
"//pkg/shim/v1/utils",
"//runsc/specutils",
"@com_github_burntsushi_toml//:go_default_library",
"@com_github_containerd_cgroups//:go_default_library",
Expand Down Expand Up @@ -60,7 +60,7 @@ go_test(
srcs = ["service_test.go"],
library = ":runsc",
deps = [
"//pkg/shim/utils",
"//pkg/shim/v1/utils",
"@com_github_opencontainers_runtime_spec//specs-go:go_default_library",
],
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions pkg/shim/runsc/service.go → pkg/shim/v1/runsc/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ import (
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/cleanup"
"gvisor.dev/gvisor/pkg/shim/runtimeoptions/v14"
"gvisor.dev/gvisor/pkg/shim/v1/runtimeoptions/v14"

"gvisor.dev/gvisor/pkg/shim/extension"
"gvisor.dev/gvisor/pkg/shim/proc"
"gvisor.dev/gvisor/pkg/shim/runsccmd"
"gvisor.dev/gvisor/pkg/shim/runtimeoptions"
"gvisor.dev/gvisor/pkg/shim/utils"
"gvisor.dev/gvisor/pkg/shim/v1/extension"
"gvisor.dev/gvisor/pkg/shim/v1/proc"
"gvisor.dev/gvisor/pkg/shim/v1/runsccmd"
"gvisor.dev/gvisor/pkg/shim/v1/runtimeoptions"
"gvisor.dev/gvisor/pkg/shim/v1/utils"
"gvisor.dev/gvisor/runsc/specutils"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"testing"

specs "github.com/opencontainers/runtime-spec/specs-go"
"gvisor.dev/gvisor/pkg/shim/utils"
"gvisor.dev/gvisor/pkg/shim/v1/utils"
)

func TestCgroupPath(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ go_library(
"runtimeoptions.go",
"runtimeoptions_cri.go",
],
visibility = ["//pkg/shim/runsc:__pkg__"],
visibility = ["//pkg/shim/v1/runsc:__pkg__"],
deps = ["@com_github_gogo_protobuf//proto:go_default_library"],
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ go_library(
"runtimeoptions.go",
"runtimeoptions_cri.go",
],
visibility = ["//pkg/shim/runsc:__pkg__"],
visibility = ["//pkg/shim/v1/runsc:__pkg__"],
deps = ["@com_github_gogo_protobuf//proto:go_default_library"],
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/shim/service.go → pkg/shim/v1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package shim implements Containerd Shim v2 interface.
package shim
// Package v1 implements Containerd Shim v2 interface.
package v1

import (
"context"
Expand All @@ -31,8 +31,8 @@ import (
"golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/cleanup"

"gvisor.dev/gvisor/pkg/shim/extension"
"gvisor.dev/gvisor/pkg/shim/runsc"
"gvisor.dev/gvisor/pkg/shim/v1/extension"
"gvisor.dev/gvisor/pkg/shim/v1/runsc"
"gvisor.dev/gvisor/pkg/sync"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion shim/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ go_binary(
visibility = [
"//visibility:public",
],
deps = ["//shim/cli"],
deps = ["//shim/v1/cli"],
)

pkg_tar(
Expand Down
2 changes: 1 addition & 1 deletion shim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package main

import (
"gvisor.dev/gvisor/shim/cli"
"gvisor.dev/gvisor/shim/v1/cli"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion shim/cli/BUILD → shim/v1/cli/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ go_library(
"//shim:__pkg__",
],
deps = [
"//pkg/shim",
"//pkg/shim/v1",
"@com_github_containerd_containerd//runtime/v2/shim:go_default_library",
],
)
2 changes: 1 addition & 1 deletion shim/cli/cli.go → shim/v1/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package cli
import (
containerdshim "github.com/containerd/containerd/runtime/v2/shim"

"gvisor.dev/gvisor/pkg/shim"
shim "gvisor.dev/gvisor/pkg/shim/v1"
)

// Main is the main entrypoint.
Expand Down

0 comments on commit 8da9815

Please sign in to comment.