diff options
author | Eivind Uggedal <eivind@uggedal.com> | 2015-09-30 08:26:05 +0000 |
---|---|---|
committer | Eivind Uggedal <eivind@uggedal.com> | 2015-09-30 08:26:05 +0000 |
commit | 521f20d8829e17ebe15560dddc60af139ce03390 (patch) | |
tree | 8bbf6d673e2cb48d65cd3f71ea42a29089434995 /community/docker | |
parent | 6f4d1a975437768e9f6dbe7f2f12ab36147b2b55 (diff) | |
download | aports-521f20d8829e17ebe15560dddc60af139ce03390.tar.bz2 aports-521f20d8829e17ebe15560dddc60af139ce03390.tar.xz |
community/docker: moved from main
Diffstat (limited to 'community/docker')
-rw-r--r-- | community/docker/APKBUILD | 101 | ||||
-rw-r--r-- | community/docker/docker.pre-install | 6 | ||||
-rw-r--r-- | community/docker/openrc-fixes.patch | 31 |
3 files changed, 138 insertions, 0 deletions
diff --git a/community/docker/APKBUILD b/community/docker/APKBUILD new file mode 100644 index 0000000000..9ee52c5672 --- /dev/null +++ b/community/docker/APKBUILD @@ -0,0 +1,101 @@ +# Maintainer: Eivind Uggedal <eivind@uggedal.com> +pkgname=docker +pkgver=1.8.2 +pkgrel=3 +_gitcommit=0a8c2e3 +pkgdesc="Pack, ship and run any application as a lightweight container" +url="http://www.docker.io/" +arch="x86_64" +license="ASL 2.0" +depends="iptables git xz" +depends_dev="" +makedepends="go sqlite-dev btrfs-progs-dev bash linux-headers" +options="!strip" +install="$pkgname.pre-install" +subpackages=" + $pkgname-bash-completion:bashcomp + $pkgname-zsh-completion:zshcomp + $pkgname-vim:vim + " +source=" + $pkgname-$pkgver.tar.gz::https://github.com/docker/docker/archive/v$pkgver.tar.gz + openrc-fixes.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" + + export AUTO_GOPATH=1 + export DOCKER_GITCOMMIT=$_gitcommit + export DOCKER_BUILDTAGS=$_buildtags + unset CC # prevent possible ccache issues + + ./hack/make.sh dynbinary +} + +package() { + cd "$_builddir" + local ver=$(cat VERSION) + + install -Dm755 bundles/$ver/dynbinary/docker-$ver \ + "$pkgdir"/usr/bin/docker + install -Dm755 bundles/$ver/dynbinary/dockerinit-$ver \ + "$pkgdir"/usr/lib/docker/dockerinit + + install -Dm755 contrib/init/openrc/docker.initd \ + "$pkgdir"/etc/init.d/docker + install -Dm644 contrib/init/openrc/docker.confd \ + "$pkgdir"/etc/conf.d/docker +} + +bashcomp() { + pkgdesc="Bash completion for Docker" + arch="noarch" + depends="" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + + install -Dm644 "$_builddir"/contrib/completion/bash/$pkgname \ + "$subpkgdir"/usr/share/bash-completion/completions/$pkgname +} + +zshcomp() { + pkgdesc="Zsh completion for $pkgname" + arch="noarch" + depends="" + install_if="$pkgname=$pkgver-r$pkgrel zsh" + + install -Dm644 "$_builddir"/contrib/completion/zsh/_$pkgname \ + "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname || return 1 +} + +vim() { + depends="" + pkgdesc="Vim syntax for Docker" + arch="noarch" + + local f= + for f in ftdetect/dockerfile.vim syntax/dockerfile.vim; do + install -Dm644 "$_builddir"/contrib/syntax/vim/$f \ + "$subpkgdir"/usr/share/vim/vimfiles/$f + done +} + +md5sums="4faf25b356900f3e7599783ad4565e69 docker-1.8.2.tar.gz +2c31dfb597ded751e566602611ddb6ae openrc-fixes.patch" +sha256sums="457569ca8edd70293132789bfe51636f86cd8a46a60c6d02d5ee8600cf79f74b docker-1.8.2.tar.gz +ae9c3c780ef5e9ffb5666cbe343b0ecb9f498f1ab5d68373b39eea76b68a0f7c openrc-fixes.patch" +sha512sums="c44f3cc0e0b7db463730620c0ec4b1aa1ea4a42f6528c891914318cb945aaa906e8eeaf91d32fb2d87a11ea1be428d1cf0de7d3ce4681c7db37390e4e1f79c67 docker-1.8.2.tar.gz +79e78eed7eb1bfc468103fd4b171f66eabbffd3e504bfe1b8bdb40441292f316f6584fae415b93f0630d6975f888f1db4fb702886e78b6adc3a9a156a80de9b3 openrc-fixes.patch" diff --git a/community/docker/docker.pre-install b/community/docker/docker.pre-install new file mode 100644 index 0000000000..8a1dec6f2a --- /dev/null +++ b/community/docker/docker.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +if ! getent group docker >/dev/null; then + addgroup -S docker +fi +exit 0 diff --git a/community/docker/openrc-fixes.patch b/community/docker/openrc-fixes.patch new file mode 100644 index 0000000000..701459910b --- /dev/null +++ b/community/docker/openrc-fixes.patch @@ -0,0 +1,31 @@ +--- a/contrib/init/openrc/docker.initd 2015-02-10 17:14:37.000000000 -0100 ++++ b/contrib/init/openrc/docker.initd 2015-03-31 10:17:15.500070311 -0200 +@@ -8,11 +8,18 @@ + DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker} + DOCKER_OPTS=${DOCKER_OPTS:-} + ++grsecdir=/proc/sys/kernel/grsecurity ++ + start() { + checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE" ++ for i in $disable_grsec; do ++ if [ -e "$grsecdir/$i" ]; then ++ einfo " Disabling $i" ++ echo 0 > "$grsecdir/$i" ++ fi ++ done + + ulimit -n 1048576 +- ulimit -u 1048576 + + ebegin "Starting docker daemon" + start-stop-daemon --start --background \ +--- a/contrib/init/openrc/docker.confd 2015-02-10 17:14:37.000000000 -0100 ++++ b/contrib/init/openrc/docker.confd 2015-03-31 14:52:47.323685914 -0200 +@@ -11,3 +11,6 @@ + + # any other random options you want to pass to docker + DOCKER_OPTS="" ++ ++# disable grsecurity features ++#disable_grsec="chroot_deny_chmod chroot_deny_mknod" |