diff --git a/cmd/podman/auto-update.go b/cmd/podman/auto-update.go index 11433bc25f..a12eeb6cb2 100644 --- a/cmd/podman/auto-update.go +++ b/cmd/podman/auto-update.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/containers/common/pkg/auth" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/errorhandling" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/errorhandling" "github.com/pkg/errors" "github.com/spf13/cobra" ) @@ -16,6 +16,8 @@ var ( autoUpdateDescription = `Auto update containers according to their auto-update policy. Auto-update policies are specified with the "io.containers.autoupdate" label. + Containers are expected to run in systemd units created with "podman-generate-systemd --new", + or similar units that create new containers in order to run the updated images. Note that this command is experimental. Please refer to the podman-auto-update(1) man page for details.` autoUpdateCommand = &cobra.Command{ Use: "auto-update [flags]", diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index ec3251ae18..f6fbe8e105 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -5,7 +5,8 @@ import ( "os" "github.com/containers/common/pkg/auth" - "github.com/containers/libpod/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/libpod/define" "github.com/spf13/pflag" ) @@ -394,6 +395,11 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet { "rootfs", false, "The first argument is not an image but the rootfs to the exploded container", ) + createFlags.StringVar( + &cf.SdNotifyMode, + "sdnotify", define.SdNotifyModeContainer, + `control sd-notify behavior ("container"|"conmon"|"ignore")`, + ) createFlags.StringArrayVar( &cf.SecurityOpt, "security-opt", containerConfig.SecurityOptions(), @@ -449,6 +455,11 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet { "tty", "t", false, "Allocate a pseudo-TTY for container", ) + createFlags.StringVar( + &cf.Timezone, + "tz", containerConfig.TZ(), + "Set timezone in container", + ) createFlags.StringSliceVar( &cf.UIDMap, "uidmap", []string{}, diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go index 4f3b8b322b..eafe7f0902 100644 --- a/cmd/podman/common/create_opts.go +++ b/cmd/podman/common/create_opts.go @@ -1,6 +1,6 @@ package common -import "github.com/containers/libpod/pkg/domain/entities" +import "github.com/containers/libpod/v2/pkg/domain/entities" type ContainerCLIOpts struct { Annotation []string @@ -81,6 +81,7 @@ type ContainerCLIOpts struct { Rm bool RootFS bool SecurityOpt []string + SdNotifyMode string ShmSize string StopSignal string StopTimeout uint @@ -91,6 +92,7 @@ type ContainerCLIOpts struct { Systemd string TmpFS []string TTY bool + Timezone string UIDMap []string Ulimit []string User string diff --git a/cmd/podman/common/createparse.go b/cmd/podman/common/createparse.go index fe6e322c2f..7f10d578e2 100644 --- a/cmd/podman/common/createparse.go +++ b/cmd/podman/common/createparse.go @@ -1,7 +1,7 @@ package common import ( - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) diff --git a/cmd/podman/common/default.go b/cmd/podman/common/default.go index 6e5994b187..b4fd2f6041 100644 --- a/cmd/podman/common/default.go +++ b/cmd/podman/common/default.go @@ -1,7 +1,7 @@ package common import ( - "github.com/containers/libpod/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/registry" ) var ( diff --git a/cmd/podman/common/netflags.go b/cmd/podman/common/netflags.go index 2bb45476b4..5c83a3c9ce 100644 --- a/cmd/podman/common/netflags.go +++ b/cmd/podman/common/netflags.go @@ -3,10 +3,10 @@ package common import ( "net" - "github.com/containers/libpod/cmd/podman/parse" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/cmd/podman/parse" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go index 1f6fbbe98c..0948e78f13 100644 --- a/cmd/podman/common/specgen.go +++ b/cmd/podman/common/specgen.go @@ -9,15 +9,15 @@ import ( "github.com/containers/common/pkg/config" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/cmd/podman/parse" - "github.com/containers/libpod/libpod/define" - ann "github.com/containers/libpod/pkg/annotations" - envLib "github.com/containers/libpod/pkg/env" - ns "github.com/containers/libpod/pkg/namespaces" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/specgen" - systemdGen "github.com/containers/libpod/pkg/systemd/generate" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/parse" + "github.com/containers/libpod/v2/libpod/define" + ann "github.com/containers/libpod/v2/pkg/annotations" + envLib "github.com/containers/libpod/v2/pkg/env" + ns "github.com/containers/libpod/v2/pkg/namespaces" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/specgen" + systemdGen "github.com/containers/libpod/v2/pkg/systemd/generate" + "github.com/containers/libpod/v2/pkg/util" "github.com/docker/go-units" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" @@ -443,6 +443,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string } s.Systemd = c.Systemd + s.SdNotifyMode = c.SdNotifyMode if s.ResourceLimits == nil { s.ResourceLimits = &specs.LinuxResources{} } @@ -619,6 +620,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string } s.Remove = c.Rm s.StopTimeout = &c.StopTimeout + s.Timezone = c.Timezone return nil } diff --git a/cmd/podman/common/util.go b/cmd/podman/common/util.go index 6c8c221471..e21e349d98 100644 --- a/cmd/podman/common/util.go +++ b/cmd/podman/common/util.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/cmd/podman/common/volumes.go b/cmd/podman/common/volumes.go index 63bb8e5f05..b201786f07 100644 --- a/cmd/podman/common/volumes.go +++ b/cmd/podman/common/volumes.go @@ -6,8 +6,8 @@ import ( "strings" "github.com/containers/buildah/pkg/parse" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/util" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/cmd/podman/containers/attach.go b/cmd/podman/containers/attach.go index cb3b1bd3ce..eca9e0787b 100644 --- a/cmd/podman/containers/attach.go +++ b/cmd/podman/containers/attach.go @@ -3,9 +3,9 @@ package containers import ( "os" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/checkpoint.go b/cmd/podman/containers/checkpoint.go index fa1bc899b9..6834370000 100644 --- a/cmd/podman/containers/checkpoint.go +++ b/cmd/podman/containers/checkpoint.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/containers/cleanup.go b/cmd/podman/containers/cleanup.go index 7e9e7e9ef5..5dea77b7ab 100644 --- a/cmd/podman/containers/cleanup.go +++ b/cmd/podman/containers/cleanup.go @@ -3,10 +3,10 @@ package containers import ( "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/podman/containers/commit.go b/cmd/podman/containers/commit.go index 79e2a32a71..d2aa32e451 100644 --- a/cmd/podman/containers/commit.go +++ b/cmd/podman/containers/commit.go @@ -7,8 +7,8 @@ import ( "os" "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/container.go b/cmd/podman/containers/container.go index 3ff341dcd3..f51baa9363 100644 --- a/cmd/podman/containers/container.go +++ b/cmd/podman/containers/container.go @@ -1,10 +1,10 @@ package containers import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/spf13/cobra" ) diff --git a/cmd/podman/containers/cp.go b/cmd/podman/containers/cp.go index ac70376210..2901287615 100644 --- a/cmd/podman/containers/cp.go +++ b/cmd/podman/containers/cp.go @@ -1,10 +1,10 @@ package containers import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go index 60e9aa8150..a44c0406f9 100644 --- a/cmd/podman/containers/create.go +++ b/cmd/podman/containers/create.go @@ -9,13 +9,13 @@ import ( "github.com/containers/common/pkg/config" "github.com/containers/image/v5/storage" "github.com/containers/image/v5/transports/alltransports" - "github.com/containers/libpod/cmd/podman/common" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/common" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/podman/containers/diff.go b/cmd/podman/containers/diff.go index 812a61a786..f39b22ede2 100644 --- a/cmd/podman/containers/diff.go +++ b/cmd/podman/containers/diff.go @@ -1,10 +1,10 @@ package containers import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/report" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/report" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/containers/exec.go b/cmd/podman/containers/exec.go index 3c713a7c47..e0fc740b5d 100644 --- a/cmd/podman/containers/exec.go +++ b/cmd/podman/containers/exec.go @@ -5,11 +5,11 @@ import ( "fmt" "os" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" - envLib "github.com/containers/libpod/pkg/env" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" + envLib "github.com/containers/libpod/v2/pkg/env" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/exists.go b/cmd/podman/containers/exists.go index 81ba8a282f..1f7c05122d 100644 --- a/cmd/podman/containers/exists.go +++ b/cmd/podman/containers/exists.go @@ -3,8 +3,8 @@ package containers import ( "context" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/containers/export.go b/cmd/podman/containers/export.go index 66e768ccbf..4a9b7f38b4 100644 --- a/cmd/podman/containers/export.go +++ b/cmd/podman/containers/export.go @@ -4,9 +4,9 @@ import ( "context" "os" - "github.com/containers/libpod/cmd/podman/parse" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/parse" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/init.go b/cmd/podman/containers/init.go index 6ae52986cc..98f69fa4b8 100644 --- a/cmd/podman/containers/init.go +++ b/cmd/podman/containers/init.go @@ -3,10 +3,10 @@ package containers import ( "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/cmd/podman/containers/inspect.go b/cmd/podman/containers/inspect.go index 1798fa99cc..c0d1d5c79c 100644 --- a/cmd/podman/containers/inspect.go +++ b/cmd/podman/containers/inspect.go @@ -1,10 +1,10 @@ package containers import ( - "github.com/containers/libpod/cmd/podman/inspect" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/inspect" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/containers/kill.go b/cmd/podman/containers/kill.go index 5289a2a0ea..da60fcf52a 100644 --- a/cmd/podman/containers/kill.go +++ b/cmd/podman/containers/kill.go @@ -5,11 +5,11 @@ import ( "errors" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/signal" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/signal" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/cmd/podman/containers/list.go b/cmd/podman/containers/list.go index 6aadbcc75e..2d107d51d6 100644 --- a/cmd/podman/containers/list.go +++ b/cmd/podman/containers/list.go @@ -1,9 +1,9 @@ package containers import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/containers/logs.go b/cmd/podman/containers/logs.go index 351a055df7..850cb2e1f2 100644 --- a/cmd/podman/containers/logs.go +++ b/cmd/podman/containers/logs.go @@ -3,10 +3,10 @@ package containers import ( "os" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/mount.go b/cmd/podman/containers/mount.go index ddde0cc9f7..186c4df160 100644 --- a/cmd/podman/containers/mount.go +++ b/cmd/podman/containers/mount.go @@ -6,10 +6,10 @@ import ( "text/tabwriter" "text/template" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" "github.com/spf13/pflag" ) @@ -30,13 +30,18 @@ var ( Args: func(cmd *cobra.Command, args []string) error { return validate.CheckAllLatestAndCIDFile(cmd, args, true, false) }, + Annotations: map[string]string{ + registry.ParentNSRequired: "", + }, } containerMountCommmand = &cobra.Command{ - Use: mountCommand.Use, - Short: mountCommand.Short, - Long: mountCommand.Long, - RunE: mountCommand.RunE, + Use: mountCommand.Use, + Short: mountCommand.Short, + Long: mountCommand.Long, + RunE: mountCommand.RunE, + Args: mountCommand.Args, + Annotations: mountCommand.Annotations, } ) diff --git a/cmd/podman/containers/pause.go b/cmd/podman/containers/pause.go index 19d97f1961..33d6ff06f1 100644 --- a/cmd/podman/containers/pause.go +++ b/cmd/podman/containers/pause.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/port.go b/cmd/podman/containers/port.go index 3ad6c507bd..7c0d8f5f63 100644 --- a/cmd/podman/containers/port.go +++ b/cmd/podman/containers/port.go @@ -5,9 +5,9 @@ import ( "strconv" "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/pkg/errors" "github.com/spf13/cobra" diff --git a/cmd/podman/containers/prune.go b/cmd/podman/containers/prune.go index 38168a6e46..65e023b39f 100644 --- a/cmd/podman/containers/prune.go +++ b/cmd/podman/containers/prune.go @@ -8,9 +8,9 @@ import ( "os" "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go index d10cda6094..7c84cbae1d 100644 --- a/cmd/podman/containers/ps.go +++ b/cmd/podman/containers/ps.go @@ -12,9 +12,9 @@ import ( tm "github.com/buger/goterm" "github.com/containers/buildah/pkg/formats" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/docker/go-units" "github.com/pkg/errors" @@ -309,7 +309,13 @@ func (l psReporter) Status() string { // Command returns the container command in string format func (l psReporter) Command() string { - return strings.Join(l.ListContainer.Command, " ") + command := strings.Join(l.ListContainer.Command, " ") + if !noTrunc { + if len(command) > 17 { + return command[0:17] + "..." + } + } + return command } // Size returns the rootfs and virtual sizes in human duration in diff --git a/cmd/podman/containers/restart.go b/cmd/podman/containers/restart.go index 83d6a13cac..393b003a98 100644 --- a/cmd/podman/containers/restart.go +++ b/cmd/podman/containers/restart.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/restore.go b/cmd/podman/containers/restore.go index a5e328e8ec..e9e0ad6fcd 100644 --- a/cmd/podman/containers/restore.go +++ b/cmd/podman/containers/restore.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/containers/rm.go b/cmd/podman/containers/rm.go index bb7bca0810..427e1e72c5 100644 --- a/cmd/podman/containers/rm.go +++ b/cmd/podman/containers/rm.go @@ -5,11 +5,11 @@ import ( "fmt" "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go index dda22e5392..17a5c6d975 100644 --- a/cmd/podman/containers/run.go +++ b/cmd/podman/containers/run.go @@ -6,14 +6,14 @@ import ( "strconv" "strings" - "github.com/containers/libpod/cmd/podman/common" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/common" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/podman/containers/runlabel.go b/cmd/podman/containers/runlabel.go index 8d1c48ad2b..c962f6c3bd 100644 --- a/cmd/podman/containers/runlabel.go +++ b/cmd/podman/containers/runlabel.go @@ -6,8 +6,8 @@ import ( "github.com/containers/common/pkg/auth" "github.com/containers/image/v5/types" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/podman/containers/start.go b/cmd/podman/containers/start.go index 05e1c38ef3..941588137a 100644 --- a/cmd/podman/containers/start.go +++ b/cmd/podman/containers/start.go @@ -4,11 +4,11 @@ import ( "fmt" "os" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/stats.go b/cmd/podman/containers/stats.go index 3da68949aa..86674cfc99 100644 --- a/cmd/podman/containers/stats.go +++ b/cmd/podman/containers/stats.go @@ -9,13 +9,13 @@ import ( "text/template" tm "github.com/buger/goterm" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/utils" "github.com/docker/go-units" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/cmd/podman/containers/stop.go b/cmd/podman/containers/stop.go index b525fc97a8..7959918a82 100644 --- a/cmd/podman/containers/stop.go +++ b/cmd/podman/containers/stop.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/cmd/podman/containers/top.go b/cmd/podman/containers/top.go index cd01046cc7..c3f411be79 100644 --- a/cmd/podman/containers/top.go +++ b/cmd/podman/containers/top.go @@ -7,10 +7,10 @@ import ( "strings" "text/tabwriter" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/unmount.go b/cmd/podman/containers/unmount.go index c061a6df30..c40c2be7ec 100644 --- a/cmd/podman/containers/unmount.go +++ b/cmd/podman/containers/unmount.go @@ -3,10 +3,10 @@ package containers import ( "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/cmd/podman/containers/unpause.go b/cmd/podman/containers/unpause.go index 7ea8e13c1f..9d4437afb4 100644 --- a/cmd/podman/containers/unpause.go +++ b/cmd/podman/containers/unpause.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/containers/wait.go b/cmd/podman/containers/wait.go index be5cfce9a3..c30bfe4052 100644 --- a/cmd/podman/containers/wait.go +++ b/cmd/podman/containers/wait.go @@ -5,11 +5,11 @@ import ( "fmt" "time" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/diff.go b/cmd/podman/diff.go index eaf6abf022..cdd908cf11 100644 --- a/cmd/podman/diff.go +++ b/cmd/podman/diff.go @@ -3,11 +3,11 @@ package main import ( "fmt" - "github.com/containers/libpod/cmd/podman/containers" - "github.com/containers/libpod/cmd/podman/images" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/containers" + "github.com/containers/libpod/v2/cmd/podman/images" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/generate/generate.go b/cmd/podman/generate/generate.go index a13e509035..d85d933479 100644 --- a/cmd/podman/generate/generate.go +++ b/cmd/podman/generate/generate.go @@ -1,10 +1,10 @@ package pods import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/spf13/cobra" ) diff --git a/cmd/podman/generate/kube.go b/cmd/podman/generate/kube.go index 86a9cc686a..56ddfbe975 100644 --- a/cmd/podman/generate/kube.go +++ b/cmd/podman/generate/kube.go @@ -5,9 +5,9 @@ import ( "io/ioutil" "os" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/generate/systemd.go b/cmd/podman/generate/systemd.go index b4ab0f9dff..5f319f21b8 100644 --- a/cmd/podman/generate/systemd.go +++ b/cmd/podman/generate/systemd.go @@ -3,9 +3,9 @@ package pods import ( "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/healthcheck/healthcheck.go b/cmd/podman/healthcheck/healthcheck.go index 15ed47d398..fdf40e8722 100644 --- a/cmd/podman/healthcheck/healthcheck.go +++ b/cmd/podman/healthcheck/healthcheck.go @@ -1,9 +1,9 @@ package healthcheck import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/healthcheck/run.go b/cmd/podman/healthcheck/run.go index 17ddf17b62..d6a4290800 100644 --- a/cmd/podman/healthcheck/run.go +++ b/cmd/podman/healthcheck/run.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index eefc488d3f..3ea74b4afc 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -10,9 +10,9 @@ import ( buildahCLI "github.com/containers/buildah/pkg/cli" "github.com/containers/buildah/pkg/parse" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/docker/go-units" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" diff --git a/cmd/podman/images/diff.go b/cmd/podman/images/diff.go index 53165543c6..10a1c06ec8 100644 --- a/cmd/podman/images/diff.go +++ b/cmd/podman/images/diff.go @@ -1,9 +1,9 @@ package images import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/report" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/report" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/images/exists.go b/cmd/podman/images/exists.go index 13191113fd..7e05ea8f73 100644 --- a/cmd/podman/images/exists.go +++ b/cmd/podman/images/exists.go @@ -1,8 +1,8 @@ package images import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/history.go b/cmd/podman/images/history.go index ea4b9983f4..3732e6e033 100644 --- a/cmd/podman/images/history.go +++ b/cmd/podman/images/history.go @@ -10,8 +10,8 @@ import ( "time" "unicode" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/docker/go-units" "github.com/pkg/errors" "github.com/spf13/cobra" diff --git a/cmd/podman/images/image.go b/cmd/podman/images/image.go index 2d1974d5c7..89badd0352 100644 --- a/cmd/podman/images/image.go +++ b/cmd/podman/images/image.go @@ -1,9 +1,9 @@ package images import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/images.go b/cmd/podman/images/images.go index 96ef344bf7..0a77946c73 100644 --- a/cmd/podman/images/images.go +++ b/cmd/podman/images/images.go @@ -3,8 +3,8 @@ package images import ( "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/import.go b/cmd/podman/images/import.go index 0e16128ce9..6b4b4f6b67 100644 --- a/cmd/podman/images/import.go +++ b/cmd/podman/images/import.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/parse" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/parse" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/hashicorp/go-multierror" "github.com/pkg/errors" "github.com/spf13/cobra" diff --git a/cmd/podman/images/inspect.go b/cmd/podman/images/inspect.go index a1a9e91ebc..c6ef503bff 100644 --- a/cmd/podman/images/inspect.go +++ b/cmd/podman/images/inspect.go @@ -1,9 +1,9 @@ package images import ( - "github.com/containers/libpod/cmd/podman/inspect" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/inspect" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/list.go b/cmd/podman/images/list.go index 53be82dda8..37ff491c36 100644 --- a/cmd/podman/images/list.go +++ b/cmd/podman/images/list.go @@ -11,8 +11,8 @@ import ( "time" "unicode" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/docker/go-units" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/images/load.go b/cmd/podman/images/load.go index 115e9a070d..df7baae22f 100644 --- a/cmd/podman/images/load.go +++ b/cmd/podman/images/load.go @@ -9,10 +9,10 @@ import ( "strings" "github.com/containers/image/v5/docker/reference" - "github.com/containers/libpod/cmd/podman/parse" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/parse" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/images/prune.go b/cmd/podman/images/prune.go index 676382a990..002453907d 100644 --- a/cmd/podman/images/prune.go +++ b/cmd/podman/images/prune.go @@ -6,10 +6,10 @@ import ( "os" "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/pull.go b/cmd/podman/images/pull.go index 9e137b5d65..83bb186df0 100644 --- a/cmd/podman/images/pull.go +++ b/cmd/podman/images/pull.go @@ -6,9 +6,9 @@ import ( "github.com/containers/common/pkg/auth" "github.com/containers/image/v5/types" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/images/push.go b/cmd/podman/images/push.go index 7af2d9343d..4eeed13d41 100644 --- a/cmd/podman/images/push.go +++ b/cmd/podman/images/push.go @@ -5,9 +5,9 @@ import ( "github.com/containers/common/pkg/auth" "github.com/containers/image/v5/types" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/images/rm.go b/cmd/podman/images/rm.go index 4b99205322..c14c256fc8 100644 --- a/cmd/podman/images/rm.go +++ b/cmd/podman/images/rm.go @@ -3,9 +3,9 @@ package images import ( "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/errorhandling" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/errorhandling" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/images/rmi.go b/cmd/podman/images/rmi.go index 8e1759ef47..8e70906cec 100644 --- a/cmd/podman/images/rmi.go +++ b/cmd/podman/images/rmi.go @@ -3,8 +3,8 @@ package images import ( "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/save.go b/cmd/podman/images/save.go index 9b03c13839..097cb3a40c 100644 --- a/cmd/podman/images/save.go +++ b/cmd/podman/images/save.go @@ -5,12 +5,12 @@ import ( "os" "strings" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" - "github.com/containers/libpod/cmd/podman/parse" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/parse" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/images/search.go b/cmd/podman/images/search.go index d7756433b7..f1a2cda96d 100644 --- a/cmd/podman/images/search.go +++ b/cmd/podman/images/search.go @@ -8,9 +8,9 @@ import ( "github.com/containers/buildah/pkg/formats" "github.com/containers/common/pkg/auth" "github.com/containers/image/v5/types" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util/camelcase" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util/camelcase" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/images/sign.go b/cmd/podman/images/sign.go index bd9cf2ea7d..9115342ed0 100644 --- a/cmd/podman/images/sign.go +++ b/cmd/podman/images/sign.go @@ -3,8 +3,8 @@ package images import ( "os" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/tag.go b/cmd/podman/images/tag.go index 859489552b..1bb956288e 100644 --- a/cmd/podman/images/tag.go +++ b/cmd/podman/images/tag.go @@ -1,8 +1,8 @@ package images import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/tree.go b/cmd/podman/images/tree.go index 5e82e9dea0..f229cfa29a 100644 --- a/cmd/podman/images/tree.go +++ b/cmd/podman/images/tree.go @@ -3,8 +3,8 @@ package images import ( "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/trust.go b/cmd/podman/images/trust.go index 88a5678715..9fc8c1f07d 100644 --- a/cmd/podman/images/trust.go +++ b/cmd/podman/images/trust.go @@ -1,9 +1,9 @@ package images import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/trust_set.go b/cmd/podman/images/trust_set.go index 5868f5546a..71b77f9614 100644 --- a/cmd/podman/images/trust_set.go +++ b/cmd/podman/images/trust_set.go @@ -1,10 +1,10 @@ package images import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/trust_show.go b/cmd/podman/images/trust_show.go index dbaa800a4a..79a583caa5 100644 --- a/cmd/podman/images/trust_show.go +++ b/cmd/podman/images/trust_show.go @@ -6,8 +6,8 @@ import ( "text/tabwriter" "text/template" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/images/untag.go b/cmd/podman/images/untag.go index 5d12748953..39804b2bc8 100644 --- a/cmd/podman/images/untag.go +++ b/cmd/podman/images/untag.go @@ -1,8 +1,8 @@ package images import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/inspect.go b/cmd/podman/inspect.go index befdeb4453..42f6ccea3d 100644 --- a/cmd/podman/inspect.go +++ b/cmd/podman/inspect.go @@ -1,9 +1,9 @@ package main import ( - "github.com/containers/libpod/cmd/podman/inspect" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/inspect" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/inspect/inspect.go b/cmd/podman/inspect/inspect.go index 1c1e68d6f7..6fcca597b5 100644 --- a/cmd/podman/inspect/inspect.go +++ b/cmd/podman/inspect/inspect.go @@ -7,9 +7,9 @@ import ( "strings" "github.com/containers/buildah/pkg/formats" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/podman/login.go b/cmd/podman/login.go index 92f13d0e7a..2239d61b9b 100644 --- a/cmd/podman/login.go +++ b/cmd/podman/login.go @@ -6,9 +6,9 @@ import ( "github.com/containers/common/pkg/auth" "github.com/containers/image/v5/types" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/registries" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/registries" "github.com/spf13/cobra" ) diff --git a/cmd/podman/logout.go b/cmd/podman/logout.go index c016de8aed..b38f927492 100644 --- a/cmd/podman/logout.go +++ b/cmd/podman/logout.go @@ -5,9 +5,9 @@ import ( "github.com/containers/common/pkg/auth" "github.com/containers/image/v5/types" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/registries" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/registries" "github.com/spf13/cobra" ) diff --git a/cmd/podman/main.go b/cmd/podman/main.go index 6365381312..5f740a0064 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -4,19 +4,19 @@ import ( "fmt" "os" - _ "github.com/containers/libpod/cmd/podman/containers" - _ "github.com/containers/libpod/cmd/podman/generate" - _ "github.com/containers/libpod/cmd/podman/healthcheck" - _ "github.com/containers/libpod/cmd/podman/images" - _ "github.com/containers/libpod/cmd/podman/manifest" - _ "github.com/containers/libpod/cmd/podman/networks" - _ "github.com/containers/libpod/cmd/podman/play" - _ "github.com/containers/libpod/cmd/podman/pods" - "github.com/containers/libpod/cmd/podman/registry" - _ "github.com/containers/libpod/cmd/podman/system" - _ "github.com/containers/libpod/cmd/podman/volumes" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/terminal" + _ "github.com/containers/libpod/v2/cmd/podman/containers" + _ "github.com/containers/libpod/v2/cmd/podman/generate" + _ "github.com/containers/libpod/v2/cmd/podman/healthcheck" + _ "github.com/containers/libpod/v2/cmd/podman/images" + _ "github.com/containers/libpod/v2/cmd/podman/manifest" + _ "github.com/containers/libpod/v2/cmd/podman/networks" + _ "github.com/containers/libpod/v2/cmd/podman/play" + _ "github.com/containers/libpod/v2/cmd/podman/pods" + "github.com/containers/libpod/v2/cmd/podman/registry" + _ "github.com/containers/libpod/v2/cmd/podman/system" + _ "github.com/containers/libpod/v2/cmd/podman/volumes" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/terminal" "github.com/containers/storage/pkg/reexec" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/podman/manifest/add.go b/cmd/podman/manifest/add.go index 38f832fadf..a9947d8058 100644 --- a/cmd/podman/manifest/add.go +++ b/cmd/podman/manifest/add.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/manifest/annotate.go b/cmd/podman/manifest/annotate.go index 82ee1ffdae..779c33edce 100644 --- a/cmd/podman/manifest/annotate.go +++ b/cmd/podman/manifest/annotate.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/manifest/create.go b/cmd/podman/manifest/create.go index 2ab1fccea7..a05cae7f62 100644 --- a/cmd/podman/manifest/create.go +++ b/cmd/podman/manifest/create.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/manifest/inspect.go b/cmd/podman/manifest/inspect.go index 861f4be4fc..0ab8f7a7c8 100644 --- a/cmd/podman/manifest/inspect.go +++ b/cmd/podman/manifest/inspect.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/manifest/manifest.go b/cmd/podman/manifest/manifest.go index 26a516ec86..f992705c16 100644 --- a/cmd/podman/manifest/manifest.go +++ b/cmd/podman/manifest/manifest.go @@ -1,9 +1,9 @@ package manifest import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/manifest/push.go b/cmd/podman/manifest/push.go index e3073faea3..d1eb37ae5a 100644 --- a/cmd/podman/manifest/push.go +++ b/cmd/podman/manifest/push.go @@ -3,9 +3,9 @@ package manifest import ( "github.com/containers/common/pkg/auth" "github.com/containers/image/v5/types" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/manifest/remove.go b/cmd/podman/manifest/remove.go index 815a3f0a84..a77cd04c7e 100644 --- a/cmd/podman/manifest/remove.go +++ b/cmd/podman/manifest/remove.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/networks/create.go b/cmd/podman/networks/create.go index 2d29beddde..f208fad7c7 100644 --- a/cmd/podman/networks/create.go +++ b/cmd/podman/networks/create.go @@ -4,10 +4,10 @@ import ( "fmt" "net" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/network" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/network" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/cmd/podman/networks/inspect.go b/cmd/podman/networks/inspect.go index 31269e8361..bf2c7a5e0f 100644 --- a/cmd/podman/networks/inspect.go +++ b/cmd/podman/networks/inspect.go @@ -8,8 +8,8 @@ import ( "os" "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/networks/list.go b/cmd/podman/networks/list.go index 747fef26dc..ad2ee98b1c 100644 --- a/cmd/podman/networks/list.go +++ b/cmd/podman/networks/list.go @@ -8,10 +8,10 @@ import ( "strings" "text/tabwriter" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/network" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/network" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/cmd/podman/networks/network.go b/cmd/podman/networks/network.go index 8f605f9958..953e4678cf 100644 --- a/cmd/podman/networks/network.go +++ b/cmd/podman/networks/network.go @@ -1,9 +1,9 @@ package network import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/networks/rm.go b/cmd/podman/networks/rm.go index 34d57f6ef6..230da88a65 100644 --- a/cmd/podman/networks/rm.go +++ b/cmd/podman/networks/rm.go @@ -3,9 +3,9 @@ package network import ( "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/cmd/podman/play/kube.go b/cmd/podman/play/kube.go index 909f225a85..9bd5c10db7 100644 --- a/cmd/podman/play/kube.go +++ b/cmd/podman/play/kube.go @@ -6,10 +6,10 @@ import ( "github.com/containers/common/pkg/auth" "github.com/containers/image/v5/types" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/play/play.go b/cmd/podman/play/play.go index bc2aa18bed..eb8873595a 100644 --- a/cmd/podman/play/play.go +++ b/cmd/podman/play/play.go @@ -1,9 +1,9 @@ package pods import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go index 835a623590..0e2a085fd0 100644 --- a/cmd/podman/pods/create.go +++ b/cmd/podman/pods/create.go @@ -7,14 +7,14 @@ import ( "os" "strings" - "github.com/containers/libpod/cmd/podman/common" - "github.com/containers/libpod/cmd/podman/parse" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/common" + "github.com/containers/libpod/v2/cmd/podman/parse" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/podman/pods/exists.go b/cmd/podman/pods/exists.go index cf3e3eae59..599b6abe27 100644 --- a/cmd/podman/pods/exists.go +++ b/cmd/podman/pods/exists.go @@ -3,8 +3,8 @@ package pods import ( "context" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/inspect.go b/cmd/podman/pods/inspect.go index db2217aea6..e21c7a74b6 100644 --- a/cmd/podman/pods/inspect.go +++ b/cmd/podman/pods/inspect.go @@ -5,9 +5,9 @@ import ( "fmt" "github.com/containers/buildah/pkg/formats" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/kill.go b/cmd/podman/pods/kill.go index d83e4d77eb..2f49308975 100644 --- a/cmd/podman/pods/kill.go +++ b/cmd/podman/pods/kill.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/pause.go b/cmd/podman/pods/pause.go index 0ed3db9364..f79d889732 100644 --- a/cmd/podman/pods/pause.go +++ b/cmd/podman/pods/pause.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/pod.go b/cmd/podman/pods/pod.go index ca0283b11b..fff5ea615f 100644 --- a/cmd/podman/pods/pod.go +++ b/cmd/podman/pods/pod.go @@ -1,10 +1,10 @@ package pods import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/prune.go b/cmd/podman/pods/prune.go index bc15d80359..ee97e13f16 100644 --- a/cmd/podman/pods/prune.go +++ b/cmd/podman/pods/prune.go @@ -7,9 +7,9 @@ import ( "os" "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/ps.go b/cmd/podman/pods/ps.go index 395acd78f7..7a1221480b 100644 --- a/cmd/podman/pods/ps.go +++ b/cmd/podman/pods/ps.go @@ -11,9 +11,9 @@ import ( "text/template" "time" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/docker/go-units" "github.com/pkg/errors" "github.com/spf13/cobra" diff --git a/cmd/podman/pods/restart.go b/cmd/podman/pods/restart.go index 8bbbbb05d7..77d9f62d49 100644 --- a/cmd/podman/pods/restart.go +++ b/cmd/podman/pods/restart.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/rm.go b/cmd/podman/pods/rm.go index 5a5aa699ba..3e07b31e9a 100644 --- a/cmd/podman/pods/rm.go +++ b/cmd/podman/pods/rm.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/common" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/common" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/start.go b/cmd/podman/pods/start.go index 7ca211baa3..586737fb2b 100644 --- a/cmd/podman/pods/start.go +++ b/cmd/podman/pods/start.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/common" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/common" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/stats.go b/cmd/podman/pods/stats.go index 619e49520d..930a6d15cd 100644 --- a/cmd/podman/pods/stats.go +++ b/cmd/podman/pods/stats.go @@ -12,10 +12,10 @@ import ( "github.com/buger/goterm" "github.com/containers/buildah/pkg/formats" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util/camelcase" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util/camelcase" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/stop.go b/cmd/podman/pods/stop.go index cb052575a8..84190fd082 100644 --- a/cmd/podman/pods/stop.go +++ b/cmd/podman/pods/stop.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/common" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/common" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/top.go b/cmd/podman/pods/top.go index d790869a4d..7e5f4e3215 100644 --- a/cmd/podman/pods/top.go +++ b/cmd/podman/pods/top.go @@ -7,10 +7,10 @@ import ( "strings" "text/tabwriter" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/pods/unpause.go b/cmd/podman/pods/unpause.go index 54553e4a85..f96f3481c7 100644 --- a/cmd/podman/pods/unpause.go +++ b/cmd/podman/pods/unpause.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/registry/config.go b/cmd/podman/registry/config.go index 85a63402b7..75e67b35d7 100644 --- a/cmd/podman/registry/config.go +++ b/cmd/podman/registry/config.go @@ -8,9 +8,9 @@ import ( "sync" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) diff --git a/cmd/podman/registry/registry.go b/cmd/podman/registry/registry.go index 71ee2bed05..d93b3e633f 100644 --- a/cmd/podman/registry/registry.go +++ b/cmd/podman/registry/registry.go @@ -4,10 +4,10 @@ import ( "context" "path/filepath" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) diff --git a/cmd/podman/registry/remote.go b/cmd/podman/registry/remote.go index ed1a874d63..006a1b9009 100644 --- a/cmd/podman/registry/remote.go +++ b/cmd/podman/registry/remote.go @@ -4,7 +4,7 @@ import ( "os" "sync" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/report/diff.go b/cmd/podman/report/diff.go index 0730f06e81..d044774a6d 100644 --- a/cmd/podman/report/diff.go +++ b/cmd/podman/report/diff.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/containers/storage/pkg/archive" "github.com/pkg/errors" ) diff --git a/cmd/podman/report/report.go b/cmd/podman/report/report.go index ce349ef350..b8b1536fdf 100644 --- a/cmd/podman/report/report.go +++ b/cmd/podman/report/report.go @@ -1,6 +1,6 @@ package report -import "github.com/containers/libpod/cmd/podman/registry" +import "github.com/containers/libpod/v2/cmd/podman/registry" // Pull in configured json library var json = registry.JSONLibrary() diff --git a/cmd/podman/root.go b/cmd/podman/root.go index 45ca48c39e..eccca3d113 100644 --- a/cmd/podman/root.go +++ b/cmd/podman/root.go @@ -10,13 +10,13 @@ import ( "strings" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/parallel" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/tracing" - "github.com/containers/libpod/version" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/parallel" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/tracing" + "github.com/containers/libpod/v2/version" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -128,6 +128,21 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error { return err } + for _, env := range cfg.Engine.Env { + splitEnv := strings.SplitN(env, "=", 2) + if len(splitEnv) != 2 { + return fmt.Errorf("invalid environment variable for engine %s, valid configuration is KEY=value pair", env) + } + // skip if the env is already defined + if _, ok := os.LookupEnv(splitEnv[0]); ok { + logrus.Debugf("environment variable %s is already defined, skip the settings from containers.conf", splitEnv[0]) + continue + } + if err := os.Setenv(splitEnv[0], splitEnv[1]); err != nil { + return err + } + } + if cmd.Flag("cpu-profile").Changed { f, err := os.Create(cfg.CPUProfile) if err != nil { diff --git a/cmd/podman/system/connection.go b/cmd/podman/system/connection.go index 8ee441446d..6a55d2d798 100644 --- a/cmd/podman/system/connection.go +++ b/cmd/podman/system/connection.go @@ -10,10 +10,10 @@ import ( "regexp" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/terminal" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/terminal" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/podman/system/df.go b/cmd/podman/system/df.go index c56990cb55..c2308f0cc5 100644 --- a/cmd/podman/system/df.go +++ b/cmd/podman/system/df.go @@ -9,9 +9,9 @@ import ( "text/tabwriter" "time" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/docker/go-units" "github.com/spf13/cobra" ) diff --git a/cmd/podman/system/events.go b/cmd/podman/system/events.go index c401c5a929..246611c1a3 100644 --- a/cmd/podman/system/events.go +++ b/cmd/podman/system/events.go @@ -8,10 +8,10 @@ import ( "strings" "github.com/containers/buildah/pkg/formats" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/system/info.go b/cmd/podman/system/info.go index dad63bcd4a..699f7b55c1 100644 --- a/cmd/podman/system/info.go +++ b/cmd/podman/system/info.go @@ -5,9 +5,9 @@ import ( "os" "text/template" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/ghodss/yaml" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/system/migrate.go b/cmd/podman/system/migrate.go index 28c23d88f6..cb67ae7603 100644 --- a/cmd/podman/system/migrate.go +++ b/cmd/podman/system/migrate.go @@ -6,10 +6,10 @@ import ( "fmt" "os" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra" "github.com/spf13/cobra" ) diff --git a/cmd/podman/system/prune.go b/cmd/podman/system/prune.go index cc9b473f1d..26b2a704f6 100644 --- a/cmd/podman/system/prune.go +++ b/cmd/podman/system/prune.go @@ -7,10 +7,10 @@ import ( "os" "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/system/renumber.go b/cmd/podman/system/renumber.go index 39cd15dd7c..82cf65d8fd 100644 --- a/cmd/podman/system/renumber.go +++ b/cmd/podman/system/renumber.go @@ -6,10 +6,10 @@ import ( "fmt" "os" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra" "github.com/spf13/cobra" ) diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go index b16fbd9c7e..9b4493391b 100644 --- a/cmd/podman/system/reset.go +++ b/cmd/podman/system/reset.go @@ -8,10 +8,10 @@ import ( "os" "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go index 5301b855e2..312fcda19b 100644 --- a/cmd/podman/system/service.go +++ b/cmd/podman/system/service.go @@ -9,11 +9,11 @@ import ( "syscall" "time" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/systemd" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/systemd" + "github.com/containers/libpod/v2/pkg/util" "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go index f5386c4f15..4baa0f6bf8 100644 --- a/cmd/podman/system/service_abi.go +++ b/cmd/podman/system/service_abi.go @@ -7,9 +7,9 @@ import ( "net" "strings" - api "github.com/containers/libpod/pkg/api/server" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra" + api "github.com/containers/libpod/v2/pkg/api/server" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/pflag" diff --git a/cmd/podman/system/system.go b/cmd/podman/system/system.go index 7937e6df8e..2dd6cf7748 100644 --- a/cmd/podman/system/system.go +++ b/cmd/podman/system/system.go @@ -1,9 +1,9 @@ package system import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/system/unshare.go b/cmd/podman/system/unshare.go index 109bab9edd..bd6540e4b1 100644 --- a/cmd/podman/system/unshare.go +++ b/cmd/podman/system/unshare.go @@ -3,9 +3,9 @@ package system import ( "os" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/system/varlink.go b/cmd/podman/system/varlink.go index 33a8075333..e5d83180eb 100644 --- a/cmd/podman/system/varlink.go +++ b/cmd/podman/system/varlink.go @@ -5,8 +5,8 @@ package system import ( "time" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/system/version.go b/cmd/podman/system/version.go index 92a3225b6b..5aac346999 100644 --- a/cmd/podman/system/version.go +++ b/cmd/podman/system/version.go @@ -8,10 +8,10 @@ import ( "text/tabwriter" "github.com/containers/buildah/pkg/formats" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/cmd/podman/utils/utils.go b/cmd/podman/utils/utils.go index f4c7046283..029ed526ef 100644 --- a/cmd/podman/utils/utils.go +++ b/cmd/podman/utils/utils.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" ) // IsDir returns true if the specified path refers to a directory. diff --git a/cmd/podman/validate/latest.go b/cmd/podman/validate/latest.go index 6e2aa063bf..0ebed72274 100644 --- a/cmd/podman/validate/latest.go +++ b/cmd/podman/validate/latest.go @@ -1,7 +1,7 @@ package validate import ( - "github.com/containers/libpod/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/registry" "github.com/spf13/cobra" ) diff --git a/cmd/podman/volumes/create.go b/cmd/podman/volumes/create.go index 16ac3771e9..2710014ef1 100644 --- a/cmd/podman/volumes/create.go +++ b/cmd/podman/volumes/create.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/parse" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/parse" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/volumes/inspect.go b/cmd/podman/volumes/inspect.go index 79f65ea4ad..9a8f4049b0 100644 --- a/cmd/podman/volumes/inspect.go +++ b/cmd/podman/volumes/inspect.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/containers/buildah/pkg/formats" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" diff --git a/cmd/podman/volumes/list.go b/cmd/podman/volumes/list.go index 72bf9f25b0..9e3a8f77b2 100644 --- a/cmd/podman/volumes/list.go +++ b/cmd/podman/volumes/list.go @@ -9,9 +9,9 @@ import ( "strings" "text/tabwriter" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/volumes/prune.go b/cmd/podman/volumes/prune.go index 57344385b5..330488e0d0 100644 --- a/cmd/podman/volumes/prune.go +++ b/cmd/podman/volumes/prune.go @@ -7,10 +7,10 @@ import ( "os" "strings" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/volumes/rm.go b/cmd/podman/volumes/rm.go index f5a898ff30..2636ad1a2b 100644 --- a/cmd/podman/volumes/rm.go +++ b/cmd/podman/volumes/rm.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/cmd/podman/volumes/volume.go b/cmd/podman/volumes/volume.go index 93b15eb384..3ef20a0275 100644 --- a/cmd/podman/volumes/volume.go +++ b/cmd/podman/volumes/volume.go @@ -1,9 +1,9 @@ package volumes import ( - "github.com/containers/libpod/cmd/podman/registry" - "github.com/containers/libpod/cmd/podman/validate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/cmd/podman/registry" + "github.com/containers/libpod/v2/cmd/podman/validate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/completions/bash/podman b/completions/bash/podman index c0d9560edd..458090ac45 100644 --- a/completions/bash/podman +++ b/completions/bash/podman @@ -2120,6 +2120,7 @@ _podman_container_run() { --stop-signal --stop-timeout --tmpfs + --tz --subgidname --subuidname --sysctl diff --git a/docs/source/markdown/podman-auto-update.1.md b/docs/source/markdown/podman-auto-update.1.md index f37280cda9..b6941362ab 100644 --- a/docs/source/markdown/podman-auto-update.1.md +++ b/docs/source/markdown/podman-auto-update.1.md @@ -23,6 +23,9 @@ Note that `podman auto-update` relies on systemd and requires a fully-qualified This enforcement is necessary to know which image to actually check and pull. If an image ID was used, Podman would not know which image to check/pull anymore. +Moreover, the systemd units are expected to be generated with `podman-generate-systemd --new`, or similar units that create new containers in order to run the updated images. +Systemd units that start and stop a container cannot run a new image. + ## OPTIONS **--authfile**=*path* diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md index 30ac54de2d..e0703fd228 100644 --- a/docs/source/markdown/podman-create.1.md +++ b/docs/source/markdown/podman-create.1.md @@ -702,6 +702,17 @@ If specified, the first argument refers to an exploded container on the file sys This is useful to run a container without requiring any image management, the rootfs of the container is assumed to be managed externally. +**--sdnotify**=**container**|**conmon**|**ignore** + +Determines how to use the NOTIFY_SOCKET, as passed with systemd and Type=notify. + +Default is **container**, which means allow the OCI runtime to proxy the socket into the +container to receive ready notification. Podman will set the MAINPID to conmon's pid. +The **conmon** option sets MAINPID to conmon's pid, and sends READY when the container +has started. The socket is never passed to the runtime or the container. +The **ignore** option removes NOTIFY_SOCKET from the environment for itself and child processes, +for the case where some other process above Podman uses NOTIFY_SOCKET and Podman should not use it. + **--seccomp-policy**=*policy* Specify the policy to select the seccomp profile. If set to *image*, Podman will look for a "io.podman.seccomp.profile" label in the container-image config and use its value as a seccomp profile. Otherwise, Podman will follow the *default* policy by applying the default profile unless specified otherwise via *--security-opt seccomp* as described below. @@ -815,6 +826,10 @@ interactive shell. The default is false. Note: The **-t** option is incompatible with a redirection of the Podman client standard input. +**--tz**=*timezone* + +Set timezone in container. This flag takes area-based timezones, GMT time, as well as `local`, which sets the timezone in the container to match the host machine. See `/usr/share/zoneinfo/` for valid timezones. + **--uidmap**=*container_uid:host_uid:amount* UID map for the user namespace. Using this flag will run the container with user namespace enabled. It conflicts with the `--userns` and `--subuidname` flags. @@ -1036,6 +1051,14 @@ the uids and gids from the host. $ podman create --uidmap 0:30000:7000 --gidmap 0:30000:7000 fedora echo hello ``` +### Configure timezone in a container + +``` +$ podman create --tz=local alpine date +$ podman create --tz=Asia/Shanghai alpine date +$ podman create --tz=US/Eastern alpine date +``` + ### Rootless Containers Podman runs as a non root user on most systems. This feature requires that a new enough version of shadow-utils diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md index 2e2adbc7ee..54c497ba2d 100644 --- a/docs/source/markdown/podman-run.1.md +++ b/docs/source/markdown/podman-run.1.md @@ -723,6 +723,17 @@ of the container is assumed to be managed externally. Note: On **SELinux** systems, the rootfs needs the correct label, which is by default **unconfined_u:object_r:container_file_t**. +**--sdnotify**=**container**|**conmon**|**ignore** + +Determines how to use the NOTIFY_SOCKET, as passed with systemd and Type=notify. + +Default is **container**, which means allow the OCI runtime to proxy the socket into the +container to receive ready notification. Podman will set the MAINPID to conmon's pid. +The **conmon** option sets MAINPID to conmon's pid, and sends READY when the container +has started. The socket is never passed to the runtime or the container. +The **ignore** option removes NOTIFY_SOCKET from the environment for itself and child processes, +for the case where some other process above Podman uses NOTIFY_SOCKET and Podman should not use it. + **--seccomp-policy**=*policy* Specify the policy to select the seccomp profile. If set to *image*, Podman will look for a "io.podman.seccomp.profile" label in the container-image config and use its value as a seccomp profile. Otherwise, Podman will follow the *default* policy by applying the default profile unless specified otherwise via *--security-opt seccomp* as described below. @@ -856,6 +867,10 @@ interactive shell. The default is **false**. **NOTE**: The **-t** option is incompatible with a redirection of the Podman client standard input. +**--tz**=*timezone* + +Set timezone in container. This flag takes area-based timezones, GMT time, as well as `local`, which sets the timezone in the container to match the host machine. See `/usr/share/zoneinfo/` for valid timezones. + **--uidmap**=*container_uid*:*host_uid*:*amount* Run the container in a new user namespace using the supplied mapping. This option conflicts @@ -1319,6 +1334,14 @@ using global options. podman --log-level=debug --storage-driver overlay --storage-opt "overlay.mount_program=/usr/bin/fuse-overlayfs" run busybox /bin/sh ``` +### Configure timezone in a container + +``` +$ podman run --tz=local alpine date +$ podman run --tz=Asia/Shanghai alpine date +$ podman run --tz=US/Eastern alpine date +``` + ### Rootless Containers Podman runs as a non root user on most systems. This feature requires that a new enough version of **shadow-utils** diff --git a/docs/source/markdown/podman.1.md b/docs/source/markdown/podman.1.md index ce02ef3a70..c45c102439 100644 --- a/docs/source/markdown/podman.1.md +++ b/docs/source/markdown/podman.1.md @@ -123,6 +123,10 @@ NOTE --tmpdir is not used for the temporary storage of downloaded images. Use t Print the version +## Environment Variables + +Podman can set up environment variables from env of [engine] table in containers.conf. These variables can be overridden by passing environment variables before the `podman` commands. + ## Exit Status The exit code from `podman` gives information about why the container diff --git a/go.mod b/go.mod index 918212bc38..4f93131e10 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/containers/libpod +module github.com/containers/libpod/v2 go 1.13 @@ -35,7 +35,7 @@ require ( github.com/hpcloud/tail v1.0.0 github.com/json-iterator/go v1.1.10 github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618 - github.com/onsi/ginkgo v1.13.0 + github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 @@ -43,6 +43,7 @@ require ( github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2 github.com/opencontainers/runtime-tools v0.9.0 github.com/opencontainers/selinux v1.5.2 + github.com/openshift/imagebuilder v1.1.6 // indirect github.com/opentracing/opentracing-go v1.2.0 github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.0 @@ -63,7 +64,7 @@ require ( golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 gopkg.in/yaml.v2 v2.3.0 - k8s.io/api v0.18.4 + k8s.io/api v0.18.5 k8s.io/apimachinery v0.18.5 k8s.io/client-go v0.0.0-20190620085101-78d2af792bab ) diff --git a/go.sum b/go.sum index be08553d58..e4d14069c8 100644 --- a/go.sum +++ b/go.sum @@ -68,7 +68,6 @@ github.com/containernetworking/plugins v0.8.6 h1:npZTLiMa4CRn6m5P9+1Dz4O1j0UeFbm github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= github.com/containers/buildah v1.15.0 h1:p9cYJwcQ5Fnv0iBeHAFwHR0K+kcv7LbyAjUtc+HjYsc= github.com/containers/buildah v1.15.0/go.mod h1:j0AY2kWpmaOPPV5GKDJY9dMtekk5WMmMhcB+z0OW+vc= -github.com/containers/common v0.14.0 h1:hiZFDPf6ajKiDmojN5f5X3gboKPO73NLrYb0RXfrQiA= github.com/containers/common v0.14.0/go.mod h1:9olhlE+WhYof1npnMJdyRMX14/yIUint6zyHzcyRVAg= github.com/containers/common v0.15.1 h1:ycIJf7ugHf0f2ag9uYFijQLbcrPu1KnOqdARgs2XbRU= github.com/containers/common v0.15.1/go.mod h1:zJ/BLqK6INqFOCxN/gh9ae1qqWD/ghk2T0jAYqz/Xq4= @@ -309,6 +308,8 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -343,6 +344,8 @@ github.com/opencontainers/selinux v1.5.2 h1:F6DgIsjgBIcDksLW4D5RG9bXok6oqZ3nvMwj github.com/opencontainers/selinux v1.5.2/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g= github.com/openshift/imagebuilder v1.1.5 h1:WAIHV6cGF9e0AcLBA7RIi7XbFoB7R+e/MWu1I+1NUOM= github.com/openshift/imagebuilder v1.1.5/go.mod h1:9aJRczxCH0mvT6XQ+5STAQaPWz7OsWcU5/mRkt8IWeo= +github.com/openshift/imagebuilder v1.1.6 h1:1+YzRxIIefY4QqtCImx6rg+75QrKNfBoPAKxgMo/khM= +github.com/openshift/imagebuilder v1.1.6/go.mod h1:9aJRczxCH0mvT6XQ+5STAQaPWz7OsWcU5/mRkt8IWeo= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/ostreedev/ostree-go v0.0.0-20190702140239-759a8c1ac913 h1:TnbXhKzrTOyuvWrjI8W6pcoI9XPbLHFXCdN2dtUw7Rw= @@ -626,11 +629,9 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A= -k8s.io/api v0.18.4 h1:8x49nBRxuXGUlDlwlWd3RMY1SayZrzFfxea3UZSkFw4= -k8s.io/api v0.18.4/go.mod h1:lOIQAKYgai1+vz9J7YcDZwC26Z0zQewYOGWdyIPUUQ4= +k8s.io/api v0.18.5 h1:fKbCxr+U3fu7k6jB+QeYPD/c6xKYeSJ2KVWmyUypuWM= +k8s.io/api v0.18.5/go.mod h1:tN+e/2nbdGKOAH55NMV8oGrMG+3uRlA9GaRfvnCCSNk= k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA= -k8s.io/apimachinery v0.18.4 h1:ST2beySjhqwJoIFk6p7Hp5v5O0hYY6Gngq/gUYXTPIA= -k8s.io/apimachinery v0.18.4/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.18.5 h1:Lh6tgsM9FMkC12K5T5QjRm7rDs6aQN5JHkA0JomULDM= k8s.io/apimachinery v0.18.5/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/client-go v0.0.0-20190620085101-78d2af792bab h1:E8Fecph0qbNsAbijJJQryKu4Oi9QTp5cVpjTE+nqg6g= diff --git a/hack/podman-registry-go/registry.go b/hack/podman-registry-go/registry.go index a833049140..5358aa4603 100644 --- a/hack/podman-registry-go/registry.go +++ b/hack/podman-registry-go/registry.go @@ -3,7 +3,7 @@ package registry import ( "strings" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/utils" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go index be27876705..38881d3e45 100644 --- a/libpod/boltdb_state.go +++ b/libpod/boltdb_state.go @@ -6,7 +6,7 @@ import ( "strings" "sync" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go index 70abbb39cb..5b339e7c25 100644 --- a/libpod/boltdb_state_internal.go +++ b/libpod/boltdb_state_internal.go @@ -6,8 +6,8 @@ import ( "runtime" "strings" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/boltdb_state_linux.go b/libpod/boltdb_state_linux.go index 6ccda71bd5..4fe0a3eaa4 100644 --- a/libpod/boltdb_state_linux.go +++ b/libpod/boltdb_state_linux.go @@ -3,7 +3,7 @@ package libpod import ( - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/common_test.go b/libpod/common_test.go index abf336f970..dff04af5c2 100644 --- a/libpod/common_test.go +++ b/libpod/common_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/lock" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/lock" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/opencontainers/runtime-tools/generate" "github.com/stretchr/testify/assert" diff --git a/libpod/container.go b/libpod/container.go index 20688e3ee2..fa90fef7a9 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -13,11 +13,11 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types/current" "github.com/containers/common/pkg/config" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/lock" - "github.com/containers/libpod/pkg/namespaces" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/lock" + "github.com/containers/libpod/v2/pkg/namespaces" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/utils" "github.com/containers/storage" "github.com/cri-o/ocicni/pkg/ocicni" spec "github.com/opencontainers/runtime-spec/specs-go" @@ -414,6 +414,8 @@ type ContainerConfig struct { // sharing kernel namespaces in a pod IsInfra bool `json:"pause"` + // SdNotifyMode tells libpod what to do with a NOTIFY_SOCKET if passed + SdNotifyMode string `json:"sdnotifyMode,omitempty"` // Systemd tells libpod to setup the container in systemd mode Systemd bool `json:"systemd"` @@ -424,6 +426,10 @@ type ContainerConfig struct { // to 0, 1, 2) that will be passed to the executed process. The total FDs // passed will be 3 + PreserveFDs. PreserveFDs uint `json:"preserveFds,omitempty"` + + // Timezone is the timezone inside the container. + // Local means it has the same timezone as the host machine + Timezone string `json:"timezone,omitempty"` } // ContainerNamedVolume is a named volume that will be mounted into the @@ -1248,3 +1254,8 @@ func (c *Container) AutoRemove() bool { } return c.Spec().Annotations[define.InspectAnnotationAutoremove] == define.InspectResponseTrue } + +func (c *Container) Timezone() string { + return c.config.Timezone + +} diff --git a/libpod/container_api.go b/libpod/container_api.go index 5e79763b6d..b37b05ff20 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -10,9 +10,9 @@ import ( "sync" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/libpod/logs" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/libpod/logs" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/container_commit.go b/libpod/container_commit.go index fa6e95b38c..e35ae11483 100644 --- a/libpod/container_commit.go +++ b/libpod/container_commit.go @@ -9,10 +9,10 @@ import ( "github.com/containers/buildah/util" is "github.com/containers/image/v5/storage" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/libpod/image" - libpodutil "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/libpod/image" + libpodutil "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/container_exec.go b/libpod/container_exec.go index a0e8904dce..69da6fcfec 100644 --- a/libpod/container_exec.go +++ b/libpod/container_exec.go @@ -10,8 +10,8 @@ import ( "time" "github.com/containers/common/pkg/capabilities" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" "github.com/containers/storage/pkg/stringid" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/container_graph.go b/libpod/container_graph.go index 97a12ec424..f38493b4e2 100644 --- a/libpod/container_graph.go +++ b/libpod/container_graph.go @@ -4,7 +4,7 @@ import ( "context" "strings" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/container_graph_test.go b/libpod/container_graph_test.go index 38f03c59c0..579b6eeada 100644 --- a/libpod/container_graph_test.go +++ b/libpod/container_graph_test.go @@ -3,7 +3,7 @@ package libpod import ( "testing" - "github.com/containers/libpod/libpod/lock" + "github.com/containers/libpod/v2/libpod/lock" "github.com/stretchr/testify/assert" ) diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index c6d9e1a65c..94d5dc93bc 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -5,9 +5,9 @@ import ( "strings" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/driver" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/driver" + "github.com/containers/libpod/v2/pkg/util" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" "github.com/opencontainers/runtime-tools/validate" @@ -322,6 +322,8 @@ func (c *Container) generateInspectContainerConfig(spec *spec.Spec) *define.Insp ctrConfig.CreateCommand = c.config.CreateCommand + ctrConfig.Timezone = c.config.Timezone + return ctrConfig } diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 27b795871d..12132cf414 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -12,18 +12,19 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/ctime" - "github.com/containers/libpod/pkg/hooks" - "github.com/containers/libpod/pkg/hooks/exec" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/selinux" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/ctime" + "github.com/containers/libpod/v2/pkg/hooks" + "github.com/containers/libpod/v2/pkg/hooks/exec" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/selinux" "github.com/containers/storage" "github.com/containers/storage/pkg/archive" "github.com/containers/storage/pkg/idtools" "github.com/containers/storage/pkg/mount" + "github.com/coreos/go-systemd/v22/daemon" securejoin "github.com/cyphar/filepath-securejoin" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" @@ -1192,6 +1193,19 @@ func (c *Container) start() error { c.state.State = define.ContainerStateRunning + if c.config.SdNotifyMode != define.SdNotifyModeIgnore { + payload := fmt.Sprintf("MAINPID=%d", c.state.ConmonPID) + if c.config.SdNotifyMode == define.SdNotifyModeConmon { + payload += "\n" + payload += daemon.SdNotifyReady + } + if sent, err := daemon.SdNotify(false, payload); err != nil { + logrus.Errorf("Error notifying systemd of Conmon PID: %s", err.Error()) + } else if sent { + logrus.Debugf("Notify sent successfully") + } + } + if c.config.HealthCheckConfig != nil { if err := c.updateHealthStatus(define.HealthCheckStarting); err != nil { logrus.Error(err) diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 2c78f6bd28..8bf6092c3f 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -22,16 +22,16 @@ import ( "github.com/containers/buildah/pkg/secrets" "github.com/containers/common/pkg/apparmor" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/annotations" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/criu" - "github.com/containers/libpod/pkg/lookup" - "github.com/containers/libpod/pkg/resolvconf" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/annotations" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/criu" + "github.com/containers/libpod/v2/pkg/lookup" + "github.com/containers/libpod/v2/pkg/resolvconf" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" + "github.com/containers/libpod/v2/utils" "github.com/containers/storage/pkg/archive" securejoin "github.com/cyphar/filepath-securejoin" "github.com/opencontainers/runc/libcontainer/user" @@ -1241,6 +1241,31 @@ func (c *Container) makeBindMounts() error { c.state.BindMounts["/etc/hostname"] = hostnamePath } + // Make /etc/localtime + if c.Timezone() != "" { + if _, ok := c.state.BindMounts["/etc/localtime"]; !ok { + var zonePath string + if c.Timezone() == "local" { + zonePath, err = filepath.EvalSymlinks("/etc/localtime") + if err != nil { + return errors.Wrapf(err, "error finding local timezone for container %s", c.ID()) + } + } else { + zone := filepath.Join("/usr/share/zoneinfo", c.Timezone()) + zonePath, err = filepath.EvalSymlinks(zone) + if err != nil { + return errors.Wrapf(err, "error setting timezone for container %s", c.ID()) + } + } + localtimePath, err := c.copyTimezoneFile(zonePath) + if err != nil { + return errors.Wrapf(err, "error setting timezone for container %s", c.ID()) + } + c.state.BindMounts["/etc/localtime"] = localtimePath + + } + } + // Make .containerenv // Empty file, so no need to recreate if it exists if _, ok := c.state.BindMounts["/run/.containerenv"]; !ok { @@ -1533,3 +1558,35 @@ func (c *Container) getOCICgroupPath() (string, error) { return "", errors.Wrapf(define.ErrInvalidArg, "invalid cgroup manager %s requested", c.runtime.config.Engine.CgroupManager) } } + +func (c *Container) copyTimezoneFile(zonePath string) (string, error) { + var localtimeCopy string = filepath.Join(c.state.RunDir, "localtime") + file, err := os.Stat(zonePath) + if err != nil { + return "", err + } + if file.IsDir() { + return "", errors.New("Invalid timezone: is a directory") + } + src, err := os.Open(zonePath) + if err != nil { + return "", err + } + defer src.Close() + dest, err := os.Create(localtimeCopy) + if err != nil { + return "", err + } + defer dest.Close() + _, err = io.Copy(dest, src) + if err != nil { + return "", err + } + if err := label.Relabel(localtimeCopy, c.config.MountLabel, false); err != nil { + return "", err + } + if err := dest.Chown(c.RootUID(), c.RootGID()); err != nil { + return "", err + } + return localtimeCopy, err +} diff --git a/libpod/container_internal_unsupported.go b/libpod/container_internal_unsupported.go index 2a611c2d98..a42c1d735e 100644 --- a/libpod/container_internal_unsupported.go +++ b/libpod/container_internal_unsupported.go @@ -5,8 +5,8 @@ package libpod import ( "context" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/lookup" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/lookup" spec "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/libpod/container_log.go b/libpod/container_log.go index 67380397aa..97936c6835 100644 --- a/libpod/container_log.go +++ b/libpod/container_log.go @@ -5,8 +5,8 @@ import ( "os" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/logs" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/logs" "github.com/hpcloud/tail/watch" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/container_log_linux.go b/libpod/container_log_linux.go index 03010d8ede..fad3bf87c4 100644 --- a/libpod/container_log_linux.go +++ b/libpod/container_log_linux.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod/logs" + "github.com/containers/libpod/v2/libpod/logs" journal "github.com/coreos/go-systemd/v22/sdjournal" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/container_log_unsupported.go b/libpod/container_log_unsupported.go index 2c4492b101..18882720a7 100644 --- a/libpod/container_log_unsupported.go +++ b/libpod/container_log_unsupported.go @@ -3,8 +3,8 @@ package libpod import ( - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/logs" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/logs" "github.com/pkg/errors" ) diff --git a/libpod/container_top_linux.go b/libpod/container_top_linux.go index 98a69966a7..9a522e0144 100644 --- a/libpod/container_top_linux.go +++ b/libpod/container_top_linux.go @@ -8,8 +8,8 @@ import ( "strconv" "strings" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/containers/psgo" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/container_top_unsupported.go b/libpod/container_top_unsupported.go index 12f6cbb6c2..9c0cf0c1c4 100644 --- a/libpod/container_top_unsupported.go +++ b/libpod/container_top_unsupported.go @@ -2,7 +2,7 @@ package libpod -import "github.com/containers/libpod/libpod/define" +import "github.com/containers/libpod/v2/libpod/define" // Top gathers statistics about the running processes in a container. It returns a // []string for output diff --git a/libpod/container_validate.go b/libpod/container_validate.go index a53a1839d9..c02833359b 100644 --- a/libpod/container_validate.go +++ b/libpod/container_validate.go @@ -1,8 +1,8 @@ package libpod import ( - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/rootless" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) diff --git a/libpod/define/config.go b/libpod/define/config.go index 900a363d8f..c436015545 100644 --- a/libpod/define/config.go +++ b/libpod/define/config.go @@ -75,3 +75,10 @@ const JSONLogging = "json-file" // NoLogging is the string conmon expects when specifying to use no log driver whatsoever const NoLogging = "none" + +// Strings used for --sdnotify option to podman +const ( + SdNotifyModeContainer = "container" + SdNotifyModeConmon = "conmon" + SdNotifyModeIgnore = "ignore" +) diff --git a/libpod/define/container_inspect.go b/libpod/define/container_inspect.go index 3fbeb8f0b3..6148824673 100644 --- a/libpod/define/container_inspect.go +++ b/libpod/define/container_inspect.go @@ -4,7 +4,7 @@ import ( "time" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/libpod/driver" + "github.com/containers/libpod/v2/libpod/driver" ) // InspectContainerConfig holds further data about how a container was initially @@ -54,6 +54,9 @@ type InspectContainerConfig struct { // CreateCommand is the full command plus arguments of the process the // container has been created with. CreateCommand []string `json:"CreateCommand,omitempty"` + // Timezone is the timezone inside the container. + // Local means it has the same timezone as the host machine + Timezone string `json:"Timezone,omitempty"` } // InspectRestartPolicy holds information about the container's restart policy. diff --git a/libpod/define/errors.go b/libpod/define/errors.go index 98dc603d12..1e91793530 100644 --- a/libpod/define/errors.go +++ b/libpod/define/errors.go @@ -3,8 +3,8 @@ package define import ( "errors" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/utils" ) var ( @@ -70,6 +70,10 @@ var ( // ErrInternal indicates an internal library error ErrInternal = errors.New("internal libpod error") + // ErrPodPartialFail indicates that a pod operation was only partially + // successful, and some containers within the pod failed. + ErrPodPartialFail = errors.New("some containers failed") + // ErrDetach indicates that an attach session was manually detached by // the user. ErrDetach = utils.ErrDetach diff --git a/libpod/define/version.go b/libpod/define/version.go index 3eb0162642..da8f88bc13 100644 --- a/libpod/define/version.go +++ b/libpod/define/version.go @@ -5,7 +5,7 @@ import ( "strconv" "time" - podmanVersion "github.com/containers/libpod/version" + podmanVersion "github.com/containers/libpod/v2/version" ) // Overwritten at build time diff --git a/libpod/diff.go b/libpod/diff.go index baa4d6ad7f..25d29866b5 100644 --- a/libpod/diff.go +++ b/libpod/diff.go @@ -3,7 +3,7 @@ package libpod import ( "io" - "github.com/containers/libpod/libpod/layers" + "github.com/containers/libpod/v2/libpod/layers" "github.com/containers/storage/pkg/archive" "github.com/pkg/errors" ) diff --git a/libpod/events.go b/libpod/events.go index 3d07c5d764..7560940a50 100644 --- a/libpod/events.go +++ b/libpod/events.go @@ -1,9 +1,10 @@ package libpod import ( + "context" "fmt" - "github.com/containers/libpod/libpod/events" + "github.com/containers/libpod/v2/libpod/events" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -75,16 +76,16 @@ func (v *Volume) newVolumeEvent(status events.Status) { // Events is a wrapper function for everyone to begin tailing the events log // with options -func (r *Runtime) Events(options events.ReadOptions) error { +func (r *Runtime) Events(ctx context.Context, options events.ReadOptions) error { eventer, err := r.newEventer() if err != nil { return err } - return eventer.Read(options) + return eventer.Read(ctx, options) } // GetEvents reads the event log and returns events based on input filters -func (r *Runtime) GetEvents(filters []string) ([]*events.Event, error) { +func (r *Runtime) GetEvents(ctx context.Context, filters []string) ([]*events.Event, error) { var readErr error eventChannel := make(chan *events.Event) options := events.ReadOptions{ @@ -98,7 +99,7 @@ func (r *Runtime) GetEvents(filters []string) ([]*events.Event, error) { return nil, err } go func() { - readErr = eventer.Read(options) + readErr = eventer.Read(ctx, options) }() if readErr != nil { return nil, readErr @@ -112,7 +113,7 @@ func (r *Runtime) GetEvents(filters []string) ([]*events.Event, error) { // GetLastContainerEvent takes a container name or ID and an event status and returns // the last occurrence of the container event -func (r *Runtime) GetLastContainerEvent(nameOrID string, containerEvent events.Status) (*events.Event, error) { +func (r *Runtime) GetLastContainerEvent(ctx context.Context, nameOrID string, containerEvent events.Status) (*events.Event, error) { // check to make sure the event.Status is valid if _, err := events.StringToStatus(containerEvent.String()); err != nil { return nil, err @@ -122,7 +123,7 @@ func (r *Runtime) GetLastContainerEvent(nameOrID string, containerEvent events.S fmt.Sprintf("event=%s", containerEvent), "type=container", } - containerEvents, err := r.GetEvents(filters) + containerEvents, err := r.GetEvents(ctx, filters) if err != nil { return nil, err } diff --git a/libpod/events/config.go b/libpod/events/config.go index 8fe551c5df..c34408e639 100644 --- a/libpod/events/config.go +++ b/libpod/events/config.go @@ -1,6 +1,7 @@ package events import ( + "context" "time" "github.com/pkg/errors" @@ -52,7 +53,7 @@ type Eventer interface { // Write an event to a backend Write(event Event) error // Read an event from the backend - Read(options ReadOptions) error + Read(ctx context.Context, options ReadOptions) error // String returns the type of event logger String() string } diff --git a/libpod/events/filters.go b/libpod/events/filters.go index 6eed1f61dc..99feab79ca 100644 --- a/libpod/events/filters.go +++ b/libpod/events/filters.go @@ -4,7 +4,7 @@ import ( "strings" "time" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go index 482435038d..d341ca7b5f 100644 --- a/libpod/events/journal_linux.go +++ b/libpod/events/journal_linux.go @@ -3,6 +3,7 @@ package events import ( + "context" "fmt" "strconv" "time" @@ -53,7 +54,7 @@ func (e EventJournalD) Write(ee Event) error { } // Read reads events from the journal and sends qualified events to the event channel -func (e EventJournalD) Read(options ReadOptions) error { +func (e EventJournalD) Read(ctx context.Context, options ReadOptions) error { defer close(options.EventChannel) eventOptions, err := generateEventOptions(options.Filters, options.Since, options.Until) if err != nil { diff --git a/libpod/events/logfile.go b/libpod/events/logfile.go index 93e6fa3c9e..28d0dc07ee 100644 --- a/libpod/events/logfile.go +++ b/libpod/events/logfile.go @@ -1,6 +1,7 @@ package events import ( + "context" "fmt" "os" @@ -40,7 +41,7 @@ func (e EventLogFile) Write(ee Event) error { } // Reads from the log file -func (e EventLogFile) Read(options ReadOptions) error { +func (e EventLogFile) Read(ctx context.Context, options ReadOptions) error { defer close(options.EventChannel) eventOptions, err := generateEventOptions(options.Filters, options.Since, options.Until) if err != nil { @@ -50,6 +51,17 @@ func (e EventLogFile) Read(options ReadOptions) error { if err != nil { return err } + funcDone := make(chan bool) + copy := true + go func() { + select { + case <-funcDone: + // Do nothing + case <-ctx.Done(): + copy = false + t.Kill(errors.New("hangup by client")) + } + }() for line := range t.Lines { event, err := newEventFromJSONString(line.Text) if err != nil { @@ -65,10 +77,11 @@ func (e EventLogFile) Read(options ReadOptions) error { for _, filter := range eventOptions { include = include && filter(event) } - if include { + if include && copy { options.EventChannel <- event } } + funcDone <- true return nil } diff --git a/libpod/events/nullout.go b/libpod/events/nullout.go index f3b36e6091..3eca9e8dba 100644 --- a/libpod/events/nullout.go +++ b/libpod/events/nullout.go @@ -1,5 +1,9 @@ package events +import ( + "context" +) + // EventToNull is an eventer type that only performs write operations // and only writes to /dev/null. It is meant for unittests only type EventToNull struct{} @@ -10,7 +14,7 @@ func (e EventToNull) Write(ee Event) error { } // Read does nothing. Do not use it. -func (e EventToNull) Read(options ReadOptions) error { +func (e EventToNull) Read(ctx context.Context, options ReadOptions) error { return nil } diff --git a/libpod/filters/containers.go b/libpod/filters/containers.go index c13372f91e..b13adb4f5e 100644 --- a/libpod/filters/containers.go +++ b/libpod/filters/containers.go @@ -6,10 +6,10 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/timetype" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/timetype" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) diff --git a/libpod/filters/pods.go b/libpod/filters/pods.go index 0edb9fbf23..5fd67dc774 100644 --- a/libpod/filters/pods.go +++ b/libpod/filters/pods.go @@ -4,9 +4,9 @@ import ( "strconv" "strings" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) diff --git a/libpod/healthcheck.go b/libpod/healthcheck.go index 0006b7c067..b04742974b 100644 --- a/libpod/healthcheck.go +++ b/libpod/healthcheck.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/healthcheck_linux.go b/libpod/healthcheck_linux.go index 42dba66102..a671414c2e 100644 --- a/libpod/healthcheck_linux.go +++ b/libpod/healthcheck_linux.go @@ -6,8 +6,8 @@ import ( "os/exec" "strings" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/systemd" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/systemd" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/healthcheck_unsupported.go b/libpod/healthcheck_unsupported.go index 1eccc77bad..28b1bc7dae 100644 --- a/libpod/healthcheck_unsupported.go +++ b/libpod/healthcheck_unsupported.go @@ -2,7 +2,7 @@ package libpod -import "github.com/containers/libpod/libpod/define" +import "github.com/containers/libpod/v2/libpod/define" // createTimer systemd timers for healthchecks of a container func (c *Container) createTimer() error { diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go index 081e7ef4f5..a43a948960 100644 --- a/libpod/image/docker_registry_options.go +++ b/libpod/image/docker_registry_options.go @@ -6,7 +6,7 @@ import ( "github.com/containers/buildah/pkg/parse" "github.com/containers/image/v5/docker/reference" "github.com/containers/image/v5/types" - podmanVersion "github.com/containers/libpod/version" + podmanVersion "github.com/containers/libpod/v2/version" ) // DockerRegistryOptions encapsulates settings that affect how we connect or diff --git a/libpod/image/filters.go b/libpod/image/filters.go index 9d99fb344e..11d081ec37 100644 --- a/libpod/image/filters.go +++ b/libpod/image/filters.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/containers/libpod/pkg/inspect" + "github.com/containers/libpod/v2/pkg/inspect" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/image/image.go b/libpod/image/image.go index 83e7467e9a..048ec825d4 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -26,11 +26,11 @@ import ( "github.com/containers/image/v5/transports" "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/driver" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/inspect" - "github.com/containers/libpod/pkg/registries" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/driver" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/inspect" + "github.com/containers/libpod/v2/pkg/registries" + "github.com/containers/libpod/v2/pkg/util" "github.com/containers/storage" digest "github.com/opencontainers/go-digest" imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/libpod/image/image_test.go b/libpod/image/image_test.go index 74067853e8..645f8d3f3d 100644 --- a/libpod/image/image_test.go +++ b/libpod/image/image_test.go @@ -7,8 +7,8 @@ import ( "os" "testing" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/util" "github.com/containers/storage" "github.com/containers/storage/pkg/reexec" "github.com/opencontainers/go-digest" diff --git a/libpod/image/prune.go b/libpod/image/prune.go index 518795173b..5ad7a9a5e1 100644 --- a/libpod/image/prune.go +++ b/libpod/image/prune.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/timetype" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/timetype" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/image/pull.go b/libpod/image/pull.go index 24909a59a2..f0cde20129 100644 --- a/libpod/image/pull.go +++ b/libpod/image/pull.go @@ -18,8 +18,8 @@ import ( "github.com/containers/image/v5/transports" "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/registries" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/registries" "github.com/hashicorp/go-multierror" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" diff --git a/libpod/image/search.go b/libpod/image/search.go index 72dba668f5..ee1ff0312b 100644 --- a/libpod/image/search.go +++ b/libpod/image/search.go @@ -8,7 +8,7 @@ import ( "github.com/containers/image/v5/docker" "github.com/containers/image/v5/types" - sysreg "github.com/containers/libpod/pkg/registries" + sysreg "github.com/containers/libpod/v2/pkg/registries" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sync/semaphore" diff --git a/libpod/in_memory_state.go b/libpod/in_memory_state.go index 2f802f3332..794212bf08 100644 --- a/libpod/in_memory_state.go +++ b/libpod/in_memory_state.go @@ -3,8 +3,8 @@ package libpod import ( "strings" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/registrar" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/registrar" "github.com/containers/storage/pkg/truncindex" "github.com/pkg/errors" ) diff --git a/libpod/info.go b/libpod/info.go index 51208a2b10..68811b1996 100644 --- a/libpod/info.go +++ b/libpod/info.go @@ -13,11 +13,11 @@ import ( "time" "github.com/containers/buildah" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/linkmode" - "github.com/containers/libpod/pkg/cgroups" - registries2 "github.com/containers/libpod/pkg/registries" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/linkmode" + "github.com/containers/libpod/v2/pkg/cgroups" + registries2 "github.com/containers/libpod/v2/pkg/registries" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/containers/storage" "github.com/containers/storage/pkg/system" "github.com/pkg/errors" diff --git a/libpod/kube.go b/libpod/kube.go index 90acd25418..641faf4dad 100644 --- a/libpod/kube.go +++ b/libpod/kube.go @@ -7,9 +7,9 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/lookup" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/lookup" + "github.com/containers/libpod/v2/pkg/util" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" diff --git a/libpod/lock/file_lock_manager.go b/libpod/lock/file_lock_manager.go index 8a4d939d31..adcc42d4ea 100644 --- a/libpod/lock/file_lock_manager.go +++ b/libpod/lock/file_lock_manager.go @@ -1,7 +1,7 @@ package lock import ( - "github.com/containers/libpod/libpod/lock/file" + "github.com/containers/libpod/v2/libpod/lock/file" ) // FileLockManager manages shared memory locks. diff --git a/libpod/lock/shm_lock_manager_linux.go b/libpod/lock/shm_lock_manager_linux.go index 5f31939f8c..38972effde 100644 --- a/libpod/lock/shm_lock_manager_linux.go +++ b/libpod/lock/shm_lock_manager_linux.go @@ -5,7 +5,7 @@ package lock import ( "syscall" - "github.com/containers/libpod/libpod/lock/shm" + "github.com/containers/libpod/v2/libpod/lock/shm" "github.com/pkg/errors" ) diff --git a/libpod/logs/log.go b/libpod/logs/log.go index 6ad2a305fe..03acadb187 100644 --- a/libpod/logs/log.go +++ b/libpod/logs/log.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/containers/libpod/libpod/logs/reversereader" + "github.com/containers/libpod/v2/libpod/logs/reversereader" "github.com/hpcloud/tail" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index f535736454..7985e17e19 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -18,11 +18,11 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types/current" "github.com/containernetworking/plugins/pkg/ns" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/netns" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/rootlessport" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/netns" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootlessport" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/networking_unsupported.go b/libpod/networking_unsupported.go index 1ef8fe2dc5..d5189709c4 100644 --- a/libpod/networking_unsupported.go +++ b/libpod/networking_unsupported.go @@ -2,7 +2,7 @@ package libpod -import "github.com/containers/libpod/libpod/define" +import "github.com/containers/libpod/v2/libpod/define" func (r *Runtime) setupRootlessNetNS(ctr *Container) (err error) { return define.ErrNotImplemented diff --git a/libpod/oci.go b/libpod/oci.go index c2f0041b19..c3bf74bba6 100644 --- a/libpod/oci.go +++ b/libpod/oci.go @@ -4,7 +4,7 @@ import ( "bufio" "net" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "k8s.io/client-go/tools/remotecommand" ) diff --git a/libpod/oci_attach_linux.go b/libpod/oci_attach_linux.go index ff158c2d17..cfcb3f2082 100644 --- a/libpod/oci_attach_linux.go +++ b/libpod/oci_attach_linux.go @@ -10,10 +10,10 @@ import ( "path/filepath" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/kubeutils" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/kubeutils" + "github.com/containers/libpod/v2/utils" "github.com/docker/docker/pkg/term" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/oci_attach_unsupported.go b/libpod/oci_attach_unsupported.go index 3b0216e5d5..6d753296ce 100644 --- a/libpod/oci_attach_unsupported.go +++ b/libpod/oci_attach_unsupported.go @@ -5,7 +5,7 @@ package libpod import ( "os" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "k8s.io/client-go/tools/remotecommand" ) diff --git a/libpod/oci_conmon_exec_linux.go b/libpod/oci_conmon_exec_linux.go index 6be8534d9b..4196bdcaf5 100644 --- a/libpod/oci_conmon_exec_linux.go +++ b/libpod/oci_conmon_exec_linux.go @@ -11,10 +11,10 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/util" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/util" + "github.com/containers/libpod/v2/utils" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" @@ -444,7 +444,7 @@ func (r *ConmonOCIRuntime) startExec(c *Container, sessionID string, options *Ex // } // } - conmonEnv, extraFiles, err := r.configureConmonEnv(runtimeDir) + conmonEnv, extraFiles, err := r.configureConmonEnv(c, runtimeDir) if err != nil { return nil, nil, err } diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index 26e5d70b0a..5346223829 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -21,15 +21,16 @@ import ( "github.com/containers/common/pkg/config" conmonConfig "github.com/containers/conmon/runner/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/lookup" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/lookup" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" + "github.com/containers/libpod/v2/utils" pmount "github.com/containers/storage/pkg/mount" "github.com/coreos/go-systemd/v22/activation" + "github.com/coreos/go-systemd/v22/daemon" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/selinux/go-selinux" "github.com/opencontainers/selinux/go-selinux/label" @@ -365,8 +366,10 @@ func (r *ConmonOCIRuntime) StartContainer(ctr *Container) error { return err } env := []string{fmt.Sprintf("XDG_RUNTIME_DIR=%s", runtimeDir)} - if notify, ok := os.LookupEnv("NOTIFY_SOCKET"); ok { - env = append(env, fmt.Sprintf("NOTIFY_SOCKET=%s", notify)) + if ctr.config.SdNotifyMode == define.SdNotifyModeContainer { + if notify, ok := os.LookupEnv("NOTIFY_SOCKET"); ok { + env = append(env, fmt.Sprintf("NOTIFY_SOCKET=%s", notify)) + } } if path, ok := os.LookupEnv("PATH"); ok { env = append(env, fmt.Sprintf("PATH=%s", path)) @@ -887,6 +890,12 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co } } + if ctr.config.SdNotifyMode == define.SdNotifyModeIgnore { + if err := os.Unsetenv("NOTIFY_SOCKET"); err != nil { + logrus.Warnf("Error unsetting NOTIFY_SOCKET %s", err.Error()) + } + } + args := r.sharedConmonArgs(ctr, ctr.ID(), ctr.bundlePath(), filepath.Join(ctr.state.RunDir, "pidfile"), ctr.LogPath(), r.exitsDir, ociLog, ctr.LogDriver(), logTag) if ctr.config.Spec.Process.Terminal { @@ -940,7 +949,7 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co } // 0, 1 and 2 are stdin, stdout and stderr - conmonEnv, envFiles, err := r.configureConmonEnv(runtimeDir) + conmonEnv, envFiles, err := r.configureConmonEnv(ctr, runtimeDir) if err != nil { return err } @@ -1034,6 +1043,13 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co // conmon not having a pid file is a valid state, so don't set it if we don't have it logrus.Infof("Got Conmon PID as %d", conmonPID) ctr.state.ConmonPID = conmonPID + if ctr.config.SdNotifyMode != define.SdNotifyModeIgnore { + if sent, err := daemon.SdNotify(false, fmt.Sprintf("MAINPID=%d", conmonPID)); err != nil { + logrus.Errorf("Error notifying systemd of Conmon PID: %s", err.Error()) + } else if sent { + logrus.Debugf("Notify MAINPID sent successfully") + } + } } if ctr.config.PreserveFDs > 0 { @@ -1137,7 +1153,7 @@ func prepareProcessExec(c *Container, cmd, env []string, tty bool, cwd, user, se // configureConmonEnv gets the environment values to add to conmon's exec struct // TODO this may want to be less hardcoded/more configurable in the future -func (r *ConmonOCIRuntime) configureConmonEnv(runtimeDir string) ([]string, []*os.File, error) { +func (r *ConmonOCIRuntime) configureConmonEnv(ctr *Container, runtimeDir string) ([]string, []*os.File, error) { env := make([]string, 0, 6) env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", runtimeDir)) env = append(env, fmt.Sprintf("_CONTAINERS_USERNS_CONFIGURED=%s", os.Getenv("_CONTAINERS_USERNS_CONFIGURED"))) @@ -1149,8 +1165,10 @@ func (r *ConmonOCIRuntime) configureConmonEnv(runtimeDir string) ([]string, []*o env = append(env, fmt.Sprintf("HOME=%s", home)) extraFiles := make([]*os.File, 0) - if notify, ok := os.LookupEnv("NOTIFY_SOCKET"); ok { - env = append(env, fmt.Sprintf("NOTIFY_SOCKET=%s", notify)) + if ctr.config.SdNotifyMode == define.SdNotifyModeContainer { + if notify, ok := os.LookupEnv("NOTIFY_SOCKET"); ok { + env = append(env, fmt.Sprintf("NOTIFY_SOCKET=%s", notify)) + } } if !r.sdNotify { if listenfds, ok := os.LookupEnv("LISTEN_FDS"); ok { diff --git a/libpod/oci_conmon_unsupported.go b/libpod/oci_conmon_unsupported.go index 309e0d4177..cd6f0b92cd 100644 --- a/libpod/oci_conmon_unsupported.go +++ b/libpod/oci_conmon_unsupported.go @@ -5,7 +5,7 @@ package libpod import ( "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" ) const ( diff --git a/libpod/oci_missing.go b/libpod/oci_missing.go index 8caf00e6eb..1b71bb1542 100644 --- a/libpod/oci_missing.go +++ b/libpod/oci_missing.go @@ -7,7 +7,7 @@ import ( "path/filepath" "sync" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" "k8s.io/client-go/tools/remotecommand" diff --git a/libpod/oci_util.go b/libpod/oci_util.go index 8b40dad81d..c9165d04b2 100644 --- a/libpod/oci_util.go +++ b/libpod/oci_util.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/options.go b/libpod/options.go index 4041fb1cfa..61d1676f13 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -4,16 +4,17 @@ import ( "net" "os" "path/filepath" + "strings" "syscall" "github.com/containers/common/pkg/config" "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/namespaces" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/namespaces" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" "github.com/containers/storage" "github.com/containers/storage/pkg/idtools" "github.com/cri-o/ocicni/pkg/ocicni" @@ -22,6 +23,10 @@ import ( ) // Runtime Creation Options +var ( + // SdNotifyModeValues describes the only values that SdNotifyMode can be + SdNotifyModeValues = []string{define.SdNotifyModeContainer, define.SdNotifyModeConmon, define.SdNotifyModeIgnore} +) // WithStorageConfig uses the given configuration to set up container storage. // If this is not specified, the system default configuration will be used @@ -550,6 +555,23 @@ func WithSystemd() CtrCreateOption { } } +// WithSdNotifyMode sets the sd-notify method +func WithSdNotifyMode(mode string) CtrCreateOption { + return func(ctr *Container) error { + if ctr.valid { + return define.ErrCtrFinalized + } + + // verify values + if len(mode) > 0 && !util.StringInSlice(strings.ToLower(mode), SdNotifyModeValues) { + return errors.Wrapf(define.ErrInvalidArg, "--sdnotify values must be one of %q", strings.Join(SdNotifyModeValues, ", ")) + } + + ctr.config.SdNotifyMode = mode + return nil + } +} + // WithShmSize sets the size of /dev/shm tmpfs mount. func WithShmSize(size int64) CtrCreateOption { return func(ctr *Container) error { @@ -1525,6 +1547,30 @@ func withSetAnon() VolumeCreateOption { } } +// WithTimezone sets the timezone in the container +func WithTimezone(path string) CtrCreateOption { + return func(ctr *Container) error { + if ctr.valid { + return define.ErrCtrFinalized + } + if path != "local" { + zone := filepath.Join("/usr/share/zoneinfo", path) + + file, err := os.Stat(zone) + if err != nil { + return err + } + //We don't want to mount a timezone directory + if file.IsDir() { + return errors.New("Invalid timezone: is a directory") + } + } + + ctr.config.Timezone = path + return nil + } +} + // Pod Creation Options // WithPodName sets the name of the pod. diff --git a/libpod/pod.go b/libpod/pod.go index bf0d7a397f..00ba5d53cf 100644 --- a/libpod/pod.go +++ b/libpod/pod.go @@ -4,8 +4,8 @@ import ( "net" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/lock" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/lock" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/pkg/errors" ) diff --git a/libpod/pod_api.go b/libpod/pod_api.go index 98f4cad73b..a02b171e18 100644 --- a/libpod/pod_api.go +++ b/libpod/pod_api.go @@ -3,10 +3,10 @@ package libpod import ( "context" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -59,7 +59,7 @@ func (p *Pod) Start(ctx context.Context) (map[string]error, error) { } if len(ctrErrors) > 0 { - return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error starting some containers") + return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error starting some containers") } defer p.newPodEvent(events.Start) return nil, nil @@ -139,7 +139,7 @@ func (p *Pod) StopWithTimeout(ctx context.Context, cleanup bool, timeout int) (m } if len(ctrErrors) > 0 { - return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error stopping some containers") + return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error stopping some containers") } defer p.newPodEvent(events.Stop) return nil, nil @@ -208,7 +208,7 @@ func (p *Pod) Pause() (map[string]error, error) { } if len(ctrErrors) > 0 { - return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error pausing some containers") + return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error pausing some containers") } defer p.newPodEvent(events.Pause) return nil, nil @@ -267,7 +267,7 @@ func (p *Pod) Unpause() (map[string]error, error) { } if len(ctrErrors) > 0 { - return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error unpausing some containers") + return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error unpausing some containers") } defer p.newPodEvent(events.Unpause) @@ -321,7 +321,7 @@ func (p *Pod) Restart(ctx context.Context) (map[string]error, error) { } if len(ctrErrors) > 0 { - return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error stopping some containers") + return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error stopping some containers") } p.newPodEvent(events.Stop) p.newPodEvent(events.Start) @@ -387,7 +387,7 @@ func (p *Pod) Kill(signal uint) (map[string]error, error) { } if len(ctrErrors) > 0 { - return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error killing some containers") + return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error killing some containers") } defer p.newPodEvent(events.Kill) return nil, nil diff --git a/libpod/pod_internal.go b/libpod/pod_internal.go index 9e60d3c078..417cdfd867 100644 --- a/libpod/pod_internal.go +++ b/libpod/pod_internal.go @@ -6,7 +6,7 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/containers/storage/pkg/stringid" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/pod_status.go b/libpod/pod_status.go index 3a44c44571..d6bd5f211f 100644 --- a/libpod/pod_status.go +++ b/libpod/pod_status.go @@ -1,6 +1,6 @@ package libpod -import "github.com/containers/libpod/libpod/define" +import "github.com/containers/libpod/v2/libpod/define" // GetPodStatus determines the status of the pod based on the // statuses of the containers in the pod. diff --git a/libpod/pod_top_linux.go b/libpod/pod_top_linux.go index 1f84c8667b..f8f7ea015f 100644 --- a/libpod/pod_top_linux.go +++ b/libpod/pod_top_linux.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/containers/psgo" ) diff --git a/libpod/pod_top_unsupported.go b/libpod/pod_top_unsupported.go index 9a33332755..fb24ae8656 100644 --- a/libpod/pod_top_unsupported.go +++ b/libpod/pod_top_unsupported.go @@ -2,7 +2,7 @@ package libpod -import "github.com/containers/libpod/libpod/define" +import "github.com/containers/libpod/v2/libpod/define" // GetPodPidInformation is exclusive to linux func (p *Pod) GetPodPidInformation(descriptors []string) ([]string, error) { diff --git a/libpod/reset.go b/libpod/reset.go index c6754b7f6c..2f18cebee3 100644 --- a/libpod/reset.go +++ b/libpod/reset.go @@ -5,9 +5,9 @@ import ( "os" "path/filepath" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/runtime.go b/libpod/runtime.go index b1e48b3b30..2575decc38 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -12,13 +12,13 @@ import ( "github.com/containers/common/pkg/config" is "github.com/containers/image/v5/storage" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/libpod/lock" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/libpod/lock" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" "github.com/containers/storage" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/docker/docker/pkg/namesgenerator" diff --git a/libpod/runtime_cstorage.go b/libpod/runtime_cstorage.go index cfcf4589fa..99b0406fb5 100644 --- a/libpod/runtime_cstorage.go +++ b/libpod/runtime_cstorage.go @@ -3,7 +3,7 @@ package libpod import ( "time" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 74647dab88..e184df45df 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -9,10 +9,10 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/containers/storage/pkg/stringid" "github.com/docker/go-units" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go index cd7f54799e..eab05f34de 100644 --- a/libpod/runtime_img.go +++ b/libpod/runtime_img.go @@ -11,9 +11,9 @@ import ( "github.com/containers/buildah/imagebuildah" "github.com/containers/image/v5/docker/reference" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/util" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/runtime_img_test.go b/libpod/runtime_img_test.go index 2bccb27528..a8cc2c9411 100644 --- a/libpod/runtime_img_test.go +++ b/libpod/runtime_img_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - sysreg "github.com/containers/libpod/pkg/registries" + sysreg "github.com/containers/libpod/v2/pkg/registries" "github.com/stretchr/testify/assert" ) diff --git a/libpod/runtime_migrate.go b/libpod/runtime_migrate.go index d856522329..b70ca982d9 100644 --- a/libpod/runtime_migrate.go +++ b/libpod/runtime_migrate.go @@ -11,9 +11,9 @@ import ( "strconv" "syscall" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go index 5b81e166a7..ace15a8781 100644 --- a/libpod/runtime_pod.go +++ b/libpod/runtime_pod.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) diff --git a/libpod/runtime_pod_infra_linux.go b/libpod/runtime_pod_infra_linux.go index a0dee3aa12..24802f89e3 100644 --- a/libpod/runtime_pod_infra_linux.go +++ b/libpod/runtime_pod_infra_linux.go @@ -6,10 +6,10 @@ import ( "context" "strings" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" v1 "github.com/opencontainers/image-spec/specs-go/v1" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" diff --git a/libpod/runtime_pod_linux.go b/libpod/runtime_pod_linux.go index 25584c5ad4..4306140bb5 100644 --- a/libpod/runtime_pod_linux.go +++ b/libpod/runtime_pod_linux.go @@ -10,10 +10,10 @@ import ( "strings" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/rootless" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/runtime_pod_unsupported.go b/libpod/runtime_pod_unsupported.go index 5f08118228..6161dd4ebe 100644 --- a/libpod/runtime_pod_unsupported.go +++ b/libpod/runtime_pod_unsupported.go @@ -5,7 +5,7 @@ package libpod import ( "context" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" ) // NewPod makes a new, empty pod diff --git a/libpod/runtime_renumber.go b/libpod/runtime_renumber.go index 9de2556b24..f63d35c221 100644 --- a/libpod/runtime_renumber.go +++ b/libpod/runtime_renumber.go @@ -1,7 +1,7 @@ package libpod import ( - "github.com/containers/libpod/libpod/events" + "github.com/containers/libpod/v2/libpod/events" "github.com/pkg/errors" ) diff --git a/libpod/runtime_volume.go b/libpod/runtime_volume.go index d5fede1d1d..4c57da09bd 100644 --- a/libpod/runtime_volume.go +++ b/libpod/runtime_volume.go @@ -3,8 +3,8 @@ package libpod import ( "context" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" "github.com/pkg/errors" ) diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go index f6ecae4abd..84649ef36b 100644 --- a/libpod/runtime_volume_linux.go +++ b/libpod/runtime_volume_linux.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" "github.com/containers/storage/pkg/stringid" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/runtime_volume_unsupported.go b/libpod/runtime_volume_unsupported.go index 1cbf2699a2..b339819e5c 100644 --- a/libpod/runtime_volume_unsupported.go +++ b/libpod/runtime_volume_unsupported.go @@ -5,7 +5,7 @@ package libpod import ( "context" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" ) func (r *Runtime) removeVolume(ctx context.Context, v *Volume, force bool) error { diff --git a/libpod/state_test.go b/libpod/state_test.go index db1c8dd992..30ddf5e241 100644 --- a/libpod/state_test.go +++ b/libpod/state_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/lock" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/lock" "github.com/containers/storage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/libpod/stats.go b/libpod/stats.go index 9f49861445..b3dffbdb74 100644 --- a/libpod/stats.go +++ b/libpod/stats.go @@ -7,8 +7,8 @@ import ( "syscall" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/cgroups" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/cgroups" "github.com/pkg/errors" ) diff --git a/libpod/stats_unsupported.go b/libpod/stats_unsupported.go index 6d21ae8f2b..940be156cb 100644 --- a/libpod/stats_unsupported.go +++ b/libpod/stats_unsupported.go @@ -2,7 +2,7 @@ package libpod -import "github.com/containers/libpod/libpod/define" +import "github.com/containers/libpod/v2/libpod/define" // GetContainerStats gets the running stats for a given container func (c *Container) GetContainerStats(previousStats *define.ContainerStats) (*define.ContainerStats, error) { diff --git a/libpod/storage.go b/libpod/storage.go index c900208334..be79b3fc06 100644 --- a/libpod/storage.go +++ b/libpod/storage.go @@ -6,7 +6,7 @@ import ( istorage "github.com/containers/image/v5/storage" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/containers/storage" "github.com/containers/storage/pkg/idtools" v1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/libpod/util.go b/libpod/util.go index ba9f1fa055..7504295f08 100644 --- a/libpod/util.go +++ b/libpod/util.go @@ -13,8 +13,8 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/utils" "github.com/fsnotify/fsnotify" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" diff --git a/libpod/util_linux.go b/libpod/util_linux.go index f0b4028dea..aac206f531 100644 --- a/libpod/util_linux.go +++ b/libpod/util_linux.go @@ -7,9 +7,9 @@ import ( "strings" "syscall" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/opencontainers/selinux/go-selinux/label" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/util_test.go b/libpod/util_test.go index 4e18a7e4ef..313854f5af 100644 --- a/libpod/util_test.go +++ b/libpod/util_test.go @@ -3,7 +3,7 @@ package libpod import ( "testing" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/utils" "github.com/stretchr/testify/assert" ) diff --git a/libpod/util_unsupported.go b/libpod/util_unsupported.go index 4c5616bd0c..36b70c4c94 100644 --- a/libpod/util_unsupported.go +++ b/libpod/util_unsupported.go @@ -3,7 +3,7 @@ package libpod import ( - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/pkg/errors" ) diff --git a/libpod/volume.go b/libpod/volume.go index 58d1f81a64..03299e9d38 100644 --- a/libpod/volume.go +++ b/libpod/volume.go @@ -3,8 +3,8 @@ package libpod import ( "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/lock" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/lock" ) // Volume is a libpod named volume. diff --git a/libpod/volume_inspect.go b/libpod/volume_inspect.go index 2be0aeaecb..85848f84fd 100644 --- a/libpod/volume_inspect.go +++ b/libpod/volume_inspect.go @@ -3,7 +3,7 @@ package libpod import ( "time" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" ) // InspectVolumeData is the output of Inspect() on a volume. It is matched to diff --git a/libpod/volume_internal.go b/libpod/volume_internal.go index d7d5a24946..1aa548521b 100644 --- a/libpod/volume_internal.go +++ b/libpod/volume_internal.go @@ -4,7 +4,7 @@ import ( "os" "path/filepath" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/pkg/errors" ) diff --git a/libpod/volume_internal_linux.go b/libpod/volume_internal_linux.go index 081a17325b..75333d0b45 100644 --- a/libpod/volume_internal_linux.go +++ b/libpod/volume_internal_linux.go @@ -6,8 +6,8 @@ import ( "os/exec" "strings" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" diff --git a/libpod/volume_internal_unsupported.go b/libpod/volume_internal_unsupported.go index 74e24cfdad..40b199c752 100644 --- a/libpod/volume_internal_unsupported.go +++ b/libpod/volume_internal_unsupported.go @@ -3,7 +3,7 @@ package libpod import ( - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" ) func (v *Volume) mount() error { diff --git a/pkg/api/handlers/compat/changes.go b/pkg/api/handlers/compat/changes.go index 6907c487e7..44faf8e84e 100644 --- a/pkg/api/handlers/compat/changes.go +++ b/pkg/api/handlers/compat/changes.go @@ -3,8 +3,8 @@ package compat import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" ) func Changes(w http.ResponseWriter, r *http.Request) { diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go index b103e399de..52b925d3c1 100644 --- a/pkg/api/handlers/compat/containers.go +++ b/pkg/api/handlers/compat/containers.go @@ -6,11 +6,11 @@ import ( "net/http" "strings" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/signal" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/signal" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/go-connections/nat" @@ -321,17 +321,17 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON, stopTimeout := int(l.StopTimeout()) - ports := make(nat.PortSet) - for p := range inspect.HostConfig.PortBindings { - splitp := strings.SplitN(p, "/", 2) + exposedPorts := make(nat.PortSet) + for ep := range inspect.HostConfig.PortBindings { + splitp := strings.SplitN(ep, "/", 2) if len(splitp) != 2 { - return nil, errors.Errorf("PORT/PROTOCOL Format required for %q", p) + return nil, errors.Errorf("PORT/PROTOCOL Format required for %q", ep) } - port, err := nat.NewPort(splitp[1], splitp[0]) + exposedPort, err := nat.NewPort(splitp[1], splitp[0]) if err != nil { return nil, err } - ports[port] = struct{}{} + exposedPorts[exposedPort] = struct{}{} } config := container.Config{ @@ -341,7 +341,7 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON, AttachStdin: inspect.Config.AttachStdin, AttachStdout: inspect.Config.AttachStdout, AttachStderr: inspect.Config.AttachStderr, - ExposedPorts: ports, + ExposedPorts: exposedPorts, Tty: inspect.Config.Tty, OpenStdin: inspect.Config.OpenStdin, StdinOnce: inspect.Config.StdinOnce, @@ -371,6 +371,15 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON, return nil, err } + p, err := json.Marshal(inspect.NetworkSettings.Ports) + if err != nil { + return nil, err + } + ports := nat.PortMap{} + if err := json.Unmarshal(p, &ports); err != nil { + return nil, err + } + networkSettingsDefault := types.DefaultNetworkSettings{ EndpointID: "", Gateway: "", @@ -382,8 +391,12 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON, MacAddress: l.Config().StaticMAC.String(), } + networkSettingsBase := types.NetworkSettingsBase{ + Ports: ports, + } + networkSettings := types.NetworkSettings{ - NetworkSettingsBase: types.NetworkSettingsBase{}, + NetworkSettingsBase: networkSettingsBase, DefaultNetworkSettings: networkSettingsDefault, Networks: nil, } diff --git a/pkg/api/handlers/compat/containers_archive.go b/pkg/api/handlers/compat/containers_archive.go index c3a26873e8..1225b541e4 100644 --- a/pkg/api/handlers/compat/containers_archive.go +++ b/pkg/api/handlers/compat/containers_archive.go @@ -4,7 +4,7 @@ import ( "errors" "net/http" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" ) func Archive(w http.ResponseWriter, r *http.Request) { diff --git a/pkg/api/handlers/compat/containers_attach.go b/pkg/api/handlers/compat/containers_attach.go index aad6e22940..325f96b401 100644 --- a/pkg/api/handlers/compat/containers_attach.go +++ b/pkg/api/handlers/compat/containers_attach.go @@ -4,9 +4,9 @@ import ( "fmt" "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/gorilla/schema" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go index 3ae9d9ab32..8034a529cd 100644 --- a/pkg/api/handlers/compat/containers_create.go +++ b/pkg/api/handlers/compat/containers_create.go @@ -7,13 +7,13 @@ import ( "strings" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod" - image2 "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/namespaces" - "github.com/containers/libpod/pkg/signal" - createconfig "github.com/containers/libpod/pkg/spec" + "github.com/containers/libpod/v2/libpod" + image2 "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/namespaces" + "github.com/containers/libpod/v2/pkg/signal" + createconfig "github.com/containers/libpod/v2/pkg/spec" "github.com/containers/storage" "github.com/gorilla/schema" "github.com/pkg/errors" diff --git a/pkg/api/handlers/compat/containers_export.go b/pkg/api/handlers/compat/containers_export.go index 37b9fbf2bb..35ef797c01 100644 --- a/pkg/api/handlers/compat/containers_export.go +++ b/pkg/api/handlers/compat/containers_export.go @@ -5,8 +5,8 @@ import ( "net/http" "os" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/compat/containers_logs.go b/pkg/api/handlers/compat/containers_logs.go index 3b25a3ecc8..8147f4d387 100644 --- a/pkg/api/handlers/compat/containers_logs.go +++ b/pkg/api/handlers/compat/containers_logs.go @@ -10,10 +10,10 @@ import ( "sync" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/logs" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/logs" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/util" "github.com/gorilla/schema" "github.com/pkg/errors" log "github.com/sirupsen/logrus" diff --git a/pkg/api/handlers/compat/containers_pause.go b/pkg/api/handlers/compat/containers_pause.go index 060bdbaeb7..5e7d786071 100644 --- a/pkg/api/handlers/compat/containers_pause.go +++ b/pkg/api/handlers/compat/containers_pause.go @@ -3,8 +3,8 @@ package compat import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" ) func PauseContainer(w http.ResponseWriter, r *http.Request) { diff --git a/pkg/api/handlers/compat/containers_prune.go b/pkg/api/handlers/compat/containers_prune.go index 9d77f612b3..63ffed0f19 100644 --- a/pkg/api/handlers/compat/containers_prune.go +++ b/pkg/api/handlers/compat/containers_prune.go @@ -3,10 +3,10 @@ package compat import ( "net/http" - "github.com/containers/libpod/libpod" - lpfilters "github.com/containers/libpod/libpod/filters" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod" + lpfilters "github.com/containers/libpod/v2/libpod/filters" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/docker/docker/api/types" "github.com/gorilla/schema" "github.com/pkg/errors" diff --git a/pkg/api/handlers/compat/containers_restart.go b/pkg/api/handlers/compat/containers_restart.go index 343bf96d21..97f453baa5 100644 --- a/pkg/api/handlers/compat/containers_restart.go +++ b/pkg/api/handlers/compat/containers_restart.go @@ -3,8 +3,8 @@ package compat import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/compat/containers_start.go b/pkg/api/handlers/compat/containers_start.go index cdbc8ff76d..111c572aa4 100644 --- a/pkg/api/handlers/compat/containers_start.go +++ b/pkg/api/handlers/compat/containers_start.go @@ -5,9 +5,9 @@ import ( "github.com/sirupsen/logrus" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/gorilla/schema" ) diff --git a/pkg/api/handlers/compat/containers_stats.go b/pkg/api/handlers/compat/containers_stats.go index 048321add5..2cfe140c81 100644 --- a/pkg/api/handlers/compat/containers_stats.go +++ b/pkg/api/handlers/compat/containers_stats.go @@ -5,10 +5,10 @@ import ( "net/http" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/cgroups" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/cgroups" docker "github.com/docker/docker/api/types" "github.com/gorilla/schema" "github.com/pkg/errors" diff --git a/pkg/api/handlers/compat/containers_stop.go b/pkg/api/handlers/compat/containers_stop.go index d26ef2c823..bbfa248a16 100644 --- a/pkg/api/handlers/compat/containers_stop.go +++ b/pkg/api/handlers/compat/containers_stop.go @@ -3,9 +3,9 @@ package compat import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/compat/containers_top.go b/pkg/api/handlers/compat/containers_top.go index 202be55d14..9b45fbcf5d 100644 --- a/pkg/api/handlers/compat/containers_top.go +++ b/pkg/api/handlers/compat/containers_top.go @@ -4,9 +4,9 @@ import ( "net/http" "strings" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/compat/containers_unpause.go b/pkg/api/handlers/compat/containers_unpause.go index adabdeaeae..67b4f219a3 100644 --- a/pkg/api/handlers/compat/containers_unpause.go +++ b/pkg/api/handlers/compat/containers_unpause.go @@ -3,8 +3,8 @@ package compat import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" ) func UnpauseContainer(w http.ResponseWriter, r *http.Request) { diff --git a/pkg/api/handlers/compat/events.go b/pkg/api/handlers/compat/events.go index 577ddd0a12..5acc94153f 100644 --- a/pkg/api/handlers/compat/events.go +++ b/pkg/api/handlers/compat/events.go @@ -1,13 +1,14 @@ package compat import ( + "context" "fmt" "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/gorilla/schema" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" @@ -45,13 +46,15 @@ func GetEvents(w http.ResponseWriter, r *http.Request) { fromStart = true } + eventCtx, eventCancel := context.WithCancel(r.Context()) eventChannel := make(chan *events.Event) go func() { readOpts := events.ReadOptions{FromStart: fromStart, Stream: query.Stream, Filters: libpodFilters, EventChannel: eventChannel, Since: query.Since, Until: query.Until} - eventsError = runtime.Events(readOpts) + eventsError = runtime.Events(eventCtx, readOpts) }() if eventsError != nil { utils.InternalServerError(w, eventsError) + eventCancel() close(eventChannel) return } @@ -59,6 +62,7 @@ func GetEvents(w http.ResponseWriter, r *http.Request) { // If client disappears we need to stop listening for events go func(done <-chan struct{}) { <-done + eventCancel() if _, ok := <-eventChannel; ok { close(eventChannel) } diff --git a/pkg/api/handlers/compat/exec.go b/pkg/api/handlers/compat/exec.go index dae76c061a..aee4196dd0 100644 --- a/pkg/api/handlers/compat/exec.go +++ b/pkg/api/handlers/compat/exec.go @@ -6,11 +6,11 @@ import ( "net/http" "strings" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/specgen/generate" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/specgen/generate" "github.com/gorilla/mux" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go index ce9ff1b197..94feb59201 100644 --- a/pkg/api/handlers/compat/images.go +++ b/pkg/api/handlers/compat/images.go @@ -11,13 +11,13 @@ import ( "github.com/containers/buildah" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/libpod" - image2 "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/auth" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + image2 "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/auth" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/docker/docker/api/types" "github.com/gorilla/schema" "github.com/pkg/errors" diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go index f967acf326..8ac5b80c1c 100644 --- a/pkg/api/handlers/compat/images_build.go +++ b/pkg/api/handlers/compat/images_build.go @@ -15,9 +15,9 @@ import ( "github.com/containers/buildah" "github.com/containers/buildah/imagebuildah" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/containers/storage/pkg/archive" "github.com/gorilla/schema" ) diff --git a/pkg/api/handlers/compat/images_history.go b/pkg/api/handlers/compat/images_history.go index 7c0bbf828e..33902362f2 100644 --- a/pkg/api/handlers/compat/images_history.go +++ b/pkg/api/handlers/compat/images_history.go @@ -3,9 +3,9 @@ package compat import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/compat/images_push.go b/pkg/api/handlers/compat/images_push.go index 47976b7c94..c73bbb8d65 100644 --- a/pkg/api/handlers/compat/images_push.go +++ b/pkg/api/handlers/compat/images_push.go @@ -6,10 +6,10 @@ import ( "os" "strings" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/auth" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/auth" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/compat/images_remove.go b/pkg/api/handlers/compat/images_remove.go index ed01535296..367cab9e12 100644 --- a/pkg/api/handlers/compat/images_remove.go +++ b/pkg/api/handlers/compat/images_remove.go @@ -3,8 +3,8 @@ package compat import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/compat/images_search.go b/pkg/api/handlers/compat/images_search.go index 8da6855274..c8e37b2149 100644 --- a/pkg/api/handlers/compat/images_search.go +++ b/pkg/api/handlers/compat/images_search.go @@ -5,8 +5,8 @@ import ( "strconv" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/compat/images_tag.go b/pkg/api/handlers/compat/images_tag.go index 722be56534..0ac11c7f56 100644 --- a/pkg/api/handlers/compat/images_tag.go +++ b/pkg/api/handlers/compat/images_tag.go @@ -4,8 +4,8 @@ import ( "fmt" "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/compat/info.go b/pkg/api/handlers/compat/info.go index 5c3f610a46..6c44393cc3 100644 --- a/pkg/api/handlers/compat/info.go +++ b/pkg/api/handlers/compat/info.go @@ -11,11 +11,11 @@ import ( "github.com/containers/common/pkg/config" "github.com/containers/common/pkg/sysinfo" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/rootless" docker "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/google/uuid" diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go index 7209255d73..2e11c0edb2 100644 --- a/pkg/api/handlers/compat/networks.go +++ b/pkg/api/handlers/compat/networks.go @@ -9,11 +9,11 @@ import ( "time" "github.com/containernetworking/cni/libcni" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/abi" - "github.com/containers/libpod/pkg/network" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/abi" + "github.com/containers/libpod/v2/pkg/network" "github.com/docker/docker/api/types" dockerNetwork "github.com/docker/docker/api/types/network" "github.com/gorilla/schema" diff --git a/pkg/api/handlers/compat/ping.go b/pkg/api/handlers/compat/ping.go index d275c4a02a..b7cc0246e0 100644 --- a/pkg/api/handlers/compat/ping.go +++ b/pkg/api/handlers/compat/ping.go @@ -5,7 +5,7 @@ import ( "net/http" "github.com/containers/buildah" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" ) // Ping returns headers to client about the service diff --git a/pkg/api/handlers/compat/resize.go b/pkg/api/handlers/compat/resize.go index 478a8fab47..7caff3d40e 100644 --- a/pkg/api/handlers/compat/resize.go +++ b/pkg/api/handlers/compat/resize.go @@ -5,9 +5,9 @@ import ( "net/http" "strings" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/gorilla/mux" "github.com/gorilla/schema" "github.com/pkg/errors" diff --git a/pkg/api/handlers/compat/swagger.go b/pkg/api/handlers/compat/swagger.go index dc94a7ebd0..c59d25c5a5 100644 --- a/pkg/api/handlers/compat/swagger.go +++ b/pkg/api/handlers/compat/swagger.go @@ -1,7 +1,7 @@ package compat import ( - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/containers/storage/pkg/archive" "github.com/docker/docker/api/types" ) diff --git a/pkg/api/handlers/compat/system.go b/pkg/api/handlers/compat/system.go index 47e187ba1c..4f2692e2a3 100644 --- a/pkg/api/handlers/compat/system.go +++ b/pkg/api/handlers/compat/system.go @@ -3,8 +3,8 @@ package compat import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" docker "github.com/docker/docker/api/types" ) diff --git a/pkg/api/handlers/compat/unsupported.go b/pkg/api/handlers/compat/unsupported.go index 55660882fa..9db0c3febe 100644 --- a/pkg/api/handlers/compat/unsupported.go +++ b/pkg/api/handlers/compat/unsupported.go @@ -4,9 +4,9 @@ import ( "fmt" "net/http" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" log "github.com/sirupsen/logrus" ) diff --git a/pkg/api/handlers/compat/version.go b/pkg/api/handlers/compat/version.go index 3164b16b99..6dd0cec2cb 100644 --- a/pkg/api/handlers/compat/version.go +++ b/pkg/api/handlers/compat/version.go @@ -6,10 +6,10 @@ import ( goRuntime "runtime" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" docker "github.com/docker/docker/api/types" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/compat/volumes.go b/pkg/api/handlers/compat/volumes.go index 1c9366409f..4b5d947302 100644 --- a/pkg/api/handlers/compat/volumes.go +++ b/pkg/api/handlers/compat/volumes.go @@ -5,11 +5,11 @@ import ( "net/http" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/filters" - "github.com/containers/libpod/pkg/domain/infra/abi/parse" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/filters" + "github.com/containers/libpod/v2/pkg/domain/infra/abi/parse" docker_api_types "github.com/docker/docker/api/types" docker_api_types_volume "github.com/docker/docker/api/types/volume" "github.com/gorilla/schema" diff --git a/pkg/api/handlers/decoder.go b/pkg/api/handlers/decoder.go index e46cd8837b..8fcb794f20 100644 --- a/pkg/api/handlers/decoder.go +++ b/pkg/api/handlers/decoder.go @@ -6,7 +6,7 @@ import ( "syscall" "time" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/pkg/util" "github.com/gorilla/schema" "github.com/sirupsen/logrus" ) diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go index 5062867368..008bff8c51 100644 --- a/pkg/api/handlers/libpod/containers.go +++ b/pkg/api/handlers/libpod/containers.go @@ -6,12 +6,12 @@ import ( "os" "strconv" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/compat" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/ps" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/ps" "github.com/gorilla/schema" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/api/handlers/libpod/containers_create.go b/pkg/api/handlers/libpod/containers_create.go index 8fbff9be71..2d9ffecced 100644 --- a/pkg/api/handlers/libpod/containers_create.go +++ b/pkg/api/handlers/libpod/containers_create.go @@ -5,11 +5,11 @@ import ( "encoding/json" "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/specgen/generate" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/specgen/generate" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/libpod/copy.go b/pkg/api/handlers/libpod/copy.go index a3b404bce9..045d875762 100644 --- a/pkg/api/handlers/libpod/copy.go +++ b/pkg/api/handlers/libpod/copy.go @@ -3,7 +3,7 @@ package libpod import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/libpod/generate.go b/pkg/api/handlers/libpod/generate.go index 23320d3469..63dfcbf90e 100644 --- a/pkg/api/handlers/libpod/generate.go +++ b/pkg/api/handlers/libpod/generate.go @@ -3,10 +3,10 @@ package libpod import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/abi" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/abi" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/libpod/healthcheck.go b/pkg/api/handlers/libpod/healthcheck.go index 0ca3574b71..93fd684035 100644 --- a/pkg/api/handlers/libpod/healthcheck.go +++ b/pkg/api/handlers/libpod/healthcheck.go @@ -3,9 +3,9 @@ package libpod import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" ) func RunHealthCheck(w http.ResponseWriter, r *http.Request) { diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go index ebcb1f460b..b21c3b8f71 100644 --- a/pkg/api/handlers/libpod/images.go +++ b/pkg/api/handlers/libpod/images.go @@ -15,18 +15,18 @@ import ( "github.com/containers/image/v5/docker/reference" "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - image2 "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/auth" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/abi" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/util" - utils2 "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + image2 "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/auth" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/abi" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/util" + utils2 "github.com/containers/libpod/v2/utils" "github.com/gorilla/schema" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/api/handlers/libpod/info.go b/pkg/api/handlers/libpod/info.go index cbf03aa178..9cdc085972 100644 --- a/pkg/api/handlers/libpod/info.go +++ b/pkg/api/handlers/libpod/info.go @@ -3,8 +3,8 @@ package libpod import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" ) func GetInfo(w http.ResponseWriter, r *http.Request) { diff --git a/pkg/api/handlers/libpod/manifests.go b/pkg/api/handlers/libpod/manifests.go index aef92368b8..24769b3164 100644 --- a/pkg/api/handlers/libpod/manifests.go +++ b/pkg/api/handlers/libpod/manifests.go @@ -7,10 +7,10 @@ import ( "github.com/containers/buildah/manifests" copy2 "github.com/containers/image/v5/copy" "github.com/containers/image/v5/transports/alltransports" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/gorilla/schema" "github.com/opencontainers/go-digest" "github.com/pkg/errors" diff --git a/pkg/api/handlers/libpod/networks.go b/pkg/api/handlers/libpod/networks.go index 7de285e5e1..12409bf502 100644 --- a/pkg/api/handlers/libpod/networks.go +++ b/pkg/api/handlers/libpod/networks.go @@ -4,11 +4,11 @@ import ( "encoding/json" "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/abi" - "github.com/containers/libpod/pkg/network" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/abi" + "github.com/containers/libpod/v2/pkg/network" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/libpod/play.go b/pkg/api/handlers/libpod/play.go index 1cb5cdb6cd..fcb56b1300 100644 --- a/pkg/api/handlers/libpod/play.go +++ b/pkg/api/handlers/libpod/play.go @@ -7,11 +7,11 @@ import ( "os" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/auth" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/abi" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/auth" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/abi" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go index 4b57ef26a7..dee5a7d33b 100644 --- a/pkg/api/handlers/libpod/pods.go +++ b/pkg/api/handlers/libpod/pods.go @@ -6,15 +6,15 @@ import ( "net/http" "strings" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/abi" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/specgen/generate" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/abi" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/specgen/generate" + "github.com/containers/libpod/v2/pkg/util" "github.com/gorilla/schema" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/api/handlers/libpod/swagger.go b/pkg/api/handlers/libpod/swagger.go index 057fbfb41e..21f5c1e59f 100644 --- a/pkg/api/handlers/libpod/swagger.go +++ b/pkg/api/handlers/libpod/swagger.go @@ -5,9 +5,9 @@ import ( "os" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/libpod/system.go b/pkg/api/handlers/libpod/system.go index 52d3b91ab3..c09480bd18 100644 --- a/pkg/api/handlers/libpod/system.go +++ b/pkg/api/handlers/libpod/system.go @@ -3,11 +3,11 @@ package libpod import ( "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers/compat" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/abi" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/abi" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/libpod/volumes.go b/pkg/api/handlers/libpod/volumes.go index 6523244f38..0d83218e3e 100644 --- a/pkg/api/handlers/libpod/volumes.go +++ b/pkg/api/handlers/libpod/volumes.go @@ -4,12 +4,12 @@ import ( "encoding/json" "net/http" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/filters" - "github.com/containers/libpod/pkg/domain/infra/abi/parse" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/filters" + "github.com/containers/libpod/v2/pkg/domain/infra/abi/parse" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/swagger/swagger.go b/pkg/api/handlers/swagger/swagger.go index 5d125417b5..e35c4e9e3f 100644 --- a/pkg/api/handlers/swagger/swagger.go +++ b/pkg/api/handlers/swagger/swagger.go @@ -1,12 +1,12 @@ package swagger import ( - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/inspect" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/inspect" "github.com/docker/docker/api/types" ) diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go index 72e1a756e8..9c3c35c5f3 100644 --- a/pkg/api/handlers/types.go +++ b/pkg/api/handlers/types.go @@ -7,8 +7,8 @@ import ( "time" "github.com/containers/image/v5/manifest" - libpodImage "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/domain/entities" + libpodImage "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/domain/entities" docker "github.com/docker/docker/api/types" dockerContainer "github.com/docker/docker/api/types/container" dockerNetwork "github.com/docker/docker/api/types/network" diff --git a/pkg/api/handlers/utils/containers.go b/pkg/api/handlers/utils/containers.go index 4bcac6e725..2c040526b7 100644 --- a/pkg/api/handlers/utils/containers.go +++ b/pkg/api/handlers/utils/containers.go @@ -5,10 +5,10 @@ import ( "net/http" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" - createconfig "github.com/containers/libpod/pkg/spec" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" + createconfig "github.com/containers/libpod/v2/pkg/spec" "github.com/gorilla/schema" "github.com/pkg/errors" ) diff --git a/pkg/api/handlers/utils/errors.go b/pkg/api/handlers/utils/errors.go index c17720694a..00d09ac116 100644 --- a/pkg/api/handlers/utils/errors.go +++ b/pkg/api/handlers/utils/errors.go @@ -4,8 +4,8 @@ import ( "fmt" "net/http" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" log "github.com/sirupsen/logrus" ) diff --git a/pkg/api/handlers/utils/images.go b/pkg/api/handlers/utils/images.go index 521f727be4..fc7d2a64e1 100644 --- a/pkg/api/handlers/utils/images.go +++ b/pkg/api/handlers/utils/images.go @@ -9,8 +9,8 @@ import ( "github.com/containers/image/v5/storage" "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/image" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/image" "github.com/gorilla/schema" "github.com/pkg/errors" ) @@ -60,6 +60,7 @@ func GetImages(w http.ResponseWriter, r *http.Request) ([]*image.Image, error) { All bool Filters map[string][]string `schema:"filters"` Digests bool + Filter string // Docker 1.24 compatibility }{ // This is where you can override the golang default value for one of fields } @@ -76,8 +77,16 @@ func GetImages(w http.ResponseWriter, r *http.Request) ([]*image.Image, error) { err error ) - if len(query.Filters) > 0 { - for k, v := range query.Filters { + queryFilters := query.Filters + if len(query.Filter) > 0 { // Docker 1.24 compatibility + if (queryFilters == nil) { + queryFilters = make(map[string][]string) + } + queryFilters["reference"] = append(queryFilters["reference"], query.Filter) + } + + if len(queryFilters) > 0 { + for k, v := range queryFilters { filters = append(filters, fmt.Sprintf("%s=%s", k, strings.Join(v, "="))) } images, err = runtime.ImageRuntime().GetImagesWithFilters(filters) diff --git a/pkg/api/handlers/utils/pods.go b/pkg/api/handlers/utils/pods.go index 0bb818c1cd..efad02dd9c 100644 --- a/pkg/api/handlers/utils/pods.go +++ b/pkg/api/handlers/utils/pods.go @@ -3,9 +3,9 @@ package utils import ( "net/http" - "github.com/containers/libpod/libpod" - lpfilters "github.com/containers/libpod/libpod/filters" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod" + lpfilters "github.com/containers/libpod/v2/libpod/filters" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/gorilla/schema" ) diff --git a/pkg/api/server/handler_api.go b/pkg/api/server/handler_api.go index dbdb7f17bf..b0fd932ba7 100644 --- a/pkg/api/server/handler_api.go +++ b/pkg/api/server/handler_api.go @@ -6,7 +6,7 @@ import ( "net/http" "runtime" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" log "github.com/sirupsen/logrus" ) diff --git a/pkg/api/server/register_archive.go b/pkg/api/server/register_archive.go index a1d5941bcb..4aeb7462e9 100644 --- a/pkg/api/server/register_archive.go +++ b/pkg/api/server/register_archive.go @@ -3,8 +3,8 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_auth.go b/pkg/api/server/register_auth.go index 33b707fa4c..1bf23d2eb1 100644 --- a/pkg/api/server/register_auth.go +++ b/pkg/api/server/register_auth.go @@ -1,7 +1,7 @@ package server import ( - "github.com/containers/libpod/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go index 0d78e4cdb4..18ff2f4233 100644 --- a/pkg/api/server/register_containers.go +++ b/pkg/api/server/register_containers.go @@ -3,8 +3,8 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_distribution.go b/pkg/api/server/register_distribution.go index 89f69ea673..73ef2e85b4 100644 --- a/pkg/api/server/register_distribution.go +++ b/pkg/api/server/register_distribution.go @@ -1,7 +1,7 @@ package server import ( - "github.com/containers/libpod/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_events.go b/pkg/api/server/register_events.go index 2b85eb1699..72aabe4969 100644 --- a/pkg/api/server/register_events.go +++ b/pkg/api/server/register_events.go @@ -3,7 +3,7 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_exec.go b/pkg/api/server/register_exec.go index af9a834967..be6cbf9bc0 100644 --- a/pkg/api/server/register_exec.go +++ b/pkg/api/server/register_exec.go @@ -3,7 +3,7 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_generate.go b/pkg/api/server/register_generate.go index 391e601115..82f1dc6802 100644 --- a/pkg/api/server/register_generate.go +++ b/pkg/api/server/register_generate.go @@ -3,7 +3,7 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_healthcheck.go b/pkg/api/server/register_healthcheck.go index 69aa5bbfbe..9059fdba7a 100644 --- a/pkg/api/server/register_healthcheck.go +++ b/pkg/api/server/register_healthcheck.go @@ -3,7 +3,7 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go index 754cb1b757..3c15c82d58 100644 --- a/pkg/api/server/register_images.go +++ b/pkg/api/server/register_images.go @@ -3,8 +3,8 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_info.go b/pkg/api/server/register_info.go index 75aaa957b6..28e7e6e531 100644 --- a/pkg/api/server/register_info.go +++ b/pkg/api/server/register_info.go @@ -3,8 +3,8 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_manifest.go b/pkg/api/server/register_manifest.go index 8fd84f205b..91e820dca1 100644 --- a/pkg/api/server/register_manifest.go +++ b/pkg/api/server/register_manifest.go @@ -3,7 +3,7 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_monitor.go b/pkg/api/server/register_monitor.go index b7a7c37926..9a76ebac2f 100644 --- a/pkg/api/server/register_monitor.go +++ b/pkg/api/server/register_monitor.go @@ -1,7 +1,7 @@ package server import ( - "github.com/containers/libpod/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go index 3ea16f81a4..3a45ee458d 100644 --- a/pkg/api/server/register_networks.go +++ b/pkg/api/server/register_networks.go @@ -3,8 +3,8 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_ping.go b/pkg/api/server/register_ping.go index bf77630295..70e88ee00a 100644 --- a/pkg/api/server/register_ping.go +++ b/pkg/api/server/register_ping.go @@ -3,7 +3,7 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_play.go b/pkg/api/server/register_play.go index d04879c19d..049be39de6 100644 --- a/pkg/api/server/register_play.go +++ b/pkg/api/server/register_play.go @@ -3,7 +3,7 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_plugins.go b/pkg/api/server/register_plugins.go index 5f6473fe8c..c21564b5cc 100644 --- a/pkg/api/server/register_plugins.go +++ b/pkg/api/server/register_plugins.go @@ -1,7 +1,7 @@ package server import ( - "github.com/containers/libpod/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go index 4156dd86b9..d5a286442d 100644 --- a/pkg/api/server/register_pods.go +++ b/pkg/api/server/register_pods.go @@ -3,7 +3,7 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_swagger.go b/pkg/api/server/register_swagger.go index 9048c19519..bf68fda3c3 100644 --- a/pkg/api/server/register_swagger.go +++ b/pkg/api/server/register_swagger.go @@ -3,7 +3,7 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_swarm.go b/pkg/api/server/register_swarm.go index 8a55882684..d1048bb8c9 100644 --- a/pkg/api/server/register_swarm.go +++ b/pkg/api/server/register_swarm.go @@ -4,7 +4,7 @@ import ( "errors" "net/http" - "github.com/containers/libpod/pkg/api/handlers/utils" + "github.com/containers/libpod/v2/pkg/api/handlers/utils" "github.com/gorilla/mux" "github.com/sirupsen/logrus" ) diff --git a/pkg/api/server/register_system.go b/pkg/api/server/register_system.go index 118ad2d080..ef88cda09f 100644 --- a/pkg/api/server/register_system.go +++ b/pkg/api/server/register_system.go @@ -3,8 +3,8 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_version.go b/pkg/api/server/register_version.go index 30289ffe30..38d27849c1 100644 --- a/pkg/api/server/register_version.go +++ b/pkg/api/server/register_version.go @@ -3,7 +3,7 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/register_volumes.go b/pkg/api/server/register_volumes.go index 0f4f18b0a4..72f0f4249d 100644 --- a/pkg/api/server/register_volumes.go +++ b/pkg/api/server/register_volumes.go @@ -3,8 +3,8 @@ package server import ( "net/http" - "github.com/containers/libpod/pkg/api/handlers/compat" - "github.com/containers/libpod/pkg/api/handlers/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers/compat" + "github.com/containers/libpod/v2/pkg/api/handlers/libpod" "github.com/gorilla/mux" ) diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go index 5b2f8bea25..8af6d31862 100644 --- a/pkg/api/server/server.go +++ b/pkg/api/server/server.go @@ -14,8 +14,8 @@ import ( "syscall" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/api/handlers" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/api/handlers" "github.com/coreos/go-systemd/v22/activation" "github.com/gorilla/mux" "github.com/gorilla/schema" diff --git a/pkg/api/server/swagger.go b/pkg/api/server/swagger.go index c463f809e5..26e8b22c21 100644 --- a/pkg/api/server/swagger.go +++ b/pkg/api/server/swagger.go @@ -1,9 +1,9 @@ package server import ( - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" ) // No such image diff --git a/pkg/autoupdate/autoupdate.go b/pkg/autoupdate/autoupdate.go index 0ec98d3b65..9f4116a0d8 100644 --- a/pkg/autoupdate/autoupdate.go +++ b/pkg/autoupdate/autoupdate.go @@ -9,12 +9,12 @@ import ( "github.com/containers/image/v5/docker/reference" "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/transports/alltransports" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/systemd" - systemdGen "github.com/containers/libpod/pkg/systemd/generate" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/systemd" + systemdGen "github.com/containers/libpod/v2/pkg/systemd/generate" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/bindings/connection.go b/pkg/bindings/connection.go index c02d55e31d..4fed482371 100644 --- a/pkg/bindings/connection.go +++ b/pkg/bindings/connection.go @@ -13,7 +13,7 @@ import ( "time" "github.com/blang/semver" - "github.com/containers/libpod/pkg/terminal" + "github.com/containers/libpod/v2/pkg/terminal" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/bindings/containers/attach.go b/pkg/bindings/containers/attach.go index 22ab2d72d2..077bb244fb 100644 --- a/pkg/bindings/containers/attach.go +++ b/pkg/bindings/containers/attach.go @@ -15,10 +15,10 @@ import ( "strconv" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings" - sig "github.com/containers/libpod/pkg/signal" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings" + sig "github.com/containers/libpod/v2/pkg/signal" + "github.com/containers/libpod/v2/utils" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/crypto/ssh/terminal" diff --git a/pkg/bindings/containers/checkpoint.go b/pkg/bindings/containers/checkpoint.go index 8a3932e806..451f2ab521 100644 --- a/pkg/bindings/containers/checkpoint.go +++ b/pkg/bindings/containers/checkpoint.go @@ -6,8 +6,8 @@ import ( "net/url" "strconv" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" ) // Checkpoint checkpoints the given container (identified by nameOrID). All additional diff --git a/pkg/bindings/containers/commit.go b/pkg/bindings/containers/commit.go index 1a9ddc970a..039dfe460f 100644 --- a/pkg/bindings/containers/commit.go +++ b/pkg/bindings/containers/commit.go @@ -6,8 +6,8 @@ import ( "net/url" "strconv" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/bindings" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/bindings" ) // Commit creates a container image from a container. The container is defined by nameOrID. Use diff --git a/pkg/bindings/containers/containers.go b/pkg/bindings/containers/containers.go index 8c588bb404..41df2d52f7 100644 --- a/pkg/bindings/containers/containers.go +++ b/pkg/bindings/containers/containers.go @@ -8,10 +8,10 @@ import ( "strconv" "strings" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" ) diff --git a/pkg/bindings/containers/create.go b/pkg/bindings/containers/create.go index 4603b86537..2c719c5305 100644 --- a/pkg/bindings/containers/create.go +++ b/pkg/bindings/containers/create.go @@ -5,9 +5,9 @@ import ( "net/http" "strings" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/specgen" jsoniter "github.com/json-iterator/go" ) diff --git a/pkg/bindings/containers/diff.go b/pkg/bindings/containers/diff.go index e7a50248af..fcdd4aadde 100644 --- a/pkg/bindings/containers/diff.go +++ b/pkg/bindings/containers/diff.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/containers/libpod/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings" "github.com/containers/storage/pkg/archive" ) diff --git a/pkg/bindings/containers/exec.go b/pkg/bindings/containers/exec.go index 73cfb50799..e4b1f61f05 100644 --- a/pkg/bindings/containers/exec.go +++ b/pkg/bindings/containers/exec.go @@ -6,9 +6,9 @@ import ( "net/http" "strings" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/bindings" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/bindings" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/bindings/containers/healthcheck.go b/pkg/bindings/containers/healthcheck.go index b726acf49b..084e63f89e 100644 --- a/pkg/bindings/containers/healthcheck.go +++ b/pkg/bindings/containers/healthcheck.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings" ) // RunHealthCheck executes the container's healthcheck and returns the health status of the diff --git a/pkg/bindings/containers/logs.go b/pkg/bindings/containers/logs.go index bec4ebb3c1..5f2ccb20af 100644 --- a/pkg/bindings/containers/logs.go +++ b/pkg/bindings/containers/logs.go @@ -9,7 +9,7 @@ import ( "net/url" "strconv" - "github.com/containers/libpod/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings" "github.com/pkg/errors" ) diff --git a/pkg/bindings/containers/mount.go b/pkg/bindings/containers/mount.go index 2d553142ff..5f2f8e13ce 100644 --- a/pkg/bindings/containers/mount.go +++ b/pkg/bindings/containers/mount.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/containers/libpod/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings" ) // Mount mounts an existing container to the filesystem. It returns the path diff --git a/pkg/bindings/errors.go b/pkg/bindings/errors.go index 278a27d608..7ee5bbb126 100644 --- a/pkg/bindings/errors.go +++ b/pkg/bindings/errors.go @@ -4,7 +4,7 @@ import ( "encoding/json" "io/ioutil" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" ) diff --git a/pkg/bindings/generate/generate.go b/pkg/bindings/generate/generate.go index 5e4be48962..832507d8b6 100644 --- a/pkg/bindings/generate/generate.go +++ b/pkg/bindings/generate/generate.go @@ -6,8 +6,8 @@ import ( "net/url" "strconv" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func Kube(ctx context.Context, nameOrID string, options entities.GenerateKubeOptions) (*entities.GenerateKubeReport, error) { diff --git a/pkg/bindings/images/diff.go b/pkg/bindings/images/diff.go index 25cbde1887..c0e8d741a3 100644 --- a/pkg/bindings/images/diff.go +++ b/pkg/bindings/images/diff.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/containers/libpod/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings" "github.com/containers/storage/pkg/archive" ) diff --git a/pkg/bindings/images/images.go b/pkg/bindings/images/images.go index bc2d116f31..15936d86bd 100644 --- a/pkg/bindings/images/images.go +++ b/pkg/bindings/images/images.go @@ -11,10 +11,10 @@ import ( "github.com/containers/buildah" "github.com/containers/image/v5/types" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/auth" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/auth" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/docker/go-units" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" diff --git a/pkg/bindings/images/rm.go b/pkg/bindings/images/rm.go index c315bfce71..f46d300659 100644 --- a/pkg/bindings/images/rm.go +++ b/pkg/bindings/images/rm.go @@ -6,10 +6,10 @@ import ( "net/url" "strconv" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/errorhandling" ) // BachtRemove removes a batch of images from the local storage. diff --git a/pkg/bindings/manifests/manifests.go b/pkg/bindings/manifests/manifests.go index e896246675..feeb8d3f7e 100644 --- a/pkg/bindings/manifests/manifests.go +++ b/pkg/bindings/manifests/manifests.go @@ -9,9 +9,9 @@ import ( "strings" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/bindings" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/bindings" jsoniter "github.com/json-iterator/go" ) diff --git a/pkg/bindings/network/network.go b/pkg/bindings/network/network.go index 34881b524e..35030bdb6b 100644 --- a/pkg/bindings/network/network.go +++ b/pkg/bindings/network/network.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" jsoniter "github.com/json-iterator/go" ) diff --git a/pkg/bindings/play/play.go b/pkg/bindings/play/play.go index 9a4f56b6df..5ed755a323 100644 --- a/pkg/bindings/play/play.go +++ b/pkg/bindings/play/play.go @@ -8,9 +8,9 @@ import ( "strconv" "github.com/containers/image/v5/types" - "github.com/containers/libpod/pkg/auth" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/auth" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func Kube(ctx context.Context, path string, options entities.PlayKubeOptions) (*entities.PlayKubeReport, error) { diff --git a/pkg/bindings/pods/pods.go b/pkg/bindings/pods/pods.go index fb273fdf32..cc9c98c3c9 100644 --- a/pkg/bindings/pods/pods.go +++ b/pkg/bindings/pods/pods.go @@ -8,10 +8,10 @@ import ( "strconv" "strings" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/specgen" jsoniter "github.com/json-iterator/go" ) diff --git a/pkg/bindings/system/info.go b/pkg/bindings/system/info.go index 8ad704f844..4926623746 100644 --- a/pkg/bindings/system/info.go +++ b/pkg/bindings/system/info.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings" ) // Info returns information about the libpod environment and its stores diff --git a/pkg/bindings/system/system.go b/pkg/bindings/system/system.go index b2ee3951b8..b26fad0176 100644 --- a/pkg/bindings/system/system.go +++ b/pkg/bindings/system/system.go @@ -10,9 +10,9 @@ import ( "strconv" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/bindings/test/attach_test.go b/pkg/bindings/test/attach_test.go index 6fb1668282..dcc6b5f8e6 100644 --- a/pkg/bindings/test/attach_test.go +++ b/pkg/bindings/test/attach_test.go @@ -5,10 +5,10 @@ import ( "fmt" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/specgen" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/test/auth_test.go b/pkg/bindings/test/auth_test.go index fdb1905514..6a5c2e8316 100644 --- a/pkg/bindings/test/auth_test.go +++ b/pkg/bindings/test/auth_test.go @@ -7,9 +7,9 @@ import ( "github.com/containers/common/pkg/auth" "github.com/containers/image/v5/types" - podmanRegistry "github.com/containers/libpod/hack/podman-registry-go" - "github.com/containers/libpod/pkg/bindings/images" - "github.com/containers/libpod/pkg/domain/entities" + podmanRegistry "github.com/containers/libpod/v2/hack/podman-registry-go" + "github.com/containers/libpod/v2/pkg/bindings/images" + "github.com/containers/libpod/v2/pkg/domain/entities" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/test/common_test.go b/pkg/bindings/test/common_test.go index a86e6f2e32..831ecfd316 100644 --- a/pkg/bindings/test/common_test.go +++ b/pkg/bindings/test/common_test.go @@ -9,10 +9,10 @@ import ( "path/filepath" "strings" - "github.com/containers/libpod/libpod/define" - . "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/define" + . "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/onsi/ginkgo" "github.com/onsi/gomega/gexec" "github.com/pkg/errors" diff --git a/pkg/bindings/test/containers_test.go b/pkg/bindings/test/containers_test.go index b987f04428..4b2c783537 100644 --- a/pkg/bindings/test/containers_test.go +++ b/pkg/bindings/test/containers_test.go @@ -6,11 +6,11 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/test/create_test.go b/pkg/bindings/test/create_test.go index a63aa79cfc..7fb69ddb79 100644 --- a/pkg/bindings/test/create_test.go +++ b/pkg/bindings/test/create_test.go @@ -3,8 +3,8 @@ package test_bindings import ( "time" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/specgen" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/test/exec_test.go b/pkg/bindings/test/exec_test.go index 53b2dcb4ab..e8cd324049 100644 --- a/pkg/bindings/test/exec_test.go +++ b/pkg/bindings/test/exec_test.go @@ -3,9 +3,9 @@ package test_bindings import ( "time" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/containers" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/test/images_test.go b/pkg/bindings/test/images_test.go index f2a1a51e59..c4f84f7560 100644 --- a/pkg/bindings/test/images_test.go +++ b/pkg/bindings/test/images_test.go @@ -6,10 +6,10 @@ import ( "path/filepath" "time" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/bindings/images" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/bindings/images" + "github.com/containers/libpod/v2/pkg/domain/entities" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/test/info_test.go b/pkg/bindings/test/info_test.go index 64f2b458fe..d7a6e0e8ad 100644 --- a/pkg/bindings/test/info_test.go +++ b/pkg/bindings/test/info_test.go @@ -4,10 +4,10 @@ import ( "runtime" "time" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/bindings/images" - "github.com/containers/libpod/pkg/bindings/system" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/bindings/images" + "github.com/containers/libpod/v2/pkg/bindings/system" + "github.com/containers/libpod/v2/pkg/specgen" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/test/manifests_test.go b/pkg/bindings/test/manifests_test.go index 71d626b7be..ddb5490614 100644 --- a/pkg/bindings/test/manifests_test.go +++ b/pkg/bindings/test/manifests_test.go @@ -4,10 +4,10 @@ import ( "net/http" "time" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/images" - "github.com/containers/libpod/pkg/bindings/manifests" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/images" + "github.com/containers/libpod/v2/pkg/bindings/manifests" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/test/pods_test.go b/pkg/bindings/test/pods_test.go index d8e2a5ef7f..2ad6f38c14 100644 --- a/pkg/bindings/test/pods_test.go +++ b/pkg/bindings/test/pods_test.go @@ -5,10 +5,10 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/pods" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/pods" + "github.com/containers/libpod/v2/pkg/specgen" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/test/system_test.go b/pkg/bindings/test/system_test.go index dd37787548..93141400bf 100644 --- a/pkg/bindings/test/system_test.go +++ b/pkg/bindings/test/system_test.go @@ -3,12 +3,12 @@ package test_bindings import ( "time" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/bindings/pods" - "github.com/containers/libpod/pkg/bindings/system" - "github.com/containers/libpod/pkg/bindings/volumes" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/bindings/pods" + "github.com/containers/libpod/v2/pkg/bindings/system" + "github.com/containers/libpod/v2/pkg/bindings/volumes" + "github.com/containers/libpod/v2/pkg/domain/entities" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/test/volumes_test.go b/pkg/bindings/test/volumes_test.go index 839a4c5752..efc02a0d4d 100644 --- a/pkg/bindings/test/volumes_test.go +++ b/pkg/bindings/test/volumes_test.go @@ -6,10 +6,10 @@ import ( "net/http" "time" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/bindings/volumes" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/bindings/volumes" + "github.com/containers/libpod/v2/pkg/domain/entities" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/pkg/bindings/volumes/volumes.go b/pkg/bindings/volumes/volumes.go index ebe19794a7..8a89619597 100644 --- a/pkg/bindings/volumes/volumes.go +++ b/pkg/bindings/volumes/volumes.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" jsoniter "github.com/json-iterator/go" ) diff --git a/pkg/cgroups/cgroups.go b/pkg/cgroups/cgroups.go index 3990721086..a8dfd7f77c 100644 --- a/pkg/cgroups/cgroups.go +++ b/pkg/cgroups/cgroups.go @@ -10,7 +10,7 @@ import ( "strconv" "strings" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootless" systemdDbus "github.com/coreos/go-systemd/v22/dbus" "github.com/godbus/dbus/v5" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/checkpoint/checkpoint_restore.go b/pkg/checkpoint/checkpoint_restore.go index 78f592d322..bc2e7cde07 100644 --- a/pkg/checkpoint/checkpoint_restore.go +++ b/pkg/checkpoint/checkpoint_restore.go @@ -6,10 +6,10 @@ import ( "os" "path/filepath" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/util" "github.com/containers/storage/pkg/archive" jsoniter "github.com/json-iterator/go" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/domain/entities/container_ps.go b/pkg/domain/entities/container_ps.go index 05627c4b32..b6f9e6892c 100644 --- a/pkg/domain/entities/container_ps.go +++ b/pkg/domain/entities/container_ps.go @@ -4,7 +4,7 @@ import ( "sort" "strings" - "github.com/containers/libpod/pkg/ps/define" + "github.com/containers/libpod/v2/pkg/ps/define" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/pkg/errors" ) diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go index 9ea572293e..dc9a670083 100644 --- a/pkg/domain/entities/containers.go +++ b/pkg/domain/entities/containers.go @@ -7,8 +7,8 @@ import ( "time" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/cri-o/ocicni/pkg/ocicni" ) diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go index 837550a2ef..f8c72da58a 100644 --- a/pkg/domain/entities/engine_container.go +++ b/pkg/domain/entities/engine_container.go @@ -4,8 +4,8 @@ import ( "context" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/spf13/cobra" ) diff --git a/pkg/domain/entities/events.go b/pkg/domain/entities/events.go index 8861be1582..05c8be34eb 100644 --- a/pkg/domain/entities/events.go +++ b/pkg/domain/entities/events.go @@ -4,7 +4,7 @@ import ( "strconv" "time" - libpodEvents "github.com/containers/libpod/libpod/events" + libpodEvents "github.com/containers/libpod/v2/libpod/events" dockerEvents "github.com/docker/docker/api/types/events" ) diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go index 27f887e8ec..25b3a70f23 100644 --- a/pkg/domain/entities/images.go +++ b/pkg/domain/entities/images.go @@ -5,8 +5,8 @@ import ( "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/types" - "github.com/containers/libpod/pkg/inspect" - "github.com/containers/libpod/pkg/trust" + "github.com/containers/libpod/v2/pkg/inspect" + "github.com/containers/libpod/v2/pkg/trust" docker "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/opencontainers/go-digest" diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go index fc76ddd416..8023034efb 100644 --- a/pkg/domain/entities/pods.go +++ b/pkg/domain/entities/pods.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/specgen" ) type PodKillOptions struct { diff --git a/pkg/domain/entities/system.go b/pkg/domain/entities/system.go index 79a90be485..09446cffec 100644 --- a/pkg/domain/entities/system.go +++ b/pkg/domain/entities/system.go @@ -3,7 +3,7 @@ package entities import ( "time" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod/define" "github.com/docker/docker/api/types" "github.com/spf13/cobra" ) diff --git a/pkg/domain/entities/types.go b/pkg/domain/entities/types.go index 622f74838d..7e910ff610 100644 --- a/pkg/domain/entities/types.go +++ b/pkg/domain/entities/types.go @@ -5,8 +5,8 @@ import ( "net" "github.com/containers/buildah/imagebuildah" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/containers/storage/pkg/archive" ) diff --git a/pkg/domain/filters/volumes.go b/pkg/domain/filters/volumes.go index b1b5e63199..052bf0f4b3 100644 --- a/pkg/domain/filters/volumes.go +++ b/pkg/domain/filters/volumes.go @@ -3,7 +3,7 @@ package filters import ( "strings" - "github.com/containers/libpod/libpod" + "github.com/containers/libpod/v2/libpod" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/abi/auto-update.go b/pkg/domain/infra/abi/auto-update.go index 9fcc451fd8..7bbcde359a 100644 --- a/pkg/domain/infra/abi/auto-update.go +++ b/pkg/domain/infra/abi/auto-update.go @@ -3,8 +3,8 @@ package abi import ( "context" - "github.com/containers/libpod/pkg/autoupdate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/autoupdate" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func (ic *ContainerEngine) AutoUpdate(ctx context.Context, options entities.AutoUpdateOptions) (*entities.AutoUpdateReport, []error) { diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go index 22de28a1cb..596fc2cc1e 100644 --- a/pkg/domain/infra/abi/containers.go +++ b/pkg/domain/infra/abi/containers.go @@ -13,22 +13,22 @@ import ( "github.com/containers/buildah" "github.com/containers/common/pkg/config" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - lpfilters "github.com/containers/libpod/libpod/filters" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/libpod/logs" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/checkpoint" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/abi/terminal" - "github.com/containers/libpod/pkg/parallel" - "github.com/containers/libpod/pkg/ps" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/signal" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/specgen/generate" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + lpfilters "github.com/containers/libpod/v2/libpod/filters" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/libpod/logs" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/checkpoint" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/abi/terminal" + "github.com/containers/libpod/v2/pkg/parallel" + "github.com/containers/libpod/v2/pkg/ps" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/signal" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/specgen/generate" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -741,7 +741,7 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri if ecode, err := ctr.Wait(); err != nil { if errors.Cause(err) == define.ErrNoSuchCtr { // Check events - event, err := ic.Libpod.GetLastContainerEvent(ctr.ID(), events.Exited) + event, err := ic.Libpod.GetLastContainerEvent(ctx, ctr.ID(), events.Exited) if err != nil { logrus.Errorf("Cannot get exit code: %v", err) exitCode = define.ExecErrorCodeNotFound @@ -871,7 +871,7 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta if ecode, err := ctr.Wait(); err != nil { if errors.Cause(err) == define.ErrNoSuchCtr { // Check events - event, err := ic.Libpod.GetLastContainerEvent(ctr.ID(), events.Exited) + event, err := ic.Libpod.GetLastContainerEvent(ctx, ctr.ID(), events.Exited) if err != nil { logrus.Errorf("Cannot get exit code: %v", err) report.ExitCode = define.ExecErrorCodeNotFound diff --git a/pkg/domain/infra/abi/containers_runlabel.go b/pkg/domain/infra/abi/containers_runlabel.go index 37422aac51..2e7d23d7e8 100644 --- a/pkg/domain/infra/abi/containers_runlabel.go +++ b/pkg/domain/infra/abi/containers_runlabel.go @@ -8,12 +8,12 @@ import ( "strings" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/domain/entities" - envLib "github.com/containers/libpod/pkg/env" - "github.com/containers/libpod/pkg/util" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/domain/entities" + envLib "github.com/containers/libpod/v2/pkg/env" + "github.com/containers/libpod/v2/pkg/util" + "github.com/containers/libpod/v2/utils" "github.com/google/shlex" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/domain/infra/abi/cp.go b/pkg/domain/infra/abi/cp.go index 82b07e2e12..baed4df7a0 100644 --- a/pkg/domain/infra/abi/cp.go +++ b/pkg/domain/infra/abi/cp.go @@ -11,9 +11,9 @@ import ( "github.com/containers/buildah/pkg/chrootuser" "github.com/containers/buildah/util" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/containers/storage" "github.com/containers/storage/pkg/chrootarchive" "github.com/containers/storage/pkg/idtools" diff --git a/pkg/domain/infra/abi/events.go b/pkg/domain/infra/abi/events.go index 7ec9db369f..7a81854451 100644 --- a/pkg/domain/infra/abi/events.go +++ b/pkg/domain/infra/abi/events.go @@ -3,11 +3,11 @@ package abi import ( "context" - "github.com/containers/libpod/libpod/events" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod/events" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func (ic *ContainerEngine) Events(ctx context.Context, opts entities.EventsOptions) error { readOpts := events.ReadOptions{FromStart: opts.FromStart, Stream: opts.Stream, Filters: opts.Filter, EventChannel: opts.EventChan, Since: opts.Since, Until: opts.Until} - return ic.Libpod.Events(readOpts) + return ic.Libpod.Events(ctx, readOpts) } diff --git a/pkg/domain/infra/abi/generate.go b/pkg/domain/infra/abi/generate.go index 8853303d59..560be988b0 100644 --- a/pkg/domain/infra/abi/generate.go +++ b/pkg/domain/infra/abi/generate.go @@ -5,10 +5,10 @@ import ( "context" "fmt" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/systemd/generate" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/systemd/generate" "github.com/ghodss/yaml" "github.com/pkg/errors" k8sAPI "k8s.io/api/core/v1" diff --git a/pkg/domain/infra/abi/healthcheck.go b/pkg/domain/infra/abi/healthcheck.go index dfa9a6fa57..4d834550f3 100644 --- a/pkg/domain/infra/abi/healthcheck.go +++ b/pkg/domain/infra/abi/healthcheck.go @@ -3,8 +3,8 @@ package abi import ( "context" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func (ic *ContainerEngine) HealthCheckRun(ctx context.Context, nameOrID string, options entities.HealthCheckOptions) (*define.HealthCheckResults, error) { diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go index 0f9ddfec40..3393275b87 100644 --- a/pkg/domain/infra/abi/images.go +++ b/pkg/domain/infra/abi/images.go @@ -11,7 +11,7 @@ import ( "strconv" "strings" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/containers/common/pkg/config" "github.com/containers/image/v5/docker" @@ -22,13 +22,13 @@ import ( "github.com/containers/image/v5/transports" "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - libpodImage "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/domain/entities" - domainUtils "github.com/containers/libpod/pkg/domain/utils" - "github.com/containers/libpod/pkg/trust" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + libpodImage "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/domain/entities" + domainUtils "github.com/containers/libpod/v2/pkg/domain/utils" + "github.com/containers/libpod/v2/pkg/trust" + "github.com/containers/libpod/v2/pkg/util" "github.com/containers/storage" imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" diff --git a/pkg/domain/infra/abi/images_list.go b/pkg/domain/infra/abi/images_list.go index 92ab0a9981..dda572ca8d 100644 --- a/pkg/domain/infra/abi/images_list.go +++ b/pkg/domain/infra/abi/images_list.go @@ -3,8 +3,8 @@ package abi import ( "context" - libpodImage "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/domain/entities" + libpodImage "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions) ([]*entities.ImageSummary, error) { diff --git a/pkg/domain/infra/abi/manifest.go b/pkg/domain/infra/abi/manifest.go index a6f5bab6b6..c2905b316d 100644 --- a/pkg/domain/infra/abi/manifest.go +++ b/pkg/domain/infra/abi/manifest.go @@ -17,9 +17,9 @@ import ( "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" - libpodImage "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + libpodImage "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/opencontainers/go-digest" imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/pkg/domain/infra/abi/network.go b/pkg/domain/infra/abi/network.go index eba1af362c..26383129cc 100644 --- a/pkg/domain/infra/abi/network.go +++ b/pkg/domain/infra/abi/network.go @@ -10,10 +10,10 @@ import ( "github.com/containernetworking/cni/libcni" cniversion "github.com/containernetworking/cni/pkg/version" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/network" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/network" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/abi/parse/parse.go b/pkg/domain/infra/abi/parse/parse.go index 2320c6a325..fc10e138c2 100644 --- a/pkg/domain/infra/abi/parse/parse.go +++ b/pkg/domain/infra/abi/parse/parse.go @@ -4,8 +4,8 @@ import ( "strconv" "strings" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go index 7053cec9ea..f82da2c95c 100644 --- a/pkg/domain/infra/abi/play.go +++ b/pkg/domain/infra/abi/play.go @@ -11,15 +11,15 @@ import ( "github.com/containers/buildah/pkg/parse" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/image" - ann "github.com/containers/libpod/pkg/annotations" - "github.com/containers/libpod/pkg/domain/entities" - envLib "github.com/containers/libpod/pkg/env" - ns "github.com/containers/libpod/pkg/namespaces" - createconfig "github.com/containers/libpod/pkg/spec" - "github.com/containers/libpod/pkg/specgen/generate" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/image" + ann "github.com/containers/libpod/v2/pkg/annotations" + "github.com/containers/libpod/v2/pkg/domain/entities" + envLib "github.com/containers/libpod/v2/pkg/env" + ns "github.com/containers/libpod/v2/pkg/namespaces" + createconfig "github.com/containers/libpod/v2/pkg/spec" + "github.com/containers/libpod/v2/pkg/specgen/generate" + "github.com/containers/libpod/v2/pkg/util" "github.com/containers/storage" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/docker/distribution/reference" diff --git a/pkg/domain/infra/abi/pods.go b/pkg/domain/infra/abi/pods.go index 4a122f54d3..d1f465362b 100644 --- a/pkg/domain/infra/abi/pods.go +++ b/pkg/domain/infra/abi/pods.go @@ -3,13 +3,13 @@ package abi import ( "context" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - lpfilters "github.com/containers/libpod/libpod/filters" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/signal" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/specgen/generate" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + lpfilters "github.com/containers/libpod/v2/libpod/filters" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/signal" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/specgen/generate" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -67,14 +67,14 @@ func (ic *ContainerEngine) PodKill(ctx context.Context, namesOrIds []string, opt for _, p := range pods { report := entities.PodKillReport{Id: p.ID()} conErrs, err := p.Kill(uint(sig)) - if err != nil { + if err != nil && errors.Cause(err) != define.ErrPodPartialFail { report.Errs = []error{err} reports = append(reports, &report) continue } if len(conErrs) > 0 { - for _, err := range conErrs { - report.Errs = append(report.Errs, err) + for id, err := range conErrs { + report.Errs = append(report.Errs, errors.Wrapf(err, "error killing container %s", id)) } reports = append(reports, &report) continue @@ -93,13 +93,13 @@ func (ic *ContainerEngine) PodPause(ctx context.Context, namesOrIds []string, op for _, p := range pods { report := entities.PodPauseReport{Id: p.ID()} errs, err := p.Pause() - if err != nil { + if err != nil && errors.Cause(err) != define.ErrPodPartialFail { report.Errs = []error{err} continue } if len(errs) > 0 { - for _, v := range errs { - report.Errs = append(report.Errs, v) + for id, v := range errs { + report.Errs = append(report.Errs, errors.Wrapf(v, "error pausing container %s", id)) } reports = append(reports, &report) continue @@ -118,13 +118,13 @@ func (ic *ContainerEngine) PodUnpause(ctx context.Context, namesOrIds []string, for _, p := range pods { report := entities.PodUnpauseReport{Id: p.ID()} errs, err := p.Unpause() - if err != nil { + if err != nil && errors.Cause(err) != define.ErrPodPartialFail { report.Errs = []error{err} continue } if len(errs) > 0 { - for _, v := range errs { - report.Errs = append(report.Errs, v) + for id, v := range errs { + report.Errs = append(report.Errs, errors.Wrapf(v, "error unpausing container %s", id)) } reports = append(reports, &report) continue @@ -143,13 +143,13 @@ func (ic *ContainerEngine) PodStop(ctx context.Context, namesOrIds []string, opt for _, p := range pods { report := entities.PodStopReport{Id: p.ID()} errs, err := p.StopWithTimeout(ctx, false, options.Timeout) - if err != nil { + if err != nil && errors.Cause(err) != define.ErrPodPartialFail { report.Errs = []error{err} continue } if len(errs) > 0 { - for _, v := range errs { - report.Errs = append(report.Errs, v) + for id, v := range errs { + report.Errs = append(report.Errs, errors.Wrapf(v, "error stopping container %s", id)) } reports = append(reports, &report) continue @@ -168,14 +168,14 @@ func (ic *ContainerEngine) PodRestart(ctx context.Context, namesOrIds []string, for _, p := range pods { report := entities.PodRestartReport{Id: p.ID()} errs, err := p.Restart(ctx) - if err != nil { + if err != nil && errors.Cause(err) != define.ErrPodPartialFail { report.Errs = []error{err} reports = append(reports, &report) continue } if len(errs) > 0 { - for _, v := range errs { - report.Errs = append(report.Errs, v) + for id, v := range errs { + report.Errs = append(report.Errs, errors.Wrapf(v, "error restarting container %s", id)) } reports = append(reports, &report) continue @@ -195,14 +195,14 @@ func (ic *ContainerEngine) PodStart(ctx context.Context, namesOrIds []string, op for _, p := range pods { report := entities.PodStartReport{Id: p.ID()} errs, err := p.Start(ctx) - if err != nil { + if err != nil && errors.Cause(err) != define.ErrPodPartialFail { report.Errs = []error{err} reports = append(reports, &report) continue } if len(errs) > 0 { - for _, v := range errs { - report.Errs = append(report.Errs, v) + for id, v := range errs { + report.Errs = append(report.Errs, errors.Wrapf(v, "error starting container %s", id)) } reports = append(reports, &report) continue diff --git a/pkg/domain/infra/abi/pods_stats.go b/pkg/domain/infra/abi/pods_stats.go index c6befcf95f..4cab6bea60 100644 --- a/pkg/domain/infra/abi/pods_stats.go +++ b/pkg/domain/infra/abi/pods_stats.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/utils" "github.com/docker/go-units" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/abi/runtime.go b/pkg/domain/infra/abi/runtime.go index b9020e9a5e..9fc089b417 100644 --- a/pkg/domain/infra/abi/runtime.go +++ b/pkg/domain/infra/abi/runtime.go @@ -3,7 +3,7 @@ package abi import ( "sync" - "github.com/containers/libpod/libpod" + "github.com/containers/libpod/v2/libpod" ) // Image-related runtime linked against libpod library diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go index 0511289ab0..e4ae6156cf 100644 --- a/pkg/domain/infra/abi/system.go +++ b/pkg/domain/infra/abi/system.go @@ -11,12 +11,12 @@ import ( "syscall" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" + "github.com/containers/libpod/v2/utils" "github.com/docker/distribution/reference" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/domain/infra/abi/system_novalink.go b/pkg/domain/infra/abi/system_novalink.go index a71b0170aa..34c1c04639 100644 --- a/pkg/domain/infra/abi/system_novalink.go +++ b/pkg/domain/infra/abi/system_novalink.go @@ -5,7 +5,7 @@ package abi import ( "context" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/abi/system_varlink.go b/pkg/domain/infra/abi/system_varlink.go index 4dc766f521..25722986d4 100644 --- a/pkg/domain/infra/abi/system_varlink.go +++ b/pkg/domain/infra/abi/system_varlink.go @@ -5,10 +5,10 @@ package abi import ( "context" - "github.com/containers/libpod/pkg/domain/entities" - iopodman "github.com/containers/libpod/pkg/varlink" - iopodmanAPI "github.com/containers/libpod/pkg/varlinkapi" - "github.com/containers/libpod/version" + "github.com/containers/libpod/v2/pkg/domain/entities" + iopodman "github.com/containers/libpod/v2/pkg/varlink" + iopodmanAPI "github.com/containers/libpod/v2/pkg/varlinkapi" + "github.com/containers/libpod/v2/version" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/varlink/go/varlink" diff --git a/pkg/domain/infra/abi/terminal/sigproxy_linux.go b/pkg/domain/infra/abi/terminal/sigproxy_linux.go index b422e549ef..973efbc0ed 100644 --- a/pkg/domain/infra/abi/terminal/sigproxy_linux.go +++ b/pkg/domain/infra/abi/terminal/sigproxy_linux.go @@ -4,8 +4,8 @@ import ( "os" "syscall" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/signal" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/signal" "github.com/sirupsen/logrus" ) diff --git a/pkg/domain/infra/abi/terminal/terminal.go b/pkg/domain/infra/abi/terminal/terminal.go index 0fc3af5119..bd78729e7d 100644 --- a/pkg/domain/infra/abi/terminal/terminal.go +++ b/pkg/domain/infra/abi/terminal/terminal.go @@ -5,7 +5,7 @@ import ( "os" "os/signal" - lsignal "github.com/containers/libpod/pkg/signal" + lsignal "github.com/containers/libpod/v2/pkg/signal" "github.com/docker/docker/pkg/term" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/domain/infra/abi/terminal/terminal_linux.go b/pkg/domain/infra/abi/terminal/terminal_linux.go index 8d9cdde03e..5575c6d110 100644 --- a/pkg/domain/infra/abi/terminal/terminal_linux.go +++ b/pkg/domain/infra/abi/terminal/terminal_linux.go @@ -6,8 +6,8 @@ import ( "fmt" "os" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/crypto/ssh/terminal" diff --git a/pkg/domain/infra/abi/trust.go b/pkg/domain/infra/abi/trust.go index 03986ad0e9..44165c6f7a 100644 --- a/pkg/domain/infra/abi/trust.go +++ b/pkg/domain/infra/abi/trust.go @@ -7,8 +7,8 @@ import ( "os" "strings" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/trust" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/trust" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/domain/infra/abi/volumes.go b/pkg/domain/infra/abi/volumes.go index 36847dd794..8db89899e8 100644 --- a/pkg/domain/infra/abi/volumes.go +++ b/pkg/domain/infra/abi/volumes.go @@ -3,10 +3,10 @@ package abi import ( "context" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/filters" - "github.com/containers/libpod/pkg/domain/infra/abi/parse" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/filters" + "github.com/containers/libpod/v2/pkg/domain/infra/abi/parse" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/runtime_abi.go b/pkg/domain/infra/runtime_abi.go index 3b344cb087..bf9de362de 100644 --- a/pkg/domain/infra/runtime_abi.go +++ b/pkg/domain/infra/runtime_abi.go @@ -6,11 +6,11 @@ import ( "context" "fmt" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/abi" - "github.com/containers/libpod/pkg/domain/infra/tunnel" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/abi" + "github.com/containers/libpod/v2/pkg/domain/infra/tunnel" ) // NewContainerEngine factory provides a libpod runtime for container-related operations diff --git a/pkg/domain/infra/runtime_abi_unsupported.go b/pkg/domain/infra/runtime_abi_unsupported.go index 3d7d457fcc..01cc904def 100644 --- a/pkg/domain/infra/runtime_abi_unsupported.go +++ b/pkg/domain/infra/runtime_abi_unsupported.go @@ -5,7 +5,7 @@ package infra import ( "errors" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" ) // NewSystemEngine factory provides a libpod runtime for specialized system operations diff --git a/pkg/domain/infra/runtime_libpod.go b/pkg/domain/infra/runtime_libpod.go index 2f2b0f90f6..7b6591fd8d 100644 --- a/pkg/domain/infra/runtime_libpod.go +++ b/pkg/domain/infra/runtime_libpod.go @@ -8,11 +8,11 @@ import ( "os" "sync" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/namespaces" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/namespaces" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/containers/storage" "github.com/containers/storage/pkg/idtools" "github.com/pkg/errors" diff --git a/pkg/domain/infra/runtime_proxy.go b/pkg/domain/infra/runtime_proxy.go index fed9b1008c..bce8d1e2ae 100644 --- a/pkg/domain/infra/runtime_proxy.go +++ b/pkg/domain/infra/runtime_proxy.go @@ -5,8 +5,8 @@ package infra import ( "context" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/abi" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/abi" flag "github.com/spf13/pflag" ) diff --git a/pkg/domain/infra/runtime_tunnel.go b/pkg/domain/infra/runtime_tunnel.go index 039a8339b8..fe45b04180 100644 --- a/pkg/domain/infra/runtime_tunnel.go +++ b/pkg/domain/infra/runtime_tunnel.go @@ -6,9 +6,9 @@ import ( "context" "fmt" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/infra/tunnel" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/infra/tunnel" ) func NewContainerEngine(facts *entities.PodmanConfig) (entities.ContainerEngine, error) { diff --git a/pkg/domain/infra/tunnel/auto-update.go b/pkg/domain/infra/tunnel/auto-update.go index 5c2dd360da..0aaceaabd2 100644 --- a/pkg/domain/infra/tunnel/auto-update.go +++ b/pkg/domain/infra/tunnel/auto-update.go @@ -3,7 +3,7 @@ package tunnel import ( "context" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 45fbc64f8a..4ee709e376 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -12,12 +12,12 @@ import ( "github.com/containers/common/pkg/config" "github.com/containers/image/v5/docker/reference" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/api/handlers" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/api/handlers" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/domain/infra/tunnel/events.go b/pkg/domain/infra/tunnel/events.go index 6a08a1f850..03a5e9f6aa 100644 --- a/pkg/domain/infra/tunnel/events.go +++ b/pkg/domain/infra/tunnel/events.go @@ -4,8 +4,8 @@ import ( "context" "strings" - "github.com/containers/libpod/pkg/bindings/system" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings/system" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go index 519dc5907a..1f6e35142b 100644 --- a/pkg/domain/infra/tunnel/generate.go +++ b/pkg/domain/infra/tunnel/generate.go @@ -3,8 +3,8 @@ package tunnel import ( "context" - "github.com/containers/libpod/pkg/bindings/generate" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings/generate" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/tunnel/healthcheck.go b/pkg/domain/infra/tunnel/healthcheck.go index 56bdd67590..f3dbf98037 100644 --- a/pkg/domain/infra/tunnel/healthcheck.go +++ b/pkg/domain/infra/tunnel/healthcheck.go @@ -3,9 +3,9 @@ package tunnel import ( "context" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func (ic *ContainerEngine) HealthCheckRun(ctx context.Context, nameOrID string, options entities.HealthCheckOptions) (*define.HealthCheckResults, error) { diff --git a/pkg/domain/infra/tunnel/helpers.go b/pkg/domain/infra/tunnel/helpers.go index 2bbc0e7a5a..9974c4d1d7 100644 --- a/pkg/domain/infra/tunnel/helpers.go +++ b/pkg/domain/infra/tunnel/helpers.go @@ -4,12 +4,12 @@ import ( "context" "strings" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings" - "github.com/containers/libpod/pkg/bindings/containers" - "github.com/containers/libpod/pkg/bindings/pods" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings" + "github.com/containers/libpod/v2/pkg/bindings/containers" + "github.com/containers/libpod/v2/pkg/bindings/pods" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go index 35189cb0af..bfe5fbec3f 100644 --- a/pkg/domain/infra/tunnel/images.go +++ b/pkg/domain/infra/tunnel/images.go @@ -12,11 +12,11 @@ import ( "github.com/containers/common/pkg/config" "github.com/containers/image/v5/docker/reference" - "github.com/containers/libpod/pkg/bindings" - images "github.com/containers/libpod/pkg/bindings/images" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/domain/utils" - utils2 "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/pkg/bindings" + images "github.com/containers/libpod/v2/pkg/bindings/images" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/utils" + utils2 "github.com/containers/libpod/v2/utils" "github.com/containers/storage/pkg/archive" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/domain/infra/tunnel/manifest.go b/pkg/domain/infra/tunnel/manifest.go index beac378fe1..a7447221c3 100644 --- a/pkg/domain/infra/tunnel/manifest.go +++ b/pkg/domain/infra/tunnel/manifest.go @@ -6,9 +6,9 @@ import ( "fmt" "strings" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/bindings/manifests" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/bindings/manifests" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/tunnel/network.go b/pkg/domain/infra/tunnel/network.go index e7cc5fb26c..b25ef0b140 100644 --- a/pkg/domain/infra/tunnel/network.go +++ b/pkg/domain/infra/tunnel/network.go @@ -3,8 +3,8 @@ package tunnel import ( "context" - "github.com/containers/libpod/pkg/bindings/network" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings/network" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func (ic *ContainerEngine) NetworkList(ctx context.Context, options entities.NetworkListOptions) ([]*entities.NetworkListReport, error) { diff --git a/pkg/domain/infra/tunnel/play.go b/pkg/domain/infra/tunnel/play.go index 5f6bc4a2ab..8a532af42b 100644 --- a/pkg/domain/infra/tunnel/play.go +++ b/pkg/domain/infra/tunnel/play.go @@ -3,8 +3,8 @@ package tunnel import ( "context" - "github.com/containers/libpod/pkg/bindings/play" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings/play" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func (ic *ContainerEngine) PlayKube(ctx context.Context, path string, options entities.PlayKubeOptions) (*entities.PlayKubeReport, error) { diff --git a/pkg/domain/infra/tunnel/pods.go b/pkg/domain/infra/tunnel/pods.go index d18e9937cf..edfda48f52 100644 --- a/pkg/domain/infra/tunnel/pods.go +++ b/pkg/domain/infra/tunnel/pods.go @@ -3,11 +3,11 @@ package tunnel import ( "context" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings/pods" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings/pods" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/tunnel/system.go b/pkg/domain/infra/tunnel/system.go index 109e6c1d7e..f128ab5265 100644 --- a/pkg/domain/infra/tunnel/system.go +++ b/pkg/domain/infra/tunnel/system.go @@ -4,9 +4,9 @@ import ( "context" "errors" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/bindings/system" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/bindings/system" + "github.com/containers/libpod/v2/pkg/domain/entities" "github.com/spf13/cobra" ) diff --git a/pkg/domain/infra/tunnel/trust.go b/pkg/domain/infra/tunnel/trust.go index a976bfdc2d..bcd186e314 100644 --- a/pkg/domain/infra/tunnel/trust.go +++ b/pkg/domain/infra/tunnel/trust.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func (ir *ImageEngine) ShowTrust(ctx context.Context, args []string, options entities.ShowTrustOptions) (*entities.ShowTrustReport, error) { diff --git a/pkg/domain/infra/tunnel/volumes.go b/pkg/domain/infra/tunnel/volumes.go index af7273ac41..e8cf2ae5a3 100644 --- a/pkg/domain/infra/tunnel/volumes.go +++ b/pkg/domain/infra/tunnel/volumes.go @@ -3,8 +3,8 @@ package tunnel import ( "context" - "github.com/containers/libpod/pkg/bindings/volumes" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/bindings/volumes" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func (ic *ContainerEngine) VolumeCreate(ctx context.Context, opts entities.VolumeCreateOptions) (*entities.IDOrNameResponse, error) { diff --git a/pkg/hooks/0.1.0/hook.go b/pkg/hooks/0.1.0/hook.go index 185cc90d17..872b56c7dd 100644 --- a/pkg/hooks/0.1.0/hook.go +++ b/pkg/hooks/0.1.0/hook.go @@ -6,7 +6,7 @@ import ( "errors" "strings" - current "github.com/containers/libpod/pkg/hooks/1.0.0" + current "github.com/containers/libpod/v2/pkg/hooks/1.0.0" rspec "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/pkg/hooks/0.1.0/hook_test.go b/pkg/hooks/0.1.0/hook_test.go index 11881ca0bc..53c7f18a75 100644 --- a/pkg/hooks/0.1.0/hook_test.go +++ b/pkg/hooks/0.1.0/hook_test.go @@ -3,7 +3,7 @@ package hook import ( "testing" - current "github.com/containers/libpod/pkg/hooks/1.0.0" + current "github.com/containers/libpod/v2/pkg/hooks/1.0.0" rspec "github.com/opencontainers/runtime-spec/specs-go" "github.com/stretchr/testify/assert" ) diff --git a/pkg/hooks/hooks.go b/pkg/hooks/hooks.go index 0d26bf4af2..fa6a3e1280 100644 --- a/pkg/hooks/hooks.go +++ b/pkg/hooks/hooks.go @@ -9,7 +9,7 @@ import ( "strings" "sync" - current "github.com/containers/libpod/pkg/hooks/1.0.0" + current "github.com/containers/libpod/v2/pkg/hooks/1.0.0" rspec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/hooks/hooks_test.go b/pkg/hooks/hooks_test.go index 02cde6d642..b9be45fdac 100644 --- a/pkg/hooks/hooks_test.go +++ b/pkg/hooks/hooks_test.go @@ -9,7 +9,7 @@ import ( "runtime" "testing" - current "github.com/containers/libpod/pkg/hooks/1.0.0" + current "github.com/containers/libpod/v2/pkg/hooks/1.0.0" rspec "github.com/opencontainers/runtime-spec/specs-go" "github.com/stretchr/testify/assert" ) diff --git a/pkg/hooks/monitor.go b/pkg/hooks/monitor.go index c50b321f26..cfec02c728 100644 --- a/pkg/hooks/monitor.go +++ b/pkg/hooks/monitor.go @@ -3,7 +3,7 @@ package hooks import ( "context" - current "github.com/containers/libpod/pkg/hooks/1.0.0" + current "github.com/containers/libpod/v2/pkg/hooks/1.0.0" "github.com/fsnotify/fsnotify" "github.com/sirupsen/logrus" ) diff --git a/pkg/hooks/read.go b/pkg/hooks/read.go index e20ae9bee4..905496f7e5 100644 --- a/pkg/hooks/read.go +++ b/pkg/hooks/read.go @@ -8,8 +8,8 @@ import ( "path/filepath" "strings" - old "github.com/containers/libpod/pkg/hooks/0.1.0" - current "github.com/containers/libpod/pkg/hooks/1.0.0" + old "github.com/containers/libpod/v2/pkg/hooks/0.1.0" + current "github.com/containers/libpod/v2/pkg/hooks/1.0.0" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/hooks/read_test.go b/pkg/hooks/read_test.go index 606c25df4b..29b2bea9dd 100644 --- a/pkg/hooks/read_test.go +++ b/pkg/hooks/read_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - current "github.com/containers/libpod/pkg/hooks/1.0.0" + current "github.com/containers/libpod/v2/pkg/hooks/1.0.0" rspec "github.com/opencontainers/runtime-spec/specs-go" "github.com/stretchr/testify/assert" ) diff --git a/pkg/inspect/inspect.go b/pkg/inspect/inspect.go index b04ce71a59..1d95a4dd6d 100644 --- a/pkg/inspect/inspect.go +++ b/pkg/inspect/inspect.go @@ -4,7 +4,7 @@ import ( "time" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/libpod/driver" + "github.com/containers/libpod/v2/libpod/driver" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/pkg/netns/netns_linux.go b/pkg/netns/netns_linux.go index e765bd46fd..a90099b0eb 100644 --- a/pkg/netns/netns_linux.go +++ b/pkg/netns/netns_linux.go @@ -29,8 +29,8 @@ import ( "sync" "github.com/containernetworking/plugins/pkg/ns" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" ) diff --git a/pkg/network/devices.go b/pkg/network/devices.go index 8eac321428..e45cc317ea 100644 --- a/pkg/network/devices.go +++ b/pkg/network/devices.go @@ -5,8 +5,8 @@ import ( "os/exec" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/pkg/util" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/pkg/util" + "github.com/containers/libpod/v2/utils" "github.com/sirupsen/logrus" ) diff --git a/pkg/network/network.go b/pkg/network/network.go index 997aaf8a23..cbebb0be8b 100644 --- a/pkg/network/network.go +++ b/pkg/network/network.go @@ -8,7 +8,7 @@ import ( "github.com/containernetworking/cni/pkg/types" "github.com/containernetworking/plugins/plugins/ipam/host-local/backend/allocator" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/parallel/parallel_linux.go b/pkg/parallel/parallel_linux.go index 4725719721..b80989d415 100644 --- a/pkg/parallel/parallel_linux.go +++ b/pkg/parallel/parallel_linux.go @@ -4,7 +4,7 @@ import ( "context" "sync" - "github.com/containers/libpod/libpod" + "github.com/containers/libpod/v2/libpod" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/ps/ps.go b/pkg/ps/ps.go index cbac2cb061..2b81311af9 100644 --- a/pkg/ps/ps.go +++ b/pkg/ps/ps.go @@ -9,11 +9,11 @@ import ( "strings" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - lpfilters "github.com/containers/libpod/libpod/filters" - "github.com/containers/libpod/pkg/domain/entities" - psdefine "github.com/containers/libpod/pkg/ps/define" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + lpfilters "github.com/containers/libpod/v2/libpod/filters" + "github.com/containers/libpod/v2/pkg/domain/entities" + psdefine "github.com/containers/libpod/v2/pkg/ps/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/registrar/registrar_test.go b/pkg/registrar/registrar_test.go index 50af959153..3a9b3af878 100644 --- a/pkg/registrar/registrar_test.go +++ b/pkg/registrar/registrar_test.go @@ -3,8 +3,8 @@ package registrar_test import ( "testing" - "github.com/containers/libpod/pkg/registrar" - . "github.com/containers/libpod/test/framework" + "github.com/containers/libpod/v2/pkg/registrar" + . "github.com/containers/libpod/v2/test/framework" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/pkg/registries/registries.go b/pkg/registries/registries.go index 4827b7012f..ab7accd5ed 100644 --- a/pkg/registries/registries.go +++ b/pkg/registries/registries.go @@ -6,7 +6,7 @@ import ( "github.com/containers/image/v5/pkg/sysregistriesv2" "github.com/containers/image/v5/types" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/pkg/errors" ) diff --git a/pkg/resolvconf/resolvconf.go b/pkg/resolvconf/resolvconf.go index 20618e2dcc..45625b7a9b 100644 --- a/pkg/resolvconf/resolvconf.go +++ b/pkg/resolvconf/resolvconf.go @@ -9,7 +9,7 @@ import ( "strings" "sync" - "github.com/containers/libpod/pkg/resolvconf/dns" + "github.com/containers/libpod/v2/pkg/resolvconf/dns" "github.com/containers/storage/pkg/ioutils" "github.com/sirupsen/logrus" ) diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go index 01f5b1206a..2e580347df 100644 --- a/pkg/rootless/rootless_linux.go +++ b/pkg/rootless/rootless_linux.go @@ -16,7 +16,7 @@ import ( "sync" "unsafe" - "github.com/containers/libpod/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/errorhandling" "github.com/containers/storage/pkg/idtools" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/spec/config_linux.go b/pkg/spec/config_linux.go index 544c0020df..93aa8a1b6b 100644 --- a/pkg/spec/config_linux.go +++ b/pkg/spec/config_linux.go @@ -10,7 +10,7 @@ import ( "strconv" "strings" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/devices" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/spec/config_linux_cgo.go b/pkg/spec/config_linux_cgo.go index 05f42c4da2..20f0e980ce 100644 --- a/pkg/spec/config_linux_cgo.go +++ b/pkg/spec/config_linux_cgo.go @@ -5,7 +5,7 @@ package createconfig import ( "io/ioutil" - "github.com/containers/libpod/pkg/seccomp" + "github.com/containers/libpod/v2/pkg/seccomp" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" goSeccomp "github.com/seccomp/containers-golang" diff --git a/pkg/spec/containerconfig.go b/pkg/spec/containerconfig.go index ae64201177..c0010471f6 100644 --- a/pkg/spec/containerconfig.go +++ b/pkg/spec/containerconfig.go @@ -1,8 +1,8 @@ package createconfig import ( - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go index a04afa00fc..879c66895d 100644 --- a/pkg/spec/createconfig.go +++ b/pkg/spec/createconfig.go @@ -8,10 +8,10 @@ import ( "syscall" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/namespaces" - "github.com/containers/libpod/pkg/seccomp" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/namespaces" + "github.com/containers/libpod/v2/pkg/seccomp" "github.com/containers/storage" "github.com/docker/go-connections/nat" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/spec/namespaces.go b/pkg/spec/namespaces.go index 40364b0545..dd89e17a65 100644 --- a/pkg/spec/namespaces.go +++ b/pkg/spec/namespaces.go @@ -6,9 +6,9 @@ import ( "strconv" "strings" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/cgroups" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/cgroups" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/docker/go-connections/nat" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/spec/security.go b/pkg/spec/security.go index 6d74e97e69..63bd4d372c 100644 --- a/pkg/spec/security.go +++ b/pkg/spec/security.go @@ -5,9 +5,9 @@ import ( "strings" "github.com/containers/common/pkg/capabilities" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/util" "github.com/opencontainers/runtime-tools/generate" "github.com/opencontainers/selinux/go-selinux/label" "github.com/pkg/errors" diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index 25cad95788..6f52b88b1e 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -6,12 +6,12 @@ import ( "github.com/containers/common/pkg/capabilities" cconfig "github.com/containers/common/pkg/config" "github.com/containers/common/pkg/sysinfo" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/env" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/env" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" "github.com/docker/go-units" "github.com/opencontainers/runc/libcontainer/user" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/spec/spec_test.go b/pkg/spec/spec_test.go index 71434fe73a..50d7e5914d 100644 --- a/pkg/spec/spec_test.go +++ b/pkg/spec/spec_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/containers/common/pkg/sysinfo" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/containers/storage" "github.com/containers/storage/pkg/idtools" "github.com/docker/go-units" diff --git a/pkg/spec/storage.go b/pkg/spec/storage.go index 68a84d6387..8a7ecc4da0 100644 --- a/pkg/spec/storage.go +++ b/pkg/spec/storage.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/containers/buildah/pkg/parse" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/util" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/specgen/config_unsupported.go b/pkg/specgen/config_unsupported.go index c2d3257c93..6b6ba6181e 100644 --- a/pkg/specgen/config_unsupported.go +++ b/pkg/specgen/config_unsupported.go @@ -3,7 +3,7 @@ package specgen import ( - "github.com/containers/libpod/libpod/image" + "github.com/containers/libpod/v2/libpod/image" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) diff --git a/pkg/specgen/container_validate.go b/pkg/specgen/container_validate.go index 33bacecaf2..bf03ff0e7e 100644 --- a/pkg/specgen/container_validate.go +++ b/pkg/specgen/container_validate.go @@ -3,8 +3,9 @@ package specgen import ( "strings" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) @@ -13,6 +14,8 @@ var ( ErrInvalidSpecConfig = errors.New("invalid configuration") // SystemDValues describes the only values that SystemD can be SystemDValues = []string{"true", "false", "always"} + // SdNotifyModeValues describes the only values that SdNotifyMode can be + SdNotifyModeValues = []string{define.SdNotifyModeContainer, define.SdNotifyModeConmon, define.SdNotifyModeIgnore} // ImageVolumeModeValues describes the only values that ImageVolumeMode can be ImageVolumeModeValues = []string{"ignore", "tmpfs", "anonymous"} ) @@ -40,6 +43,10 @@ func (s *SpecGenerator) Validate() error { if len(s.ContainerBasicConfig.Systemd) > 0 && !util.StringInSlice(strings.ToLower(s.ContainerBasicConfig.Systemd), SystemDValues) { return errors.Wrapf(ErrInvalidSpecConfig, "--systemd values must be one of %q", strings.Join(SystemDValues, ", ")) } + // sdnotify values must be container, conmon, or ignore + if len(s.ContainerBasicConfig.SdNotifyMode) > 0 && !util.StringInSlice(strings.ToLower(s.ContainerBasicConfig.SdNotifyMode), SdNotifyModeValues) { + return errors.Wrapf(ErrInvalidSpecConfig, "--sdnotify values must be one of %q", strings.Join(SdNotifyModeValues, ", ")) + } // // ContainerStorageConfig diff --git a/pkg/specgen/generate/config_linux.go b/pkg/specgen/generate/config_linux.go index f4cf0c7048..5d928cc5d7 100644 --- a/pkg/specgen/generate/config_linux.go +++ b/pkg/specgen/generate/config_linux.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/devices" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/specgen/generate/config_linux_cgo.go b/pkg/specgen/generate/config_linux_cgo.go index 5d629a6e60..7ea4278a27 100644 --- a/pkg/specgen/generate/config_linux_cgo.go +++ b/pkg/specgen/generate/config_linux_cgo.go @@ -6,9 +6,9 @@ import ( "context" "io/ioutil" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/seccomp" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/seccomp" + "github.com/containers/libpod/v2/pkg/specgen" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" goSeccomp "github.com/seccomp/containers-golang" diff --git a/pkg/specgen/generate/config_linux_nocgo.go b/pkg/specgen/generate/config_linux_nocgo.go index 81d1c7011a..8afd2f9dce 100644 --- a/pkg/specgen/generate/config_linux_nocgo.go +++ b/pkg/specgen/generate/config_linux_nocgo.go @@ -5,8 +5,8 @@ package generate import ( "errors" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/specgen" spec "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go index df27f225b6..dee79cf67d 100644 --- a/pkg/specgen/generate/container.go +++ b/pkg/specgen/generate/container.go @@ -4,12 +4,12 @@ import ( "context" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/image" - ann "github.com/containers/libpod/pkg/annotations" - envLib "github.com/containers/libpod/pkg/env" - "github.com/containers/libpod/pkg/signal" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/image" + ann "github.com/containers/libpod/v2/pkg/annotations" + envLib "github.com/containers/libpod/v2/pkg/env" + "github.com/containers/libpod/v2/pkg/signal" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/pkg/errors" "golang.org/x/sys/unix" ) diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go index 7b4fbebf44..8df5b996e0 100644 --- a/pkg/specgen/generate/container_create.go +++ b/pkg/specgen/generate/container_create.go @@ -6,10 +6,10 @@ import ( "path/filepath" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/util" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -135,6 +135,10 @@ func createContainerOptions(ctx context.Context, rt *libpod.Runtime, s *specgen. options = append(options, libpod.WithStdin()) } + if s.Timezone != "" { + options = append(options, libpod.WithTimezone(s.Timezone)) + } + useSystemd := false switch s.Systemd { case "always": @@ -171,6 +175,10 @@ func createContainerOptions(ctx context.Context, rt *libpod.Runtime, s *specgen. options = append(options, libpod.WithSystemd()) } + if len(s.SdNotifyMode) > 0 { + options = append(options, libpod.WithSdNotifyMode(s.SdNotifyMode)) + } + if len(s.Name) > 0 { logrus.Debugf("setting container name %s", s.Name) options = append(options, libpod.WithName(s.Name)) diff --git a/pkg/specgen/generate/namespaces.go b/pkg/specgen/generate/namespaces.go index 3815bbcc93..566830cd84 100644 --- a/pkg/specgen/generate/namespaces.go +++ b/pkg/specgen/generate/namespaces.go @@ -6,12 +6,12 @@ import ( "strings" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/util" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" "github.com/pkg/errors" diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go index badb349999..0a485e7cd2 100644 --- a/pkg/specgen/generate/oci.go +++ b/pkg/specgen/generate/oci.go @@ -5,11 +5,11 @@ import ( "strings" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/opencontainers/runc/libcontainer/user" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" diff --git a/pkg/specgen/generate/pod_create.go b/pkg/specgen/generate/pod_create.go index 5ccb1ba807..690651a23d 100644 --- a/pkg/specgen/generate/pod_create.go +++ b/pkg/specgen/generate/pod_create.go @@ -3,8 +3,8 @@ package generate import ( "context" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/specgen/generate/ports.go b/pkg/specgen/generate/ports.go index 5c06d3bc30..9412ecfbfe 100644 --- a/pkg/specgen/generate/ports.go +++ b/pkg/specgen/generate/ports.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/specgen/generate/security.go b/pkg/specgen/generate/security.go index f3821d1f79..70493cd5f1 100644 --- a/pkg/specgen/generate/security.go +++ b/pkg/specgen/generate/security.go @@ -5,10 +5,10 @@ import ( "github.com/containers/common/pkg/capabilities" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/util" "github.com/opencontainers/runtime-tools/generate" "github.com/opencontainers/selinux/go-selinux/label" "github.com/pkg/errors" diff --git a/pkg/specgen/generate/storage.go b/pkg/specgen/generate/storage.go index 0d78421a68..f3b1a4e3d5 100644 --- a/pkg/specgen/generate/storage.go +++ b/pkg/specgen/generate/storage.go @@ -9,10 +9,10 @@ import ( "strings" "github.com/containers/common/pkg/config" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/specgen" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/specgen" + "github.com/containers/libpod/v2/pkg/util" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/specgen/generate/validate.go b/pkg/specgen/generate/validate.go index bb3ca99072..cd2f9ec22b 100644 --- a/pkg/specgen/generate/validate.go +++ b/pkg/specgen/generate/validate.go @@ -2,8 +2,8 @@ package generate import ( "github.com/containers/common/pkg/sysinfo" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/specgen" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/specgen" "github.com/pkg/errors" ) diff --git a/pkg/specgen/namespaces.go b/pkg/specgen/namespaces.go index da1f8e8fc0..5f56b242b9 100644 --- a/pkg/specgen/namespaces.go +++ b/pkg/specgen/namespaces.go @@ -3,8 +3,8 @@ package specgen import ( "strings" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/pkg/errors" ) diff --git a/pkg/specgen/pod_validate.go b/pkg/specgen/pod_validate.go index 2d57cdb914..070bb1e411 100644 --- a/pkg/specgen/pod_validate.go +++ b/pkg/specgen/pod_validate.go @@ -1,7 +1,7 @@ package specgen import ( - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/pkg/util" "github.com/pkg/errors" ) diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go index 361f09379f..b4e10fa87f 100644 --- a/pkg/specgen/specgen.go +++ b/pkg/specgen/specgen.go @@ -107,6 +107,11 @@ type ContainerBasicConfig struct { // If not specified, "false" will be assumed. // Optional. Systemd string `json:"systemd,omitempty"` + // Determine how to handle the NOTIFY_SOCKET - do we participate or pass it through + // "container" - let the OCI runtime deal with it, advertise conmon's MAINPID + // "conmon-only" - advertise conmon's MAINPID, send READY when started, don't pass to OCI + // "ignore" - unset NOTIFY_SOCKET + SdNotifyMode string `json:"sdnotifyMode,omitempty"` // Namespace is the libpod namespace the container will be placed in. // Optional. Namespace string `json:"namespace,omitempty"` @@ -135,6 +140,9 @@ type ContainerBasicConfig struct { // passed will be 3 + PreserveFDs. // set tags as `json:"-"` for not supported remote PreserveFDs uint `json:"-"` + // Timezone is the timezone inside the container. + // Local means it has the same timezone as the host machine + Timezone string `json:"timezone,omitempty"` } // ContainerStorageConfig contains information on the storage configuration of a diff --git a/pkg/systemd/dbus.go b/pkg/systemd/dbus.go index df24667a11..76ea2b9b44 100644 --- a/pkg/systemd/dbus.go +++ b/pkg/systemd/dbus.go @@ -6,7 +6,7 @@ import ( "path/filepath" "strconv" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/coreos/go-systemd/v22/dbus" godbus "github.com/godbus/dbus/v5" ) diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go index 333f8ef88d..b77fb5e116 100644 --- a/pkg/systemd/generate/containers.go +++ b/pkg/systemd/generate/containers.go @@ -11,9 +11,9 @@ import ( "text/template" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/version" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/version" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/systemd/generate/containers_test.go b/pkg/systemd/generate/containers_test.go index e108251ea9..13138c0cda 100644 --- a/pkg/systemd/generate/containers_test.go +++ b/pkg/systemd/generate/containers_test.go @@ -3,7 +3,7 @@ package generate import ( "testing" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func TestValidateRestartPolicyContainer(t *testing.T) { diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go index cb4078face..1c7ef77924 100644 --- a/pkg/systemd/generate/pods.go +++ b/pkg/systemd/generate/pods.go @@ -11,9 +11,9 @@ import ( "text/template" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/domain/entities" - "github.com/containers/libpod/version" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/domain/entities" + "github.com/containers/libpod/v2/version" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/systemd/generate/pods_test.go b/pkg/systemd/generate/pods_test.go index 874d7204e1..4089b44e55 100644 --- a/pkg/systemd/generate/pods_test.go +++ b/pkg/systemd/generate/pods_test.go @@ -3,7 +3,7 @@ package generate import ( "testing" - "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/v2/pkg/domain/entities" ) func TestValidateRestartPolicyPod(t *testing.T) { diff --git a/pkg/util/utils.go b/pkg/util/utils.go index 1d8941b4d1..47d3e231db 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -15,10 +15,10 @@ import ( "github.com/BurntSushi/toml" "github.com/containers/common/pkg/config" "github.com/containers/image/v5/types" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/namespaces" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/signal" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/namespaces" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/signal" "github.com/containers/storage" "github.com/containers/storage/pkg/idtools" v1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/pkg/util/utils_linux.go b/pkg/util/utils_linux.go index 5e4dc4a510..d4c2644b3b 100644 --- a/pkg/util/utils_linux.go +++ b/pkg/util/utils_linux.go @@ -6,7 +6,7 @@ import ( "path/filepath" "syscall" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/containers/psgo" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/util/utils_supported.go b/pkg/util/utils_supported.go index c6aed99432..82bfdb3ec1 100644 --- a/pkg/util/utils_supported.go +++ b/pkg/util/utils_supported.go @@ -11,7 +11,7 @@ import ( "path/filepath" "syscall" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/pkg/varlinkapi/attach.go b/pkg/varlinkapi/attach.go index db977ee5c5..8acf2a1b65 100644 --- a/pkg/varlinkapi/attach.go +++ b/pkg/varlinkapi/attach.go @@ -4,13 +4,14 @@ package varlinkapi import ( "bufio" + "context" "io" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/events" - iopodman "github.com/containers/libpod/pkg/varlink" - "github.com/containers/libpod/pkg/varlinkapi/virtwriter" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/events" + iopodman "github.com/containers/libpod/v2/pkg/varlink" + "github.com/containers/libpod/v2/pkg/varlinkapi/virtwriter" "github.com/pkg/errors" "github.com/sirupsen/logrus" "k8s.io/client-go/tools/remotecommand" @@ -89,7 +90,7 @@ func (i *VarlinkAPI) Attach(call iopodman.VarlinkCall, name string, detachKeys s if ecode, err := ctr.Wait(); err != nil { if errors.Cause(err) == define.ErrNoSuchCtr { // Check events - event, err := i.Runtime.GetLastContainerEvent(ctr.ID(), events.Exited) + event, err := i.Runtime.GetLastContainerEvent(context.Background(), ctr.ID(), events.Exited) if err != nil { logrus.Errorf("Cannot get exit code: %v", err) exitCode = define.ExecErrorCodeNotFound diff --git a/pkg/varlinkapi/config.go b/pkg/varlinkapi/config.go index cc787eca28..cd6342a17e 100644 --- a/pkg/varlinkapi/config.go +++ b/pkg/varlinkapi/config.go @@ -3,8 +3,8 @@ package varlinkapi import ( - "github.com/containers/libpod/libpod" - iopodman "github.com/containers/libpod/pkg/varlink" + "github.com/containers/libpod/v2/libpod" + iopodman "github.com/containers/libpod/v2/pkg/varlink" "github.com/spf13/cobra" ) diff --git a/pkg/varlinkapi/container.go b/pkg/varlinkapi/container.go index eae54dfeb2..d578d9b875 100644 --- a/pkg/varlinkapi/container.go +++ b/pkg/varlinkapi/container.go @@ -15,11 +15,11 @@ import ( "time" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/timetype" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/timetype" + "github.com/containers/libpod/v2/pkg/util" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/docker/go-units" "github.com/google/shlex" diff --git a/pkg/varlinkapi/containers.go b/pkg/varlinkapi/containers.go index a81d191319..8650ba0002 100644 --- a/pkg/varlinkapi/containers.go +++ b/pkg/varlinkapi/containers.go @@ -14,13 +14,13 @@ import ( "syscall" "time" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/logs" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/rootless" - iopodman "github.com/containers/libpod/pkg/varlink" - "github.com/containers/libpod/pkg/varlinkapi/virtwriter" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/logs" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/rootless" + iopodman "github.com/containers/libpod/v2/pkg/varlink" + "github.com/containers/libpod/v2/pkg/varlinkapi/virtwriter" "github.com/containers/storage/pkg/archive" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/pkg/varlinkapi/containers_create.go b/pkg/varlinkapi/containers_create.go index f0a87491a5..2fdcfedca8 100644 --- a/pkg/varlinkapi/containers_create.go +++ b/pkg/varlinkapi/containers_create.go @@ -3,7 +3,7 @@ package varlinkapi import ( - iopodman "github.com/containers/libpod/pkg/varlink" + iopodman "github.com/containers/libpod/v2/pkg/varlink" ) // CreateContainer ... diff --git a/pkg/varlinkapi/create.go b/pkg/varlinkapi/create.go index d921130e72..5c5f075f7e 100644 --- a/pkg/varlinkapi/create.go +++ b/pkg/varlinkapi/create.go @@ -15,22 +15,22 @@ import ( "github.com/containers/common/pkg/sysinfo" "github.com/containers/image/v5/manifest" - "github.com/containers/libpod/cmd/podman/parse" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - ann "github.com/containers/libpod/pkg/annotations" - "github.com/containers/libpod/pkg/autoupdate" - "github.com/containers/libpod/pkg/cgroups" - envLib "github.com/containers/libpod/pkg/env" - "github.com/containers/libpod/pkg/errorhandling" - "github.com/containers/libpod/pkg/inspect" - ns "github.com/containers/libpod/pkg/namespaces" - "github.com/containers/libpod/pkg/rootless" - "github.com/containers/libpod/pkg/seccomp" - cc "github.com/containers/libpod/pkg/spec" - systemdGen "github.com/containers/libpod/pkg/systemd/generate" - "github.com/containers/libpod/pkg/util" + "github.com/containers/libpod/v2/cmd/podman/parse" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + ann "github.com/containers/libpod/v2/pkg/annotations" + "github.com/containers/libpod/v2/pkg/autoupdate" + "github.com/containers/libpod/v2/pkg/cgroups" + envLib "github.com/containers/libpod/v2/pkg/env" + "github.com/containers/libpod/v2/pkg/errorhandling" + "github.com/containers/libpod/v2/pkg/inspect" + ns "github.com/containers/libpod/v2/pkg/namespaces" + "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/v2/pkg/seccomp" + cc "github.com/containers/libpod/v2/pkg/spec" + systemdGen "github.com/containers/libpod/v2/pkg/systemd/generate" + "github.com/containers/libpod/v2/pkg/util" "github.com/docker/go-connections/nat" "github.com/docker/go-units" "github.com/opentracing/opentracing-go" diff --git a/pkg/varlinkapi/events.go b/pkg/varlinkapi/events.go index 33938f08bc..910b64a571 100644 --- a/pkg/varlinkapi/events.go +++ b/pkg/varlinkapi/events.go @@ -3,10 +3,11 @@ package varlinkapi import ( + "context" "time" - "github.com/containers/libpod/libpod/events" - iopodman "github.com/containers/libpod/pkg/varlink" + "github.com/containers/libpod/v2/libpod/events" + iopodman "github.com/containers/libpod/v2/pkg/varlink" ) // GetEvents is a remote endpoint to get events from the event log @@ -27,7 +28,7 @@ func (i *VarlinkAPI) GetEvents(call iopodman.VarlinkCall, filter []string, since eventChannel := make(chan *events.Event) go func() { readOpts := events.ReadOptions{FromStart: fromStart, Stream: stream, Filters: filter, EventChannel: eventChannel} - eventsError = i.Runtime.Events(readOpts) + eventsError = i.Runtime.Events(context.Background(), readOpts) }() if eventsError != nil { return call.ReplyErrorOccurred(eventsError.Error()) diff --git a/pkg/varlinkapi/funcs.go b/pkg/varlinkapi/funcs.go index ed90ba050f..e32e311b0d 100644 --- a/pkg/varlinkapi/funcs.go +++ b/pkg/varlinkapi/funcs.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod/image" + "github.com/containers/libpod/v2/libpod/image" "github.com/google/shlex" "github.com/pkg/errors" ) diff --git a/pkg/varlinkapi/generate.go b/pkg/varlinkapi/generate.go index 4df185db67..7c481aad7a 100644 --- a/pkg/varlinkapi/generate.go +++ b/pkg/varlinkapi/generate.go @@ -5,7 +5,7 @@ package varlinkapi import ( "encoding/json" - iopodman "github.com/containers/libpod/pkg/varlink" + iopodman "github.com/containers/libpod/v2/pkg/varlink" ) // GenerateKube ... diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go index 8d43b84146..8d67a47bca 100644 --- a/pkg/varlinkapi/images.go +++ b/pkg/varlinkapi/images.go @@ -20,13 +20,13 @@ import ( "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/libpod/image" - "github.com/containers/libpod/pkg/channelwriter" - "github.com/containers/libpod/pkg/util" - iopodman "github.com/containers/libpod/pkg/varlink" - "github.com/containers/libpod/utils" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/libpod/image" + "github.com/containers/libpod/v2/pkg/channelwriter" + "github.com/containers/libpod/v2/pkg/util" + iopodman "github.com/containers/libpod/v2/pkg/varlink" + "github.com/containers/libpod/v2/utils" "github.com/containers/storage/pkg/archive" v1 "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" diff --git a/pkg/varlinkapi/intermediate_varlink.go b/pkg/varlinkapi/intermediate_varlink.go index bd0c45b334..f1a183017c 100644 --- a/pkg/varlinkapi/intermediate_varlink.go +++ b/pkg/varlinkapi/intermediate_varlink.go @@ -4,8 +4,8 @@ package varlinkapi import ( "github.com/containers/common/pkg/config" - "github.com/containers/libpod/pkg/rootless" - iopodman "github.com/containers/libpod/pkg/varlink" + "github.com/containers/libpod/v2/pkg/rootless" + iopodman "github.com/containers/libpod/v2/pkg/varlink" "github.com/pkg/errors" ) diff --git a/pkg/varlinkapi/mount.go b/pkg/varlinkapi/mount.go index 6e1eed644e..a04a0b630b 100644 --- a/pkg/varlinkapi/mount.go +++ b/pkg/varlinkapi/mount.go @@ -2,7 +2,7 @@ package varlinkapi -import iopodman "github.com/containers/libpod/pkg/varlink" +import iopodman "github.com/containers/libpod/v2/pkg/varlink" // ListContainerMounts ... func (i *VarlinkAPI) ListContainerMounts(call iopodman.VarlinkCall) error { diff --git a/pkg/varlinkapi/pods.go b/pkg/varlinkapi/pods.go index aeb3cdcb81..b190233d52 100644 --- a/pkg/varlinkapi/pods.go +++ b/pkg/varlinkapi/pods.go @@ -8,9 +8,9 @@ import ( "strconv" "syscall" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - iopodman "github.com/containers/libpod/pkg/varlink" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + iopodman "github.com/containers/libpod/v2/pkg/varlink" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/docker/go-connections/nat" "github.com/pkg/errors" diff --git a/pkg/varlinkapi/remote_client.go b/pkg/varlinkapi/remote_client.go index 88e410de62..0ad2d89ccc 100644 --- a/pkg/varlinkapi/remote_client.go +++ b/pkg/varlinkapi/remote_client.go @@ -3,8 +3,8 @@ package varlinkapi import ( - "github.com/containers/libpod/libpod/define" - iopodman "github.com/containers/libpod/pkg/varlink" + "github.com/containers/libpod/v2/libpod/define" + iopodman "github.com/containers/libpod/v2/pkg/varlink" ) // ContainerStatsToLibpodContainerStats converts the varlink containerstats to a libpod diff --git a/pkg/varlinkapi/shortcuts.go b/pkg/varlinkapi/shortcuts.go index 7711294042..8e21cc5d0d 100644 --- a/pkg/varlinkapi/shortcuts.go +++ b/pkg/varlinkapi/shortcuts.go @@ -1,7 +1,7 @@ package varlinkapi import ( - "github.com/containers/libpod/libpod" + "github.com/containers/libpod/v2/libpod" "github.com/sirupsen/logrus" ) diff --git a/pkg/varlinkapi/system.go b/pkg/varlinkapi/system.go index 308f022742..b5fe681fdb 100644 --- a/pkg/varlinkapi/system.go +++ b/pkg/varlinkapi/system.go @@ -10,8 +10,8 @@ import ( "time" "github.com/containers/image/v5/pkg/sysregistriesv2" - "github.com/containers/libpod/libpod/define" - iopodman "github.com/containers/libpod/pkg/varlink" + "github.com/containers/libpod/v2/libpod/define" + iopodman "github.com/containers/libpod/v2/pkg/varlink" "github.com/sirupsen/logrus" ) diff --git a/pkg/varlinkapi/transfers.go b/pkg/varlinkapi/transfers.go index aed6e054db..32c227d56d 100644 --- a/pkg/varlinkapi/transfers.go +++ b/pkg/varlinkapi/transfers.go @@ -8,7 +8,7 @@ import ( "io/ioutil" "os" - iopodman "github.com/containers/libpod/pkg/varlink" + iopodman "github.com/containers/libpod/v2/pkg/varlink" "github.com/sirupsen/logrus" ) diff --git a/pkg/varlinkapi/util.go b/pkg/varlinkapi/util.go index f73e772497..64b61c6fd4 100644 --- a/pkg/varlinkapi/util.go +++ b/pkg/varlinkapi/util.go @@ -9,10 +9,10 @@ import ( "time" "github.com/containers/buildah" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/channelwriter" - iopodman "github.com/containers/libpod/pkg/varlink" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/channelwriter" + iopodman "github.com/containers/libpod/v2/pkg/varlink" "github.com/containers/storage/pkg/archive" ) diff --git a/pkg/varlinkapi/volumes.go b/pkg/varlinkapi/volumes.go index 3b62762873..a1e711d348 100644 --- a/pkg/varlinkapi/volumes.go +++ b/pkg/varlinkapi/volumes.go @@ -6,9 +6,9 @@ import ( "context" "encoding/json" - "github.com/containers/libpod/libpod" - "github.com/containers/libpod/pkg/domain/infra/abi/parse" - iopodman "github.com/containers/libpod/pkg/varlink" + "github.com/containers/libpod/v2/libpod" + "github.com/containers/libpod/v2/pkg/domain/infra/abi/parse" + iopodman "github.com/containers/libpod/v2/pkg/varlink" ) // VolumeCreate creates a libpod volume based on input from a varlink connection diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at index 9efebfeb90..25843e61ce 100644 --- a/test/apiv2/20-containers.at +++ b/test/apiv2/20-containers.at @@ -98,9 +98,41 @@ t GET libpod/images/newrepo:v2/json 200 \ .Comment=bar \ .Config.Cmd[-1]="/bin/foo" +# Create a container for testing the container initializing later +podman create -t -i --name myctr $IMAGE ls + +# Check configuration before initializing +t GET libpod/containers/myctr/json 200 \ + .Id~[0-9a-f]\\{64\\} \ + .State.Status="configured" \ + .State.Pid=0 \ + .ResolvConfPath="" \ + .HostnamePath="" \ + .HostsPath="" \ + .NetworkSettings.SandboxKey="" + +cpid_file=$(jq -r '.ConmonPidFile' <<<"$output") +userdata_path=$(dirname $cpid_file) + +# Initializing the container +t POST libpod/containers/myctr/init '' 204 + +# Check configuration after initializing +t GET libpod/containers/myctr/json 200 \ + .Id~[0-9a-f]\\{64\\} \ + .State.Status="created" \ + .State.Pid~[0-9]\\{1\,8\\} \ + .ResolvConfPath=$userdata_path/resolv.conf \ + .HostnamePath=$userdata_path/hostname \ + .HostsPath=$userdata_path/hosts \ + .NetworkSettings.SandboxKey~.*/netns/cni- \ + .OCIConfigPath~.*config\.json \ + .GraphDriver.Data.MergedDir~.*merged + t DELETE images/localhost/newrepo:latest?force=true 200 t DELETE images/localhost/newrepo:v1?force=true 200 t DELETE images/localhost/newrepo:v2?force=true 200 t DELETE libpod/containers/$cid 204 +t DELETE libpod/containers/myctr 204 # vim: filetype=sh diff --git a/test/e2e/attach_test.go b/test/e2e/attach_test.go index e9050b53bb..9fd1466aa1 100644 --- a/test/e2e/attach_test.go +++ b/test/e2e/attach_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -7,7 +7,7 @@ import ( "syscall" "time" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go index 0cf5283ad6..9c8078f166 100644 --- a/test/e2e/build_test.go +++ b/test/e2e/build_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -9,7 +9,7 @@ import ( "runtime" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/checkpoint_test.go b/test/e2e/checkpoint_test.go index 663205209d..e9d60f507f 100644 --- a/test/e2e/checkpoint_test.go +++ b/test/e2e/checkpoint_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -7,8 +7,8 @@ import ( "os" "os/exec" - "github.com/containers/libpod/pkg/criu" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/criu" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go index 72387ed8c6..b7bc2c7e88 100644 --- a/test/e2e/commit_test.go +++ b/test/e2e/commit_test.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index e12edad492..51f290159e 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -13,10 +13,10 @@ import ( "testing" "time" - "github.com/containers/libpod/libpod/define" - "github.com/containers/libpod/pkg/inspect" - "github.com/containers/libpod/pkg/rootless" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/libpod/define" + "github.com/containers/libpod/v2/pkg/inspect" + "github.com/containers/libpod/v2/pkg/rootless" + . "github.com/containers/libpod/v2/test/utils" "github.com/containers/storage" "github.com/containers/storage/pkg/reexec" "github.com/containers/storage/pkg/stringid" @@ -143,6 +143,12 @@ var _ = SynchronizedBeforeSuite(func() []byte { fmt.Println(err) os.Exit(1) } + + // If running remote, we need to stop the associated podman system service + if podman.RemoteTest { + podman.StopRemoteService() + } + return []byte(path) }, func(data []byte) { LockTmpDir = string(data) @@ -173,6 +179,10 @@ var _ = SynchronizedAfterSuite(func() {}, fmt.Printf("%q\n", err) } + // If running remote, we need to stop the associated podman system service + if podmanTest.RemoteTest { + podmanTest.StopRemoteService() + } // for localized tests, this removes the image cache dir and for remote tests // this is a no-op removeCache() @@ -458,6 +468,10 @@ func (p *PodmanTestIntegration) CleanupVolume() { // Remove all containers session := p.Podman([]string{"volume", "rm", "-fa"}) session.Wait(90) + + // Stop remove service on volume cleanup + p.StopRemoteService() + // Nuke tempdir if err := os.RemoveAll(p.TempDir); err != nil { fmt.Printf("%q\n", err) diff --git a/test/e2e/config/containers.conf b/test/e2e/config/containers.conf index a3bdde7860..0a07676c4f 100644 --- a/test/e2e/config/containers.conf +++ b/test/e2e/config/containers.conf @@ -48,3 +48,5 @@ default_sysctls = [ dns_searches=[ "foobar.com", ] dns_servers=[ "1.2.3.4", ] dns_options=[ "debug", ] + +tz = "Pacific/Honolulu" diff --git a/test/e2e/container_inspect_test.go b/test/e2e/container_inspect_test.go index 9cbcbbc7c7..a10a634e77 100644 --- a/test/e2e/container_inspect_test.go +++ b/test/e2e/container_inspect_test.go @@ -3,8 +3,8 @@ package integration import ( "os" - "github.com/containers/libpod/pkg/annotations" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/annotations" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go index a2ef7eb4ad..23d8dd1979 100644 --- a/test/e2e/containers_conf_test.go +++ b/test/e2e/containers_conf_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -10,7 +10,7 @@ import ( "path/filepath" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -211,4 +211,13 @@ var _ = Describe("Podman run", func() { Expect(session.ExitCode()).To(Equal(0)) Expect(session.LineInOuputStartsWith("search")).To(BeFalse()) }) + + It("podman run containers.conf timezone", func() { + //containers.conf timezone set to Pacific/Honolulu + session := podmanTest.Podman([]string{"run", ALPINE, "date", "+'%H %Z'"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("HST")) + + }) }) diff --git a/test/e2e/cp_test.go b/test/e2e/cp_test.go index 3f9b12e0a9..6fed6a0ace 100644 --- a/test/e2e/cp_test.go +++ b/test/e2e/cp_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -142,7 +142,6 @@ var _ = Describe("Podman cp", func() { It("podman cp stdin/stdout", func() { SkipIfRemote() - Skip("Looks like SkipIfRemote() is not working") session := podmanTest.Podman([]string{"create", ALPINE, "ls", "foo"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) diff --git a/test/e2e/create_staticip_test.go b/test/e2e/create_staticip_test.go index 6937956376..e52b37417e 100644 --- a/test/e2e/create_staticip_test.go +++ b/test/e2e/create_staticip_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -6,7 +6,7 @@ import ( "os" "time" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/create_staticmac_test.go b/test/e2e/create_staticmac_test.go index 6460659f70..fbe11440c7 100644 --- a/test/e2e/create_staticmac_test.go +++ b/test/e2e/create_staticmac_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go index 44bb5c45f6..f21f17d392 100644 --- a/test/e2e/create_test.go +++ b/test/e2e/create_test.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -107,6 +107,7 @@ var _ = Describe("Podman create", func() { }) It("podman create --entrypoint \"\"", func() { + Skip(v2remotefail) session := podmanTest.Podman([]string{"create", "--entrypoint", "", ALPINE, "ls"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) @@ -471,4 +472,31 @@ var _ = Describe("Podman create", func() { Expect(len(data)).To(Equal(1)) Expect(data[0].Config.StopSignal).To(Equal(uint(15))) }) + + It("podman create --tz", func() { + session := podmanTest.Podman([]string{"create", "--tz", "foo", "--name", "bad", ALPINE, "date"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + + session = podmanTest.Podman([]string{"create", "--tz", "America", "--name", "dir", ALPINE, "date"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + + session = podmanTest.Podman([]string{"create", "--tz", "Pacific/Honolulu", "--name", "zone", ALPINE, "date"}) + session.WaitWithDefaultTimeout() + inspect := podmanTest.Podman([]string{"inspect", "zone"}) + inspect.WaitWithDefaultTimeout() + data := inspect.InspectContainerToJSON() + Expect(len(data)).To(Equal(1)) + Expect(data[0].Config.Timezone).To(Equal("Pacific/Honolulu")) + + session = podmanTest.Podman([]string{"create", "--tz", "local", "--name", "lcl", ALPINE, "date"}) + session.WaitWithDefaultTimeout() + inspect = podmanTest.Podman([]string{"inspect", "lcl"}) + inspect.WaitWithDefaultTimeout() + data = inspect.InspectContainerToJSON() + Expect(len(data)).To(Equal(1)) + Expect(data[0].Config.Timezone).To(Equal("local")) + }) + }) diff --git a/test/e2e/diff_test.go b/test/e2e/diff_test.go index fbbe49eacf..f854c667e2 100644 --- a/test/e2e/diff_test.go +++ b/test/e2e/diff_test.go @@ -4,7 +4,7 @@ import ( "os" "sort" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go index 8c496872f7..7f95502558 100644 --- a/test/e2e/events_test.go +++ b/test/e2e/events_test.go @@ -7,7 +7,7 @@ import ( "strings" "time" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go index f44d428d65..4f744e401d 100644 --- a/test/e2e/exec_test.go +++ b/test/e2e/exec_test.go @@ -5,7 +5,7 @@ import ( "os" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -79,6 +79,7 @@ var _ = Describe("Podman exec", func() { }) It("podman exec environment test", func() { + Skip(v2remotefail) setup := podmanTest.RunTopContainer("test1") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -123,6 +124,7 @@ var _ = Describe("Podman exec", func() { }) It("podman exec terminal doesn't hang", func() { + Skip(v2remotefail) setup := podmanTest.Podman([]string{"run", "-dti", fedoraMinimal, "sleep", "+Inf"}) setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -157,6 +159,7 @@ var _ = Describe("Podman exec", func() { }) It("podman exec with user only in container", func() { + Skip(v2remotefail) testUser := "test123" setup := podmanTest.Podman([]string{"run", "--name", "test1", "-d", fedoraMinimal, "sleep", "60"}) setup.WaitWithDefaultTimeout() @@ -173,6 +176,7 @@ var _ = Describe("Podman exec", func() { }) It("podman exec with user from run", func() { + Skip(v2remotefail) testUser := "guest" setup := podmanTest.Podman([]string{"run", "--user", testUser, "-d", ALPINE, "top"}) setup.WaitWithDefaultTimeout() @@ -192,6 +196,7 @@ var _ = Describe("Podman exec", func() { }) It("podman exec simple working directory test", func() { + Skip(v2remotefail) setup := podmanTest.RunTopContainer("test1") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -210,6 +215,7 @@ var _ = Describe("Podman exec", func() { }) It("podman exec missing working directory test", func() { + Skip(v2remotefail) setup := podmanTest.RunTopContainer("test1") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -224,6 +230,7 @@ var _ = Describe("Podman exec", func() { }) It("podman exec cannot be invoked", func() { + Skip(v2remotefail) setup := podmanTest.RunTopContainer("test1") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -234,6 +241,7 @@ var _ = Describe("Podman exec", func() { }) It("podman exec command not found", func() { + Skip(v2remotefail) setup := podmanTest.RunTopContainer("test1") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) diff --git a/test/e2e/exists_test.go b/test/e2e/exists_test.go index 8f3b371d8a..f509bdff65 100644 --- a/test/e2e/exists_test.go +++ b/test/e2e/exists_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" diff --git a/test/e2e/export_test.go b/test/e2e/export_test.go index fb25827965..dda1c5a620 100644 --- a/test/e2e/export_test.go +++ b/test/e2e/export_test.go @@ -4,7 +4,7 @@ import ( "os" "path/filepath" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go index 7872a9fbf8..987e4779cf 100644 --- a/test/e2e/generate_kube_test.go +++ b/test/e2e/generate_kube_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" "github.com/ghodss/yaml" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/test/e2e/generate_systemd_test.go b/test/e2e/generate_systemd_test.go index f43a4f8654..63c12d2e8c 100644 --- a/test/e2e/generate_systemd_test.go +++ b/test/e2e/generate_systemd_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -6,7 +6,7 @@ import ( "io/ioutil" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go index d8e3f045fd..c92b908be9 100644 --- a/test/e2e/healthcheck_run_test.go +++ b/test/e2e/healthcheck_run_test.go @@ -5,7 +5,7 @@ import ( "os" "time" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/history_test.go b/test/e2e/history_test.go index 231e8b8561..3ecee5d49d 100644 --- a/test/e2e/history_test.go +++ b/test/e2e/history_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go index b6391cebfc..6c2be1a4fc 100644 --- a/test/e2e/images_test.go +++ b/test/e2e/images_test.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" "github.com/docker/go-units" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -176,6 +176,7 @@ var _ = Describe("Podman images", func() { }) It("podman images filter before image", func() { + Skip(v2remotefail) dockerfile := `FROM docker.io/library/alpine:latest RUN apk update && apk add strace ` @@ -187,6 +188,7 @@ RUN apk update && apk add strace }) It("podman images workingdir from image", func() { + Skip(v2remotefail) dockerfile := `FROM docker.io/library/alpine:latest WORKDIR /test ` @@ -306,6 +308,7 @@ WORKDIR /test }) It("podman images --all flag", func() { + Skip(v2remotefail) podmanTest.RestoreAllArtifacts() dockerfile := `FROM docker.io/library/alpine:latest RUN mkdir hello @@ -325,6 +328,7 @@ ENV foo=bar }) It("podman images filter by label", func() { + Skip(v2remotefail) dockerfile := `FROM docker.io/library/alpine:latest LABEL version="1.0" LABEL "com.example.vendor"="Example Vendor" @@ -337,6 +341,7 @@ LABEL "com.example.vendor"="Example Vendor" }) It("podman with images with no layers", func() { + Skip(v2remotefail) dockerfile := strings.Join([]string{ `FROM scratch`, `LABEL org.opencontainers.image.authors=""`, diff --git a/test/e2e/import_test.go b/test/e2e/import_test.go index bceb30f7c1..92ee49b8b0 100644 --- a/test/e2e/import_test.go +++ b/test/e2e/import_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/info_test.go b/test/e2e/info_test.go index dbdaa05a7c..e38ace53fe 100644 --- a/test/e2e/info_test.go +++ b/test/e2e/info_test.go @@ -7,8 +7,8 @@ import ( "os/exec" "path/filepath" - "github.com/containers/libpod/pkg/rootless" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/rootless" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/init_test.go b/test/e2e/init_test.go index 721017d0c1..1bf07dcc81 100644 --- a/test/e2e/init_test.go +++ b/test/e2e/init_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go index ed7876d8a2..eaecf28371 100644 --- a/test/e2e/inspect_test.go +++ b/test/e2e/inspect_test.go @@ -4,7 +4,7 @@ import ( "os" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/opencontainers/selinux/go-selinux" diff --git a/test/e2e/kill_test.go b/test/e2e/kill_test.go index 3f192fb554..449b6da24b 100644 --- a/test/e2e/kill_test.go +++ b/test/e2e/kill_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/libpod_suite_remote_test.go b/test/e2e/libpod_suite_remote_test.go index b94b6e267e..8a071a911d 100644 --- a/test/e2e/libpod_suite_remote_test.go +++ b/test/e2e/libpod_suite_remote_test.go @@ -1,4 +1,4 @@ -// +build remoteclient +// +build remote package integration @@ -15,7 +15,7 @@ import ( "syscall" "time" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/onsi/ginkgo" ) diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index 009f70914d..3543bd110f 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration diff --git a/test/e2e/libpod_suite_varlink_test.go b/test/e2e/libpod_suite_varlink_test.go index 92c815b39c..f040f4feaf 100644 --- a/test/e2e/libpod_suite_varlink_test.go +++ b/test/e2e/libpod_suite_varlink_test.go @@ -14,7 +14,7 @@ import ( "syscall" "time" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/rootless" "github.com/onsi/ginkgo" ) diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go index 9a2cee9e19..df2613334c 100644 --- a/test/e2e/load_test.go +++ b/test/e2e/load_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -7,7 +7,7 @@ import ( "os" "path/filepath" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/login_logout_test.go b/test/e2e/login_logout_test.go index 66289dfc3d..3bdce970b3 100644 --- a/test/e2e/login_logout_test.go +++ b/test/e2e/login_logout_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -11,7 +11,7 @@ import ( "strconv" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" "github.com/onsi/ginkgo/config" . "github.com/onsi/gomega" diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go index cf69cbd3e2..1ceab91615 100644 --- a/test/e2e/logs_test.go +++ b/test/e2e/logs_test.go @@ -6,7 +6,7 @@ import ( "os/exec" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" @@ -273,6 +273,7 @@ var _ = Describe("Podman logs", func() { }) It("streaming output", func() { + Skip(v2remotefail) containerName := "logs-f-rm" logc := podmanTest.Podman([]string{"run", "--rm", "--name", containerName, "-dt", ALPINE, "sh", "-c", "echo podman; sleep 1; echo podman"}) @@ -313,6 +314,7 @@ var _ = Describe("Podman logs", func() { }) It("follow output stopped container", func() { + Skip(v2remotefail) containerName := "logs-f" logc := podmanTest.Podman([]string{"run", "--name", containerName, "-d", ALPINE, "true"}) diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go index 1137ebe8e4..3bee15bd01 100644 --- a/test/e2e/manifest_test.go +++ b/test/e2e/manifest_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/mount_test.go b/test/e2e/mount_test.go index ac52d8c7e1..36d1f856d2 100644 --- a/test/e2e/mount_test.go +++ b/test/e2e/mount_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -18,6 +18,7 @@ var _ = Describe("Podman mount", func() { ) BeforeEach(func() { + SkipIfRootless() tempdir, err = CreateTempDirInTempDir() if err != nil { os.Exit(1) diff --git a/test/e2e/namespace_test.go b/test/e2e/namespace_test.go index 88b48cb06d..70472f3846 100644 --- a/test/e2e/namespace_test.go +++ b/test/e2e/namespace_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/negative_test.go b/test/e2e/negative_test.go index 957609b7e6..1deaf1f674 100644 --- a/test/e2e/negative_test.go +++ b/test/e2e/negative_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go index 7eccaa9ab7..83b0ce32ce 100644 --- a/test/e2e/network_create_test.go +++ b/test/e2e/network_create_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -10,8 +10,8 @@ import ( "strings" cniversion "github.com/containernetworking/cni/pkg/version" - "github.com/containers/libpod/pkg/network" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/network" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/pkg/errors" diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go index e293876b94..85f3566b1a 100644 --- a/test/e2e/network_test.go +++ b/test/e2e/network_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" "github.com/containers/storage/pkg/stringid" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/test/e2e/pause_test.go b/test/e2e/pause_test.go index 149a2e28ac..e3256b1e5e 100644 --- a/test/e2e/pause_test.go +++ b/test/e2e/pause_test.go @@ -7,8 +7,8 @@ import ( "path/filepath" "strings" - "github.com/containers/libpod/pkg/cgroups" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/cgroups" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index 7fe4ce9678..23604f47d4 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -10,7 +10,7 @@ import ( "path/filepath" "text/template" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go index 8d07f6290b..57737ad596 100644 --- a/test/e2e/pod_create_test.go +++ b/test/e2e/pod_create_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_infra_container_test.go b/test/e2e/pod_infra_container_test.go index 9b6f9b6572..49105310b1 100644 --- a/test/e2e/pod_infra_container_test.go +++ b/test/e2e/pod_infra_container_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -6,7 +6,7 @@ import ( "os" "strconv" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_inspect_test.go b/test/e2e/pod_inspect_test.go index f1acd37500..e2c2ac607a 100644 --- a/test/e2e/pod_inspect_test.go +++ b/test/e2e/pod_inspect_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -59,6 +59,7 @@ var _ = Describe("Podman pod inspect", func() { }) It("podman pod inspect (CreateCommand)", func() { + Skip(v2remotefail) podName := "myTestPod" createCommand := []string{"pod", "create", "--name", podName, "--hostname", "rudolph", "--share", "net"} diff --git a/test/e2e/pod_kill_test.go b/test/e2e/pod_kill_test.go index af3d2af73b..8f39f969af 100644 --- a/test/e2e/pod_kill_test.go +++ b/test/e2e/pod_kill_test.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_pause_test.go b/test/e2e/pod_pause_test.go index df6e5482e5..192738809a 100644 --- a/test/e2e/pod_pause_test.go +++ b/test/e2e/pod_pause_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_pod_namespaces.go b/test/e2e/pod_pod_namespaces.go index 806ec3884b..fce131e203 100644 --- a/test/e2e/pod_pod_namespaces.go +++ b/test/e2e/pod_pod_namespaces.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -6,7 +6,7 @@ import ( "fmt" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_prune_test.go b/test/e2e/pod_prune_test.go index 1711b55d4c..21dfe2ebfe 100644 --- a/test/e2e/pod_prune_test.go +++ b/test/e2e/pod_prune_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_ps_test.go b/test/e2e/pod_ps_test.go index 8dcaf6af17..83852f278f 100644 --- a/test/e2e/pod_ps_test.go +++ b/test/e2e/pod_ps_test.go @@ -5,7 +5,7 @@ import ( "os" "sort" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_restart_test.go b/test/e2e/pod_restart_test.go index 72e8043533..77a65a9228 100644 --- a/test/e2e/pod_restart_test.go +++ b/test/e2e/pod_restart_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_rm_test.go b/test/e2e/pod_rm_test.go index d0ece7b53e..7395cada74 100644 --- a/test/e2e/pod_rm_test.go +++ b/test/e2e/pod_rm_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_start_test.go b/test/e2e/pod_start_test.go index d7d623d6ed..371339f515 100644 --- a/test/e2e/pod_start_test.go +++ b/test/e2e/pod_start_test.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_stats_test.go b/test/e2e/pod_stats_test.go index 778b44d1e4..6cf392bd73 100644 --- a/test/e2e/pod_stats_test.go +++ b/test/e2e/pod_stats_test.go @@ -1,12 +1,12 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - "github.com/containers/libpod/pkg/cgroups" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/cgroups" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_stop_test.go b/test/e2e/pod_stop_test.go index 0fe5809212..dec59b3dbb 100644 --- a/test/e2e/pod_stop_test.go +++ b/test/e2e/pod_stop_test.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/pod_top_test.go b/test/e2e/pod_top_test.go index de011eda71..f86d23d846 100644 --- a/test/e2e/pod_top_test.go +++ b/test/e2e/pod_top_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -7,7 +7,7 @@ import ( "os" "time" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/port_test.go b/test/e2e/port_test.go index 5bb86d5589..897505588e 100644 --- a/test/e2e/port_test.go +++ b/test/e2e/port_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -7,7 +7,7 @@ import ( "os" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go index e77e6dd253..a51b9565cb 100644 --- a/test/e2e/prune_test.go +++ b/test/e2e/prune_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go index cfc0a415eb..152c85704f 100644 --- a/test/e2e/ps_test.go +++ b/test/e2e/ps_test.go @@ -7,7 +7,7 @@ import ( "sort" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" "github.com/docker/go-units" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -466,4 +466,15 @@ var _ = Describe("Podman ps", func() { Expect(ps.ExitCode()).To(Equal(0)) Expect(ps.OutputToString()).To(ContainSubstring("0.0.0.0:8080->80/tcp")) }) + + It("podman ps truncate long create commad", func() { + session := podmanTest.Podman([]string{"run", ALPINE, "echo", "very", "long", "create", "command"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"ps", "-a"}) + session.WaitWithDefaultTimeout() + Expect(session.OutputToString()).To(ContainSubstring("echo very long cr...")) + }) + }) diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go index ac882927f5..eec2877e8a 100644 --- a/test/e2e/pull_test.go +++ b/test/e2e/pull_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/push_test.go b/test/e2e/push_test.go index 0747257bec..a05291d069 100644 --- a/test/e2e/push_test.go +++ b/test/e2e/push_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -8,8 +8,8 @@ import ( "path/filepath" "strings" - "github.com/containers/libpod/pkg/rootless" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/rootless" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/restart_test.go b/test/e2e/restart_test.go index e72a20f2d7..e5cab500f8 100644 --- a/test/e2e/restart_test.go +++ b/test/e2e/restart_test.go @@ -4,7 +4,7 @@ import ( "os" "time" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/rm_test.go b/test/e2e/rm_test.go index d0dbd527ae..7ddfae0cb0 100644 --- a/test/e2e/rm_test.go +++ b/test/e2e/rm_test.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go index b8cbdc7928..73a54039ad 100644 --- a/test/e2e/rmi_test.go +++ b/test/e2e/rmi_test.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" diff --git a/test/e2e/run_cgroup_parent_test.go b/test/e2e/run_cgroup_parent_test.go index 14294eeacc..ed32921391 100644 --- a/test/e2e/run_cgroup_parent_test.go +++ b/test/e2e/run_cgroup_parent_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_cleanup_test.go b/test/e2e/run_cleanup_test.go index 99d0d55e5d..7c83acc40e 100644 --- a/test/e2e/run_cleanup_test.go +++ b/test/e2e/run_cleanup_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_cpu_test.go b/test/e2e/run_cpu_test.go index 29ceb4e677..b4785c513f 100644 --- a/test/e2e/run_cpu_test.go +++ b/test/e2e/run_cpu_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -6,8 +6,8 @@ import ( "io/ioutil" "os" - "github.com/containers/libpod/pkg/cgroups" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/cgroups" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_device_test.go b/test/e2e/run_device_test.go index eae3f574c3..a5e1e02690 100644 --- a/test/e2e/run_device_test.go +++ b/test/e2e/run_device_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_dns_test.go b/test/e2e/run_dns_test.go index 02b9ff8d1b..beed80fd2f 100644 --- a/test/e2e/run_dns_test.go +++ b/test/e2e/run_dns_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_entrypoint_test.go b/test/e2e/run_entrypoint_test.go index b1344a371f..76e0215528 100644 --- a/test/e2e/run_entrypoint_test.go +++ b/test/e2e/run_entrypoint_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_env_test.go b/test/e2e/run_env_test.go index 2adf21171b..c6fb1ad1b8 100644 --- a/test/e2e/run_env_test.go +++ b/test/e2e/run_env_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_exit_test.go b/test/e2e/run_exit_test.go index 40731142e3..2382fb2790 100644 --- a/test/e2e/run_exit_test.go +++ b/test/e2e/run_exit_test.go @@ -3,8 +3,8 @@ package integration import ( "os" - "github.com/containers/libpod/libpod/define" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/libpod/define" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_memory_test.go b/test/e2e/run_memory_test.go index d60f2a8cd2..0e88c09b3c 100644 --- a/test/e2e/run_memory_test.go +++ b/test/e2e/run_memory_test.go @@ -1,12 +1,12 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - "github.com/containers/libpod/pkg/cgroups" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/cgroups" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index cdfbd55306..5a463d46fe 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_ns_test.go b/test/e2e/run_ns_test.go index c8ba68efcc..96ca2fc562 100644 --- a/test/e2e/run_ns_test.go +++ b/test/e2e/run_ns_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -6,7 +6,7 @@ import ( "os" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_passwd_test.go b/test/e2e/run_passwd_test.go index bd6a0e0368..3152f166b5 100644 --- a/test/e2e/run_passwd_test.go +++ b/test/e2e/run_passwd_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_privileged_test.go b/test/e2e/run_privileged_test.go index f2c424483a..03fb716565 100644 --- a/test/e2e/run_privileged_test.go +++ b/test/e2e/run_privileged_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -6,7 +6,7 @@ import ( "os" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_restart_test.go b/test/e2e/run_restart_test.go index 8bbdf20568..0a1c7e134a 100644 --- a/test/e2e/run_restart_test.go +++ b/test/e2e/run_restart_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_seccomp.go b/test/e2e/run_seccomp.go index dcf938ad6f..a6a14618cc 100644 --- a/test/e2e/run_seccomp.go +++ b/test/e2e/run_seccomp.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_security_labels.go b/test/e2e/run_security_labels.go index a04bdc7397..148b18daa6 100644 --- a/test/e2e/run_security_labels.go +++ b/test/e2e/run_security_labels.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -6,7 +6,7 @@ import ( "os" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_selinux_test.go b/test/e2e/run_selinux_test.go index 8b33a05b23..7c19465343 100644 --- a/test/e2e/run_selinux_test.go +++ b/test/e2e/run_selinux_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/opencontainers/selinux/go-selinux" diff --git a/test/e2e/run_signal_test.go b/test/e2e/run_signal_test.go index fbdd3acecd..d3b77ae73f 100644 --- a/test/e2e/run_signal_test.go +++ b/test/e2e/run_signal_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -11,8 +11,8 @@ import ( "syscall" "time" - "github.com/containers/libpod/pkg/rootless" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/rootless" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "golang.org/x/sys/unix" diff --git a/test/e2e/run_staticip_test.go b/test/e2e/run_staticip_test.go index 5ad8f9fb07..8377636cf6 100644 --- a/test/e2e/run_staticip_test.go +++ b/test/e2e/run_staticip_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -8,7 +8,7 @@ import ( "os" "time" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 42754bab4a..6cbedb4577 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -13,8 +13,8 @@ import ( "syscall" "time" - "github.com/containers/libpod/pkg/cgroups" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/cgroups" + . "github.com/containers/libpod/v2/test/utils" "github.com/containers/storage/pkg/stringid" "github.com/mrunalp/fileutils" . "github.com/onsi/ginkgo" @@ -1047,4 +1047,29 @@ USER mail` Expect(session.ExitCode()).To(Equal(0)) Expect(strings.Contains(session.OutputToString(), groupName)).To(BeTrue()) }) + + It("podman run --tz", func() { + session := podmanTest.Podman([]string{"run", "--tz", "foo", "--rm", ALPINE, "date"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + + session = podmanTest.Podman([]string{"run", "--tz", "America", "--rm", ALPINE, "date"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + + session = podmanTest.Podman([]string{"run", "--tz", "Pacific/Honolulu", "--rm", ALPINE, "date", "+'%H %Z'"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("HST")) + + session = podmanTest.Podman([]string{"run", "--tz", "local", "--rm", ALPINE, "date", "+'%H %Z'"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + t := time.Now() + z, _ := t.Zone() + h := strconv.Itoa(t.Hour()) + Expect(session.OutputToString()).To(ContainSubstring(z)) + Expect(session.OutputToString()).To(ContainSubstring(h)) + + }) }) diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go index 3e55f56c0a..9f04664680 100644 --- a/test/e2e/run_userns_test.go +++ b/test/e2e/run_userns_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -9,7 +9,7 @@ import ( "os/user" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index 7cd69f7382..92988ff872 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/test/e2e/runlabel_test.go b/test/e2e/runlabel_test.go index 41d61e9d9e..3383fbd1ea 100644 --- a/test/e2e/runlabel_test.go +++ b/test/e2e/runlabel_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/save_test.go b/test/e2e/save_test.go index aaa5ae1809..1e035c3e54 100644 --- a/test/e2e/save_test.go +++ b/test/e2e/save_test.go @@ -4,8 +4,8 @@ import ( "os" "path/filepath" - "github.com/containers/libpod/pkg/rootless" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/rootless" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go index 4e37f7d7a6..aeab3ac568 100644 --- a/test/e2e/search_test.go +++ b/test/e2e/search_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -10,7 +10,7 @@ import ( "strconv" "text/template" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go index b8198a3a9e..bf62a65f25 100644 --- a/test/e2e/start_test.go +++ b/test/e2e/start_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" @@ -120,6 +120,7 @@ var _ = Describe("Podman start", func() { }) It("podman failed to start with --rm should delete the container", func() { + Skip(v2remotefail) session := podmanTest.Podman([]string{"create", "--name", "test1", "-it", "--rm", ALPINE, "foo"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) diff --git a/test/e2e/stats_test.go b/test/e2e/stats_test.go index d3af44891b..009bb9cac5 100644 --- a/test/e2e/stats_test.go +++ b/test/e2e/stats_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -7,8 +7,8 @@ import ( "os" "time" - "github.com/containers/libpod/pkg/cgroups" - . "github.com/containers/libpod/test/utils" + "github.com/containers/libpod/v2/pkg/cgroups" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go index 4ed0b62934..417bba3212 100644 --- a/test/e2e/stop_test.go +++ b/test/e2e/stop_test.go @@ -5,7 +5,7 @@ import ( "os" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -198,6 +198,7 @@ var _ = Describe("Podman stop", func() { }) It("podman stop all containers with one stopped", func() { + Skip(v2remotefail) session := podmanTest.RunTopContainer("test1") session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) diff --git a/test/e2e/system_df_test.go b/test/e2e/system_df_test.go index bbbdf30b0d..01ceac325e 100644 --- a/test/e2e/system_df_test.go +++ b/test/e2e/system_df_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -7,7 +7,7 @@ import ( "os" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/system_reset_test.go b/test/e2e/system_reset_test.go index 63e77af860..3e16e28d84 100644 --- a/test/e2e/system_reset_test.go +++ b/test/e2e/system_reset_test.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go index a35e5113a5..3db8fc3a6e 100644 --- a/test/e2e/systemd_test.go +++ b/test/e2e/systemd_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -8,7 +8,7 @@ import ( "strings" "time" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/tag_test.go b/test/e2e/tag_test.go index 2b513015b2..39d0d24db7 100644 --- a/test/e2e/tag_test.go +++ b/test/e2e/tag_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/top_test.go b/test/e2e/top_test.go index b62d242f13..157a7fe462 100644 --- a/test/e2e/top_test.go +++ b/test/e2e/top_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/tree_test.go b/test/e2e/tree_test.go index c445328fa2..c4436962f1 100644 --- a/test/e2e/tree_test.go +++ b/test/e2e/tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/trust_test.go b/test/e2e/trust_test.go index 8c97e6b288..62ebc903fb 100644 --- a/test/e2e/trust_test.go +++ b/test/e2e/trust_test.go @@ -1,4 +1,4 @@ -// +build !remoteclient +// +build !remote package integration @@ -8,7 +8,7 @@ import ( "os" "path/filepath" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/unshare_test.go b/test/e2e/unshare_test.go index 5f342ffc33..ba8bf5963c 100644 --- a/test/e2e/unshare_test.go +++ b/test/e2e/unshare_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/untag_test.go b/test/e2e/untag_test.go index 8a1c8091d4..e0e8d060a8 100644 --- a/test/e2e/untag_test.go +++ b/test/e2e/untag_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -33,6 +33,7 @@ var _ = Describe("Podman untag", func() { }) It("podman untag all", func() { + Skip(v2remotefail) tags := []string{ALPINE, "registry.com/foo:bar", "localhost/foo:bar"} cmd := []string{"tag"} diff --git a/test/e2e/version_test.go b/test/e2e/version_test.go index e353b9f970..775be65119 100644 --- a/test/e2e/version_test.go +++ b/test/e2e/version_test.go @@ -3,8 +3,8 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" - "github.com/containers/libpod/version" + . "github.com/containers/libpod/v2/test/utils" + "github.com/containers/libpod/v2/version" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" diff --git a/test/e2e/volume_create_test.go b/test/e2e/volume_create_test.go index 71023f9e24..a734cdc1a6 100644 --- a/test/e2e/volume_create_test.go +++ b/test/e2e/volume_create_test.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/volume_inspect_test.go b/test/e2e/volume_inspect_test.go index 5015e0535f..d7bdaacccb 100644 --- a/test/e2e/volume_inspect_test.go +++ b/test/e2e/volume_inspect_test.go @@ -4,7 +4,7 @@ import ( "os" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/volume_ls_test.go b/test/e2e/volume_ls_test.go index d2d75af9e3..647cb7a493 100644 --- a/test/e2e/volume_ls_test.go +++ b/test/e2e/volume_ls_test.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/volume_prune_test.go b/test/e2e/volume_prune_test.go index 3049646b08..c4fafa406f 100644 --- a/test/e2e/volume_prune_test.go +++ b/test/e2e/volume_prune_test.go @@ -1,11 +1,11 @@ -// +build !remoteclient +// +build !remote package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/volume_rm_test.go b/test/e2e/volume_rm_test.go index 742d4e0dc1..fd79be126f 100644 --- a/test/e2e/volume_rm_test.go +++ b/test/e2e/volume_rm_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/e2e/wait_test.go b/test/e2e/wait_test.go index c03116b01a..ea693c1159 100644 --- a/test/e2e/wait_test.go +++ b/test/e2e/wait_test.go @@ -3,7 +3,7 @@ package integration import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/endpoint/commit.go b/test/endpoint/commit.go index 2a8e365ae3..ff671f572c 100644 --- a/test/endpoint/commit.go +++ b/test/endpoint/commit.go @@ -6,7 +6,7 @@ import ( "encoding/json" "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/endpoint/endpoint.go b/test/endpoint/endpoint.go index 20b5c577ee..3352f36f22 100644 --- a/test/endpoint/endpoint.go +++ b/test/endpoint/endpoint.go @@ -13,8 +13,8 @@ import ( "syscall" "time" - "github.com/containers/libpod/pkg/rootless" - iopodman "github.com/containers/libpod/pkg/varlink" + "github.com/containers/libpod/v2/pkg/rootless" + iopodman "github.com/containers/libpod/v2/pkg/varlink" . "github.com/onsi/ginkgo" "github.com/onsi/gomega/gexec" ) diff --git a/test/endpoint/exists_test.go b/test/endpoint/exists_test.go index 17e0fcab42..4278f2bfd0 100644 --- a/test/endpoint/exists_test.go +++ b/test/endpoint/exists_test.go @@ -5,7 +5,7 @@ package endpoint import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/endpoint/pull_test.go b/test/endpoint/pull_test.go index 25141d7874..06813125ee 100644 --- a/test/endpoint/pull_test.go +++ b/test/endpoint/pull_test.go @@ -5,7 +5,7 @@ package endpoint import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/endpoint/setup.go b/test/endpoint/setup.go index c05cc0cbb4..f784e5696f 100644 --- a/test/endpoint/setup.go +++ b/test/endpoint/setup.go @@ -10,8 +10,8 @@ import ( "path/filepath" "strings" - "github.com/containers/libpod/pkg/rootless" - iopodman "github.com/containers/libpod/pkg/varlink" + "github.com/containers/libpod/v2/pkg/rootless" + iopodman "github.com/containers/libpod/v2/pkg/varlink" "github.com/containers/storage/pkg/stringid" "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/test/endpoint/version_test.go b/test/endpoint/version_test.go index 403fca5553..90f2c7043a 100644 --- a/test/endpoint/version_test.go +++ b/test/endpoint/version_test.go @@ -5,8 +5,8 @@ package endpoint import ( "os" - . "github.com/containers/libpod/test/utils" - "github.com/containers/libpod/version" + . "github.com/containers/libpod/v2/test/utils" + "github.com/containers/libpod/v2/version" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/system/260-sdnotify.bats b/test/system/260-sdnotify.bats new file mode 100644 index 0000000000..c37eea15a0 --- /dev/null +++ b/test/system/260-sdnotify.bats @@ -0,0 +1,142 @@ +#!/usr/bin/env bats -*- bats -*- +# +# Tests for systemd sdnotify +# + +load helpers + +# Shared throughout this module: PID of socat process, and path to its log +_SOCAT_PID= +_SOCAT_LOG= + +function setup() { + skip_if_remote + + # TODO: remove this once CI systems have newer crun and container-selinux + skip "TEMPORARY SKIP - until CI systems get new crun, container-selinux" + + basic_setup +} + +function teardown() { + unset NOTIFY_SOCKET + + _stop_socat + + basic_teardown +} + +############################################################################### +# BEGIN helpers + +# Run socat process on a socket, logging to well-known path. Each received +# packet is logged with a newline appended, for ease of parsing the log file. +function _start_socat() { + _SOCAT_LOG="$PODMAN_TMPDIR/socat.log" + + rm -f $_SOCAT_LOG + socat unix-recvfrom:"$NOTIFY_SOCKET",fork \ + system:"(cat;echo) >> $_SOCAT_LOG" & + _SOCAT_PID=$! +} + +# Stop the socat background process and clean up logs +function _stop_socat() { + if [[ -n "$_SOCAT_PID" ]]; then + kill $_SOCAT_PID + fi + _SOCAT_PID= + + if [[ -n "$_SOCAT_LOG" ]]; then + rm -f $_SOCAT_LOG + fi +} + +# Check that MAINPID=xxxxx points to a running conmon process +function _assert_mainpid_is_conmon() { + local mainpid=$(expr "$1" : "MAINPID=\([0-9]\+\)") + test -n "$mainpid" || die "Could not parse '$1' as 'MAINPID=nnnn'" + + test -d /proc/$mainpid || die "sdnotify MAINPID=$mainpid - but /proc/$mainpid does not exist" + + # e.g. /proc/12345/exe -> /usr/bin/conmon + local mainpid_bin=$(readlink /proc/$mainpid/exe) + is "$mainpid_bin" ".*/conmon" "sdnotify MAINPID=$mainpid is conmon process" +} + +# END helpers +############################################################################### +# BEGIN tests themselves + +@test "sdnotify : ignore" { + export NOTIFY_SOCKET=$PODMAN_TMPDIR/ignore.sock + _start_socat + + run_podman 1 run --rm --sdnotify=ignore $IMAGE printenv NOTIFY_SOCKET + is "$output" "" "\$NOTIFY_SOCKET in container" + + is "$(< $_SOCAT_LOG)" "" "nothing received on socket" + _stop_socat +} + +@test "sdnotify : conmon" { + export NOTIFY_SOCKET=$PODMAN_TMPDIR/conmon.sock + _start_socat + + run_podman run -d --name sdnotify_conmon_c \ + --sdnotify=conmon \ + $IMAGE \ + sh -c 'printenv NOTIFY_SOCKET;echo READY;while ! test -f /stop;do sleep 0.1;done' + cid="$output" + wait_for_ready $cid + + run_podman logs sdnotify_conmon_c + is "$output" "READY" "\$NOTIFY_SOCKET in container" + + run cat $_SOCAT_LOG + is "${lines[-1]}" "READY=1" "final output from sdnotify" + + _assert_mainpid_is_conmon "${lines[0]}" + + # Done. Stop container, clean up. + run_podman exec $cid touch /stop + run_podman rm $cid + _stop_socat +} + +@test "sdnotify : container" { + # Sigh... we need to pull a humongous image because it has systemd-notify. + # FIXME: is there a smaller image we could use? + _FEDORA=registry.fedoraproject.org/fedora:latest + + # Pull that image. Retry in case of flakes. + run_podman pull $_FEDORA || \ + run_podman pull $_FEDORA || \ + run_podman pull $_FEDORA + + export NOTIFY_SOCKET=$PODMAN_TMPDIR/container.sock + _start_socat + + run_podman run -d --sdnotify=container $_FEDORA \ + sh -c 'printenv NOTIFY_SOCKET;echo READY;systemd-notify --ready;while ! test -f /stop;do sleep 0.1;done' + cid="$output" + wait_for_ready $cid + + run_podman logs $cid + is "${lines[0]}" "/.*/container\.sock/notify" "NOTIFY_SOCKET is passed to container" + + # With container, READY=1 isn't necessarily the last message received; + # just look for it anywhere in received messages + run cat $_SOCAT_LOG + is "$output" ".*READY=1" "received READY=1 through notify socket" + + _assert_mainpid_is_conmon "${lines[0]}" + + # Done. Stop container, clean up. + run_podman exec $cid touch /stop + run_podman rm $cid + run_podman rmi $_FEDORA + _stop_socat +} + +# vim: filetype=sh diff --git a/test/utils/common_function_test.go b/test/utils/common_function_test.go index 46cce10769..c088772041 100644 --- a/test/utils/common_function_test.go +++ b/test/utils/common_function_test.go @@ -8,7 +8,7 @@ import ( "reflect" "strings" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" diff --git a/test/utils/podmansession_test.go b/test/utils/podmansession_test.go index de8c20b240..fa0b6ec506 100644 --- a/test/utils/podmansession_test.go +++ b/test/utils/podmansession_test.go @@ -1,7 +1,7 @@ package utils_test import ( - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/utils/podmantest_test.go b/test/utils/podmantest_test.go index 387c8747cc..f4d994c3d1 100644 --- a/test/utils/podmantest_test.go +++ b/test/utils/podmantest_test.go @@ -3,7 +3,7 @@ package utils_test import ( "os" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/test/utils/utils_suite_test.go b/test/utils/utils_suite_test.go index 0cfa00e9cd..a8a5c6e93b 100644 --- a/test/utils/utils_suite_test.go +++ b/test/utils/utils_suite_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - . "github.com/containers/libpod/test/utils" + . "github.com/containers/libpod/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" diff --git a/utils/utils_supported.go b/utils/utils_supported.go index 4258e6d7ac..f6441e0fb5 100644 --- a/utils/utils_supported.go +++ b/utils/utils_supported.go @@ -11,8 +11,8 @@ import ( "path/filepath" "strings" - "github.com/containers/libpod/pkg/cgroups" - "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/v2/pkg/cgroups" + "github.com/containers/libpod/v2/pkg/rootless" systemdDbus "github.com/coreos/go-systemd/v22/dbus" "github.com/godbus/dbus/v5" "github.com/pkg/errors" diff --git a/vendor/github.com/coreos/go-systemd/v22/daemon/sdnotify.go b/vendor/github.com/coreos/go-systemd/v22/daemon/sdnotify.go new file mode 100644 index 0000000000..ba4ae31f19 --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/daemon/sdnotify.go @@ -0,0 +1,84 @@ +// Copyright 2014 Docker, Inc. +// Copyright 2015-2018 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package daemon provides a Go implementation of the sd_notify protocol. +// It can be used to inform systemd of service start-up completion, watchdog +// events, and other status changes. +// +// https://www.freedesktop.org/software/systemd/man/sd_notify.html#Description +package daemon + +import ( + "net" + "os" +) + +const ( + // SdNotifyReady tells the service manager that service startup is finished + // or the service finished loading its configuration. + SdNotifyReady = "READY=1" + + // SdNotifyStopping tells the service manager that the service is beginning + // its shutdown. + SdNotifyStopping = "STOPPING=1" + + // SdNotifyReloading tells the service manager that this service is + // reloading its configuration. Note that you must call SdNotifyReady when + // it completed reloading. + SdNotifyReloading = "RELOADING=1" + + // SdNotifyWatchdog tells the service manager to update the watchdog + // timestamp for the service. + SdNotifyWatchdog = "WATCHDOG=1" +) + +// SdNotify sends a message to the init daemon. It is common to ignore the error. +// If `unsetEnvironment` is true, the environment variable `NOTIFY_SOCKET` +// will be unconditionally unset. +// +// It returns one of the following: +// (false, nil) - notification not supported (i.e. NOTIFY_SOCKET is unset) +// (false, err) - notification supported, but failure happened (e.g. error connecting to NOTIFY_SOCKET or while sending data) +// (true, nil) - notification supported, data has been sent +func SdNotify(unsetEnvironment bool, state string) (bool, error) { + socketAddr := &net.UnixAddr{ + Name: os.Getenv("NOTIFY_SOCKET"), + Net: "unixgram", + } + + // NOTIFY_SOCKET not set + if socketAddr.Name == "" { + return false, nil + } + + if unsetEnvironment { + if err := os.Unsetenv("NOTIFY_SOCKET"); err != nil { + return false, err + } + } + + conn, err := net.DialUnix(socketAddr.Net, nil, socketAddr) + // Error connecting to NOTIFY_SOCKET + if err != nil { + return false, err + } + defer conn.Close() + + if _, err = conn.Write([]byte(state)); err != nil { + return false, err + } + return true, nil +} diff --git a/vendor/github.com/coreos/go-systemd/v22/daemon/watchdog.go b/vendor/github.com/coreos/go-systemd/v22/daemon/watchdog.go new file mode 100644 index 0000000000..7a0e0d3a51 --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/daemon/watchdog.go @@ -0,0 +1,73 @@ +// Copyright 2016 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package daemon + +import ( + "fmt" + "os" + "strconv" + "time" +) + +// SdWatchdogEnabled returns watchdog information for a service. +// Processes should call daemon.SdNotify(false, daemon.SdNotifyWatchdog) every +// time / 2. +// If `unsetEnvironment` is true, the environment variables `WATCHDOG_USEC` and +// `WATCHDOG_PID` will be unconditionally unset. +// +// It returns one of the following: +// (0, nil) - watchdog isn't enabled or we aren't the watched PID. +// (0, err) - an error happened (e.g. error converting time). +// (time, nil) - watchdog is enabled and we can send ping. +// time is delay before inactive service will be killed. +func SdWatchdogEnabled(unsetEnvironment bool) (time.Duration, error) { + wusec := os.Getenv("WATCHDOG_USEC") + wpid := os.Getenv("WATCHDOG_PID") + if unsetEnvironment { + wusecErr := os.Unsetenv("WATCHDOG_USEC") + wpidErr := os.Unsetenv("WATCHDOG_PID") + if wusecErr != nil { + return 0, wusecErr + } + if wpidErr != nil { + return 0, wpidErr + } + } + + if wusec == "" { + return 0, nil + } + s, err := strconv.Atoi(wusec) + if err != nil { + return 0, fmt.Errorf("error converting WATCHDOG_USEC: %s", err) + } + if s <= 0 { + return 0, fmt.Errorf("error WATCHDOG_USEC must be a positive number") + } + interval := time.Duration(s) * time.Microsecond + + if wpid == "" { + return interval, nil + } + p, err := strconv.Atoi(wpid) + if err != nil { + return 0, fmt.Errorf("error converting WATCHDOG_PID: %s", err) + } + if os.Getpid() != p { + return 0, nil + } + + return interval, nil +} diff --git a/vendor/github.com/onsi/ginkgo/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/CHANGELOG.md index 03ce58a46a..bdf18327e2 100644 --- a/vendor/github.com/onsi/ginkgo/CHANGELOG.md +++ b/vendor/github.com/onsi/ginkgo/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.14.0 + +### Features +- Defer running top-level container nodes until RunSpecs is called [d44dedf] +- [Document Ginkgo lifecycle](http://onsi.github.io/ginkgo/#understanding-ginkgos-lifecycle) +- Add `extensions/globals` package (#692) [3295c8f] - this can be helpful in contexts where you are test-driving your test-generation code (see [#692](https://github.com/onsi/ginkgo/pull/692)) +- Print Skip reason in JUnit reporter if one was provided [820dfab] + ## 1.13.0 ### Features diff --git a/vendor/github.com/onsi/ginkgo/config/config.go b/vendor/github.com/onsi/ginkgo/config/config.go index cf22a8e449..2ae48b804e 100644 --- a/vendor/github.com/onsi/ginkgo/config/config.go +++ b/vendor/github.com/onsi/ginkgo/config/config.go @@ -1,7 +1,7 @@ /* Ginkgo accepts a number of configuration options. -These are documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) +These are documented [here](http://onsi.github.io/ginkgo/#the-ginkgo-cli) You can also learn more via @@ -20,7 +20,7 @@ import ( "fmt" ) -const VERSION = "1.13.0" +const VERSION = "1.14.0" type GinkgoConfigType struct { RandomSeed int64 diff --git a/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go b/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go index 783e7964ad..4d9c237ad7 100644 --- a/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go +++ b/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go @@ -21,12 +21,6 @@ type TableEntry struct { } func (t TableEntry) generateIt(itBody reflect.Value) { - if t.codeLocation == (types.CodeLocation{}) { - // The user created the TableEntry struct directly instead of having used the (F/P/X)Entry constructors. - // Therefore default to the code location of the surrounding DescribeTable. - t.codeLocation = codelocation.New(5) - } - var description string descriptionValue := reflect.ValueOf(t.Description) switch descriptionValue.Kind() { diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/watch/dependencies.go b/vendor/github.com/onsi/ginkgo/ginkgo/watch/dependencies.go index b7f756777e..f5ddff30fc 100644 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch/dependencies.go +++ b/vendor/github.com/onsi/ginkgo/ginkgo/watch/dependencies.go @@ -6,6 +6,7 @@ import ( ) var ginkgoAndGomegaFilter = regexp.MustCompile(`github\.com/onsi/ginkgo|github\.com/onsi/gomega`) +var ginkgoIntegrationTestFilter = regexp.MustCompile(`github\.com/onsi/ginkgo/integration`) //allow us to integration test this thing type Dependencies struct { deps map[string]int @@ -77,7 +78,7 @@ func (d Dependencies) resolveAndAdd(deps []string, depth int) { if err != nil { continue } - if !pkg.Goroot && !ginkgoAndGomegaFilter.Match([]byte(pkg.Dir)) { + if !pkg.Goroot && (!ginkgoAndGomegaFilter.Match([]byte(pkg.Dir)) || ginkgoIntegrationTestFilter.Match([]byte(pkg.Dir))) { d.addDepIfNotPresent(pkg.Dir, depth) } } diff --git a/vendor/github.com/onsi/ginkgo/go.mod b/vendor/github.com/onsi/ginkgo/go.mod index 212b2454c4..1f71252280 100644 --- a/vendor/github.com/onsi/ginkgo/go.mod +++ b/vendor/github.com/onsi/ginkgo/go.mod @@ -4,7 +4,6 @@ require ( github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/nxadm/tail v1.4.4 github.com/onsi/gomega v1.10.1 - github.com/sclevine/agouti v3.0.0+incompatible // indirect golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 golang.org/x/text v0.3.2 // indirect ) diff --git a/vendor/github.com/onsi/ginkgo/go.sum b/vendor/github.com/onsi/ginkgo/go.sum index beb29b3e6e..2b774f3e82 100644 --- a/vendor/github.com/onsi/ginkgo/go.sum +++ b/vendor/github.com/onsi/ginkgo/go.sum @@ -25,8 +25,6 @@ github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/sclevine/agouti v3.0.0+incompatible h1:8IBJS6PWz3uTlMP3YBIR5f+KAldcGuOeFkFbUWfBgK4= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/vendor/github.com/onsi/ginkgo/internal/global/init.go b/vendor/github.com/onsi/ginkgo/internal/global/init.go index 7114432000..109f617a5e 100644 --- a/vendor/github.com/onsi/ginkgo/internal/global/init.go +++ b/vendor/github.com/onsi/ginkgo/internal/global/init.go @@ -13,6 +13,10 @@ var Suite *suite.Suite var Failer *failer.Failer func init() { + InitializeGlobals() +} + +func InitializeGlobals() { Failer = failer.New() Suite = suite.New(Failer) } diff --git a/vendor/github.com/onsi/ginkgo/internal/suite/suite.go b/vendor/github.com/onsi/ginkgo/internal/suite/suite.go index 34f639ee41..e75da1f896 100644 --- a/vendor/github.com/onsi/ginkgo/internal/suite/suite.go +++ b/vendor/github.com/onsi/ginkgo/internal/suite/suite.go @@ -22,25 +22,37 @@ type ginkgoTestingT interface { Fail() } +type deferredContainerNode struct { + text string + body func() + flag types.FlagType + codeLocation types.CodeLocation +} + type Suite struct { topLevelContainer *containernode.ContainerNode currentContainer *containernode.ContainerNode - containerIndex int - beforeSuiteNode leafnodes.SuiteNode - afterSuiteNode leafnodes.SuiteNode - runner *specrunner.SpecRunner - failer *failer.Failer - running bool + + deferredContainerNodes []deferredContainerNode + + containerIndex int + beforeSuiteNode leafnodes.SuiteNode + afterSuiteNode leafnodes.SuiteNode + runner *specrunner.SpecRunner + failer *failer.Failer + running bool + expandTopLevelNodes bool } func New(failer *failer.Failer) *Suite { topLevelContainer := containernode.New("[Top Level]", types.FlagTypeNone, types.CodeLocation{}) return &Suite{ - topLevelContainer: topLevelContainer, - currentContainer: topLevelContainer, - failer: failer, - containerIndex: 1, + topLevelContainer: topLevelContainer, + currentContainer: topLevelContainer, + failer: failer, + containerIndex: 1, + deferredContainerNodes: []deferredContainerNode{}, } } @@ -53,6 +65,11 @@ func (suite *Suite) Run(t ginkgoTestingT, description string, reporters []report panic("ginkgo.parallel.node is one-indexed and must be <= ginkgo.parallel.total") } + suite.expandTopLevelNodes = true + for _, deferredNode := range suite.deferredContainerNodes { + suite.PushContainerNode(deferredNode.text, deferredNode.body, deferredNode.flag, deferredNode.codeLocation) + } + r := rand.New(rand.NewSource(config.RandomSeed)) suite.topLevelContainer.Shuffle(r) iterator, hasProgrammaticFocus := suite.generateSpecsIterator(description, config) @@ -137,6 +154,23 @@ func (suite *Suite) SetSynchronizedAfterSuiteNode(bodyA interface{}, bodyB inter } func (suite *Suite) PushContainerNode(text string, body func(), flag types.FlagType, codeLocation types.CodeLocation) { + /* + We defer walking the container nodes (which immediately evaluates the `body` function) + until `RunSpecs` is called. We do this by storing off the deferred container nodes. Then, when + `RunSpecs` is called we actually go through and add the container nodes to the test structure. + + This allows us to defer calling all the `body` functions until _after_ the top level functions + have been walked, _after_ func init()s have been called, and _after_ `go test` has called `flag.Parse()`. + + This allows users to load up configuration information in the `TestX` go test hook just before `RunSpecs` + is invoked and solves issues like #693 and makes the lifecycle easier to reason about. + + */ + if !suite.expandTopLevelNodes { + suite.deferredContainerNodes = append(suite.deferredContainerNodes, deferredContainerNode{text, body, flag, codeLocation}) + return + } + container := containernode.New(text, flag, codeLocation) suite.currentContainer.PushContainerNode(container) diff --git a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go index d76e2fe77d..963caaaff1 100644 --- a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go +++ b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go @@ -50,7 +50,7 @@ type JUnitFailureMessage struct { } type JUnitSkipped struct { - XMLName xml.Name `xml:"skipped"` + Message string `xml:",chardata"` } type JUnitReporter struct { @@ -132,6 +132,9 @@ func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary) { } if specSummary.State == types.SpecStateSkipped || specSummary.State == types.SpecStatePending { testCase.Skipped = &JUnitSkipped{} + if specSummary.Failure.Message != "" { + testCase.Skipped.Message = failureMessage(specSummary.Failure) + } } testCase.Time = specSummary.RunTime.Seconds() reporter.suite.TestCases = append(reporter.suite.TestCases, testCase) diff --git a/vendor/github.com/openshift/imagebuilder/builder.go b/vendor/github.com/openshift/imagebuilder/builder.go index ffc3b257f8..583c303c02 100644 --- a/vendor/github.com/openshift/imagebuilder/builder.go +++ b/vendor/github.com/openshift/imagebuilder/builder.go @@ -334,7 +334,7 @@ func ParseFile(path string) (*parser.Node, error) { func (b *Builder) Step() *Step { argsMap := make(map[string]string) for _, argsVal := range b.Arguments() { - val := strings.Split(argsVal, "=") + val := strings.SplitN(argsVal, "=", 2) if len(val) > 1 { argsMap[val[0]] = val[1] } diff --git a/vendor/github.com/openshift/imagebuilder/imagebuilder.spec b/vendor/github.com/openshift/imagebuilder/imagebuilder.spec index 3b32403a78..b8680bd10a 100644 --- a/vendor/github.com/openshift/imagebuilder/imagebuilder.spec +++ b/vendor/github.com/openshift/imagebuilder/imagebuilder.spec @@ -12,7 +12,7 @@ # %global golang_version 1.8.1 -%{!?version: %global version 1.1.5} +%{!?version: %global version 1.1.6} %{!?release: %global release 1} %global package_name imagebuilder %global product_name Container Image Builder diff --git a/vendor/github.com/openshift/imagebuilder/internals.go b/vendor/github.com/openshift/imagebuilder/internals.go index b652dc1c71..5dc174bf7f 100644 --- a/vendor/github.com/openshift/imagebuilder/internals.go +++ b/vendor/github.com/openshift/imagebuilder/internals.go @@ -103,7 +103,7 @@ func makeUserArgs(bEnv []string, bArgs map[string]string) (userArgs []string) { userArgs = bEnv envMap := make(map[string]string) for _, envVal := range bEnv { - val := strings.Split(envVal, "=") + val := strings.SplitN(envVal, "=", 2) if len(val) > 1 { envMap[val[0]] = val[1] } diff --git a/vendor/modules.txt b/vendor/modules.txt index 697ce70cbe..5183ef19b3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -200,6 +200,7 @@ github.com/containers/storage/pkg/unshare github.com/coreos/go-iptables/iptables # github.com/coreos/go-systemd/v22 v22.1.0 github.com/coreos/go-systemd/v22/activation +github.com/coreos/go-systemd/v22/daemon github.com/coreos/go-systemd/v22/dbus github.com/coreos/go-systemd/v22/internal/dlopen github.com/coreos/go-systemd/v22/journal @@ -362,7 +363,7 @@ github.com/nxadm/tail/ratelimiter github.com/nxadm/tail/util github.com/nxadm/tail/watch github.com/nxadm/tail/winfile -# github.com/onsi/ginkgo v1.13.0 +# github.com/onsi/ginkgo v1.14.0 github.com/onsi/ginkgo github.com/onsi/ginkgo/config github.com/onsi/ginkgo/extensions/table @@ -431,7 +432,7 @@ github.com/opencontainers/runtime-tools/validate github.com/opencontainers/selinux/go-selinux github.com/opencontainers/selinux/go-selinux/label github.com/opencontainers/selinux/pkg/pwalk -# github.com/openshift/imagebuilder v1.1.5 +# github.com/openshift/imagebuilder v1.1.6 github.com/openshift/imagebuilder github.com/openshift/imagebuilder/dockerfile/command github.com/openshift/imagebuilder/dockerfile/parser @@ -689,7 +690,7 @@ gopkg.in/tomb.v1 gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c gopkg.in/yaml.v3 -# k8s.io/api v0.18.4 +# k8s.io/api v0.18.5 k8s.io/api/apps/v1 k8s.io/api/core/v1 # k8s.io/apimachinery v0.18.5