From cfda9781d387c1399b6d25689441dc616c7ca15f Mon Sep 17 00:00:00 2001 From: Matt Heon Date: Fri, 2 Feb 2024 10:41:06 -0500 Subject: [PATCH] Fix lint issues We're using a now-deprecated runc package, but I don't want to update to the replacement on a stable branch. Signed-off-by: Matt Heon --- libpod/container_internal_common.go | 4 +++- libpod/oci_conmon_exec_freebsd.go | 1 + libpod/oci_conmon_exec_linux.go | 1 + pkg/lookup/lookup.go | 1 + pkg/rootless/rootless.go | 1 + pkg/rootless/rootless_test.go | 1 + 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libpod/container_internal_common.go b/libpod/container_internal_common.go index 9a1cc496fb..666aa2f21d 100644 --- a/libpod/container_internal_common.go +++ b/libpod/container_internal_common.go @@ -50,13 +50,15 @@ import ( "github.com/containers/storage/pkg/lockfile" stypes "github.com/containers/storage/types" securejoin "github.com/cyphar/filepath-securejoin" - runcuser "github.com/opencontainers/runc/libcontainer/user" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" "github.com/opencontainers/selinux/go-selinux" "github.com/opencontainers/selinux/go-selinux/label" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" + + //nolint:staticcheck + runcuser "github.com/opencontainers/runc/libcontainer/user" ) func parseOptionIDs(ctrMappings []idtools.IDMap, option string) ([]idtools.IDMap, error) { diff --git a/libpod/oci_conmon_exec_freebsd.go b/libpod/oci_conmon_exec_freebsd.go index bf30404a19..0c38275d1e 100644 --- a/libpod/oci_conmon_exec_freebsd.go +++ b/libpod/oci_conmon_exec_freebsd.go @@ -1,6 +1,7 @@ package libpod import ( + //nolint:staticcheck "github.com/opencontainers/runc/libcontainer/user" spec "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/libpod/oci_conmon_exec_linux.go b/libpod/oci_conmon_exec_linux.go index 617e8d6015..6a81372b14 100644 --- a/libpod/oci_conmon_exec_linux.go +++ b/libpod/oci_conmon_exec_linux.go @@ -2,6 +2,7 @@ package libpod import ( "github.com/containers/common/pkg/capabilities" + //nolint:staticcheck "github.com/opencontainers/runc/libcontainer/user" spec "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/pkg/lookup/lookup.go b/pkg/lookup/lookup.go index dae937c7da..0be78f28e9 100644 --- a/pkg/lookup/lookup.go +++ b/pkg/lookup/lookup.go @@ -5,6 +5,7 @@ import ( "strconv" securejoin "github.com/cyphar/filepath-securejoin" + //nolint:staticcheck "github.com/opencontainers/runc/libcontainer/user" "github.com/sirupsen/logrus" ) diff --git a/pkg/rootless/rootless.go b/pkg/rootless/rootless.go index 6b9b30f35a..5358ddb9b1 100644 --- a/pkg/rootless/rootless.go +++ b/pkg/rootless/rootless.go @@ -8,6 +8,7 @@ import ( "sync" "github.com/containers/storage/pkg/lockfile" + //nolint:staticcheck "github.com/opencontainers/runc/libcontainer/user" spec "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/pkg/rootless/rootless_test.go b/pkg/rootless/rootless_test.go index fe9b23cdfa..e926cd778f 100644 --- a/pkg/rootless/rootless_test.go +++ b/pkg/rootless/rootless_test.go @@ -4,6 +4,7 @@ import ( "reflect" "testing" + //nolint:staticcheck "github.com/opencontainers/runc/libcontainer/user" spec "github.com/opencontainers/runtime-spec/specs-go" )