diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-01-20 07:36:15 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-01-20 07:37:23 +0000 |
commit | 30f737a26499b1a9bbbcc682fa590414b5478ae5 (patch) | |
tree | e801418c6728dbf1a51b04b9e562c0b3b8f30d38 | |
parent | d52a4af59321ff892fd99d568a2612d6c93b78b3 (diff) | |
download | aports-30f737a26499b1a9bbbcc682fa590414b5478ae5.tar.bz2 aports-30f737a26499b1a9bbbcc682fa590414b5478ae5.tar.xz |
testing/docker: add 1.10-rc1 for testing
-rw-r--r-- | testing/docker/APKBUILD | 102 | ||||
-rw-r--r-- | testing/docker/docker.pre-install | 6 | ||||
-rw-r--r-- | testing/docker/openrc-fixes.patch | 34 |
3 files changed, 142 insertions, 0 deletions
diff --git a/testing/docker/APKBUILD b/testing/docker/APKBUILD new file mode 100644 index 0000000000..83620b0198 --- /dev/null +++ b/testing/docker/APKBUILD @@ -0,0 +1,102 @@ +# Maintainer: Eivind Uggedal <eivind@uggedal.com> +pkgname=docker +pkgver=1.10.0_rc1 +pkgrel=0 +_ver=${pkgver/_rc/-rc} +_gitcommit=677c593 +pkgdesc="Pack, ship and run any application as a lightweight container" +url="http://www.docker.io/" +arch="all" +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-$_ver.tar.gz::https://github.com/docker/docker/archive/v$_ver.tar.gz + openrc-fixes.patch + " + +_builddir="$srcdir"/$pkgname-$_ver +_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="40780d251a0ce9c1076ae8fd8d960ff3 docker-1.10.0-rc1.tar.gz +506e32a6157a7f92e67511111fba6fe8 openrc-fixes.patch" +sha256sums="b3ff5ca921d74242fdc72c50cac61883208b6f90261f472bb82a085859eb8dae docker-1.10.0-rc1.tar.gz +864d229e21dfa6c931b29b908093302a48837ddb1aa4205088f6f7fd4d7da4e3 openrc-fixes.patch" +sha512sums="ea5d9366fba59d52e0fb0eae370bd83edfb539d08d7898be9f9cf0aa0665de5336cbd8676d52afe8d4c50f0204402ad9fb9f7a7561129ed0247a36e75a653c92 docker-1.10.0-rc1.tar.gz +1162f62e8a7a5ded0c54cfe46014449efd67491bdb678fa22862117adb08206c909a3f98b0062125d25256dc1f48596b696bd4b19a8804d2862e758678a8bb62 openrc-fixes.patch" diff --git a/testing/docker/docker.pre-install b/testing/docker/docker.pre-install new file mode 100644 index 0000000000..8a1dec6f2a --- /dev/null +++ b/testing/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/testing/docker/openrc-fixes.patch b/testing/docker/openrc-fixes.patch new file mode 100644 index 0000000000..f350daaf93 --- /dev/null +++ b/testing/docker/openrc-fixes.patch @@ -0,0 +1,34 @@ +diff --git a/contrib/init/openrc/docker.initd b/contrib/init/openrc/docker.initd +index 26fa8ef..ea8a3b2 100644 +--- a/contrib/init/openrc/docker.initd ++++ b/contrib/init/openrc/docker.initd +@@ -9,11 +9,18 @@ DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}" + start_stop_daemon_args="--background \ + --stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\"" + ++grsecdir=/proc/sys/kernel/grsecurity ++ + start_pre() { + 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 + + return 0 + } + +--- 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" |