mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #1197 from lrusak/docker-libreelec-7.0
backport of #1195 (docker: update to 1.13.0)
This commit is contained in:
commit
b2e811fc4a
@ -17,13 +17,13 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="containerd"
|
||||
PKG_VERSION="0366d7e"
|
||||
PKG_VERSION="03e5862"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="APL"
|
||||
PKG_SITE="https://containerd.tools/"
|
||||
PKG_URL="https://github.com/docker/containerd/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="toolchain go"
|
||||
PKG_DEPENDS_TARGET="toolchain go:host"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="system"
|
||||
PKG_SHORTDESC="containerd is a daemon to control runC"
|
||||
@ -73,4 +73,3 @@ make_target() {
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="go"
|
||||
PKG_VERSION="1.6.3"
|
||||
PKG_VERSION="1.7.4"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="BSD"
|
||||
@ -54,6 +54,11 @@ make_host() {
|
||||
bash make.bash --no-banner
|
||||
}
|
||||
|
||||
pre_makeinstall_host() {
|
||||
# need to cleanup old golang version when updating to a new version
|
||||
rm -rf $ROOT/$TOOLCHAIN/lib/golang
|
||||
}
|
||||
|
||||
makeinstall_host() {
|
||||
mkdir -p $ROOT/$TOOLCHAIN/lib/golang
|
||||
cp -av $ROOT/$PKG_BUILD/* $ROOT/$TOOLCHAIN/lib/golang/
|
||||
|
74
packages/addons/addon-depends/libnetwork/package.mk
Normal file
74
packages/addons/addon-depends/libnetwork/package.mk
Normal file
@ -0,0 +1,74 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2009-2016 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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libnetwork"
|
||||
PKG_VERSION="0f53435"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="APL"
|
||||
PKG_SITE="https://github.com/docker/libnetwork"
|
||||
PKG_URL="https://github.com/docker/libnetwork/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain go:host"
|
||||
PKG_SECTION="system"
|
||||
PKG_SHORTDESC="Libnetwork provides a native Go implementation for connecting containers"
|
||||
PKG_LONGDESC="Libnetwork provides a native Go implementation for connecting containers"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
pre_make_target() {
|
||||
case $TARGET_ARCH in
|
||||
x86_64)
|
||||
export GOARCH=amd64
|
||||
;;
|
||||
arm)
|
||||
export GOARCH=arm
|
||||
|
||||
case $TARGET_CPU in
|
||||
arm1176jzf-s)
|
||||
export GOARM=6
|
||||
;;
|
||||
cortex-a7)
|
||||
export GOARM=7
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
aarch64)
|
||||
export GOARCH=arm64
|
||||
;;
|
||||
esac
|
||||
|
||||
export GOOS=linux
|
||||
export CGO_ENABLED=0
|
||||
export CGO_NO_EMULATION=1
|
||||
export CGO_CFLAGS=$CFLAGS
|
||||
export LDFLAGS="-extld $CC"
|
||||
export GOLANG=$ROOT/$TOOLCHAIN/lib/golang/bin/go
|
||||
export GOPATH=$ROOT/$PKG_BUILD.gopath
|
||||
export GOROOT=$ROOT/$TOOLCHAIN/lib/golang
|
||||
export PATH=$PATH:$GOROOT/bin
|
||||
}
|
||||
|
||||
make_target() {
|
||||
mkdir -p bin
|
||||
$GOLANG build -v -o bin/docker-proxy -a -ldflags "$LDFLAGS" ./cmd/proxy
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
@ -17,13 +17,13 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="runc"
|
||||
PKG_VERSION="02f8fa7"
|
||||
PKG_VERSION="2f7393a"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="APL"
|
||||
PKG_SITE="https://github.com/opencontainers/runc"
|
||||
PKG_URL="https://github.com/opencontainers/runc/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="toolchain go"
|
||||
PKG_DEPENDS_TARGET="toolchain go:host"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="system"
|
||||
PKG_SHORTDESC="runc is a CLI tool for spawning and running containers according to the OCI specification"
|
||||
@ -55,7 +55,7 @@ pre_make_target() {
|
||||
export CGO_ENABLED=1
|
||||
export CGO_NO_EMULATION=1
|
||||
export CGO_CFLAGS=$CFLAGS
|
||||
export LDFLAGS="-w -extldflags -static -X main.gitCommit=${PKG_VERSION} -extld $TARGET_CC"
|
||||
export LDFLAGS="-w -extldflags -static -X main.gitCommit=${PKG_VERSION} -X main.version=$(cat ./VERSION) -extld $CC"
|
||||
export GOLANG=$ROOT/$TOOLCHAIN/lib/golang/bin/go
|
||||
export GOPATH=$ROOT/$PKG_BUILD.gopath:$ROOT/$PKG_BUILD/Godeps/_workspace/
|
||||
export GOROOT=$ROOT/$TOOLCHAIN/lib/golang
|
||||
|
44
packages/addons/addon-depends/tini/package.mk
Normal file
44
packages/addons/addon-depends/tini/package.mk
Normal file
@ -0,0 +1,44 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2009-2016 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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="tini"
|
||||
PKG_VERSION="949e6fa"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/krallin/tini"
|
||||
PKG_URL="https://github.com/krallin/tini/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="system"
|
||||
PKG_SHORTDESC="Tini is the simplest init you could think of"
|
||||
PKG_LONGDESC="Tini is the simplest init you could think of"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_CMAKE_TARGET_OPTS="-DMINIMAL=ON"
|
||||
|
||||
PKG_MAKE_TARGET_OPTS="tini-static"
|
||||
|
||||
pre_configure_target(){
|
||||
sed -i "s|@tini_VERSION_GIT@| - git.${PKG_VERSION}|" $ROOT/$PKG_BUILD/src/tiniConfig.h.in
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
@ -1,3 +1,8 @@
|
||||
7.0.112
|
||||
- Update to docker 1.13.0
|
||||
- Use journald log driver
|
||||
- Add docker-init (tini)
|
||||
|
||||
7.0.111
|
||||
- Add temporary cleanup for old systemd service
|
||||
|
||||
|
@ -17,14 +17,14 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="docker"
|
||||
PKG_VERSION="1.12.5"
|
||||
PKG_REV="111"
|
||||
PKG_VERSION="1.13.0"
|
||||
PKG_REV="112"
|
||||
PKG_ARCH="any"
|
||||
PKG_ADDON_PROJECTS="Generic RPi RPi2"
|
||||
PKG_LICENSE="ASL"
|
||||
PKG_SITE="http://www.docker.com/"
|
||||
PKG_URL="https://github.com/docker/docker/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain sqlite go:host containerd runc"
|
||||
PKG_DEPENDS_TARGET="toolchain sqlite go:host containerd runc libnetwork tini"
|
||||
PKG_PRIORITY="optional"
|
||||
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."
|
||||
@ -67,11 +67,13 @@ configure_target() {
|
||||
export CGO_CFLAGS=$CFLAGS
|
||||
export LDFLAGS="-w -linkmode external -extldflags -Wl,--unresolved-symbols=ignore-in-shared-libs -extld $TARGET_CC"
|
||||
export GOLANG=$ROOT/$TOOLCHAIN/lib/golang/bin/go
|
||||
export GOPATH=$ROOT/$PKG_BUILD/.gopath:$ROOT/$PKG_BUILD/vendor
|
||||
export GOPATH=$ROOT/$PKG_BUILD/.gopath
|
||||
export GOROOT=$ROOT/$TOOLCHAIN/lib/golang
|
||||
export PATH=$PATH:$GOROOT/bin
|
||||
|
||||
ln -fs $ROOT/$PKG_BUILD $ROOT/$PKG_BUILD/vendor/src/github.com/docker/docker
|
||||
mkdir -p $ROOT/$PKG_BUILD/.gopath
|
||||
mv $ROOT/$PKG_BUILD/vendor $ROOT/$PKG_BUILD/.gopath/src
|
||||
ln -fs $ROOT/$PKG_BUILD $ROOT/$PKG_BUILD/.gopath/src/github.com/docker/docker
|
||||
|
||||
# used for docker version
|
||||
export GITCOMMIT=$PKG_VERSION
|
||||
@ -84,7 +86,6 @@ 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
|
||||
$GOLANG build -v -o bin/docker-proxy -a -ldflags "$LDFLAGS" ./vendor/src/github.com/docker/libnetwork/cmd/proxy
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
@ -95,12 +96,17 @@ addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $ROOT/$PKG_BUILD/bin/docker $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $ROOT/$PKG_BUILD/bin/dockerd $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $ROOT/$PKG_BUILD/bin/docker-proxy $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
# containerd
|
||||
cp -P $(get_build_dir containerd)/bin/containerd $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-containerd
|
||||
cp -P $(get_build_dir containerd)/bin/containerd-shim $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-containerd-shim
|
||||
|
||||
# libnetwork
|
||||
cp -P $(get_build_dir libnetwork)/bin/docker-proxy $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-proxy
|
||||
|
||||
# runc
|
||||
cp -P $(get_build_dir runc)/bin/runc $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-runc
|
||||
|
||||
# tini
|
||||
cp -P $(get_build_dir tini)/.$TARGET_NAME/tini-static $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-init
|
||||
}
|
||||
|
@ -2,20 +2,20 @@
|
||||
# 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-06-17 13:28:45.000000000 -0700
|
||||
+++ b/cmd/dockerd/daemon_solaris.go 2016-06-23 10:53:28.544141675 -0700
|
||||
--- 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 {
|
||||
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-06-17 13:28:45.000000000 -0700
|
||||
+++ b/cmd/dockerd/daemon_unix.go 2016-06-23 10:53:28.542141655 -0700
|
||||
--- 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"
|
||||
)
|
||||
@ -28,15 +28,15 @@ diff -Naur a/cmd/dockerd/daemon_unix.go b/cmd/dockerd/daemon_unix.go
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
|
||||
func getDaemonConfDir() string {
|
||||
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-06-17 13:28:45.000000000 -0700
|
||||
+++ b/integration-cli/docker_cli_authz_unix_test.go 2016-06-23 10:53:28.339139631 -0700
|
||||
--- 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)
|
||||
})
|
||||
@ -60,9 +60,9 @@ diff -Naur a/integration-cli/docker_cli_authz_unix_test.go b/integration-cli/doc
|
||||
}
|
||||
|
||||
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-06-17 13:28:45.000000000 -0700
|
||||
+++ b/integration-cli/docker_cli_daemon_test.go 2016-06-23 10:53:28.411140349 -0700
|
||||
@@ -553,13 +553,13 @@
|
||||
--- 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
|
||||
@ -78,7 +78,7 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
|
||||
if err != nil {
|
||||
c.Fatalf("Error opening key file")
|
||||
}
|
||||
@@ -572,7 +572,7 @@
|
||||
@@ -560,7 +560,7 @@
|
||||
|
||||
func (s *DockerDaemonSuite) TestDaemonKeyMigration(c *check.C) {
|
||||
// TODO: skip or update for Windows daemon
|
||||
@ -87,7 +87,7 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
|
||||
k1, err := libtrust.GenerateECP256PrivateKey()
|
||||
if err != nil {
|
||||
c.Fatalf("Error generating private key: %s", err)
|
||||
@@ -589,7 +589,7 @@
|
||||
@@ -577,7 +577,7 @@
|
||||
}
|
||||
s.d.Stop()
|
||||
|
||||
@ -96,7 +96,7 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
|
||||
if err != nil {
|
||||
c.Fatalf("Error opening key file")
|
||||
}
|
||||
@@ -1337,7 +1337,7 @@
|
||||
@@ -1300,7 +1300,7 @@
|
||||
Y string `json:"y"`
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
|
||||
if err := s.d.Start(); err != nil {
|
||||
c.Fatalf("Failed to start daemon: %v", err)
|
||||
}
|
||||
@@ -1347,7 +1347,7 @@
|
||||
@@ -1310,7 +1310,7 @@
|
||||
}
|
||||
|
||||
config := &Config{}
|
||||
@ -114,7 +114,7 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
|
||||
if err != nil {
|
||||
c.Fatalf("Error reading key.json file: %s", err)
|
||||
}
|
||||
@@ -1367,11 +1367,11 @@
|
||||
@@ -1330,11 +1330,11 @@
|
||||
}
|
||||
|
||||
// write back
|
||||
@ -129,9 +129,9 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
|
||||
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-06-17 13:28:45.000000000 -0700
|
||||
+++ b/integration-cli/docker_cli_external_graphdriver_unix_test.go 2016-06-23 10:53:28.444140678 -0700
|
||||
@@ -321,10 +321,10 @@
|
||||
--- 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})
|
||||
})
|
||||
|
||||
@ -145,7 +145,7 @@ diff -Naur a/integration-cli/docker_cli_external_graphdriver_unix_test.go b/inte
|
||||
err = ioutil.WriteFile(specFile, b, 0644)
|
||||
c.Assert(err, check.IsNil, check.Commentf("error writing to %s", specFile))
|
||||
}
|
||||
@@ -333,8 +333,8 @@
|
||||
@@ -332,8 +332,8 @@
|
||||
s.server.Close()
|
||||
s.jserver.Close()
|
||||
|
||||
@ -157,9 +157,9 @@ diff -Naur a/integration-cli/docker_cli_external_graphdriver_unix_test.go b/inte
|
||||
|
||||
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-06-17 13:28:45.000000000 -0700
|
||||
+++ b/integration-cli/docker_cli_external_volume_driver_unix_test.go 2016-06-23 10:53:28.435140588 -0700
|
||||
@@ -239,17 +239,17 @@
|
||||
--- 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" }}`)
|
||||
})
|
||||
|
||||
@ -167,20 +167,21 @@ diff -Naur a/integration-cli/docker_cli_external_volume_driver_unix_test.go b/in
|
||||
+ 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/test-external-volume-driver.spec", []byte(s.server.URL), 0644)
|
||||
+ err = ioutil.WriteFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/test-external-volume-driver.spec", []byte(s.server.URL), 0644)
|
||||
- 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.server.Close()
|
||||
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)
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@
|
||||
@@ -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) {
|
||||
@ -189,7 +190,7 @@ diff -Naur a/integration-cli/docker_cli_external_volume_driver_unix_test.go b/in
|
||||
err := ioutil.WriteFile(specPath, []byte("tcp://127.0.0.7:9999"), 0644)
|
||||
c.Assert(err, check.IsNil)
|
||||
defer os.RemoveAll(specPath)
|
||||
@@ -373,7 +373,7 @@
|
||||
@@ -415,7 +415,7 @@
|
||||
err := s.d.StartWithBusybox()
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
@ -199,9 +200,9 @@ diff -Naur a/integration-cli/docker_cli_external_volume_driver_unix_test.go b/in
|
||||
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-06-17 13:28:45.000000000 -0700
|
||||
+++ b/integration-cli/docker_cli_network_unix_test.go 2016-06-23 10:53:28.441140648 -0700
|
||||
@@ -201,14 +201,14 @@
|
||||
--- 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 @@
|
||||
}
|
||||
})
|
||||
|
||||
@ -219,7 +220,7 @@ diff -Naur a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/d
|
||||
err = ioutil.WriteFile(ipamFileName, []byte(url), 0644)
|
||||
c.Assert(err, checker.IsNil)
|
||||
}
|
||||
@@ -220,7 +220,7 @@
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
s.server.Close()
|
||||
|
||||
@ -228,21 +229,39 @@ diff -Naur a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/d
|
||||
c.Assert(err, checker.IsNil)
|
||||
}
|
||||
|
||||
diff -Naur a/pkg/plugins/discovery.go b/pkg/plugins/discovery.go
|
||||
--- a/pkg/plugins/discovery.go 2016-06-17 13:28:45.000000000 -0700
|
||||
+++ b/pkg/plugins/discovery.go 2016-06-23 10:53:28.636142593 -0700
|
||||
@@ -16,7 +16,7 @@
|
||||
// ErrNotFound plugin not found
|
||||
ErrNotFound = errors.New("plugin not found")
|
||||
socketsPath = "/run/docker/plugins"
|
||||
- specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"}
|
||||
+ specsPaths = []string{"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", "/usr/lib/docker/plugins"}
|
||||
)
|
||||
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 @@
|
||||
}
|
||||
})
|
||||
|
||||
// localRegistry defines a registry that is local (using unix socket).
|
||||
- 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-06-17 13:28:45.000000000 -0700
|
||||
+++ b/pkg/plugins/plugins.go 2016-06-23 10:53:28.636142593 -0700
|
||||
--- 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
|
||||
@ -253,9 +272,9 @@ diff -Naur a/pkg/plugins/plugins.go b/pkg/plugins/plugins.go
|
||||
// its name if it exists.
|
||||
//
|
||||
diff -Naur a/registry/config_unix.go b/registry/config_unix.go
|
||||
--- a/registry/config_unix.go 2016-06-17 13:28:45.000000000 -0700
|
||||
+++ b/registry/config_unix.go 2016-06-23 10:53:28.594142174 -0700
|
||||
@@ -4,7 +4,7 @@
|
||||
--- 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
|
||||
@ -265,8 +284,8 @@ diff -Naur a/registry/config_unix.go b/registry/config_unix.go
|
||||
|
||||
// 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-06-17 13:28:45.000000000 -0700
|
||||
+++ b/registry/endpoint_v1.go 2016-06-23 10:53:28.593142164 -0700
|
||||
--- 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`
|
||||
|
@ -0,0 +1,60 @@
|
||||
commit 472c4da2e78a01b4fcf194c2c85edde4fc32aa0b
|
||||
Author: Sebastiaan van Stijn <github@gone.nl>
|
||||
Date: Tue Jan 3 14:54:30 2017 +0100
|
||||
|
||||
do not create init-dir if not needed
|
||||
|
||||
commit 56f77d5ade945b3b8816a6c8acb328b7c6dce9a7
|
||||
added support for cpu-rt-period and cpu-rt-runtime,
|
||||
but always initialized the cgroup path, even if not
|
||||
used.
|
||||
|
||||
As a result, containers failed to start on a
|
||||
read-only filesystem.
|
||||
|
||||
This patch only creates the cgroup path if
|
||||
one of these options is set.
|
||||
|
||||
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
||||
|
||||
diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go
|
||||
index 56e980d..5b3ffeb 100644
|
||||
--- a/daemon/daemon_unix.go
|
||||
+++ b/daemon/daemon_unix.go
|
||||
@@ -1190,6 +1190,12 @@ func (daemon *Daemon) initCgroupsPath(path string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
+ if daemon.configStore.CPURealtimePeriod == 0 && daemon.configStore.CPURealtimeRuntime == 0 {
|
||||
+ return nil
|
||||
+ }
|
||||
+
|
||||
+ // Recursively create cgroup to ensure that the system and all parent cgroups have values set
|
||||
+ // for the period and runtime as this limits what the children can be set to.
|
||||
daemon.initCgroupsPath(filepath.Dir(path))
|
||||
|
||||
_, root, err := cgroups.FindCgroupMountpointAndRoot("cpu")
|
||||
@@ -1198,16 +1204,19 @@ func (daemon *Daemon) initCgroupsPath(path string) error {
|
||||
}
|
||||
|
||||
path = filepath.Join(root, path)
|
||||
- sysinfo := sysinfo.New(false)
|
||||
- if err := os.MkdirAll(path, 0755); err != nil && !os.IsExist(err) {
|
||||
- return err
|
||||
- }
|
||||
+ sysinfo := sysinfo.New(true)
|
||||
if sysinfo.CPURealtimePeriod && daemon.configStore.CPURealtimePeriod != 0 {
|
||||
+ if err := os.MkdirAll(path, 0755); err != nil && !os.IsExist(err) {
|
||||
+ return err
|
||||
+ }
|
||||
if err := ioutil.WriteFile(filepath.Join(path, "cpu.rt_period_us"), []byte(strconv.FormatInt(daemon.configStore.CPURealtimePeriod, 10)), 0700); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if sysinfo.CPURealtimeRuntime && daemon.configStore.CPURealtimeRuntime != 0 {
|
||||
+ if err := os.MkdirAll(path, 0755); err != nil && !os.IsExist(err) {
|
||||
+ return err
|
||||
+ }
|
||||
if err := ioutil.WriteFile(filepath.Join(path, "cpu.rt_runtime_us"), []byte(strconv.FormatInt(daemon.configStore.CPURealtimeRuntime, 10)), 0700); err != nil {
|
||||
return err
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
commit 51ed00db7df80caad3c3d2b136ee5578cedb7e31
|
||||
Author: Lukas Rusak <lorusak@gmail.com>
|
||||
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)
|
||||
v.DefaultRuntime = daemon.configStore.GetDefaultRuntimeName()
|
||||
v.InitBinary = daemon.configStore.GetInitPath()
|
||||
|
||||
- v.ContainerdCommit.Expected = dockerversion.ContainerdCommitID
|
||||
+ v.ContainerdCommit.Expected = dockerversion.ContainerdCommitID[0:7]
|
||||
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)
|
||||
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 {
|
||||
parts := strings.Split(strings.TrimSpace(string(rv)), "\n")
|
||||
if len(parts) == 3 {
|
@ -9,6 +9,7 @@ Environment=PATH=/bin:/sbin:/usr/bin:/usr/sbin:/storage/.kodi/addons/service.sys
|
||||
ExecStartPre=/storage/.kodi/addons/service.system.docker/bin/docker-config
|
||||
EnvironmentFile=-/storage/.kodi/userdata/addon_data/service.system.docker/config/docker.conf
|
||||
ExecStart=/storage/.kodi/addons/service.system.docker/bin/dockerd --exec-opt native.cgroupdriver=systemd \
|
||||
--log-driver=journald \
|
||||
--group=root \
|
||||
$DOCKER_DAEMON_OPTS \
|
||||
$DOCKER_STORAGE_OPTS
|
||||
|
Loading…
x
Reference in New Issue
Block a user