summaryrefslogtreecommitdiffstats
path: root/main/docker
diff options
context:
space:
mode:
authorEivind Uggedal <eivind@uggedal.com>2014-05-08 11:13:16 +0000
committerEivind Uggedal <eivind@uggedal.com>2014-05-08 11:13:16 +0000
commitf4d6b70e28d6035dc2f4cdeb660875b21373702f (patch)
treee85f676695a40f73afe95edf9209a9757b48570d /main/docker
parentf84207da377b1ea805146d95a3257c14265564ca (diff)
downloadaports-f4d6b70e28d6035dc2f4cdeb660875b21373702f.tar.bz2
aports-f4d6b70e28d6035dc2f4cdeb660875b21373702f.tar.xz
main/docker: fix bug with CONFIG_PROC_KCORE disabled
Diffstat (limited to 'main/docker')
-rw-r--r--main/docker/APKBUILD22
-rw-r--r--main/docker/kcore-error.patch38
2 files changed, 56 insertions, 4 deletions
diff --git a/main/docker/APKBUILD b/main/docker/APKBUILD
index 036313a9f..cecd6e5c5 100644
--- a/main/docker/APKBUILD
+++ b/main/docker/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Eivind Uggedal <eivind@uggedal.com>
pkgname=docker
pkgver=0.11.1
-pkgrel=0
+pkgrel=1
_gitcommit=fb99f99
pkgdesc="Pack, ship and run any application as a lightweight container"
url="http://www.docker.io/"
@@ -20,11 +20,22 @@ subpackages="
source="
$pkgname-$pkgver.tar.gz::https://github.com/dotcloud/docker/archive/v$pkgver.tar.gz
http://dev.alpinelinux.org/archive/$pkgname/$pkgname-man-$pkgver.tar.gz
+ kcore-error.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
_buildtags="exclude_graphdriver_aufs exclude_graphdriver_devicemapper"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
build() {
cd "$_builddir"
@@ -79,8 +90,11 @@ vim() {
}
md5sums="6496901bfc30aa8094411a0dd6c10ab5 docker-0.11.1.tar.gz
-ceb985bf1f68fe7e0bd500dca66eacf7 docker-man-0.11.1.tar.gz"
+ceb985bf1f68fe7e0bd500dca66eacf7 docker-man-0.11.1.tar.gz
+e909f4cccd0e066be06538d0669fa4df kcore-error.patch"
sha256sums="91a65759fb5d870f215f25a1e2866204b252be8ed79778ca3f009a8ed6838c62 docker-0.11.1.tar.gz
-f68612e4149d958acc18e9d607f11ed4a6189de628641a18eaf981c406c18e78 docker-man-0.11.1.tar.gz"
+f68612e4149d958acc18e9d607f11ed4a6189de628641a18eaf981c406c18e78 docker-man-0.11.1.tar.gz
+a045e46feef94cace5c2909238351751c6b3d5bbb3fd28c6d80acd04d757a363 kcore-error.patch"
sha512sums="d035cdf2a72cd0b953d7a1a51187cd69634a2a582cd516c75b78654e883396ffb227acaeb30c9ba709c8c90404e397ae21911435ead85a30e258344c3acc803b docker-0.11.1.tar.gz
-da23c045ea5abdb55884fa217c92c8016ced07d39b70c69182864503041aef7429a891dc463ffd225ff8076e50269a9a9657d785f17502aff98bd19d8bdfd547 docker-man-0.11.1.tar.gz"
+da23c045ea5abdb55884fa217c92c8016ced07d39b70c69182864503041aef7429a891dc463ffd225ff8076e50269a9a9657d785f17502aff98bd19d8bdfd547 docker-man-0.11.1.tar.gz
+48d216694a9fd15dbdb3674b1506aff6ce9d3d7d5676d1a1774736ba2c9d466f5b6c0528a5a9ffe6d202cddc2598617fcd9cf8893eca5d9581cf1e29d06d2afc kcore-error.patch"
diff --git a/main/docker/kcore-error.patch b/main/docker/kcore-error.patch
new file mode 100644
index 000000000..451566687
--- /dev/null
+++ b/main/docker/kcore-error.patch
@@ -0,0 +1,38 @@
+From d60301edb88a4e182a10cd2becb3795b2dd13fab Mon Sep 17 00:00:00 2001
+From: Tianon Gravi <admwiggin@gmail.com>
+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 <admwiggin@gmail.com> (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
+