diff options
-rw-r--r-- | app-emulation/docker/ChangeLog | 11 | ||||
-rw-r--r-- | app-emulation/docker/Manifest | 30 | ||||
-rw-r--r-- | app-emulation/docker/docker-1.3.3-r1.ebuild | 234 |
3 files changed, 260 insertions, 15 deletions
diff --git a/app-emulation/docker/ChangeLog b/app-emulation/docker/ChangeLog index 1b964fe4d197..d923109436ce 100644 --- a/app-emulation/docker/ChangeLog +++ b/app-emulation/docker/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-emulation/docker # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/ChangeLog,v 1.34 2014/12/12 18:53:23 xarthisius Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/ChangeLog,v 1.35 2014/12/16 00:39:53 alunduil Exp $ + +*docker-1.3.3-r1 (16 Dec 2014) + + 16 Dec 2014; Alex Brandt <alunduil@gentoo.org> +docker-1.3.3-r1.ebuild: + add version 1.3.3-r1 from tianon's docker overlay + + Version 1.4.0 of docker has a nasty bug when using volumes that are bind + mounts. Thus, I've added 1.3.3-r1 until 1.4.1 is released and fixes this + issue, or longer that's OK too. *docker-1.4.0 (12 Dec 2014) diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest index 75ca25a04164..a4b5a491160f 100644 --- a/app-emulation/docker/Manifest +++ b/app-emulation/docker/Manifest @@ -4,24 +4,26 @@ Hash: SHA256 AUX docker-r2.confd 581 SHA256 94e1c07b09701f3b0b1c4f6f917206da3b32f8d7e961c3850c4391ebd59df0b4 SHA512 5838270ff9ce7b9a562b2449ba5f4ad72db956dd03f6a1b006c8019ff43fea1c4ae1e2a4818fb092b6096cff6bd9ce539b05b7940412c55b3bb3e30c356da944 WHIRLPOOL a8e3759b6c86855afa7e784d50a7926fc888d50ec03dc2d9dcd70c3f2dd11caf6670196d91f383cab1d603f32a968bed4b3a0668ec1a38d41dc1142ec92235cc AUX docker-r2.initd 1767 SHA256 0cb83137cf3d37aadf450dd30ec9e0ceca3d865867f7fe64a43a1d5f42d2ecf8 SHA512 1250f8b16ded27877cf2759fca1d69f37ce308d4d5e5a29438210e847894617fa088260b0cfd87e1ee65ed26a4293d98c79462c1ccc93aac14203fbfed4b69a2 WHIRLPOOL 272f04feb587a0f91079f41ad90868f99c28a21a5ec35876f38dbbd342a53796dd4ec822fa2cd3506f22485b6a0147d24da2e7ab89da7875f84e3e9fab50c3c8 AUX docker.service 249 SHA256 ddf23c8bd07303a87f7e76881b14c023c54835feba575998d6f5a9a7ec8a0a0a SHA512 d7564489486b3547cb79057fa44cb3eb0aa6c50ec47eca12579748170d62ab435395d173fdf39fcec8e86f4778db7413b7fa0ab85dbbd2fc1636164d4aad8b37 WHIRLPOOL 553f8a93a5d7cb6cc037a2004e19efa06520eba363e12574a5d251d10b23d9f24d1a023eb9915968a9bb661bddb577163948fb180a85ca9c916cac5c6680b1df +DIST docker-1.3.3.tar.gz 5886211 SHA256 9c054e438eee94e7028e860fcb2356a0983e98522223089902d0c61f505dbbcb SHA512 d0f928c1edfcd6d3e11893c2c41da430041fcbe53217e1abc978b379e5464c41204de97da9d5e3e06c1337f4e5b79e1ae98f734d62d64962b3f8b6c37c9bdb85 WHIRLPOOL 2fd4ae184d04f21c62a7e7157f81fe9484ce05cc019c184acc9bcc23db7ba2a866930c6bdcb69f2981a0c394e61e6c996a847bcd8102657a82806fdec2aed29d DIST docker-1.4.0.tar.gz 6053302 SHA256 3fe1c317a1685de896690986a1e0d175ff0baaa9b893bf7d58737df632e19967 SHA512 7eeaae011d0439aca8af9f6db6541f6a50250de600cbc9c080d9506c57179438a7b8cce5495ccf16a59ce7e1fcde174e00d458b494b94fc2d3bcb086d3805aa5 WHIRLPOOL ab340cc34687dd11f5be4b5eac6c4cc4d8b910bb0dfce13bc3aef138c0954db7de6f310ea33c0eb5d0dae8251dd37b4612ad8219ba9ded05971e23fa8f19b45c +EBUILD docker-1.3.3-r1.ebuild 6622 SHA256 7492e6644263dd180c5cead23b0a490bb6120fd309497c3c23c3d1288e97b9b0 SHA512 64a91ede0108b96fa464ac1b52bdc4824c3bdb2d9ce04562567fee6a5c928d2e70f1b2bc4ee3955d93c8071dc012965dda190cf69c497fb3474eb22ebe7d8c6e WHIRLPOOL dd0eac9bd9fe6e46094f0688605f701e1d242bf21ae2fc957d1d852fb111d2d1e0a6518f488479dfc717ae9d279b7c5775967e2771b05bf147b46f0dbb6215b7 EBUILD docker-1.4.0.ebuild 6603 SHA256 13b37a1327e93a694b50ddc209edbc818bda86a2c65ad51d072e12e523822a1a SHA512 f7ba30458f86042878568917aedd201a8c6d422d7b2a724b3d62065ff022c77a51b7e7928ef3c097f8db95b43eeca38e2e749221b2bfaefb6508c5912c4cf3e7 WHIRLPOOL 2887ec3570c347f5b90010aac072090fdddac33a7ee10d9b3438029267c7621377262983b80d9fb5244be49474bbccfabf893171ae5a4a9dad88808e09e559e4 -MISC ChangeLog 5344 SHA256 fc37fe350c042c34aad03ebd013bd693d8bf7504471ed1c2569e8f3dc066857b SHA512 19a7fb2e124f7d7f47397bf3a384b85fef8a155a5b7ecc94728bfd2cad41c553acf0fa929892a3f2a39aa740065d15c5c13df81b88a9545b6f5ddc7a18b9785a WHIRLPOOL f73f7b68e11fda145bf16a0743c0aafbec99ae73fb5bca4928805e9b8ab65b3bfcdf87a4bd79a13651f7a7fbdadeb35d7726d921b3694007300420edb861483d +MISC ChangeLog 5687 SHA256 5f3119dc45d3f029acf5fb60d7a11a60dc5e8d137d2cf91fc0bf97ddb49da5e9 SHA512 444dd84236ae5d548822c4867d86885b267c3053331276857835b12023363f57bbde9350b5ba45c2090e269aea7af3f64a87100b9709634de15945eccf5e1696 WHIRLPOOL f782426d656cbeb161265c1024263fa79a73cdacdfe0e66731a3fe66e2ee609c6bdec85c761d98ee249c60c726310a8dd9b984c9651407cda5e0e08e86521ce5 MISC metadata.xml 1277 SHA256 e5d0394aa0f0ba5f133ccbbfe92c28111a5ad888d46a53ade9625ef0155c7d9b SHA512 f910edcabda2011dd1ca107848663c97a17fbb0f84391376abd5e26111662e8bb172c9d0b77a57b82fc5b35181a543a8f869823d0ae7b9d3deaaa75c18d03f10 WHIRLPOOL cbfeb224f2205c91fa288d18086dce87d61d25481f0c10e09a8b77e9950162d647fa8c3cd7793c2fad19c3c2a0be55fad29a9002eeacf02a6a10a48d68e846c5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQIcBAEBCAAGBQJUizmnAAoJEF0huFKJUZL54w0P/1wzb2Z8wFXZvpcyGl6d4DG3 -ph2yk7OAv+rF0Ik0/OaKvJKa0c2eX01/NJUlUtMxEKk+zXH+MFb6oAN1bLrfbQdf -K5SXfRrlpqUwc/plckHX1OVXZgNY0uF1S6K2uQ3V0lnAVbNjTa59jsdWykMbI25a -QgKXxVvTP1omFYpGeB+S0nfCfbmD6We4hWKGUA/QuhvshQAnRWTn4tX7nC7wF1dA -l9yv7KR2cqt0tYcV23krchKnczbUDJzz44HPHfb2Loa0KxzuZ1t9gd6TOvmIPUzq -nwG6Q6XeaVUv5mHKszkqRb0V67Sq5kmstI+IKf/LGP/WDvYU6BrkHFc6sj1VMvqN -TVb0D4+xC26V4bQSquUh58vcYJj4hFoUPCgMlrnbfrk8eSkFTS3TOOGQIvWW97Bt -jHAJ1LkR7GduT1VzFKu7PmDn1371EbeVPY5G/lAf2wduNnD5a0MximvUeEzw0yl6 -15OlOVI0vdZHbxGGLQOB+JqsO/zYdfN/qiQYl8BtIVvUnX4muaVLel7EDbMPa2AB -6TGZzrKKEichgnEOSb2DecFFaDNswChLWC+F76r1bEQvW9HvFZBpCI93cWzqCPIH -uVBOQvQD/yQvJb50yvVM7eEdrtxKMr30xvi7TUMDbiMEXsh+7u3VEHdASBq/bJYS -Vm/OeCVr/oady+2qIkc6 -=QNyu +iQIcBAEBCAAGBQJUj39bAAoJECZUyt4RqCF8MAEP/RY0i+8TWpy3eJT7EUyjCt3k +TJn2CfMlSPJ/rsOMnIufFkZ5GR6pJPfqgJ/aXGXNKXmQ/iA7wtxaBWdxzaOrRyMm +lrknq9hU1719bYM/532OVVkQabz7k74uaMND5rsRiYBWOLKov2Y2nktvRv/1BKid +FPp75PdUnj3hggXjr1xLiv5jaaakoxmUfx2vsQUnnkccq+KBJCemYY4+JgKeFmzM +yhkztcI8C3cWRU30cWanVfwenebYDXerw/iY5LUQvpyl//F9DLSaAt8jf0pPjZeD +D3YfdOMNnAaVydmqnuzvd7WRKYkzpsfqaONgBuczyWt+7D7pQk999mNzjZgcdOqv +VSTISHua0FWIeCt+DCwM1JGbEQnp4DF2ZY1wR5SJb1V2vT12MAMmKPbWkeP8xinb +Y3BReUWxcXlTwz/agjZtSPLaz76wNxoL2UbTXyTm4mQ2ttf6FQ3KU71y6X+HL50U +JkwwTHdisp53bwmz4aejXgUr1yueWpS9+URGJU1hUC83hf+dRik9kxNhqV6sVvJN +kOiW1GphMPFlEIwQ+p0+twQF7lLmL5wyDmcsrXGpqxeJnnnNT3cI/SaeqiNPQMxu +5/pdvLN670TQiAWG4Q8DC9BvvQzuYlB1rQDIn73bwCNAx0bGR+dmybWyVX7xGkKX +CxMWGXPN3/1jgnzkIJ90 +=6GHO -----END PGP SIGNATURE----- diff --git a/app-emulation/docker/docker-1.3.3-r1.ebuild b/app-emulation/docker/docker-1.3.3-r1.ebuild new file mode 100644 index 000000000000..e0da96849eb0 --- /dev/null +++ b/app-emulation/docker/docker-1.3.3-r1.ebuild @@ -0,0 +1,234 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/docker-1.3.3-r1.ebuild,v 1.1 2014/12/16 00:39:53 alunduil Exp $ + +EAPI=5 + +DESCRIPTION="Docker complements kernel namespacing with a high-level API which operates at the process level" +HOMEPAGE="https://www.docker.com" + +GITHUB_URI="github.com/docker/docker" + +if [[ ${PV} == *9999 ]]; then + SRC_URI="" + EGIT_REPO_URI="git://${GITHUB_URI}.git" + inherit git-2 +else + SRC_URI="https://${GITHUB_URI}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + DOCKER_GITCOMMIT="d344625" + KEYWORDS="~amd64" + [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!" +fi + +inherit bash-completion-r1 linux-info multilib systemd udev user + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="aufs btrfs +contrib +device-mapper doc lxc vim-syntax zsh-completion" + +# https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#build-dependencies +CDEPEND=" + >=dev-db/sqlite-3.7.9:3 + device-mapper? ( + >=sys-fs/lvm2-2.02.89[thin] + ) +" + +DEPEND=" + ${CDEPEND} + >=dev-lang/go-1.3 + <dev-lang/go-1.4 + btrfs? ( + >=sys-fs/btrfs-progs-3.16.1 + ) +" + +# https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#runtime-dependencies +# https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#optional-dependencies +RDEPEND=" + ${CDEPEND} + + !app-emulation/docker-bin + >=net-firewall/iptables-1.4 + sys-process/procps + >=dev-vcs/git-1.7 + >=app-arch/xz-utils-4.9 + + lxc? ( + >=app-emulation/lxc-1.0 + ) + aufs? ( + || ( + sys-fs/aufs3 + sys-kernel/aufs-sources + ) + ) +" + +RESTRICT="installsources strip" + +# see "contrib/check-config.sh" from upstream's sources +CONFIG_CHECK=" + NAMESPACES NET_NS PID_NS IPC_NS UTS_NS + DEVPTS_MULTIPLE_INSTANCES + CGROUPS CGROUP_CPUACCT CGROUP_DEVICE CGROUP_FREEZER CGROUP_SCHED + MACVLAN VETH BRIDGE + NF_NAT_IPV4 IP_NF_FILTER IP_NF_TARGET_MASQUERADE + NETFILTER_XT_MATCH_ADDRTYPE NETFILTER_XT_MATCH_CONNTRACK + NF_NAT NF_NAT_NEEDED + + ~MEMCG_SWAP + ~RESOURCE_COUNTERS + ~CGROUP_PERF +" + +ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers" +ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering" +ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering" + +pkg_setup() { + if kernel_is lt 3 8; then + eerror "" + eerror "Using Docker with kernels older than 3.8 is unstable and unsupported." + eerror " - http://docs.docker.com/installation/binaries/#check-kernel-dependencies" + die 'Kernel is too old - need 3.8 or above' + fi + + # for where these kernel versions come from, see: + # https://www.google.com/search?q=945b2b2d259d1a4364a2799e80e8ff32f8c6ee6f+site%3Akernel.org%2Fpub%2Flinux%2Fkernel+file%3AChangeLog* + if ! { + kernel_is ge 3 16 \ + || { kernel_is 3 15 && kernel_is ge 3 15 5; } \ + || { kernel_is 3 14 && kernel_is ge 3 14 12; } \ + || { kernel_is 3 12 && kernel_is ge 3 12 25; } + }; then + ewarn "" + ewarn "There is a serious Docker-related kernel panic that has been fixed in 3.16+" + ewarn " (and was backported to 3.15.5+, 3.14.12+, and 3.12.25+)" + ewarn "" + ewarn "See also https://github.com/docker/docker/issues/2960" + fi + + if use aufs; then + CONFIG_CHECK+=" + ~AUFS_FS + " + # TODO there must be a way to detect "sys-kernel/aufs-sources" so we don't warn "sys-fs/aufs3" users about this + # an even better solution would be to check if the current kernel sources include CONFIG_AUFS_FS as an option, but that sounds hairy and error-prone + ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used" + fi + + if use btrfs; then + CONFIG_CHECK+=" + ~BTRFS_FS + " + fi + + if use device-mapper; then + CONFIG_CHECK+=" + ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS + " + fi + + linux-info_pkg_setup +} + +src_prepare() { + # allow user patches (use sparingly - upstream won't support them) + epatch_user +} + +src_compile() { + # if we treat them right, Docker's build scripts will set up a + # reasonable GOPATH for us + export AUTO_GOPATH=1 + + # setup CFLAGS and LDFLAGS for separate build target + # see https://github.com/tianon/docker-overlay/pull/10 + export CGO_CFLAGS="-I${ROOT}/usr/include" + export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)" + + # if we're building from a zip, we need the GITCOMMIT value + [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT + + if gcc-specs-pie; then + sed -i "s/EXTLDFLAGS_STATIC='/EXTLDFLAGS_STATIC='-fno-PIC /" hack/make.sh || die + grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed' + + sed -i 's/LDFLAGS_STATIC_DOCKER="/LDFLAGS_STATIC_DOCKER="-extldflags -fno-PIC /' hack/make/dynbinary || die + grep -q -- '-fno-PIC' hack/make/dynbinary || die 'hardened sed failed' + fi + + # let's set up some optional features :) + export DOCKER_BUILDTAGS='' + for gd in aufs btrfs device-mapper; do + if ! use $gd; then + DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" + fi + done + + # time to build! + ./hack/make.sh dynbinary || die 'dynbinary failed' + + # TODO get go-md2man and then include the man pages using docs/man/md2man-all.sh +} + +src_install() { + VERSION=$(cat VERSION) + newbin bundles/$VERSION/dynbinary/docker-$VERSION docker + exeinto /usr/libexec/docker + newexe bundles/$VERSION/dynbinary/dockerinit-$VERSION dockerinit + + newinitd contrib/init/openrc/docker.initd docker + newconfd contrib/init/openrc/docker.confd docker + + systemd_dounit contrib/init/systemd/docker.{service,socket} + + udev_dorules contrib/udev/*.rules + + dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md + if use doc; then + # TODO doman contrib/man/man*/* + + docompress -x /usr/share/doc/${PF}/md + docinto md + dodoc -r docs/sources/* + fi + + dobashcomp contrib/completion/bash/* + + if use zsh-completion; then + insinto /usr/share/zsh/site-functions + doins contrib/completion/zsh/* + fi + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles + doins -r contrib/syntax/vim/ftdetect + doins -r contrib/syntax/vim/syntax + fi + + if use contrib; then + mkdir -p "${D}/usr/share/${PN}/contrib" + cp -R contrib/* "${D}/usr/share/${PN}/contrib" + fi +} + +pkg_postinst() { + udev_reload + + elog "" + elog "To use Docker, the Docker daemon must be running as root. To automatically" + elog "start the Docker daemon at boot, add Docker to the default runlevel:" + elog " rc-update add docker default" + elog "Similarly for systemd:" + elog " systemctl enable docker.service" + elog "" + + # create docker group if the code checking for it in /etc/group exists + enewgroup docker + + elog "To use Docker as a non-root user, add yourself to the 'docker' group:" + elog " usermod -aG docker youruser" + elog "" +} |