Hi, Here is a patch that can make this package build on sid. It is inspired by https://github.com/docker/docker/commit/d820e00aac2376d4e01721557b9af5e482ec89cd.patch, but I removed all vendor related patches, and only kept the URL changes. This one is very small then.
I also included a backport of an upstream patch to allow docker to work with newer lxc releases. Regards, Pierre-André MOREY
From 6089e679a2fb2494fd3e599a9eab9327e6a509fc Mon Sep 17 00:00:00 2001 From: Alex Samorukov <s...@os2.kiev.ua> Date: Sat, 2 May 2015 01:42:53 +0200 Subject: [PATCH] Make LXC exec driver compatible with recent LXC where lxc.autodev is enabled by default Update LXC to 1.1.2 Signed-off-by: Alex Samorukov <s...@os2.kiev.ua> Origin: upstream, https://github.com/docker/docker/commit/6089e679a2fb2494fd3e599a9eab9327e6a509fc Bug: https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1466550 Last-Update: 2015-06-24 Merged with typo commit: https://github.com/icecrime/docker/commit/cb979edec0c8a8ba5a874abcbf74eae3a48fe52c --- Dockerfile | 2 +- daemon/execdriver/lxc/lxc_template.go | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index bbefb47..4bb35b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,7 +69,7 @@ RUN cd /usr/local/lvm2 \ # see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL # Install lxc -ENV LXC_VERSION 1.0.7 +ENV LXC_VERSION 1.1.2 RUN mkdir -p /usr/src/lxc \ && curl -sSL https://linuxcontainers.org/downloads/lxc/lxc-${LXC_VERSION}.tar.gz | tar -v -C /usr/src/lxc/ -xz --strip-components=1 RUN cd /usr/src/lxc \ diff --git a/daemon/execdriver/lxc/lxc_template.go b/daemon/execdriver/lxc/lxc_template.go index 6bb50e6..816d237 100644 --- a/daemon/execdriver/lxc/lxc_template.go +++ b/daemon/execdriver/lxc/lxc_template.go @@ -46,6 +46,9 @@ lxc.cgroup.devices.allow = {{$allowedDevice.CgroupString}} # Use mnt.putold as per https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/986385 lxc.pivotdir = lxc_putold +# lxc.autodev is not compatible with lxc --device switch +lxc.autodev = 0 + # NOTICE: These mounts must be applied within the namespace {{if .ProcessConfig.Privileged}} # WARNING: mounting procfs and/or sysfs read-write is a known attack vector. @@ -67,11 +70,11 @@ lxc.aa_profile = {{.AppArmorProfile}} {{end}} {{if .ProcessConfig.Tty}} -lxc.mount.entry = {{.ProcessConfig.Console}} {{escapeFstabSpaces $ROOTFS}}/dev/console none bind,rw 0 0 +lxc.mount.entry = {{.ProcessConfig.Console}} {{escapeFstabSpaces $ROOTFS}}/dev/console none bind,rw,create=file 0 0 {{end}} -lxc.mount.entry = devpts {{escapeFstabSpaces $ROOTFS}}/dev/pts devpts {{formatMountLabel "newinstance,ptmxmode=0666,nosuid,noexec" ""}} 0 0 -lxc.mount.entry = shm {{escapeFstabSpaces $ROOTFS}}/dev/shm tmpfs {{formatMountLabel "size=65536k,nosuid,nodev,noexec" ""}} 0 0 +lxc.mount.entry = devpts {{escapeFstabSpaces $ROOTFS}}/dev/pts devpts {{formatMountLabel "newinstance,ptmxmode=0666,nosuid,noexec,create=dir" ""}} 0 0 +lxc.mount.entry = shm {{escapeFstabSpaces $ROOTFS}}/dev/shm tmpfs {{formatMountLabel "size=65536k,nosuid,nodev,noexec,create=dir" ""}} 0 0 {{range $value := .Mounts}} {{$createVal := isDirectory $value.Source}}
From d820e00aac2376d4e01721557b9af5e482ec89cd Mon Sep 17 00:00:00 2001 From: Tibor Vass <ti...@docker.com> Date: Tue, 16 Jun 2015 10:08:18 -0400 Subject: [PATCH] Update vendored go.net to use golang.org/x/net canonical path Signed-off-by: Tibor Vass <ti...@docker.com> Last-Update: 2015-06-24 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789736 Origin: backport, https://github.com/docker/docker/commit/d820e00aac2376d4e01721557b9af5e482ec89cd Fix FTBS on wily due to upstream go url change Just cherry-picked the urls changes, no vendor. diff --git a/api/server/server.go b/api/server/server.go index cfbb7f2..6d292ed 100644 --- a/api/server/server.go +++ b/api/server/server.go @@ -20,7 +20,7 @@ import ( "crypto/tls" "crypto/x509" - "code.google.com/p/go.net/websocket" + "golang.org/x/net/websocket" "github.com/docker/libcontainer/user" "github.com/gorilla/mux" diff --git a/hack/vendor.sh b/hack/vendor.sh index c0b1112..6b4dca9 100755 --- a/hack/vendor.sh +++ b/hack/vendor.sh @@ -47,7 +47,7 @@ clone git github.com/gorilla/mux 136d54f81f clone git github.com/tchap/go-patricia v1.0.1 -clone hg code.google.com/p/go.net 84a4013f96e0 +clone git golang.org/x/net 3cffabab72adf04f8e3b01c5baf775361837b5fe https://github.com/golang/net.git clone hg code.google.com/p/gosqlite 74691fb6f837 diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go index b16a7bb..3ce207c 100644 --- a/integration-cli/docker_api_attach_test.go +++ b/integration-cli/docker_api_attach_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "code.google.com/p/go.net/websocket" + "golang.org/x/net/websocket" ) func TestGetContainersAttachWebsocket(t *testing.T) {