diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-0.10.0.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-0.11.1.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-0.10.0.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-0.11.1.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild index 29c4e78d6d..6730c62093 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild @@ -14,12 +14,11 @@ CROS_WORKON_REPO="git://github.com" GITHUB_URI="github.com/crosbymichael/docker" if [[ ${PV} == *9999 ]]; then - SRC_URI="" - EGIT_REPO_URI="git://${GITHUB_URI}.git" - inherit git-2 - KEYWORDS="" + DOCKER_GITCOMMIT="deadbee" + KEYWORDS="~amd64" else - CROS_WORKON_COMMIT="dc9c28f51d669d6b09e81c2381f800f1a33bb659" # v0.10.0 + CROS_WORKON_COMMIT="fb99f992c081a1d433c97c99ffb46d12693eeb76" # v0.11.1 + DOCKER_GITCOMMIT="fb99f99" # hack(philips): delete when an epatch isn't in use KEYWORDS="amd64" fi @@ -132,7 +131,14 @@ pkg_setup() { check_extra_config } +src_prepare() { + epatch "${FILESDIR}"/daemon-ensure-the-var-lib-docker-dir-exists.patch +} + src_compile() { + # hack(philips): to keep the git commit from being dirty + mv .git .git.old + # if we treat them right, Docker's build scripts will set up a # reasonable GOPATH for us export AUTO_GOPATH=1 @@ -142,6 +148,7 @@ src_compile() { export CGO_CFLAGS="-I${ROOT}/usr/include" export CGO_LDFLAGS="-L${ROOT}/usr/lib" + [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT # time to build! ./hack/make.sh dynbinary || die diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/daemon-ensure-the-var-lib-docker-dir-exists.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/daemon-ensure-the-var-lib-docker-dir-exists.patch new file mode 100644 index 0000000000..f22795d874 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/daemon-ensure-the-var-lib-docker-dir-exists.patch @@ -0,0 +1,41 @@ +From b4ccd7cbfb5f2c7c4b6c963c4c12e41500e7ad55 Mon Sep 17 00:00:00 2001 +From: Brandon Philips +Date: Fri, 9 May 2014 18:05:54 -0700 +Subject: [PATCH] fix(daemon): ensure the /var/lib/docker dir exists + +The btrfs driver attempts to stat the /var/lib/docker directory to +ensure it exists. If it doesn't exist then it bails with an unhelpful +log line: + +``` +2014/05/10 00:51:30 no such file or directory +``` + +In 0.10 the directory was created but quickly digging through the logs I +can't tell what sort of re-ordering of code caused this regression. + +Docker-DCO-1.1-Signed-off-by: Brandon Philips (github: philips) +--- + daemon/daemon.go | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/daemon/daemon.go b/daemon/daemon.go +index 00b6d9e..7901f8e 100644 +--- a/daemon/daemon.go ++++ b/daemon/daemon.go +@@ -680,6 +680,12 @@ func NewDaemonFromDirectory(config *daemonconfig.Config, eng *engine.Engine) (*D + if !config.EnableSelinuxSupport { + selinux.SetDisabled() + } ++ ++ // Create the root directory if it doesn't exists ++ if err := os.MkdirAll(config.Root, 0700); err != nil && !os.IsExist(err) { ++ return nil, err ++ } ++ + // Set the default driver + graphdriver.DefaultDriver = config.GraphDriver + +-- +1.9.1 +