diff --git a/1017-libnetwork-fix-non-constant-format-string-in-call-go.patch b/1017-libnetwork-fix-non-constant-format-string-in-call-go.patch new file mode 100644 index 0000000000000000000000000000000000000000..46967b0c36b40007de35d2e02853bfe42431f5ae --- /dev/null +++ b/1017-libnetwork-fix-non-constant-format-string-in-call-go.patch @@ -0,0 +1,62 @@ +From 81053917083b7776ec39172823f7a4f954363ec1 Mon Sep 17 00:00:00 2001 +From: Sebastiaan van Stijn +Date: Wed, 21 Aug 2024 15:38:52 +0200 +Subject: [PATCH 107/172] libnetwork: fix non-constant format string in call + (govet) + + libnetwork/controller.go:1054:32: printf: non-constant format string in call to github.com/docker/docker/libnetwork/types.NotFoundErrorf (govet) + return types.NotFoundErrorf(err.Error()) + ^ + libnetwork/controller.go:1073:32: printf: non-constant format string in call to github.com/docker/docker/libnetwork/types.NotFoundErrorf (govet) + return types.NotFoundErrorf(err.Error()) + ^ + libnetwork/sandbox_externalkey_unix.go:113:21: printf: non-constant format string in call to fmt.Errorf (govet) + return fmt.Errorf(string(buf[0:n])) + ^ + +Signed-off-by: Sebastiaan van Stijn +(cherry picked from commit 6008c42ca2903467964c430c0030a29ae4cc858e) +Signed-off-by: Austin Vazquez +--- + libnetwork/controller.go | 4 ++-- + libnetwork/sandbox_externalkey_unix.go | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libnetwork/controller.go b/libnetwork/controller.go +index bcbbdd06ca..8341946756 100644 +--- a/libnetwork/controller.go ++++ b/libnetwork/controller.go +@@ -1045,7 +1045,7 @@ func (c *Controller) loadDriver(networkType string) error { + + if err != nil { + if errors.Cause(err) == plugins.ErrNotFound { +- return types.NotFoundErrorf(err.Error()) ++ return types.NotFoundErrorf("%v", err) + } + return err + } +@@ -1064,7 +1064,7 @@ func (c *Controller) loadIPAMDriver(name string) error { + + if err != nil { + if errors.Cause(err) == plugins.ErrNotFound { +- return types.NotFoundErrorf(err.Error()) ++ return types.NotFoundErrorf("%v", err) + } + return err + } +diff --git a/libnetwork/sandbox_externalkey_unix.go b/libnetwork/sandbox_externalkey_unix.go +index 7534421141..32b1027bb4 100644 +--- a/libnetwork/sandbox_externalkey_unix.go ++++ b/libnetwork/sandbox_externalkey_unix.go +@@ -94,7 +94,7 @@ func processReturn(r io.Reader) error { + return fmt.Errorf("failed to read buf in processReturn : %v", err) + } + if string(buf[0:n]) != success { +- return fmt.Errorf(string(buf[0:n])) ++ return fmt.Errorf("%s", buf[0:n]) + } + return nil + } +-- +2.27.0 + diff --git a/moby.spec b/moby.spec index 40e94ec130c0932188187434f369b7a51f0bc12b..ca9389faa25247dc6dd3c510eacb0906bfd7f066 100644 --- a/moby.spec +++ b/moby.spec @@ -7,7 +7,7 @@ Name: moby Version: 25.0.3 -Release: 28 +Release: 29 Summary: The open-source application container engine License: Apache-2.0 URL: https://www.docker.com @@ -40,6 +40,7 @@ Patch1013: 1013-Don-t-enforce-new-validation-rules-for-existing-netw.patch Patch1014: 1014-daemon-overlay2-remove-world-writable-permission-fro.patch Patch1015: 1015-rootless-fix-open-etc-docker-plugins-permission-deni.patch Patch1016: 1016-Fix-cases-where-we-are-wrapping-a-nil-error.patch +Patch1017: 1017-libnetwork-fix-non-constant-format-string-in-call-go.patch # Patch 2001-2999 for tini Patch2001: 2001-tini.c-a-function-declaration-without-a-prototype-is.patch Requires(meta): %{name}-engine = %{version}-%{release} @@ -231,6 +232,9 @@ fi %systemd_postun_with_restart docker.service %changelog +* Sun Apr 20 2025 shechenglong - 25.0.3-29 +- libnetwork: fix non-constant format string in call (govet) + * Sat Apr 19 2025 shechenglong - 25.0.3-28 - rootless: Fix cases where we are wrapping a nil error