|
|
|
@ -1,8 +1,13 @@
|
|
|
|
|
From 9979cbaa4d0108da552fd452294788a042766995 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: 5schatten <supervisedthinking@gmail.com>
|
|
|
|
|
Date: Wed, 7 Nov 2018 12:22:23 +0100
|
|
|
|
|
Subject: [PATCH] use Kodi addon storage location
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
index 20fb47bcae..a023df7895 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
|
|
|
|
|
@@ -4,7 +4,7 @@ package registry // import "github.com/docker/docker/registry"
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
// CertsDir is the directory where certificates are stored
|
|
|
|
@ -12,7 +17,7 @@ index b81d24933c..954d4fa0f1 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 d6a51bfaf7..f615521008 100644
|
|
|
|
|
index 832fdb95a4..606ddfaf96 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 {
|
|
|
|
@ -24,24 +29,11 @@ index d6a51bfaf7..f615521008 100644
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
index 7b03e28594..74fc0cfe24 100644
|
|
|
|
|
--- a/components/engine/cmd/dockerd/daemon_unix.go
|
|
|
|
|
+++ b/components/engine/cmd/dockerd/daemon_unix.go
|
|
|
|
|
@@ -17,7 +17,7 @@ import (
|
|
|
|
|
@@ -19,7 +19,7 @@ import (
|
|
|
|
|
"golang.org/x/sys/unix"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
@ -50,7 +42,7 @@ index 7909d98da5..eface33226 100644
|
|
|
|
|
|
|
|
|
|
// setDefaultUmask sets the umask to 0022 to avoid problems
|
|
|
|
|
// caused by custom umask
|
|
|
|
|
@@ -32,7 +32,7 @@ func setDefaultUmask() error {
|
|
|
|
|
@@ -34,7 +34,7 @@ func setDefaultUmask() error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func getDaemonConfDir(_ string) string {
|
|
|
|
@ -58,76 +50,22 @@ index 7909d98da5..eface33226 100644
|
|
|
|
|
+ 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)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (cli *DaemonCli) getPlatformContainerdDaemonOpts() ([]supervisor.DaemonOpt, error) {
|
|
|
|
|
diff --git a/components/engine/daemon/config/config_test.go b/components/engine/daemon/config/config_test.go
|
|
|
|
|
index 6998ed3312..c255b62146 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) {
|
|
|
|
|
func TestReloadDefaultConfigNotExist(t *testing.T) {
|
|
|
|
|
skip.If(t, os.Getuid() != 0, "skipping test that requires root")
|
|
|
|
|
reloaded := false
|
|
|
|
|
- configFile := "/etc/docker/daemon.json"
|
|
|
|
|
+ configFile := "/storage/.kodi/userdata/addon_data/service.system.docker/config/daemon.json"
|
|
|
|
|
flags := pflag.NewFlagSet("test", pflag.ContinueOnError)
|
|
|
|
|
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 ccf50543e9..8fe34d67d2 100644
|
|
|
|
|
index 986cc27530..7a0c2805cd 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) {
|
|
|
|
@ -144,7 +82,7 @@ index ccf50543e9..8fe34d67d2 100644
|
|
|
|
|
if err != nil {
|
|
|
|
|
c.Fatalf("Error opening key file")
|
|
|
|
|
}
|
|
|
|
|
@@ -1199,12 +1199,12 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *check.C) {
|
|
|
|
|
@@ -1198,12 +1198,12 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *check.C) {
|
|
|
|
|
Y string `json:"y"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -159,7 +97,7 @@ index ccf50543e9..8fe34d67d2 100644
|
|
|
|
|
if err != nil {
|
|
|
|
|
c.Fatalf("Error reading key.json file: %s", err)
|
|
|
|
|
}
|
|
|
|
|
@@ -1224,11 +1224,11 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *check.C) {
|
|
|
|
|
@@ -1223,11 +1223,11 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *check.C) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// write back
|
|
|
|
@ -173,40 +111,11 @@ index ccf50543e9..8fe34d67d2 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_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
|
|
|
|
|
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
|
|
|
|
|
@@ -268,10 +268,10 @@ func newVolumePlugin(c *check.C, name string) *volumePlugin {
|
|
|
|
|
@@ -267,10 +267,10 @@ func newVolumePlugin(c *check.C, name string) *volumePlugin {
|
|
|
|
|
send(w, `{"Capabilities": { "Scope": "global" }}`)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -219,7 +128,7 @@ index 2e2de972d5..a5c0b71b2b 100644
|
|
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
|
|
return s
|
|
|
|
|
}
|
|
|
|
|
@@ -279,7 +279,7 @@ func newVolumePlugin(c *check.C, name string) *volumePlugin {
|
|
|
|
|
@@ -278,7 +278,7 @@ func newVolumePlugin(c *check.C, name string) *volumePlugin {
|
|
|
|
|
func (s *DockerExternalVolumeSuite) TearDownSuite(c *check.C) {
|
|
|
|
|
s.volumePlugin.Close()
|
|
|
|
|
|
|
|
|
@ -228,7 +137,7 @@ index 2e2de972d5..a5c0b71b2b 100644
|
|
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -372,7 +372,7 @@ func hostVolumePath(name string) string {
|
|
|
|
|
@@ -371,7 +371,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) {
|
|
|
|
@ -238,10 +147,10 @@ index 2e2de972d5..a5c0b71b2b 100644
|
|
|
|
|
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
|
|
|
|
|
index d3d6256a75..a0f0ae973d 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
|
|
|
|
|
@@ -208,14 +208,14 @@ func setupRemoteNetworkDrivers(c *check.C, mux *http.ServeMux, url, netDrv, ipam
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -259,7 +168,7 @@ index 4762e3993c..634deff67c 100644
|
|
|
|
|
err = ioutil.WriteFile(ipamFileName, []byte(url), 0644)
|
|
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
|
|
}
|
|
|
|
|
@@ -228,7 +228,7 @@ func (s *DockerNetworkSuite) TearDownSuite(c *check.C) {
|
|
|
|
|
@@ -227,7 +227,7 @@ func (s *DockerNetworkSuite) TearDownSuite(c *check.C) {
|
|
|
|
|
|
|
|
|
|
s.server.Close()
|
|
|
|
|
|
|
|
|
@ -269,10 +178,10 @@ index 4762e3993c..634deff67c 100644
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
index 9f99d0c849..2d9a4b088e 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,
|
|
|
|
|
@@ -783,14 +783,14 @@ func setupRemoteGlobalNetworkPlugin(c *check.C, mux *http.ServeMux, url, netDrv,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -290,7 +199,7 @@ index 3f32f37447..888e80dbc8 100644
|
|
|
|
|
err = ioutil.WriteFile(ipamFileName, []byte(url), 0644)
|
|
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
|
|
}
|
|
|
|
|
@@ -803,7 +803,7 @@ func (s *DockerSwarmSuite) TestSwarmNetworkPlugin(c *check.C) {
|
|
|
|
|
@@ -802,7 +802,7 @@ func (s *DockerSwarmSuite) TestSwarmNetworkPlugin(c *check.C) {
|
|
|
|
|
setupRemoteGlobalNetworkPlugin(c, mux, s.server.URL, globalNetworkPlugin, globalIPAMPlugin)
|
|
|
|
|
defer func() {
|
|
|
|
|
s.server.Close()
|
|
|
|
@ -299,18 +208,67 @@ index 3f32f37447..888e80dbc8 100644
|
|
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
|
|
}()
|
|
|
|
|
|
|
|
|
|
diff --git a/components/engine/integration/plugin/authz/authz_plugin_test.go b/components/engine/integration/plugin/authz/authz_plugin_test.go
|
|
|
|
|
index d0f5d8a783..ba626c6310 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() {
|
|
|
|
|
ctrl = &authorizationController{}
|
|
|
|
|
teardown := setupTest(t)
|
|
|
|
|
|
|
|
|
|
- err := os.MkdirAll("/etc/docker/plugins", 0755)
|
|
|
|
|
+ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
|
|
|
|
|
assert.NilError(t, err)
|
|
|
|
|
|
|
|
|
|
- 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(server.URL), 0644)
|
|
|
|
|
assert.NilError(t, err)
|
|
|
|
|
|
|
|
|
|
return func() {
|
|
|
|
|
- err := os.RemoveAll("/etc/docker/plugins")
|
|
|
|
|
+ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
|
|
|
|
|
assert.NilError(t, err)
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
--- 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) {
|
|
|
|
|
|
|
|
|
|
sserver.Close()
|
|
|
|
|
jserver.Close()
|
|
|
|
|
- err := os.RemoveAll("/etc/docker/plugins")
|
|
|
|
|
+ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
|
|
|
|
|
assert.NilError(t, err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -344,10 +344,10 @@ func setupPlugin(t *testing.T, ec map[string]*graphEventsCounter, ext string, mu
|
|
|
|
|
respond(w, &graphDriverResponse{Size: size})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
- err = os.MkdirAll("/etc/docker/plugins", 0755)
|
|
|
|
|
+ err = os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
|
|
|
|
|
assert.NilError(t, err)
|
|
|
|
|
|
|
|
|
|
- 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)
|
|
|
|
|
assert.NilError(t, err)
|
|
|
|
|
}
|
|
|
|
|
diff --git a/components/engine/pkg/plugins/discovery_unix.go b/components/engine/pkg/plugins/discovery_unix.go
|
|
|
|
|
index 693a47e394..9903633a5d 100644
|
|
|
|
|
index 58058f2828..a7b449ca25 100644
|
|
|
|
|
--- a/components/engine/pkg/plugins/discovery_unix.go
|
|
|
|
|
+++ b/components/engine/pkg/plugins/discovery_unix.go
|
|
|
|
|
@@ -2,4 +2,4 @@
|
|
|
|
|
|
|
|
|
|
package plugins
|
|
|
|
|
package plugins // import "github.com/docker/docker/pkg/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
|
|
|
|
|
index 28c06ff693..c24cad2b63 100644
|
|
|
|
|
--- a/components/engine/pkg/plugins/plugins.go
|
|
|
|
|
+++ b/components/engine/pkg/plugins/plugins.go
|
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
@ -323,10 +281,10 @@ index f9033ed1bc..f7df06592a 100644
|
|
|
|
|
// 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
|
|
|
|
|
index 20fb47bcae..a023df7895 100644
|
|
|
|
|
--- a/components/engine/registry/config_unix.go
|
|
|
|
|
+++ b/components/engine/registry/config_unix.go
|
|
|
|
|
@@ -4,7 +4,7 @@ package registry
|
|
|
|
|
@@ -4,7 +4,7 @@ package registry // import "github.com/docker/docker/registry"
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
// CertsDir is the directory where certificates are stored
|
|
|
|
@ -336,7 +294,7 @@ index b81d24933c..954d4fa0f1 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 d6a51bfaf7..f615521008 100644
|
|
|
|
|
index 832fdb95a4..606ddfaf96 100644
|
|
|
|
|
--- a/components/engine/registry/endpoint_v1.go
|
|
|
|
|
+++ b/components/engine/registry/endpoint_v1.go
|
|
|
|
|
@@ -49,7 +49,7 @@ func validateEndpoint(endpoint *V1Endpoint) error {
|
|
|
|
|