diff --git a/packages/addons/addon-depends/containerd/package.mk b/packages/addons/addon-depends/containerd/package.mk
index db28a6ec07..487cbe314a 100644
--- a/packages/addons/addon-depends/containerd/package.mk
+++ b/packages/addons/addon-depends/containerd/package.mk
@@ -17,8 +17,8 @@
################################################################################
PKG_NAME="containerd"
-PKG_VERSION="aa8187d"
-PKG_SHA256="717dc364050f9ad72dcacf02f6fdb062c93ca5fe04f8636ac70ba715e52d3340"
+PKG_VERSION="06b9cb3"
+PKG_SHA256="4d2b6e30bcc6c4bb901d6b9f19b5ac1d4a2d9b17075a9b1f110102920d01f64a"
PKG_ARCH="any"
PKG_LICENSE="APL"
PKG_SITE="https://containerd.tools/"
@@ -57,11 +57,16 @@ pre_make_target() {
export CGO_CFLAGS=$CFLAGS
export LDFLAGS="-w -extldflags -static -X github.com/docker/containerd.GitCommit=${PKG_VERSION} -extld $CC"
export GOLANG=$TOOLCHAIN/lib/golang/bin/go
- export GOPATH=$PKG_BUILD.gopath:$PKG_BUILD/vendor/
+ export GOPATH=$PKG_BUILD/.gopath
export GOROOT=$TOOLCHAIN/lib/golang
export PATH=$PATH:$GOROOT/bin
- ln -fs $PKG_BUILD $PKG_BUILD/vendor/src/github.com/docker/containerd
+ mkdir -p $PKG_BUILD/.gopath
+ if [ -d $PKG_BUILD/vendor ]; then
+ mv $PKG_BUILD/vendor $PKG_BUILD/.gopath/src
+ fi
+
+ ln -fs $PKG_BUILD $PKG_BUILD/.gopath/src/github.com/containerd/containerd
}
make_target() {
diff --git a/packages/addons/addon-depends/go/package.mk b/packages/addons/addon-depends/go/package.mk
index 065ec933a6..66efa7cb74 100644
--- a/packages/addons/addon-depends/go/package.mk
+++ b/packages/addons/addon-depends/go/package.mk
@@ -17,8 +17,8 @@
################################################################################
PKG_NAME="go"
-PKG_VERSION="1.7.5"
-PKG_SHA256="7af80c99d9e8a52e53d6a617a20332a8602b1a4eca9cbf3d829e1d43e688f6ba"
+PKG_VERSION="1.9.2"
+PKG_SHA256="5fb19c45d5230a7c2380232c9fb5b7e8d6f45015003f63b1485f78c20f96bce4"
PKG_ARCH="any"
PKG_LICENSE="BSD"
PKG_SITE="https://golang.org"
diff --git a/packages/addons/addon-depends/go/patches/go-0001-add-ca-cert-location.patch b/packages/addons/addon-depends/go/patches/go-0001-add-ca-cert-location.patch
index 39ca1a380f..c64b430f03 100644
--- a/packages/addons/addon-depends/go/patches/go-0001-add-ca-cert-location.patch
+++ b/packages/addons/addon-depends/go/patches/go-0001-add-ca-cert-location.patch
@@ -1,11 +1,11 @@
-diff -Naur a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go
---- a/src/crypto/x509/root_unix.go 2016-04-19 16:27:35.000000000 -0700
-+++ b/src/crypto/x509/root_unix.go 2016-04-22 01:21:02.884977461 -0700
-@@ -13,6 +13,7 @@
- var certDirectories = []string{
- "/etc/ssl/certs", // SLES10/SLES11, https://golang.org/issue/12139
- "/system/etc/security/cacerts", // Android
+diff -Naur go-1.9.2.orig/src/crypto/x509/root_unix.go go-1.9.2/src/crypto/x509/root_unix.go
+--- go-1.9.2.orig/src/crypto/x509/root_unix.go 2017-11-03 14:58:53.655965257 +0100
++++ go-1.9.2/src/crypto/x509/root_unix.go 2017-11-03 14:59:16.923786983 +0100
+@@ -19,6 +19,7 @@
+ "/usr/local/share/certs", // FreeBSD
+ "/etc/pki/tls/certs", // Fedora/RHEL
+ "/etc/openssl/certs", // NetBSD
+ "/etc/ssl", // LibreELEC
}
- func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate, err error) {
+ const (
diff --git a/packages/addons/addon-depends/libnetwork/package.mk b/packages/addons/addon-depends/libnetwork/package.mk
index 1fdb25fc2a..0e8d9039d9 100644
--- a/packages/addons/addon-depends/libnetwork/package.mk
+++ b/packages/addons/addon-depends/libnetwork/package.mk
@@ -17,8 +17,8 @@
################################################################################
PKG_NAME="libnetwork"
-PKG_VERSION="0f53435"
-PKG_SHA256="170d355ad613cc28245a6d9501bcaba930cb594a632fdd9bd52a4fa90b406932"
+PKG_VERSION="7b2b1fe"
+PKG_SHA256="2eee331b6ded567a36e7db708405b34032b93938682cf049025f48b96d755bf6"
PKG_ARCH="any"
PKG_LICENSE="APL"
PKG_SITE="https://github.com/docker/libnetwork"
diff --git a/packages/addons/addon-depends/moby/package.mk b/packages/addons/addon-depends/moby/package.mk
deleted file mode 100644
index 0481fde84e..0000000000
--- a/packages/addons/addon-depends/moby/package.mk
+++ /dev/null
@@ -1,87 +0,0 @@
-################################################################################
-# This file is part of LibreELEC - https://libreelec.tv
-# Copyright (C) 2009-present Lukas Rusak (lrusak@libreelec.tv)
-#
-# LibreELEC is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# LibreELEC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with LibreELEC. If not, see .
-################################################################################
-
-PKG_NAME="moby"
-PKG_VERSION="1.13.1"
-PKG_ARCH="any"
-PKG_LICENSE="ASL"
-PKG_SITE="http://www.docker.com/"
-PKG_URL="https://github.com/moby/moby/archive/v${PKG_VERSION}.tar.gz"
-PKG_DEPENDS_TARGET="toolchain sqlite go:host containerd runc libnetwork tini"
-PKG_SECTION="service/system"
-PKG_SHORTDESC="Moby is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere."
-PKG_LONGDESC="Docker containers can encapsulate any payload, and will run consistently on and between virtually any server. The same container that a developer builds and tests on a laptop will run at scale, in production*, on VMs, bare-metal servers, OpenStack clusters, public instances, or combinations of the above. Moby as the central part of the Docker engine"
-PKG_TOOLCHAIN="manual"
-
-configure_target() {
- export DOCKER_BUILDTAGS="daemon \
- autogen \
- exclude_graphdriver_devicemapper \
- exclude_graphdriver_aufs \
- exclude_graphdriver_btrfs \
- journald"
-
- case $TARGET_ARCH in
- x86_64)
- export GOARCH=amd64
- ;;
- arm)
- export GOARCH=arm
-
- case $TARGET_CPU in
- arm1176jzf-s)
- export GOARM=6
- ;;
- cortex-a7|cortex-a9)
- export GOARM=7
- ;;
- esac
- ;;
- aarch64)
- export GOARCH=arm64
- ;;
- esac
-
- export GOOS=linux
- export CGO_ENABLED=1
- export CGO_NO_EMULATION=1
- export CGO_CFLAGS=$CFLAGS
- export LDFLAGS="-w -linkmode external -extldflags -Wl,--unresolved-symbols=ignore-in-shared-libs -extld $CC"
- export GOLANG=$TOOLCHAIN/lib/golang/bin/go
- export GOPATH=$PKG_BUILD/.gopath
- export GOROOT=$TOOLCHAIN/lib/golang
- export PATH=$PATH:$GOROOT/bin
-
- mkdir -p $PKG_BUILD/.gopath
- if [ -d $PKG_BUILD/vendor ]; then
- mv $PKG_BUILD/vendor $PKG_BUILD/.gopath/src
- fi
- ln -fs $PKG_BUILD $PKG_BUILD/.gopath/src/github.com/docker/docker
-
- # used for docker version
- export GITCOMMIT=$PKG_VERSION
- export VERSION=$PKG_VERSION
- export BUILDTIME="$(date --utc)"
- bash ./hack/make/.go-autogen
-}
-
-make_target() {
- mkdir -p bin
- $GOLANG build -v -o bin/docker -a -tags "$DOCKER_BUILDTAGS" -ldflags "$LDFLAGS" ./cmd/docker
- $GOLANG build -v -o bin/dockerd -a -tags "$DOCKER_BUILDTAGS" -ldflags "$LDFLAGS" ./cmd/dockerd
-}
diff --git a/packages/addons/addon-depends/moby/patches/moby-001-use-addon-storage-location.patch b/packages/addons/addon-depends/moby/patches/moby-001-use-addon-storage-location.patch
deleted file mode 100644
index 96ae092e3f..0000000000
--- a/packages/addons/addon-depends/moby/patches/moby-001-use-addon-storage-location.patch
+++ /dev/null
@@ -1,297 +0,0 @@
-# Created with
-# find . -name "*.go" -print | xargs sed -i 's/\/etc\/docker/\/storage\/.kodi\/userdata\/addon_data\/service.system.docker\/config/g'
-
-diff -Naur a/cmd/dockerd/daemon_solaris.go b/cmd/dockerd/daemon_solaris.go
---- a/cmd/dockerd/daemon_solaris.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/cmd/dockerd/daemon_solaris.go 2017-01-01 23:25:18.558212694 -0800
-@@ -39,7 +39,7 @@
- }
-
- func getDaemonConfDir(_ string) string {
-- return "/etc/docker"
-+ return "/storage/.kodi/userdata/addon_data/service.system.docker/config"
- }
-
- // setupConfigReloadTrap configures the USR2 signal to reload the configuration.
-diff -Naur a/cmd/dockerd/daemon_unix.go b/cmd/dockerd/daemon_unix.go
---- a/cmd/dockerd/daemon_unix.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/cmd/dockerd/daemon_unix.go 2017-01-01 23:25:18.560212712 -0800
-@@ -18,7 +18,7 @@
- "github.com/docker/libnetwork/portallocator"
- )
-
--const defaultDaemonConfigFile = "/etc/docker/daemon.json"
-+const defaultDaemonConfigFile = "/storage/.kodi/userdata/addon_data/service.system.docker/config/daemon.json"
-
- // currentUserIsOwner checks whether the current user is the owner of the given
- // file.
-@@ -44,7 +44,7 @@
- }
-
- func getDaemonConfDir(_ string) string {
-- return "/etc/docker"
-+ return "/storage/.kodi/userdata/addon_data/service.system.docker/config"
- }
-
- // setupConfigReloadTrap configures the USR2 signal to reload the configuration.
-diff -Naur a/integration-cli/docker_cli_authz_unix_test.go b/integration-cli/docker_cli_authz_unix_test.go
---- a/integration-cli/docker_cli_authz_unix_test.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/integration-cli/docker_cli_authz_unix_test.go 2017-01-01 23:25:17.908206740 -0800
-@@ -142,10 +142,10 @@
- w.Write(b)
- })
-
-- err := os.MkdirAll("/etc/docker/plugins", 0755)
-+ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
- c.Assert(err, checker.IsNil)
-
-- fileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", testAuthZPlugin)
-+ fileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", testAuthZPlugin)
- err = ioutil.WriteFile(fileName, []byte(s.server.URL), 0644)
- c.Assert(err, checker.IsNil)
- }
-@@ -194,7 +194,7 @@
-
- s.server.Close()
-
-- err := os.RemoveAll("/etc/docker/plugins")
-+ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
- c.Assert(err, checker.IsNil)
- }
-
-diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go
---- a/integration-cli/docker_cli_daemon_test.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/integration-cli/docker_cli_daemon_test.go 2017-01-01 23:25:17.939207024 -0800
-@@ -541,13 +541,13 @@
-
- func (s *DockerDaemonSuite) TestDaemonKeyGeneration(c *check.C) {
- // 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")
- if err := s.d.Start(); err != nil {
- c.Fatalf("Could not start daemon: %v", err)
- }
- s.d.Stop()
-
-- k, err := libtrust.LoadKeyFile("/etc/docker/key.json")
-+ k, err := libtrust.LoadKeyFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json")
- if err != nil {
- c.Fatalf("Error opening key file")
- }
-@@ -560,7 +560,7 @@
-
- func (s *DockerDaemonSuite) TestDaemonKeyMigration(c *check.C) {
- // 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")
- k1, err := libtrust.GenerateECP256PrivateKey()
- if err != nil {
- c.Fatalf("Error generating private key: %s", err)
-@@ -577,7 +577,7 @@
- }
- s.d.Stop()
-
-- k2, err := libtrust.LoadKeyFile("/etc/docker/key.json")
-+ k2, err := libtrust.LoadKeyFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json")
- if err != nil {
- c.Fatalf("Error opening key file")
- }
-@@ -1300,7 +1300,7 @@
- Y string `json:"y"`
- }
-
-- os.Remove("/etc/docker/key.json")
-+ os.Remove("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json")
- if err := s.d.Start(); err != nil {
- c.Fatalf("Failed to start daemon: %v", err)
- }
-@@ -1310,7 +1310,7 @@
- }
-
- config := &Config{}
-- bytes, err := ioutil.ReadFile("/etc/docker/key.json")
-+ bytes, err := ioutil.ReadFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json")
- if err != nil {
- c.Fatalf("Error reading key.json file: %s", err)
- }
-@@ -1330,11 +1330,11 @@
- }
-
- // write back
-- if err := ioutil.WriteFile("/etc/docker/key.json", newBytes, 0400); err != nil {
-+ if err := ioutil.WriteFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json", newBytes, 0400); err != nil {
- c.Fatalf("Error ioutil.WriteFile: %s", err)
- }
-
-- defer os.Remove("/etc/docker/key.json")
-+ defer os.Remove("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json")
-
- if err := s.d.Start(); err == nil {
- c.Fatalf("It should not be successful to start daemon with wrong key: %v", err)
-diff -Naur a/integration-cli/docker_cli_external_graphdriver_unix_test.go b/integration-cli/docker_cli_external_graphdriver_unix_test.go
---- a/integration-cli/docker_cli_external_graphdriver_unix_test.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/integration-cli/docker_cli_external_graphdriver_unix_test.go 2017-01-01 23:25:17.932206960 -0800
-@@ -320,10 +320,10 @@
- respond(w, &graphDriverResponse{Size: size})
- })
-
-- err = os.MkdirAll("/etc/docker/plugins", 0755)
-- c.Assert(err, check.IsNil, check.Commentf("error creating /etc/docker/plugins"))
-+ err = os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
-+ c.Assert(err, check.IsNil, check.Commentf("error creating /storage/.kodi/userdata/addon_data/service.system.docker/config/plugins"))
-
-- specFile := "/etc/docker/plugins/" + name + "." + ext
-+ specFile := "/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/" + name + "." + ext
- err = ioutil.WriteFile(specFile, b, 0644)
- c.Assert(err, check.IsNil, check.Commentf("error writing to %s", specFile))
- }
-@@ -332,8 +332,8 @@
- s.server.Close()
- s.jserver.Close()
-
-- err := os.RemoveAll("/etc/docker/plugins")
-- c.Assert(err, check.IsNil, check.Commentf("error removing /etc/docker/plugins"))
-+ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
-+ c.Assert(err, check.IsNil, check.Commentf("error removing /storage/.kodi/userdata/addon_data/service.system.docker/config/plugins"))
- }
-
- func (s *DockerExternalGraphdriverSuite) TestExternalGraphDriver(c *check.C) {
-diff -Naur a/integration-cli/docker_cli_external_volume_driver_unix_test.go b/integration-cli/docker_cli_external_volume_driver_unix_test.go
---- a/integration-cli/docker_cli_external_volume_driver_unix_test.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/integration-cli/docker_cli_external_volume_driver_unix_test.go 2017-01-01 23:25:17.931206951 -0800
-@@ -264,10 +264,10 @@
- send(w, `{"Capabilities": { "Scope": "global" }}`)
- })
-
-- err := os.MkdirAll("/etc/docker/plugins", 0755)
-+ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
- c.Assert(err, checker.IsNil)
-
-- err = ioutil.WriteFile("/etc/docker/plugins/"+name+".spec", []byte(s.Server.URL), 0644)
-+ err = ioutil.WriteFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/"+name+".spec", []byte(s.Server.URL), 0644)
- c.Assert(err, checker.IsNil)
- return s
- }
-@@ -275,7 +275,7 @@
- func (s *DockerExternalVolumeSuite) TearDownSuite(c *check.C) {
- s.volumePlugin.Close()
-
-- err := os.RemoveAll("/etc/docker/plugins")
-+ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
- c.Assert(err, checker.IsNil)
- }
-
-@@ -376,7 +376,7 @@
-
- // Make sure a request to use a down driver doesn't block other requests
- func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverLookupNotBlocked(c *check.C) {
-- 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)
- defer os.RemoveAll(specPath)
-@@ -415,7 +415,7 @@
- err := s.d.StartWithBusybox()
- c.Assert(err, checker.IsNil)
-
-- specPath := "/etc/docker/plugins/test-external-volume-driver-retry.spec"
-+ specPath := "/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/test-external-volume-driver-retry.spec"
- os.RemoveAll(specPath)
- defer os.RemoveAll(specPath)
-
-diff -Naur a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go
---- a/integration-cli/docker_cli_network_unix_test.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/integration-cli/docker_cli_network_unix_test.go 2017-01-01 23:25:17.896206630 -0800
-@@ -203,14 +203,14 @@
- }
- })
-
-- err := os.MkdirAll("/etc/docker/plugins", 0755)
-+ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
- c.Assert(err, checker.IsNil)
-
-- fileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", netDrv)
-+ fileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", netDrv)
- err = ioutil.WriteFile(fileName, []byte(url), 0644)
- c.Assert(err, checker.IsNil)
-
-- ipamFileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", ipamDrv)
-+ ipamFileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", ipamDrv)
- err = ioutil.WriteFile(ipamFileName, []byte(url), 0644)
- c.Assert(err, checker.IsNil)
- }
-@@ -222,7 +222,7 @@
-
- s.server.Close()
-
-- err := os.RemoveAll("/etc/docker/plugins")
-+ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
- c.Assert(err, checker.IsNil)
- }
-
-diff -Naur a/integration-cli/docker_cli_swarm_test.go b/integration-cli/docker_cli_swarm_test.go
---- a/integration-cli/docker_cli_swarm_test.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/integration-cli/docker_cli_swarm_test.go 2017-01-01 23:25:17.919206841 -0800
-@@ -659,14 +659,14 @@
- }
- })
-
-- err := os.MkdirAll("/etc/docker/plugins", 0755)
-+ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
- c.Assert(err, checker.IsNil)
-
-- fileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", netDrv)
-+ fileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", netDrv)
- err = ioutil.WriteFile(fileName, []byte(url), 0644)
- c.Assert(err, checker.IsNil)
-
-- ipamFileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", ipamDrv)
-+ ipamFileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", ipamDrv)
- err = ioutil.WriteFile(ipamFileName, []byte(url), 0644)
- c.Assert(err, checker.IsNil)
- }
-diff -Naur a/pkg/plugins/discovery_unix.go b/pkg/plugins/discovery_unix.go
---- a/pkg/plugins/discovery_unix.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/pkg/plugins/discovery_unix.go 2017-01-01 23:25:17.977207372 -0800
-@@ -2,4 +2,4 @@
-
- package plugins
-
--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 -Naur a/pkg/plugins/plugins.go b/pkg/plugins/plugins.go
---- a/pkg/plugins/plugins.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/pkg/plugins/plugins.go 2017-01-01 23:25:17.977207372 -0800
-@@ -4,7 +4,7 @@
- // Docker discovers plugins by looking for them in the plugin directory whenever
- // a user or container tries to use one by name. UNIX domain socket files must
- // be located under /run/docker/plugins, whereas spec files can be located
--// either under /etc/docker/plugins or /usr/lib/docker/plugins. This is handled
-+// either under /storage/.kodi/userdata/addon_data/service.system.docker/config/plugins or /usr/lib/docker/plugins. This is handled
- // by the Registry interface, which lets you list all plugins or get a plugin by
- // its name if it exists.
- //
-diff -Naur a/registry/config_unix.go b/registry/config_unix.go
---- a/registry/config_unix.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/registry/config_unix.go 2017-01-01 23:25:18.578212877 -0800
-@@ -8,7 +8,7 @@
-
- var (
- // CertsDir is the directory where certificates are stored
-- CertsDir = "/etc/docker/certs.d"
-+ CertsDir = "/storage/.kodi/userdata/addon_data/service.system.docker/config/certs.d"
- )
-
- // cleanPath is used to ensure that a directory name is valid on the target
-diff -Naur a/registry/endpoint_v1.go b/registry/endpoint_v1.go
---- a/registry/endpoint_v1.go 2016-12-16 02:10:49.000000000 -0800
-+++ b/registry/endpoint_v1.go 2017-01-01 23:25:18.584212932 -0800
-@@ -49,7 +49,7 @@
- if endpoint.IsSecure {
- // If registry is secure and HTTPS failed, show user the error and tell them about `--insecure-registry`
- // in case that's what they need. DO NOT accept unknown CA certificates, and DO NOT fallback to HTTP.
-- return fmt.Errorf("invalid registry endpoint %s: %v. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry %s` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/%s/ca.crt", endpoint, err, endpoint.URL.Host, endpoint.URL.Host)
-+ return fmt.Errorf("invalid registry endpoint %s: %v. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry %s` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /storage/.kodi/userdata/addon_data/service.system.docker/config/certs.d/%s/ca.crt", endpoint, err, endpoint.URL.Host, endpoint.URL.Host)
- }
-
- // If registry is insecure and HTTPS failed, fallback to HTTP.
diff --git a/packages/addons/addon-depends/runc/package.mk b/packages/addons/addon-depends/runc/package.mk
index 366150b4e1..19f5338936 100644
--- a/packages/addons/addon-depends/runc/package.mk
+++ b/packages/addons/addon-depends/runc/package.mk
@@ -17,8 +17,8 @@
################################################################################
PKG_NAME="runc"
-PKG_VERSION="9df8b30"
-PKG_SHA256="93d2ad2fdf83803517a601141253ebb760970a4a237c6e016871a5ec31d85552"
+PKG_VERSION="0351df1"
+PKG_SHA256="f3c59d337e52808da93e2514ddac829dd81a2b4f19529a35301819ae2524434e"
PKG_ARCH="any"
PKG_LICENSE="APL"
PKG_SITE="https://github.com/opencontainers/runc"
@@ -57,11 +57,16 @@ pre_make_target() {
export CGO_CFLAGS=$CFLAGS
export LDFLAGS="-w -extldflags -static -X main.gitCommit=${PKG_VERSION} -X main.version=$(cat ./VERSION) -extld $CC"
export GOLANG=$TOOLCHAIN/lib/golang/bin/go
- export GOPATH=$PKG_BUILD.gopath:$PKG_BUILD/Godeps/_workspace/
+ export GOPATH=$PKG_BUILD/.gopath
export GOROOT=$TOOLCHAIN/lib/golang
export PATH=$PATH:$GOROOT/bin
- ln -fs $PKG_BUILD $PKG_BUILD/Godeps/_workspace/src/github.com/opencontainers/runc
+ mkdir -p $PKG_BUILD/.gopath
+ if [ -d $PKG_BUILD/vendor ]; then
+ mv $PKG_BUILD/vendor $PKG_BUILD/.gopath/src
+ fi
+
+ ln -fs $PKG_BUILD $PKG_BUILD/.gopath/src/github.com/opencontainers/runc
}
make_target() {
diff --git a/packages/addons/addon-depends/runc/patches/runc-001-reenable-systemd-on-static-build.patch b/packages/addons/addon-depends/runc/patches/runc-001-reenable-systemd-on-static-build.patch
new file mode 100644
index 0000000000..8122b6f660
--- /dev/null
+++ b/packages/addons/addon-depends/runc/patches/runc-001-reenable-systemd-on-static-build.patch
@@ -0,0 +1,20 @@
+diff --git a/libcontainer/cgroups/systemd/apply_nosystemd.go b/libcontainer/cgroups/systemd/apply_nosystemd.go
+index a65d8e44..b897564c 100644
+--- a/libcontainer/cgroups/systemd/apply_nosystemd.go
++++ b/libcontainer/cgroups/systemd/apply_nosystemd.go
+@@ -1,4 +1,4 @@
+-// +build !linux static_build
++// +build !linux
+
+ package systemd
+
+diff --git a/libcontainer/cgroups/systemd/apply_systemd.go b/libcontainer/cgroups/systemd/apply_systemd.go
+index d9d8302d..de89ccbe 100644
+--- a/libcontainer/cgroups/systemd/apply_systemd.go
++++ b/libcontainer/cgroups/systemd/apply_systemd.go
+@@ -1,4 +1,4 @@
+-// +build linux,!static_build
++// +build linux
+
+ package systemd
+
diff --git a/packages/addons/service/docker/changelog.txt b/packages/addons/service/docker/changelog.txt
index 03dc1a7c8a..a820db316b 100644
--- a/packages/addons/service/docker/changelog.txt
+++ b/packages/addons/service/docker/changelog.txt
@@ -1,3 +1,6 @@
+117
+- Update to docker 17.10
+
116
- change to new project structure
diff --git a/packages/addons/service/docker/package.mk b/packages/addons/service/docker/package.mk
index a3e3a60d90..bd2c359ea2 100644
--- a/packages/addons/service/docker/package.mk
+++ b/packages/addons/service/docker/package.mk
@@ -1,6 +1,7 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
-# Copyright (C) 2009-present Lukas Rusak (lrusak@libreelec.tv)
+# Copyright (C) 2009-2017 Lukas Rusak (lrusak@libreelec.tv)
+# Copyright (C) 2017-present Team LibreELEC
#
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,13 +18,16 @@
################################################################################
PKG_NAME="docker"
-PKG_VERSION=""
-PKG_REV="116"
+PKG_VERSION="17.10.0"
+PKG_SHA256="90f54b988d5241ee0472800e139e0628ae8a58dac168bb32fdb031383f3b46be"
+PKG_REV="117"
PKG_ARCH="any"
PKG_ADDON_PROJECTS="Generic RPi RPi2 WeTek_Hub WeTek_Play_2 Odroid_C2"
-PKG_LICENSE=""
+PKG_LICENSE="ASL"
PKG_SITE="http://www.docker.com/"
-PKG_DEPENDS_TARGET="toolchain moby"
+PKG_URL="https://github.com/docker/docker-ce/archive/v${PKG_VERSION}-ce.tar.gz"
+PKG_SOURCE_DIR="docker-ce-${PKG_VERSION}-ce"
+PKG_DEPENDS_TARGET="toolchain sqlite go:host containerd runc libnetwork tini"
PKG_SECTION="service/system"
PKG_SHORTDESC="Docker is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere."
PKG_LONGDESC="Docker containers can encapsulate any payload, and will run consistently on and between virtually any server. The same container that a developer builds and tests on a laptop will run at scale, in production*, on VMs, bare-metal servers, OpenStack clusters, public instances, or combinations of the above."
@@ -33,10 +37,85 @@ PKG_IS_ADDON="yes"
PKG_ADDON_NAME="Docker"
PKG_ADDON_TYPE="xbmc.service"
+configure_target() {
+ export DOCKER_BUILDTAGS="daemon \
+ autogen \
+ exclude_graphdriver_devicemapper \
+ exclude_graphdriver_aufs \
+ exclude_graphdriver_btrfs \
+ journald"
+
+ case $TARGET_ARCH in
+ x86_64)
+ export GOARCH=amd64
+ ;;
+ arm)
+ export GOARCH=arm
+
+ case $TARGET_CPU in
+ arm1176jzf-s)
+ export GOARM=6
+ ;;
+ cortex-a7|cortex-a9)
+ export GOARM=7
+ ;;
+ esac
+ ;;
+ aarch64)
+ export GOARCH=arm64
+ ;;
+ esac
+
+ export GOOS=linux
+ export CGO_ENABLED=1
+ export CGO_NO_EMULATION=1
+ export CGO_CFLAGS=$CFLAGS
+ export LDFLAGS="-w -linkmode external -extldflags -Wl,--unresolved-symbols=ignore-in-shared-libs -extld $CC"
+ export GOLANG=$TOOLCHAIN/lib/golang/bin/go
+ export GOPATH=$PKG_BUILD/.gopath:$PKG_BUILD/.gopath_cli
+ export GOROOT=$TOOLCHAIN/lib/golang
+ export PATH=$PATH:$GOROOT/bin
+
+ mkdir -p $PKG_BUILD/.gopath
+ mkdir -p $PKG_BUILD/.gopath_cli
+ PKG_ENGINE_PATH=$PKG_BUILD/components/engine
+ PKG_CLI_PATH=$PKG_BUILD/components/cli
+ if [ -d $PKG_ENGINE_PATH/vendor ]; then
+ mv $PKG_ENGINE_PATH/vendor $PKG_BUILD/.gopath/src
+ fi
+ if [ -d $PKG_CLI_PATH/vendor ]; then
+ mv $PKG_CLI_PATH/vendor $PKG_BUILD/.gopath_cli/src
+ fi
+ ln -fs $PKG_ENGINE_PATH $PKG_BUILD/.gopath/src/github.com/docker/docker
+ ln -fs $PKG_CLI_PATH $PKG_BUILD/.gopath_cli/src/github.com/docker/cli
+
+ # used for docker version
+ export GITCOMMIT=${PKG_VERSION}-ce
+ export VERSION=${PKG_VERSION}-ce
+ export BUILDTIME="$(date --utc)"
+
+ cd $PKG_ENGINE_PATH
+ bash hack/make/.go-autogen
+ cd $PKG_BUILD
+}
+
+make_target() {
+ mkdir -p bin
+ PKG_CLI_FLAGS="-X 'github.com/docker/cli/cli.Version=${VERSION}'"
+ PKG_CLI_FLAGS="${PKG_CLI_FLAGS} -X 'github.com/docker/cli/cli.GitCommit=${GITCOMMIT}'"
+ PKG_CLI_FLAGS="${PKG_CLI_FLAGS} -X 'github.com/docker/cli/cli.BuildTime=${BUILDTIME}'"
+ $GOLANG build -v -o bin/docker -a -tags "$DOCKER_BUILDTAGS" -ldflags "$LDFLAGS ${PKG_CLI_FLAGS}" ./components/cli/cmd/docker
+ $GOLANG build -v -o bin/dockerd -a -tags "$DOCKER_BUILDTAGS" -ldflags "$LDFLAGS" ./components/engine/cmd/dockerd
+}
+
+makeinstall_target() {
+ :
+}
+
addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
- cp -P $(get_build_dir moby)/bin/docker $ADDON_BUILD/$PKG_ADDON_ID/bin
- cp -P $(get_build_dir moby)/bin/dockerd $ADDON_BUILD/$PKG_ADDON_ID/bin
+ cp -P $PKG_BUILD/bin/docker $ADDON_BUILD/$PKG_ADDON_ID/bin
+ cp -P $PKG_BUILD/bin/dockerd $ADDON_BUILD/$PKG_ADDON_ID/bin
# containerd
cp -P $(get_build_dir containerd)/bin/containerd $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-containerd
diff --git a/packages/addons/service/docker/patches/docker-001-use-addon-storage-location.patch b/packages/addons/service/docker/patches/docker-001-use-addon-storage-location.patch
new file mode 100644
index 0000000000..2d9710ddc5
--- /dev/null
+++ b/packages/addons/service/docker/patches/docker-001-use-addon-storage-location.patch
@@ -0,0 +1,350 @@
+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 b81d24933c..954d4fa0f1 100644
+--- a/components/cli/vendor/github.com/docker/docker/registry/config_unix.go
++++ b/components/cli/vendor/github.com/docker/docker/registry/config_unix.go
+@@ -4,7 +4,7 @@ package registry
+
+ var (
+ // CertsDir is the directory where certificates are stored
+- CertsDir = "/etc/docker/certs.d"
++ CertsDir = "/storage/.kodi/userdata/addon_data/service.system.docker/config/certs.d"
+ )
+
+ // 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 d6a51bfaf7..f615521008 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 {
+ if endpoint.IsSecure {
+ // If registry is secure and HTTPS failed, show user the error and tell them about `--insecure-registry`
+ // in case that's what they need. DO NOT accept unknown CA certificates, and DO NOT fallback to HTTP.
+- return fmt.Errorf("invalid registry endpoint %s: %v. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry %s` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/%s/ca.crt", endpoint, err, endpoint.URL.Host, endpoint.URL.Host)
++ return fmt.Errorf("invalid registry endpoint %s: %v. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry %s` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /storage/.kodi/userdata/addon_data/service.system.docker/config/certs.d/%s/ca.crt", endpoint, err, endpoint.URL.Host, endpoint.URL.Host)
+ }
+
+ // If registry is insecure and HTTPS failed, fallback to HTTP.
+diff --git a/components/engine/cmd/dockerd/daemon_solaris.go b/components/engine/cmd/dockerd/daemon_solaris.go
+index 9ee18dad7d..f33ff4d3fe 100644
+--- a/components/engine/cmd/dockerd/daemon_solaris.go
++++ b/components/engine/cmd/dockerd/daemon_solaris.go
+@@ -26,7 +26,7 @@ func setDefaultUmask() error {
+ }
+
+ func getDaemonConfDir(_ string) string {
+- return "/etc/docker"
++ return "/storage/.kodi/userdata/addon_data/service.system.docker/config"
+ }
+
+ // setupConfigReloadTrap configures the USR2 signal to reload the configuration.
+diff --git a/components/engine/cmd/dockerd/daemon_unix.go b/components/engine/cmd/dockerd/daemon_unix.go
+index 7909d98da5..eface33226 100644
+--- a/components/engine/cmd/dockerd/daemon_unix.go
++++ b/components/engine/cmd/dockerd/daemon_unix.go
+@@ -17,7 +17,7 @@ import (
+ "golang.org/x/sys/unix"
+ )
+
+-const defaultDaemonConfigFile = "/etc/docker/daemon.json"
++const defaultDaemonConfigFile = "/storage/.kodi/userdata/addon_data/service.system.docker/config/daemon.json"
+
+ // setDefaultUmask sets the umask to 0022 to avoid problems
+ // caused by custom umask
+@@ -32,7 +32,7 @@ func setDefaultUmask() error {
+ }
+
+ func getDaemonConfDir(_ string) string {
+- return "/etc/docker"
++ return "/storage/.kodi/userdata/addon_data/service.system.docker/config"
+ }
+
+ // setupConfigReloadTrap configures the USR2 signal to reload the configuration.
+diff --git a/components/engine/contrib/selinux-fedora-24/docker-engine-selinux/docker.fc b/components/engine/contrib/selinux-fedora-24/docker-engine-selinux/docker.fc
+index d6cb0e5792..699eb9259b 100644
+--- a/components/engine/contrib/selinux-fedora-24/docker-engine-selinux/docker.fc
++++ b/components/engine/contrib/selinux-fedora-24/docker-engine-selinux/docker.fc
+@@ -7,7 +7,7 @@
+ /usr/lib/systemd/system/docker.service -- gen_context(system_u:object_r:docker_unit_file_t,s0)
+ /usr/lib/systemd/system/docker-novolume-plugin.service -- gen_context(system_u:object_r:docker_unit_file_t,s0)
+
+-/etc/docker(/.*)? gen_context(system_u:object_r:docker_config_t,s0)
++/storage/.kodi/userdata/addon_data/service.system.docker/config(/.*)? gen_context(system_u:object_r:docker_config_t,s0)
+
+ /var/lib/docker(/.*)? gen_context(system_u:object_r:docker_var_lib_t,s0)
+ /var/lib/kublet(/.*)? gen_context(system_u:object_r:docker_var_lib_t,s0)
+diff --git a/components/engine/contrib/selinux-oraclelinux-7/docker-engine-selinux/docker.fc b/components/engine/contrib/selinux-oraclelinux-7/docker-engine-selinux/docker.fc
+index 467d659604..1b5d574a3c 100644
+--- a/components/engine/contrib/selinux-oraclelinux-7/docker-engine-selinux/docker.fc
++++ b/components/engine/contrib/selinux-oraclelinux-7/docker-engine-selinux/docker.fc
+@@ -4,7 +4,7 @@
+
+ /usr/lib/systemd/system/docker.service -- gen_context(system_u:object_r:docker_unit_file_t,s0)
+
+-/etc/docker(/.*)? gen_context(system_u:object_r:docker_config_t,s0)
++/storage/.kodi/userdata/addon_data/service.system.docker/config(/.*)? gen_context(system_u:object_r:docker_config_t,s0)
+
+ /var/lib/docker(/.*)? gen_context(system_u:object_r:docker_var_lib_t,s0)
+
+diff --git a/components/engine/hack/Jenkins/W2L/setup.sh b/components/engine/hack/Jenkins/W2L/setup.sh
+index a3d86b857a..7bf9f6be23 100644
+--- a/components/engine/hack/Jenkins/W2L/setup.sh
++++ b/components/engine/hack/Jenkins/W2L/setup.sh
+@@ -49,8 +49,8 @@ if [ -n "$DOCKER_TLS_VERIFY" ]; then
+ fi
+ certs=$(echo ~/.docker/machine/machines/$DOCKER_MACHINE_NAME)
+ curlopts="--cacert $certs/ca.pem --cert $certs/cert.pem --key $certs/key.pem"
+- run_extra_args="-v tlscerts:/etc/docker"
+- daemon_extra_args="--tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem"
++ run_extra_args="-v tlscerts:/storage/.kodi/userdata/addon_data/service.system.docker/config"
++ daemon_extra_args="--tlsverify --tlscacert /storage/.kodi/userdata/addon_data/service.system.docker/config/ca.pem --tlscert /storage/.kodi/userdata/addon_data/service.system.docker/config/server.pem --tlskey /storage/.kodi/userdata/addon_data/service.system.docker/config/server-key.pem"
+ else
+ protocol=http
+ fi
+diff --git a/components/engine/integration-cli/docker_cli_authz_unix_test.go b/components/engine/integration-cli/docker_cli_authz_unix_test.go
+index 8a1bd023ea..fbd650082a 100644
+--- a/components/engine/integration-cli/docker_cli_authz_unix_test.go
++++ b/components/engine/integration-cli/docker_cli_authz_unix_test.go
+@@ -148,10 +148,10 @@ func (s *DockerAuthzSuite) SetUpSuite(c *check.C) {
+ w.Write(b)
+ })
+
+- err := os.MkdirAll("/etc/docker/plugins", 0755)
++ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
+ c.Assert(err, checker.IsNil)
+
+- fileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", testAuthZPlugin)
++ fileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", testAuthZPlugin)
+ err = ioutil.WriteFile(fileName, []byte(s.server.URL), 0644)
+ c.Assert(err, checker.IsNil)
+ }
+@@ -200,7 +200,7 @@ func (s *DockerAuthzSuite) TearDownSuite(c *check.C) {
+
+ s.server.Close()
+
+- err := os.RemoveAll("/etc/docker/plugins")
++ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
+ c.Assert(err, checker.IsNil)
+ }
+
+diff --git a/components/engine/integration-cli/docker_cli_daemon_test.go b/components/engine/integration-cli/docker_cli_daemon_test.go
+index ccf50543e9..8fe34d67d2 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) {
+
+ func (s *DockerDaemonSuite) TestDaemonKeyGeneration(c *check.C) {
+ // 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")
+ s.d.Start(c)
+ s.d.Stop(c)
+
+- k, err := libtrust.LoadKeyFile("/etc/docker/key.json")
++ k, err := libtrust.LoadKeyFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json")
+ if err != nil {
+ c.Fatalf("Error opening key file")
+ }
+@@ -1199,12 +1199,12 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *check.C) {
+ Y string `json:"y"`
+ }
+
+- os.Remove("/etc/docker/key.json")
++ os.Remove("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json")
+ s.d.Start(c)
+ s.d.Stop(c)
+
+ config := &Config{}
+- bytes, err := ioutil.ReadFile("/etc/docker/key.json")
++ bytes, err := ioutil.ReadFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json")
+ if err != nil {
+ c.Fatalf("Error reading key.json file: %s", err)
+ }
+@@ -1224,11 +1224,11 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *check.C) {
+ }
+
+ // write back
+- if err := ioutil.WriteFile("/etc/docker/key.json", newBytes, 0400); err != nil {
++ if err := ioutil.WriteFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json", newBytes, 0400); err != nil {
+ c.Fatalf("Error ioutil.WriteFile: %s", err)
+ }
+
+- defer os.Remove("/etc/docker/key.json")
++ defer os.Remove("/storage/.kodi/userdata/addon_data/service.system.docker/config/key.json")
+
+ 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_graphdriver_unix_test.go b/components/engine/integration-cli/docker_cli_external_graphdriver_unix_test.go
+index 8e766bcc31..dc560610f1 100644
+--- a/components/engine/integration-cli/docker_cli_external_graphdriver_unix_test.go
++++ b/components/engine/integration-cli/docker_cli_external_graphdriver_unix_test.go
+@@ -330,10 +330,10 @@ func (s *DockerExternalGraphdriverSuite) setUpPlugin(c *check.C, name string, ex
+ respond(w, &graphDriverResponse{Size: size})
+ })
+
+- err = os.MkdirAll("/etc/docker/plugins", 0755)
+- c.Assert(err, check.IsNil, check.Commentf("error creating /etc/docker/plugins"))
++ err = os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
++ c.Assert(err, check.IsNil, check.Commentf("error creating /storage/.kodi/userdata/addon_data/service.system.docker/config/plugins"))
+
+- specFile := "/etc/docker/plugins/" + name + "." + ext
++ specFile := "/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/" + name + "." + ext
+ err = ioutil.WriteFile(specFile, b, 0644)
+ c.Assert(err, check.IsNil, check.Commentf("error writing to %s", specFile))
+ }
+@@ -342,8 +342,8 @@ func (s *DockerExternalGraphdriverSuite) TearDownSuite(c *check.C) {
+ s.server.Close()
+ s.jserver.Close()
+
+- err := os.RemoveAll("/etc/docker/plugins")
+- c.Assert(err, check.IsNil, check.Commentf("error removing /etc/docker/plugins"))
++ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
++ c.Assert(err, check.IsNil, check.Commentf("error removing /storage/.kodi/userdata/addon_data/service.system.docker/config/plugins"))
+ }
+
+ func (s *DockerExternalGraphdriverSuite) TestExternalGraphDriver(c *check.C) {
+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 2e2de972d5..a5c0b71b2b 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
+@@ -268,10 +268,10 @@ func newVolumePlugin(c *check.C, name string) *volumePlugin {
+ send(w, `{"Capabilities": { "Scope": "global" }}`)
+ })
+
+- err := os.MkdirAll("/etc/docker/plugins", 0755)
++ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
+ c.Assert(err, checker.IsNil)
+
+- err = ioutil.WriteFile("/etc/docker/plugins/"+name+".spec", []byte(s.Server.URL), 0644)
++ err = ioutil.WriteFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/"+name+".spec", []byte(s.Server.URL), 0644)
+ c.Assert(err, checker.IsNil)
+ return s
+ }
+@@ -279,7 +279,7 @@ func newVolumePlugin(c *check.C, name string) *volumePlugin {
+ func (s *DockerExternalVolumeSuite) TearDownSuite(c *check.C) {
+ s.volumePlugin.Close()
+
+- err := os.RemoveAll("/etc/docker/plugins")
++ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
+ c.Assert(err, checker.IsNil)
+ }
+
+@@ -372,7 +372,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) {
+- 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)
+ 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 4762e3993c..634deff67c 100644
+--- a/components/engine/integration-cli/docker_cli_network_unix_test.go
++++ b/components/engine/integration-cli/docker_cli_network_unix_test.go
+@@ -209,14 +209,14 @@ func setupRemoteNetworkDrivers(c *check.C, mux *http.ServeMux, url, netDrv, ipam
+ }
+ })
+
+- err := os.MkdirAll("/etc/docker/plugins", 0755)
++ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
+ c.Assert(err, checker.IsNil)
+
+- fileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", netDrv)
++ fileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", netDrv)
+ err = ioutil.WriteFile(fileName, []byte(url), 0644)
+ c.Assert(err, checker.IsNil)
+
+- ipamFileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", ipamDrv)
++ ipamFileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", ipamDrv)
+ err = ioutil.WriteFile(ipamFileName, []byte(url), 0644)
+ c.Assert(err, checker.IsNil)
+ }
+@@ -228,7 +228,7 @@ func (s *DockerNetworkSuite) TearDownSuite(c *check.C) {
+
+ s.server.Close()
+
+- err := os.RemoveAll("/etc/docker/plugins")
++ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
+ c.Assert(err, checker.IsNil)
+ }
+
+diff --git a/components/engine/integration-cli/docker_cli_swarm_test.go b/components/engine/integration-cli/docker_cli_swarm_test.go
+index 3f32f37447..888e80dbc8 100644
+--- a/components/engine/integration-cli/docker_cli_swarm_test.go
++++ b/components/engine/integration-cli/docker_cli_swarm_test.go
+@@ -784,14 +784,14 @@ func setupRemoteGlobalNetworkPlugin(c *check.C, mux *http.ServeMux, url, netDrv,
+ }
+ })
+
+- err := os.MkdirAll("/etc/docker/plugins", 0755)
++ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
+ c.Assert(err, checker.IsNil)
+
+- fileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", netDrv)
++ fileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", netDrv)
+ err = ioutil.WriteFile(fileName, []byte(url), 0644)
+ c.Assert(err, checker.IsNil)
+
+- ipamFileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", ipamDrv)
++ ipamFileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", ipamDrv)
+ err = ioutil.WriteFile(ipamFileName, []byte(url), 0644)
+ c.Assert(err, checker.IsNil)
+ }
+@@ -803,7 +803,7 @@ func (s *DockerSwarmSuite) TestSwarmNetworkPlugin(c *check.C) {
+ setupRemoteGlobalNetworkPlugin(c, mux, s.server.URL, globalNetworkPlugin, globalIPAMPlugin)
+ defer func() {
+ s.server.Close()
+- err := os.RemoveAll("/etc/docker/plugins")
++ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
+ c.Assert(err, checker.IsNil)
+ }()
+
+diff --git a/components/engine/pkg/plugins/discovery_unix.go b/components/engine/pkg/plugins/discovery_unix.go
+index 693a47e394..9903633a5d 100644
+--- a/components/engine/pkg/plugins/discovery_unix.go
++++ b/components/engine/pkg/plugins/discovery_unix.go
+@@ -2,4 +2,4 @@
+
+ package plugins
+
+-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 f9033ed1bc..f7df06592a 100644
+--- a/components/engine/pkg/plugins/plugins.go
++++ b/components/engine/pkg/plugins/plugins.go
+@@ -4,7 +4,7 @@
+ // Docker discovers plugins by looking for them in the plugin directory whenever
+ // a user or container tries to use one by name. UNIX domain socket files must
+ // be located under /run/docker/plugins, whereas spec files can be located
+-// either under /etc/docker/plugins or /usr/lib/docker/plugins. This is handled
++// either under /storage/.kodi/userdata/addon_data/service.system.docker/config/plugins or /usr/lib/docker/plugins. This is handled
+ // by the Registry interface, which lets you list all plugins or get a plugin by
+ // its name if it exists.
+ //
+diff --git a/components/engine/registry/config_unix.go b/components/engine/registry/config_unix.go
+index b81d24933c..954d4fa0f1 100644
+--- a/components/engine/registry/config_unix.go
++++ b/components/engine/registry/config_unix.go
+@@ -4,7 +4,7 @@ package registry
+
+ var (
+ // CertsDir is the directory where certificates are stored
+- CertsDir = "/etc/docker/certs.d"
++ CertsDir = "/storage/.kodi/userdata/addon_data/service.system.docker/config/certs.d"
+ )
+
+ // 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 d6a51bfaf7..f615521008 100644
+--- a/components/engine/registry/endpoint_v1.go
++++ b/components/engine/registry/endpoint_v1.go
+@@ -49,7 +49,7 @@ func validateEndpoint(endpoint *V1Endpoint) error {
+ if endpoint.IsSecure {
+ // If registry is secure and HTTPS failed, show user the error and tell them about `--insecure-registry`
+ // in case that's what they need. DO NOT accept unknown CA certificates, and DO NOT fallback to HTTP.
+- return fmt.Errorf("invalid registry endpoint %s: %v. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry %s` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/%s/ca.crt", endpoint, err, endpoint.URL.Host, endpoint.URL.Host)
++ return fmt.Errorf("invalid registry endpoint %s: %v. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry %s` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /storage/.kodi/userdata/addon_data/service.system.docker/config/certs.d/%s/ca.crt", endpoint, err, endpoint.URL.Host, endpoint.URL.Host)
+ }
+
+ // If registry is insecure and HTTPS failed, fallback to HTTP.
diff --git a/packages/addons/addon-depends/moby/patches/moby-003-use-short-expected-commit-values.patch b/packages/addons/service/docker/patches/docker-002-use-short-expected-commit-values.patch
similarity index 57%
rename from packages/addons/addon-depends/moby/patches/moby-003-use-short-expected-commit-values.patch
rename to packages/addons/service/docker/patches/docker-002-use-short-expected-commit-values.patch
index fc21bc67c0..0935af7399 100644
--- a/packages/addons/addon-depends/moby/patches/moby-003-use-short-expected-commit-values.patch
+++ b/packages/addons/service/docker/patches/docker-002-use-short-expected-commit-values.patch
@@ -1,14 +1,8 @@
-commit 51ed00db7df80caad3c3d2b136ee5578cedb7e31
-Author: Lukas Rusak
-Date: Fri Jan 13 13:54:42 2017 -0800
-
- use short expected commit values
-
-diff --git a/daemon/info_unix.go b/daemon/info_unix.go
-index 9c41c0e..4e0e896 100644
---- a/daemon/info_unix.go
-+++ b/daemon/info_unix.go
-@@ -27,7 +27,7 @@ func (daemon *Daemon) FillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
+diff --git a/components/engine/daemon/info_unix.go b/components/engine/daemon/info_unix.go
+index f43af6274f..a2c578e58b 100644
+--- a/components/engine/daemon/info_unix.go
++++ b/components/engine/daemon/info_unix.go
+@@ -28,7 +28,7 @@ func (daemon *Daemon) FillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
v.DefaultRuntime = daemon.configStore.GetDefaultRuntimeName()
v.InitBinary = daemon.configStore.GetInitPath()
@@ -17,12 +11,12 @@ index 9c41c0e..4e0e896 100644
if sv, err := daemon.containerd.GetServerVersion(context.Background()); err == nil {
v.ContainerdCommit.ID = sv.Revision
} else {
-@@ -35,7 +35,7 @@ func (daemon *Daemon) FillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
+@@ -36,7 +36,7 @@ func (daemon *Daemon) FillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
v.ContainerdCommit.ID = "N/A"
}
- v.RuncCommit.Expected = dockerversion.RuncCommitID
+ v.RuncCommit.Expected = dockerversion.RuncCommitID[0:7]
- if rv, err := exec.Command(DefaultRuntimeBinary, "--version").Output(); err == nil {
+ defaultRuntimeBinary := daemon.configStore.GetRuntime(daemon.configStore.GetDefaultRuntimeName()).Path
+ if rv, err := exec.Command(defaultRuntimeBinary, "--version").Output(); err == nil {
parts := strings.Split(strings.TrimSpace(string(rv)), "\n")
- if len(parts) == 3 {