diff --git a/libcontainer/cgroups/config_linux.go b/libcontainer/cgroups/config_linux.go index f1e8a15782e..3052ef50da4 100644 --- a/libcontainer/cgroups/config_linux.go +++ b/libcontainer/cgroups/config_linux.go @@ -2,7 +2,7 @@ package cgroups import ( systemdDbus "github.com/coreos/go-systemd/v22/dbus" - "github.com/opencontainers/runc/libcontainer/devices" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" ) type FreezerState string diff --git a/libcontainer/cgroups/devices/devicefilter.go b/libcontainer/cgroups/devices/devicefilter.go index 5f59352bb04..416c7f27a99 100644 --- a/libcontainer/cgroups/devices/devicefilter.go +++ b/libcontainer/cgroups/devices/devicefilter.go @@ -13,7 +13,7 @@ import ( "strconv" "github.com/cilium/ebpf/asm" - "github.com/opencontainers/runc/libcontainer/devices" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" "golang.org/x/sys/unix" ) diff --git a/libcontainer/cgroups/devices/devicefilter_test.go b/libcontainer/cgroups/devices/devicefilter_test.go index 23ad92ea06e..197039a7c8e 100644 --- a/libcontainer/cgroups/devices/devicefilter_test.go +++ b/libcontainer/cgroups/devices/devicefilter_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/opencontainers/runc/libcontainer/devices" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" "github.com/opencontainers/runc/libcontainer/specconv" ) diff --git a/libcontainer/cgroups/devices/devices_emulator.go b/libcontainer/cgroups/devices/devices_emulator.go index 3e1f49f0f7a..81ff206a9e1 100644 --- a/libcontainer/cgroups/devices/devices_emulator.go +++ b/libcontainer/cgroups/devices/devices_emulator.go @@ -26,7 +26,7 @@ import ( "strconv" "strings" - "github.com/opencontainers/runc/libcontainer/devices" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" ) // deviceMeta is a Rule without the Allow or Permissions fields, and no diff --git a/libcontainer/cgroups/devices/devices_emulator_test.go b/libcontainer/cgroups/devices/devices_emulator_test.go index 51c1f521eb0..c107618cc17 100644 --- a/libcontainer/cgroups/devices/devices_emulator_test.go +++ b/libcontainer/cgroups/devices/devices_emulator_test.go @@ -25,7 +25,7 @@ import ( "strings" "testing" - "github.com/opencontainers/runc/libcontainer/devices" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" ) func TestDeviceEmulatorLoad(t *testing.T) { diff --git a/libcontainer/cgroups/devices/systemd.go b/libcontainer/cgroups/devices/systemd.go index e1251c5ffb1..4851b56137d 100644 --- a/libcontainer/cgroups/devices/systemd.go +++ b/libcontainer/cgroups/devices/systemd.go @@ -12,7 +12,7 @@ import ( "github.com/sirupsen/logrus" "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/devices" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" ) // systemdProperties takes the configured device rules and generates a diff --git a/libcontainer/cgroups/devices/systemd_test.go b/libcontainer/cgroups/devices/systemd_test.go index ef802007b07..0b3e3d4e2b8 100644 --- a/libcontainer/cgroups/devices/systemd_test.go +++ b/libcontainer/cgroups/devices/systemd_test.go @@ -9,8 +9,8 @@ import ( "testing" "github.com/opencontainers/runc/libcontainer/cgroups" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" "github.com/opencontainers/runc/libcontainer/cgroups/systemd" - "github.com/opencontainers/runc/libcontainer/devices" ) // TestPodSkipDevicesUpdate checks that updating a pod having SkipDevices: true diff --git a/libcontainer/cgroups/devices/v1.go b/libcontainer/cgroups/devices/v1.go index 17e11847724..27a7ab29494 100644 --- a/libcontainer/cgroups/devices/v1.go +++ b/libcontainer/cgroups/devices/v1.go @@ -7,7 +7,7 @@ import ( "github.com/moby/sys/userns" "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/devices" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" ) var testingSkipFinalCheck bool diff --git a/libcontainer/cgroups/devices/v1_test.go b/libcontainer/cgroups/devices/v1_test.go index 2deb56c6e6e..5781169bef9 100644 --- a/libcontainer/cgroups/devices/v1_test.go +++ b/libcontainer/cgroups/devices/v1_test.go @@ -8,8 +8,8 @@ import ( "github.com/moby/sys/userns" "github.com/opencontainers/runc/libcontainer/cgroups" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" - "github.com/opencontainers/runc/libcontainer/devices" ) func init() { diff --git a/libcontainer/cgroups/devices/v2.go b/libcontainer/cgroups/devices/v2.go index 23ac09f70dd..911d1ce2fd6 100644 --- a/libcontainer/cgroups/devices/v2.go +++ b/libcontainer/cgroups/devices/v2.go @@ -7,7 +7,7 @@ import ( "golang.org/x/sys/unix" "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/devices" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" ) func isRWM(perms devices.Permissions) bool { diff --git a/libcontainer/configs/config.go b/libcontainer/configs/config.go index dbf34f120cc..d186e46fd2a 100644 --- a/libcontainer/configs/config.go +++ b/libcontainer/configs/config.go @@ -10,7 +10,7 @@ import ( "github.com/sirupsen/logrus" "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/devices" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/libcontainer/integration/template_test.go b/libcontainer/integration/template_test.go index 9c5e18c6923..4d31acb09e6 100644 --- a/libcontainer/integration/template_test.go +++ b/libcontainer/integration/template_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/opencontainers/runc/libcontainer/cgroups" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" "github.com/opencontainers/runc/libcontainer/configs" - "github.com/opencontainers/runc/libcontainer/devices" "github.com/opencontainers/runc/libcontainer/specconv" "golang.org/x/sys/unix" ) diff --git a/libcontainer/integration/update_test.go b/libcontainer/integration/update_test.go index 5678b6f6364..68e77b5d91c 100644 --- a/libcontainer/integration/update_test.go +++ b/libcontainer/integration/update_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/opencontainers/runc/libcontainer" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" "github.com/opencontainers/runc/libcontainer/cgroups/systemd" - "github.com/opencontainers/runc/libcontainer/devices" ) func testUpdateDevices(t *testing.T, systemd bool) { diff --git a/libcontainer/rootfs_linux.go b/libcontainer/rootfs_linux.go index 158e03c56d9..012b0506713 100644 --- a/libcontainer/rootfs_linux.go +++ b/libcontainer/rootfs_linux.go @@ -22,9 +22,9 @@ import ( "golang.org/x/sys/unix" "github.com/opencontainers/runc/libcontainer/cgroups" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" "github.com/opencontainers/runc/libcontainer/cgroups/fs2" "github.com/opencontainers/runc/libcontainer/configs" - "github.com/opencontainers/runc/libcontainer/devices" "github.com/opencontainers/runc/libcontainer/utils" ) diff --git a/libcontainer/specconv/spec_linux.go b/libcontainer/specconv/spec_linux.go index 79a9a790049..9f93dacbb4b 100644 --- a/libcontainer/specconv/spec_linux.go +++ b/libcontainer/specconv/spec_linux.go @@ -15,8 +15,8 @@ import ( systemdDbus "github.com/coreos/go-systemd/v22/dbus" dbus "github.com/godbus/dbus/v5" "github.com/opencontainers/runc/libcontainer/cgroups" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" "github.com/opencontainers/runc/libcontainer/configs" - "github.com/opencontainers/runc/libcontainer/devices" "github.com/opencontainers/runc/libcontainer/internal/userns" "github.com/opencontainers/runc/libcontainer/seccomp" libcontainerUtils "github.com/opencontainers/runc/libcontainer/utils" diff --git a/libcontainer/specconv/spec_linux_test.go b/libcontainer/specconv/spec_linux_test.go index 8c7fb774f97..c8d4ae464da 100644 --- a/libcontainer/specconv/spec_linux_test.go +++ b/libcontainer/specconv/spec_linux_test.go @@ -6,9 +6,9 @@ import ( "testing" dbus "github.com/godbus/dbus/v5" + devices "github.com/opencontainers/runc/libcontainer/cgroups/devices/config" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/configs/validate" - "github.com/opencontainers/runc/libcontainer/devices" "github.com/opencontainers/runtime-spec/specs-go" "golang.org/x/sys/unix" )