From 994d13716f12412699b957e820fe7d2a9ada9a0a Mon Sep 17 00:00:00 2001 From: heitbaum <6086324+heitbaum@users.noreply.github.com> Date: Sun, 8 Nov 2020 11:35:08 +0000 Subject: [PATCH] docker: updated to 19.03.13 --- packages/addons/service/docker/changelog.txt | 3 + packages/addons/service/docker/package.mk | 10 +-- ...er-100.01-use-addon-storage-location.patch | 76 +++++++++---------- .../docker-100.02-fix-containerd-pr3246.patch | 13 ++++ ...s-in-call-to-filesync.CopyFileWriter.patch | 12 --- .../docker-100.03-remove-marshaljson.patch | 33 ++++++++ 6 files changed, 92 insertions(+), 55 deletions(-) create mode 100644 packages/addons/service/docker/patches/docker-100.02-fix-containerd-pr3246.patch delete mode 100644 packages/addons/service/docker/patches/docker-100.02-fix-too-many-arguments-in-call-to-filesync.CopyFileWriter.patch create mode 100644 packages/addons/service/docker/patches/docker-100.03-remove-marshaljson.patch diff --git a/packages/addons/service/docker/changelog.txt b/packages/addons/service/docker/changelog.txt index 40c0f7621a..a230008d86 100644 --- a/packages/addons/service/docker/changelog.txt +++ b/packages/addons/service/docker/changelog.txt @@ -1,3 +1,6 @@ +130 +- Update to docker 19.03.13 + 129 - Fix "docker run --init" diff --git a/packages/addons/service/docker/package.mk b/packages/addons/service/docker/package.mk index e8411a4a57..6993d0a642 100644 --- a/packages/addons/service/docker/package.mk +++ b/packages/addons/service/docker/package.mk @@ -3,9 +3,9 @@ # Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv) PKG_NAME="docker" -PKG_VERSION="19.03.2" -PKG_SHA256="46b52f92cb258e038e3f29624e75a52e4d2f91502f56edeac0f0b2661b3b9c3d" -PKG_REV="129" +PKG_VERSION="19.03.13" +PKG_SHA256="b2ff08675738031b6d6d59a90226657c16726851957c11b5fb85a4598b933b92" +PKG_REV="130" PKG_ARCH="any" PKG_LICENSE="ASL" PKG_SITE="http://www.docker.com/" @@ -17,7 +17,7 @@ PKG_LONGDESC="Docker containers can encapsulate any payload, and will run consis PKG_TOOLCHAIN="manual" # Git commit of the matching release https://github.com/docker/docker-ce/releases -export PKG_GIT_COMMIT="6a30dfca03664a0b6bf0646a7d389ee7d0318e6e" +export PKG_GIT_COMMIT="4484c46d9d1a2d10b8fc662923ad586daeedb04f" PKG_IS_ADDON="yes" PKG_ADDON_NAME="Docker" @@ -60,7 +60,7 @@ configure_target() { cp -rf ${PKG_GOPATH_ENGINE}/src/github.com/moby/buildkit/util/progress/* ${PKG_GOPATH_CLI}/src/github.com/moby/buildkit/util/progress cp -rf ${PKG_GOPATH_ENGINE}/src/github.com/docker/swarmkit/manager/* ${PKG_GOPATH_CLI}/src/github.com/docker/swarmkit/manager cp -rf ${PKG_GOPATH_ENGINE}/src/github.com/coreos/etcd/raft/* ${PKG_GOPATH_CLI}/src/github.com/coreos/etcd/raft - cp -rf ${PKG_GOPATH_ENGINE}/src/golang.org/x/* ${PKG_GOPATH_CLI}/src/golang.org/x + cp -rf ${PKG_GOPATH_ENGINE}/src/golang.org/x/crypto/* ${PKG_GOPATH_CLI}/src/golang.org/x/crypto cp -rf ${PKG_GOPATH_ENGINE}/src/github.com/opencontainers/runtime-spec/specs-go/* ${PKG_GOPATH_CLI}/src/github.com/opencontainers/runtime-spec/specs-go rm -rf ${PKG_GOPATH_CLI}/src/github.com/containerd/containerd diff --git a/packages/addons/service/docker/patches/docker-100.01-use-addon-storage-location.patch b/packages/addons/service/docker/patches/docker-100.01-use-addon-storage-location.patch index 059fc8606b..65eee528bf 100644 --- a/packages/addons/service/docker/patches/docker-100.01-use-addon-storage-location.patch +++ b/packages/addons/service/docker/patches/docker-100.01-use-addon-storage-location.patch @@ -1,15 +1,15 @@ -From de25daa9281709a90e4dc23b4c27cbcdcef32fd3 Mon Sep 17 00:00:00 2001 +From fd6bc40f8035924754d66b9aebef0ab83bc4d322 Mon Sep 17 00:00:00 2001 From: 5schatten -Date: Sat, 29 Jun 2019 17:58:09 +0200 -Subject: [PATCH] use Kodi addon storage location +Date: Tue, 8 Oct 2019 23:26:57 +0200 +Subject: [PATCH] Use Kodi addon storage path --- .../github.com/docker/docker/registry/config_unix.go | 2 +- .../github.com/docker/docker/registry/endpoint_v1.go | 2 +- - components/engine/cmd/dockerd/daemon_unix.go | 4 ++-- + components/engine/cmd/dockerd/daemon_unix.go | 2 +- components/engine/daemon/config/config_test.go | 2 +- .../engine/integration-cli/docker_cli_daemon_test.go | 12 ++++++------ - .../docker_cli_external_volume_driver_unix_test.go | 8 ++++---- + .../docker_cli_external_volume_driver_test.go | 8 ++++---- .../integration-cli/docker_cli_network_unix_test.go | 8 ++++---- .../engine/integration-cli/docker_cli_swarm_test.go | 8 ++++---- .../integration/plugin/authz/authz_plugin_test.go | 6 +++--- @@ -18,7 +18,7 @@ Subject: [PATCH] use Kodi addon storage location components/engine/pkg/plugins/plugins.go | 2 +- components/engine/registry/config_unix.go | 2 +- components/engine/registry/endpoint_v1.go | 2 +- - 14 files changed, 33 insertions(+), 33 deletions(-) + 14 files changed, 32 insertions(+), 32 deletions(-) diff --git a/components/cli/vendor/github.com/docker/docker/registry/config_unix.go b/components/cli/vendor/github.com/docker/docker/registry/config_unix.go index 20fb47bcae..a023df7895 100644 @@ -34,7 +34,7 @@ index 20fb47bcae..a023df7895 100644 // cleanPath is used to ensure that a directory name is valid on the target diff --git a/components/cli/vendor/github.com/docker/docker/registry/endpoint_v1.go b/components/cli/vendor/github.com/docker/docker/registry/endpoint_v1.go -index 832fdb95a4..606ddfaf96 100644 +index 2fc2ea0e74..5673cf1506 100644 --- a/components/cli/vendor/github.com/docker/docker/registry/endpoint_v1.go +++ b/components/cli/vendor/github.com/docker/docker/registry/endpoint_v1.go @@ -49,7 +49,7 @@ func validateEndpoint(endpoint *V1Endpoint) error { @@ -47,10 +47,10 @@ index 832fdb95a4..606ddfaf96 100644 // If registry is insecure and HTTPS failed, fallback to HTTP. diff --git a/components/engine/cmd/dockerd/daemon_unix.go b/components/engine/cmd/dockerd/daemon_unix.go -index a6685bb..f39da58 100644 +index 2500260028..4e9f7ce46a 100644 --- a/components/engine/cmd/dockerd/daemon_unix.go +++ b/components/engine/cmd/dockerd/daemon_unix.go -@@ -26,7 +26,7 @@ import ( +@@ -25,7 +25,7 @@ import ( func getDefaultDaemonConfigDir() (string, error) { if !honorXDG { @@ -58,12 +58,12 @@ index a6685bb..f39da58 100644 + return "/storage/.kodi/userdata/addon_data/service.system.docker/config", nil } // NOTE: CLI uses ~/.docker while the daemon uses ~/.config/docker, because - + // ~/.docker was not designed to store daemon configurations. diff --git a/components/engine/daemon/config/config_test.go b/components/engine/daemon/config/config_test.go -index 6998ed3312..c255b62146 100644 +index b27548b200..7e546bac77 100644 --- a/components/engine/daemon/config/config_test.go +++ b/components/engine/daemon/config/config_test.go -@@ -463,7 +463,7 @@ func TestReloadSetConfigFileNotExist(t *testing.T) { +@@ -517,7 +517,7 @@ func TestReloadSetConfigFileNotExist(t *testing.T) { func TestReloadDefaultConfigNotExist(t *testing.T) { skip.If(t, os.Getuid() != 0, "skipping test that requires root") reloaded := false @@ -73,12 +73,12 @@ index 6998ed3312..c255b62146 100644 flags.String("config-file", configFile, "") err := Reload(configFile, flags, func(c *Config) { diff --git a/components/engine/integration-cli/docker_cli_daemon_test.go b/components/engine/integration-cli/docker_cli_daemon_test.go -index d3cd5f1676..b5e504489d 100644 +index 6a874eb981..5b4846cf86 100644 --- a/components/engine/integration-cli/docker_cli_daemon_test.go +++ b/components/engine/integration-cli/docker_cli_daemon_test.go -@@ -546,11 +546,11 @@ func (s *DockerDaemonSuite) TestDaemonAllocatesListeningPort(c *check.C) { +@@ -553,11 +553,11 @@ func (s *DockerDaemonSuite) TestDaemonAllocatesListeningPort(c *testing.T) { - func (s *DockerDaemonSuite) TestDaemonKeyGeneration(c *check.C) { + func (s *DockerDaemonSuite) TestDaemonKeyGeneration(c *testing.T) { // TODO: skip or update for Windows daemon - os.Remove("/etc/docker/key.json") + os.Remove("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json") @@ -90,7 +90,7 @@ index d3cd5f1676..b5e504489d 100644 if err != nil { c.Fatalf("Error opening key file") } -@@ -1198,12 +1198,12 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *check.C) { +@@ -1188,12 +1188,12 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *testing.T) { Y string `json:"y"` } @@ -105,7 +105,7 @@ index d3cd5f1676..b5e504489d 100644 if err != nil { c.Fatalf("Error reading key.json file: %s", err) } -@@ -1223,11 +1223,11 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *check.C) { +@@ -1213,11 +1213,11 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *testing.T) { } // write back @@ -119,11 +119,11 @@ index d3cd5f1676..b5e504489d 100644 if err := s.d.StartWithError(); err == nil { c.Fatalf("It should not be successful to start daemon with wrong key: %v", err) -diff --git a/components/engine/integration-cli/docker_cli_external_volume_driver_unix_test.go b/components/engine/integration-cli/docker_cli_external_volume_driver_unix_test.go -index da8bb7e011..605a162e79 100644 ---- a/components/engine/integration-cli/docker_cli_external_volume_driver_unix_test.go -+++ b/components/engine/integration-cli/docker_cli_external_volume_driver_unix_test.go -@@ -267,10 +267,10 @@ func newVolumePlugin(c *check.C, name string) *volumePlugin { +diff --git a/components/engine/integration-cli/docker_cli_external_volume_driver_test.go b/components/engine/integration-cli/docker_cli_external_volume_driver_test.go +index 94144f85c9..20afd4b37d 100644 +--- a/components/engine/integration-cli/docker_cli_external_volume_driver_test.go ++++ b/components/engine/integration-cli/docker_cli_external_volume_driver_test.go +@@ -258,10 +258,10 @@ func newVolumePlugin(c *testing.T, name string) *volumePlugin { send(w, `{"Capabilities": { "Scope": "global" }}`) }) @@ -136,8 +136,8 @@ index da8bb7e011..605a162e79 100644 assert.NilError(c, err) return s } -@@ -278,7 +278,7 @@ func newVolumePlugin(c *check.C, name string) *volumePlugin { - func (s *DockerExternalVolumeSuite) TearDownSuite(c *check.C) { +@@ -269,7 +269,7 @@ func newVolumePlugin(c *testing.T, name string) *volumePlugin { + func (s *DockerExternalVolumeSuite) TearDownSuite(c *testing.T) { s.volumePlugin.Close() - err := os.RemoveAll("/etc/docker/plugins") @@ -145,20 +145,20 @@ index da8bb7e011..605a162e79 100644 assert.NilError(c, err) } -@@ -371,7 +371,7 @@ func hostVolumePath(name string) string { +@@ -359,7 +359,7 @@ func hostVolumePath(name string) string { // Make sure a request to use a down driver doesn't block other requests - func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverLookupNotBlocked(c *check.C) { + func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverLookupNotBlocked(c *testing.T) { - specPath := "/etc/docker/plugins/down-driver.spec" + specPath := "/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/down-driver.spec" err := ioutil.WriteFile(specPath, []byte("tcp://127.0.0.7:9999"), 0644) - c.Assert(err, check.IsNil) + assert.NilError(c, err) defer os.RemoveAll(specPath) diff --git a/components/engine/integration-cli/docker_cli_network_unix_test.go b/components/engine/integration-cli/docker_cli_network_unix_test.go -index d3d6256a75..a0f0ae973d 100644 +index 28cc9e9622..e7f21ddb5a 100644 --- a/components/engine/integration-cli/docker_cli_network_unix_test.go +++ b/components/engine/integration-cli/docker_cli_network_unix_test.go -@@ -208,14 +208,14 @@ func setupRemoteNetworkDrivers(c *check.C, mux *http.ServeMux, url, netDrv, ipam +@@ -196,14 +196,14 @@ func setupRemoteNetworkDrivers(c *testing.T, mux *http.ServeMux, url, netDrv, ip } }) @@ -176,7 +176,7 @@ index d3d6256a75..a0f0ae973d 100644 err = ioutil.WriteFile(ipamFileName, []byte(url), 0644) assert.NilError(c, err) } -@@ -227,7 +227,7 @@ func (s *DockerNetworkSuite) TearDownSuite(c *check.C) { +@@ -215,7 +215,7 @@ func (s *DockerNetworkSuite) TearDownSuite(c *testing.T) { s.server.Close() @@ -186,10 +186,10 @@ index d3d6256a75..a0f0ae973d 100644 } diff --git a/components/engine/integration-cli/docker_cli_swarm_test.go b/components/engine/integration-cli/docker_cli_swarm_test.go -index f6fadcf995..5d0b5256c1 100644 +index 2493287140..feb73bd38a 100644 --- a/components/engine/integration-cli/docker_cli_swarm_test.go +++ b/components/engine/integration-cli/docker_cli_swarm_test.go -@@ -783,14 +783,14 @@ func setupRemoteGlobalNetworkPlugin(c *check.C, mux *http.ServeMux, url, netDrv, +@@ -776,14 +776,14 @@ func setupRemoteGlobalNetworkPlugin(c *testing.T, mux *http.ServeMux, url, netDr } }) @@ -207,7 +207,7 @@ index f6fadcf995..5d0b5256c1 100644 err = ioutil.WriteFile(ipamFileName, []byte(url), 0644) assert.NilError(c, err) } -@@ -802,7 +802,7 @@ func (s *DockerSwarmSuite) TestSwarmNetworkPlugin(c *check.C) { +@@ -795,7 +795,7 @@ func (s *DockerSwarmSuite) TestSwarmNetworkPlugin(c *testing.T) { setupRemoteGlobalNetworkPlugin(c, mux, s.server.URL, globalNetworkPlugin, globalIPAMPlugin) defer func() { s.server.Close() @@ -217,10 +217,10 @@ index f6fadcf995..5d0b5256c1 100644 }() diff --git a/components/engine/integration/plugin/authz/authz_plugin_test.go b/components/engine/integration/plugin/authz/authz_plugin_test.go -index 105affc1af..fa631a377a 100644 +index 211bf9f6cc..6cd1cef909 100644 --- a/components/engine/integration/plugin/authz/authz_plugin_test.go +++ b/components/engine/integration/plugin/authz/authz_plugin_test.go -@@ -55,15 +55,15 @@ func setupTestV1(t *testing.T) func() { +@@ -56,15 +56,15 @@ func setupTestV1(t *testing.T) func() { ctrl = &authorizationController{} teardown := setupTest(t) @@ -240,7 +240,7 @@ index 105affc1af..fa631a377a 100644 teardown() diff --git a/components/engine/integration/plugin/graphdriver/external_test.go b/components/engine/integration/plugin/graphdriver/external_test.go -index 99ce60ceef..53242b1ee0 100644 +index 0013ec7bc7..45a6e20bf3 100644 --- a/components/engine/integration/plugin/graphdriver/external_test.go +++ b/components/engine/integration/plugin/graphdriver/external_test.go @@ -79,7 +79,7 @@ func TestExternalGraphDriver(t *testing.T) { @@ -276,7 +276,7 @@ index 58058f2828..a7b449ca25 100644 -var specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"} +var specsPaths = []string{"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", "/usr/lib/docker/plugins"} diff --git a/components/engine/pkg/plugins/plugins.go b/components/engine/pkg/plugins/plugins.go -index 6962079df9..77b69265b1 100644 +index 2371e92101..4c7a16a9a5 100644 --- a/components/engine/pkg/plugins/plugins.go +++ b/components/engine/pkg/plugins/plugins.go @@ -4,7 +4,7 @@ @@ -302,7 +302,7 @@ index 20fb47bcae..a023df7895 100644 // cleanPath is used to ensure that a directory name is valid on the target diff --git a/components/engine/registry/endpoint_v1.go b/components/engine/registry/endpoint_v1.go -index 832fdb95a4..606ddfaf96 100644 +index 2fc2ea0e74..5673cf1506 100644 --- a/components/engine/registry/endpoint_v1.go +++ b/components/engine/registry/endpoint_v1.go @@ -49,7 +49,7 @@ func validateEndpoint(endpoint *V1Endpoint) error { diff --git a/packages/addons/service/docker/patches/docker-100.02-fix-containerd-pr3246.patch b/packages/addons/service/docker/patches/docker-100.02-fix-containerd-pr3246.patch new file mode 100644 index 0000000000..caa0353733 --- /dev/null +++ b/packages/addons/service/docker/patches/docker-100.02-fix-containerd-pr3246.patch @@ -0,0 +1,13 @@ +--- a/components/engine/vendor/github.com/containerd/containerd/runtime/v1/shim/client/client.go ++++ b/components/engine/vendor/github.com/containerd/containerd/runtime/v1/shim/client/client.go +@@ -219,7 +219,8 @@ + if err != nil { + return nil, nil, err + } +- client := ttrpc.NewClient(conn, ttrpc.WithOnClose(onClose)) ++ client := ttrpc.NewClient(conn) ++ client.OnClose(onClose) + return shimapi.NewShimClient(client), conn, nil + } + } + diff --git a/packages/addons/service/docker/patches/docker-100.02-fix-too-many-arguments-in-call-to-filesync.CopyFileWriter.patch b/packages/addons/service/docker/patches/docker-100.02-fix-too-many-arguments-in-call-to-filesync.CopyFileWriter.patch deleted file mode 100644 index 0ae2380d66..0000000000 --- a/packages/addons/service/docker/patches/docker-100.02-fix-too-many-arguments-in-call-to-filesync.CopyFileWriter.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/components/engine/vendor/github.com/moby/buildkit/exporter/tar/export.go -+++ b/components/engine/vendor/github.com/moby/buildkit/exporter/tar/export.go -@@ -147,7 +147,7 @@ - fs = d.FS - } - -- w, err := filesync.CopyFileWriter(ctx, nil, e.caller) -+ w, err := filesync.CopyFileWriter(ctx, e.caller) - if err != nil { - return nil, err - } - diff --git a/packages/addons/service/docker/patches/docker-100.03-remove-marshaljson.patch b/packages/addons/service/docker/patches/docker-100.03-remove-marshaljson.patch new file mode 100644 index 0000000000..6dc546e0ec --- /dev/null +++ b/packages/addons/service/docker/patches/docker-100.03-remove-marshaljson.patch @@ -0,0 +1,33 @@ +--- a/components/engine/daemon/config/builder.go ++++ b/components/engine/daemon/config/builder.go +@@ -2,8 +2,6 @@ + + import ( + "encoding/json" +- "fmt" +- "sort" + "strings" + + "github.com/docker/docker/api/types/filters" +@@ -19,21 +17,6 @@ + // BuilderGCFilter contains garbage-collection filter rules for a BuildKit builder + type BuilderGCFilter filters.Args + +-// MarshalJSON returns a JSON byte representation of the BuilderGCFilter +-func (x *BuilderGCFilter) MarshalJSON() ([]byte, error) { +- f := filters.Args(*x) +- keys := f.Keys() +- sort.Strings(keys) +- arr := make([]string, 0, len(keys)) +- for _, k := range keys { +- values := f.Get(k) +- for _, v := range values { +- arr = append(arr, fmt.Sprintf("%s=%s", k, v)) +- } +- } +- return json.Marshal(arr) +-} +- + // UnmarshalJSON fills the BuilderGCFilter values structure from JSON input + func (x *BuilderGCFilter) UnmarshalJSON(data []byte) error { + var arr []string