diff --git a/community/docker/0004-Allow-missing-kcore.patch b/community/docker/0004-Allow-missing-kcore.patch new file mode 100644 index 000000000..451566687 --- /dev/null +++ b/community/docker/0004-Allow-missing-kcore.patch @@ -0,0 +1,38 @@ +From d60301edb88a4e182a10cd2becb3795b2dd13fab Mon Sep 17 00:00:00 2001 +From: Tianon Gravi +Date: Thu, 8 May 2014 01:03:45 -0600 +Subject: [PATCH] Update restrict.Restrict to both show the error message when + failing to mount /dev/null over /proc/kcore, and to ignore "not exists" + errors while doing so (for when CONFIG_PROC_KCORE=n in the kernel) + +Docker-DCO-1.1-Signed-off-by: Andrew Page (github: tianon) +--- + pkg/libcontainer/security/restrict/restrict.go | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/pkg/libcontainer/security/restrict/restrict.go b/pkg/libcontainer/security/restrict/restrict.go +index e1296b1..361d076 100644 +--- a/pkg/libcontainer/security/restrict/restrict.go ++++ b/pkg/libcontainer/security/restrict/restrict.go +@@ -4,6 +4,7 @@ package restrict + + import ( + "fmt" ++ "os" + "syscall" + + "github.com/dotcloud/docker/pkg/system" +@@ -18,8 +19,8 @@ func Restrict(mounts ...string) error { + return fmt.Errorf("unable to remount %s readonly: %s", dest, err) + } + } +- if err := system.Mount("/dev/null", "/proc/kcore", "", syscall.MS_BIND, ""); err != nil { +- return fmt.Errorf("unable to bind-mount /dev/null over /proc/kcore") ++ if err := system.Mount("/dev/null", "/proc/kcore", "", syscall.MS_BIND, ""); err != nil && !os.IsNotExist(err) { ++ return fmt.Errorf("unable to bind-mount /dev/null over /proc/kcore: %s", err) + } + return nil + } +-- +1.9.1 + diff --git a/community/docker/PKGBUILD b/community/docker/PKGBUILD index 9441a052a..1734c242a 100644 --- a/community/docker/PKGBUILD +++ b/community/docker/PKGBUILD @@ -6,7 +6,7 @@ pkgname=docker pkgver=0.11.0 -pkgrel=1 +pkgrel=1.1 epoch=1 pkgdesc='Pack, ship and run any application as a lightweight container' arch=('x86_64') @@ -22,11 +22,13 @@ install=$pkgname.install source=("git+https://github.com/dotcloud/docker.git#tag=v$pkgver" '0001-ARM-as-allowed-architecture.patch' '0002-Fix-btrfs-detection-on-ARM.patch' - '0003-setBridgeMacAddress-ARM-support.patch') + '0003-setBridgeMacAddress-ARM-support.patch' + '0004-Allow-missing-kcore.patch') md5sums=('SKIP' 'c003084f4cf0f754c868662a8bae95e8' 'f3ed840798065ca2a40e40b07d5e4069' - 'f42c2001c85556830598a8ec07430d53') + 'f42c2001c85556830598a8ec07430d53' + 'e909f4cccd0e066be06538d0669fa4df') prepare() { cd "docker" @@ -37,6 +39,7 @@ prepare() { find . -name '*.go' | xargs sed --in-place= -e 's/\/\/ +build linux,amd64/\/\/ +build linux,arm/' # This patch is applicable after the seds. patch -p1 -i ../0003-setBridgeMacAddress-ARM-support.patch + patch -p1 -i ../0004-Allow-missing-kcore.patch } build() {