From 18ca7546f6dd4d018e30dff14f10eb0eebfb146b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 27 Sep 2022 21:36:09 +0200 Subject: [PATCH 1/3] pkg/system: remove stubs for deprecated sequential functions These functions were moved to github.com/moby/sys/sequential, and the stubs were added in 509f19f611d9316960ae176cdf31c401aa9bcce3, which is part of the 22.x release, so we can safely remove these from master. Signed-off-by: Sebastiaan van Stijn --- pkg/system/filesys_deprecated.go | 35 -------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 pkg/system/filesys_deprecated.go diff --git a/pkg/system/filesys_deprecated.go b/pkg/system/filesys_deprecated.go deleted file mode 100644 index b2ee006314..0000000000 --- a/pkg/system/filesys_deprecated.go +++ /dev/null @@ -1,35 +0,0 @@ -package system - -import ( - "os" - - "github.com/moby/sys/sequential" -) - -// CreateSequential is deprecated. -// -// Deprecated: use os.Create or github.com/moby/sys/sequential.Create() -func CreateSequential(name string) (*os.File, error) { - return sequential.Create(name) -} - -// OpenSequential is deprecated. -// -// Deprecated: use os.Open or github.com/moby/sys/sequential.Open -func OpenSequential(name string) (*os.File, error) { - return sequential.Open(name) -} - -// OpenFileSequential is deprecated. -// -// Deprecated: use github.com/moby/sys/sequential.OpenFile() -func OpenFileSequential(name string, flag int, perm os.FileMode) (*os.File, error) { - return sequential.OpenFile(name, flag, perm) -} - -// TempFileSequential is deprecated. -// -// Deprecated: use os.CreateTemp or github.com/moby/sys/sequential.CreateTemp -func TempFileSequential(dir, prefix string) (f *os.File, err error) { - return sequential.CreateTemp(dir, prefix) -} From 4a8b3b8bc5ff3e96b20458a2ce41cedf1172f917 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 27 Sep 2022 21:44:15 +0200 Subject: [PATCH 2/3] api/types: remove aliases for deprecated Volume and VolumeUsageData These were moved, and deprecated in f19ef20a4414a6f63da8fb2493e6010359652ad1 and 4caf68f4f60cddbe95f71b5a395e022ccc8cbf16, which are part of the 22.x release, so we can safely remove these from master. Signed-off-by: Sebastiaan van Stijn --- api/types/deprecated.go | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 api/types/deprecated.go diff --git a/api/types/deprecated.go b/api/types/deprecated.go deleted file mode 100644 index 216d1df0ff..0000000000 --- a/api/types/deprecated.go +++ /dev/null @@ -1,14 +0,0 @@ -package types // import "github.com/docker/docker/api/types" - -import "github.com/docker/docker/api/types/volume" - -// Volume volume -// -// Deprecated: use github.com/docker/docker/api/types/volume.Volume -type Volume = volume.Volume - -// VolumeUsageData Usage details about the volume. This information is used by the -// `GET /system/df` endpoint, and omitted in other endpoints. -// -// Deprecated: use github.com/docker/docker/api/types/volume.UsageData -type VolumeUsageData = volume.UsageData From ee5d8f43e1c47975bf96f45c2854dfdaf584ee48 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 27 Sep 2022 21:48:52 +0200 Subject: [PATCH 3/3] pkg/signal: remove stubs for deprecated package The pkg/signal package was moved to github.com/moby/sys/signal in 28409ca6c76030ef1cd277cf73223a47cf3f1dbe. The DefaultStopSignal const was deprecated in e53f65a9168aaf4289a490bd56d9e05b46c08bec, and the DumpStacks function was moved to pkg/stack in ea5c94cdb94f74808958732d8b3254921f52be4f, all of which are included in the 22.x release, so we can safely remove these from master. Signed-off-by: Sebastiaan van Stijn --- pkg/signal/signal_deprecated.go | 55 --------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 pkg/signal/signal_deprecated.go diff --git a/pkg/signal/signal_deprecated.go b/pkg/signal/signal_deprecated.go deleted file mode 100644 index 9977cad94b..0000000000 --- a/pkg/signal/signal_deprecated.go +++ /dev/null @@ -1,55 +0,0 @@ -// Package signal provides helper functions for dealing with signals across -// various operating systems. -package signal // import "github.com/docker/docker/pkg/signal" - -import ( - "github.com/docker/docker/pkg/stack" - msignal "github.com/moby/sys/signal" -) - -var ( - // DumpStacks appends the runtime stack into file in dir and returns full path - // to that file. - // Deprecated: use github.com/docker/docker/pkg/stack.Dump instead. - DumpStacks = stack.DumpToFile - - // CatchAll catches all signals and relays them to the specified channel. - // SIGURG is not handled, as it's used by the Go runtime to support - // preemptable system calls. - // Deprecated: use github.com/moby/sys/signal.CatchAll instead - CatchAll = msignal.CatchAll - - // StopCatch stops catching the signals and closes the specified channel. - // Deprecated: use github.com/moby/sys/signal.StopCatch instead - StopCatch = msignal.StopCatch - - // ParseSignal translates a string to a valid syscall signal. - // It returns an error if the signal map doesn't include the given signal. - // Deprecated: use github.com/moby/sys/signal.ParseSignal instead - ParseSignal = msignal.ParseSignal - - // ValidSignalForPlatform returns true if a signal is valid on the platform - // Deprecated: use github.com/moby/sys/signal.ValidSignalForPlatform instead - ValidSignalForPlatform = msignal.ValidSignalForPlatform - - // SignalMap is a map of signals for the current platform. - // Deprecated: use github.com/moby/sys/signal.SignalMap instead - SignalMap = msignal.SignalMap -) - -// Signals used in cli/command -const ( - // SIGCHLD is a signal sent to a process when a child process terminates, is interrupted, or resumes after being interrupted. - // Deprecated: use github.com/moby/sys/signal.SIGCHLD instead - SIGCHLD = msignal.SIGCHLD - // SIGWINCH is a signal sent to a process when its controlling terminal changes its size - // Deprecated: use github.com/moby/sys/signal.SIGWINCH instead - SIGWINCH = msignal.SIGWINCH - // SIGPIPE is a signal sent to a process when a pipe is written to before the other end is open for reading - // Deprecated: use github.com/moby/sys/signal.SIGPIPE instead - SIGPIPE = msignal.SIGPIPE - - // DefaultStopSignal has been deprecated and removed. The default value is - // now defined in github.com/docker/docker/container. Clients should omit - // the container's stop-signal field if the default should be used. -)