diff options
author | 2014-01-15 14:09:46 -0600 | |
---|---|---|
committer | 2014-01-15 14:09:46 -0600 | |
commit | 958dee60298cd95a77dff0a96ee5246951e28624 (patch) | |
tree | ebdbe590e53189697afaaf111eca93359942cfe2 | |
parent | adobe-air-sdk-bin: import 1.5.3 from sunrise. (diff) | |
download | dberkholz-958dee60298cd95a77dff0a96ee5246951e28624.tar.gz dberkholz-958dee60298cd95a77dff0a96ee5246951e28624.tar.bz2 dberkholz-958dee60298cd95a77dff0a96ee5246951e28624.zip |
docker: bump to 0.7.6
-rw-r--r-- | app-emulation/docker/Manifest | 9 | ||||
-rw-r--r-- | app-emulation/docker/docker-0.7.6.ebuild | 184 | ||||
-rw-r--r-- | app-emulation/docker/files/docker-r2.confd | 18 | ||||
-rwxr-xr-x | app-emulation/docker/files/docker-r2.initd | 54 | ||||
-rw-r--r-- | app-emulation/docker/files/docker-r3.confd | 13 | ||||
-rwxr-xr-x | app-emulation/docker/files/docker-r3.initd | 31 | ||||
-rwxr-xr-x | app-emulation/docker/files/docker.initd | 31 | ||||
-rw-r--r-- | app-emulation/docker/files/docker.service | 12 | ||||
-rw-r--r-- | app-emulation/docker/metadata.xml | 25 |
9 files changed, 377 insertions, 0 deletions
diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest new file mode 100644 index 0000000..13ecc43 --- /dev/null +++ b/app-emulation/docker/Manifest @@ -0,0 +1,9 @@ +AUX docker-r2.confd 581 SHA256 94e1c07b09701f3b0b1c4f6f917206da3b32f8d7e961c3850c4391ebd59df0b4 SHA512 5838270ff9ce7b9a562b2449ba5f4ad72db956dd03f6a1b006c8019ff43fea1c4ae1e2a4818fb092b6096cff6bd9ce539b05b7940412c55b3bb3e30c356da944 WHIRLPOOL a8e3759b6c86855afa7e784d50a7926fc888d50ec03dc2d9dcd70c3f2dd11caf6670196d91f383cab1d603f32a968bed4b3a0668ec1a38d41dc1142ec92235cc +AUX docker-r2.initd 1626 SHA256 d5971b96307ba6946da6431df4c024f0bd9812db63640fda35d829d52a6e2bd7 SHA512 8eb07d85cb6d02acffd6f26cfcd4e93b80685dd8b45bf8aec7dedfa5181e13f69ed476232603eb114e8b7f742181b00cf8617022c9ef7da42013c7321847315c WHIRLPOOL 9321f65a6db8cf957f98232e5a12aaf614396a64f651a9eb561093edfe71d2891cd638df967294b50f2ed58395c8b3432bff78d68213f1c5db15528cbd7d1d6a +AUX docker-r3.confd 356 SHA256 be66cae5c678687ad989e8b8409b98e99c6f7dc484babb6018907ce53a01c33d SHA512 3fed48b59ca329f755f883fe794556179fb85c093342716f0455b716c0408e3e7a074ba32fe66579f0ca79b7a0cc82718a1d05c84c5d69f53a474b6f1e167eb0 WHIRLPOOL fef81b13617bba43a31f32c0df8a25173556ddb4accf8a985435cf374cf939c5f2da657a3435d03cf9e551858a4c1bcc714e2a1744a7e4abb3d097df8fbb7c8c +AUX docker-r3.initd 789 SHA256 748f7a01b4fefcb299cdd248b1726d9384ffb98286b4a1b035248a281793eea7 SHA512 105c3f75a612abf0ec7f64ac858aeff374b3db291d36811fa1a85245851efc75bc4df55a0c8ddfb6316f55e1fb3a6aff3ffe44a1f3f0e153e0b4dcfefd3bf4ab WHIRLPOOL 337483995ae6542ef40156279adbf16d760b140b7b71c2cdb20d0ebd5672b331167a9d36a3a36dc15df6dabfc4a8786cf73fff1e35e589f52289d174c74d4cd3 +AUX docker.initd 780 SHA256 abf8e48df3817f0c2b1971c3748b063e86ec3a6c18536e9c3468fb2e9ee455d4 SHA512 e4b1fbe5eabd8dc6c32bfcdfb93eea2fd5ff74406cd9e8711a752ae887f4b58fdb64d99089c3a86067d615ca42842c201e380a59e305ddd42d40ed858c684581 WHIRLPOOL 6b41b18c8cca22506daedc93da205d147fd5743d7350bb3681123b6ff9732045b5448d68417091a8107abf2a02a902762de55345399b857e0a872d235a713f00 +AUX docker.service 285 SHA256 848c73b11cfd0071076b7119bc4a45db83d7abfb8b1ff3ba571c0dffc5d50071 SHA512 63e3b10d3af77254e0b78eae80386247ad4ffb2b4a3a3843b635121ae42ad4a313a0e589ec420a9bd4ddbea35d7f5eea04de82b565e30d42989abbd1f9b2a930 WHIRLPOOL a95de86ac6a6a5000bbd37be43a4344e0e9b3115e4d5dd1a0e68517ea4d1df1f87aa3fbf5e095b2a6aa0c081ee512019d8c9a9d52abadf6d46cc492149249caa +DIST docker-0.7.6.zip 2669399 SHA256 d9ec6e598dcf75528bf5bfdfd341498a54b8d0748707a0cd6cea0cbe3683fac9 SHA512 8787e7180fb3d4841c9b12ed27c0eac6dbfd777260f51d9b130582952e314835dd177debce354cf49f264b305817fd249411a751ea7ab0bb02eaaff2e6a5984c WHIRLPOOL bb30164d13087b4375011ad569c09087fe7fa493b228087631b52f1a55d4b77e28af75777629f99c1c0e4e8e07f65a3ece123d3ca86e19fa5eef2d90ed03813d +EBUILD docker-0.7.6.ebuild 4495 SHA256 9797ee791f824c7b0e356013eca16791145daa5b6b55fae71efcb3f125d0eb3f SHA512 ed9dbc675144d3fe2828570c67c44df4e60aa2de093140a217d1db15fc730801d7b353dec39b9b51e49b5fcaa75e9f34ac4c2af49813fb0700d58d1500ace01e WHIRLPOOL ed67d53c25a28f14e91c4b3158d96604c95a195af00ab841c29be8a1c5849d30a05ee601d5313d4932e0fc55bed42f5b04fde6ca43757a50e1e0544a30b3dc37 +MISC metadata.xml 839 SHA256 5404323c6318eea6a2ad31f370ee8b698503c421532ed6341062262bf8b4d243 SHA512 afde4228cad6131fec7d91ecd85829f3917497fd67618137b008993912c564159855c1ddc054343bc3f49b0bd27610d5daf5afede3d1a4a81ac14f7e7638ca3f WHIRLPOOL 71ed16244de522827c9beab96b76b211a00ddbb750c1080074951522691424cebf08af116119e5ebdb1a98823e95735dfb27586396846dd9c5ff2a9f1dac6254 diff --git a/app-emulation/docker/docker-0.7.6.ebuild b/app-emulation/docker/docker-0.7.6.ebuild new file mode 100644 index 0000000..6b950dd --- /dev/null +++ b/app-emulation/docker/docker-0.7.6.ebuild @@ -0,0 +1,184 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +DESCRIPTION="Docker complements LXC with a high-level API which operates at the process level." +HOMEPAGE="http://www.docker.io/" + +GITHUB_URI="github.com/dotcloud/docker" + +if [[ ${PV} == *9999 ]]; then + SRC_URI="" + EGIT_REPO_URI="git://${GITHUB_URI}.git" + inherit git-2 + KEYWORDS="" +else + SRC_URI="https://${GITHUB_URI}/archive/v${PV}.zip -> ${P}.zip" + DOCKER_GITCOMMIT="c348c04" + KEYWORDS="~amd64" + [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!" +fi + +inherit bash-completion-r1 linux-info systemd udev user + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="aufs +device-mapper doc vim-syntax zsh-completion" + +# TODO work with upstream to allow us to build without lvm2 installed if we have -device-mapper +CDEPEND=" + >=dev-db/sqlite-3.7.9:3 + sys-fs/lvm2[thin] +" +DEPEND=" + ${CDEPEND} + >=dev-lang/go-1.2 + dev-vcs/git + dev-vcs/mercurial + doc? ( + dev-python/sphinx + dev-python/sphinxcontrib-httpdomain + ) +" +RDEPEND=" + ${CDEPEND} + !app-emulation/docker-bin + >=app-arch/tar-1.26 + >=sys-apps/iproute2-3.5 + >=net-firewall/iptables-1.4 + >=app-emulation/lxc-0.8 + >=dev-vcs/git-1.7 + >=app-arch/xz-utils-4.9 + aufs? ( + || ( + sys-fs/aufs3 + sys-kernel/aufs-sources + ) + ) +" + +RESTRICT="strip" + +pkg_setup() { + CONFIG_CHECK+=" + ~BRIDGE + ~IP_NF_TARGET_MASQUERADE + ~MEMCG_SWAP + ~NETFILTER_XT_MATCH_ADDRTYPE + ~NF_NAT + ~NF_NAT_NEEDED + " + ERROR_MEMCG_SWAP="MEMCG_SWAP is required if you wish to limit swap usage of containers" + + if use aufs; then + CONFIG_CHECK+=" + ~AUFS_FS + " + ERROR_AUFS_FS="AUFS_FS is required to be set if and only if aufs-sources are used" + fi + + if use device-mapper; then + CONFIG_CHECK+=" + ~BLK_DEV_DM + ~DM_THIN_PROVISIONING + ~EXT4_FS + " + fi + + check_extra_config +} + +src_compile() { + # eventually, perhaps Gentoo will include a "go" eclass to do some of this + + export GOPATH="${WORKDIR}/gopath" + mkdir -p "$GOPATH" || die + + # make sure docker itself is in our shiny new GOPATH + mkdir -p "${GOPATH}/src/github.com/dotcloud" || die + ln -sf "$(pwd -P)" "${GOPATH}/src/github.com/dotcloud/docker" || die + + # we need our vendored deps, too + export GOPATH="$GOPATH:$(pwd -P)/vendor" + + # 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/lib" + + # if we're building from a zip, we need the GITCOMMIT value + [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT + + # time to build! + ./hack/make.sh dynbinary || die + + if use doc; then + emake -C docs docs man || die + fi +} + +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 + + udev_dorules contrib/udev/*.rules + + dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md + if use doc; then + dohtml -r docs/_build/html/* + doman docs/_build/man/* + 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 + + insinto /usr/share/${P}/contrib + doins contrib/README + cp -R "${S}/contrib"/* "${D}/usr/share/${P}/contrib/" +} + +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 "" + + ewarn "" + ewarn "If you want your containers to have access to the public internet or even" + ewarn "the existing private network, IP Forwarding must be enabled:" + ewarn " sysctl -w net.ipv4.ip_forward=1" + ewarn "or more permanently:" + ewarn " echo net.ipv4.ip_forward = 1 > /etc/sysctl.d/${PN}.conf" + ewarn "Please be mindful of the security implications of enabling IP Forwarding." + ewarn "" +} diff --git a/app-emulation/docker/files/docker-r2.confd b/app-emulation/docker/files/docker-r2.confd new file mode 100644 index 0000000..5436b23 --- /dev/null +++ b/app-emulation/docker/files/docker-r2.confd @@ -0,0 +1,18 @@ +# /etc/conf.d/docker: config file for /etc/init.d/docker + +# where the docker daemon output gets piped +#DOCKER_LOGFILE="/var/log/docker.log" + +# where docker's pid get stored +#DOCKER_PIDFILE="/run/docker.pid" + +# where the docker daemon itself is run from +#DOCKER_BINARY="/usr/bin/docker" + +# uncomment this for a simple workaround to +# https://github.com/dotcloud/docker/issues/1422 +#DOCKER_WORKAROUND_1422="1" + +# if you find that the default DOCKER_WORKAROUND_1422 delay of one second +# is not sufficient, try uncommenting and increasing this value +#DOCKER_WORKAROUND_1422_DELAY="1" diff --git a/app-emulation/docker/files/docker-r2.initd b/app-emulation/docker/files/docker-r2.initd new file mode 100755 index 0000000..5133f9c --- /dev/null +++ b/app-emulation/docker/files/docker-r2.initd @@ -0,0 +1,54 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log} +DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid} +DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker} +DOCKER_WORKAROUND_1422=${DOCKER_WORKAROUND_1422:-0} +DOCKER_WORKAROUND_1422_DELAY=${DOCKER_WORKAROUND_1422_DELAY:-1} + +start() { + checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE" + + ebegin "Starting docker daemon" + start-stop-daemon --start --background \ + --exec "$DOCKER_BINARY" \ + --pidfile "$DOCKER_PIDFILE" \ + --stdout "$DOCKER_LOGFILE" \ + --stderr "$DOCKER_LOGFILE" \ + -- -d -p "$DOCKER_PIDFILE" + eend $? + ret=$? + + if [ $ret -eq 0 ] \ + && [ "$DOCKER_WORKAROUND_1422" ] \ + && [ "$DOCKER_WORKAROUND_1422" -gt 0 ] \ + ; then + # see https://github.com/dotcloud/docker/issues/1422 + ewarn "Working around gh#1422 (via busybox image); this may take a moment" + + # we were calling "docker run" more quickly than "docker -d" could get + # fired up, so our workaround wasn't successful without a short delay + sleep $DOCKER_WORKAROUND_1422_DELAY + + # TODO when we get https://github.com/dotcloud/docker/pull/1589, these + # both need -rm so we clean up after ourselves (thanks, @eliasp!) + docker run -i -t busybox true &> /dev/null || true + # first run will fail, so we ignore its output and result and run again + docker run -i -t busybox true + + ewend $? + fi + + return $ret +} + +stop() { + ebegin "Stopping docker daemon" + start-stop-daemon --stop \ + --exec "$DOCKER_BINARY" \ + --pidfile "$DOCKER_PIDFILE" + eend $? +} diff --git a/app-emulation/docker/files/docker-r3.confd b/app-emulation/docker/files/docker-r3.confd new file mode 100644 index 0000000..ae247c0 --- /dev/null +++ b/app-emulation/docker/files/docker-r3.confd @@ -0,0 +1,13 @@ +# /etc/conf.d/docker: config file for /etc/init.d/docker + +# where the docker daemon output gets piped +#DOCKER_LOGFILE="/var/log/docker.log" + +# where docker's pid get stored +#DOCKER_PIDFILE="/run/docker.pid" + +# where the docker daemon itself is run from +#DOCKER_BINARY="/usr/bin/docker" + +# any other random options you want to pass to docker +DOCKER_OPTS="" diff --git a/app-emulation/docker/files/docker-r3.initd b/app-emulation/docker/files/docker-r3.initd new file mode 100755 index 0000000..2d79a73 --- /dev/null +++ b/app-emulation/docker/files/docker-r3.initd @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log} +DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid} +DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker} +DOCKER_OPTS=${DOCKER_OPTS:-} + +start() { + checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE" + + ebegin "Starting docker daemon" + start-stop-daemon --start --background \ + --exec "$DOCKER_BINARY" \ + --pidfile "$DOCKER_PIDFILE" \ + --stdout "$DOCKER_LOGFILE" \ + --stderr "$DOCKER_LOGFILE" \ + -- -d -p "$DOCKER_PIDFILE" \ + $DOCKER_OPTS + eend $? +} + +stop() { + ebegin "Stopping docker daemon" + start-stop-daemon --stop \ + --exec "$DOCKER_BINARY" \ + --pidfile "$DOCKER_PIDFILE" + eend $? +} diff --git a/app-emulation/docker/files/docker.initd b/app-emulation/docker/files/docker.initd new file mode 100755 index 0000000..986fa08 --- /dev/null +++ b/app-emulation/docker/files/docker.initd @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log} +DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid} +DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker} + +start() { + touch "$DOCKER_LOGFILE" + chown root:docker "$DOCKER_LOGFILE" + chmod 0644 "$DOCKER_LOGFILE" + + ebegin "Starting docker daemon" + start-stop-daemon --start --background \ + --exec "$DOCKER_BINARY" \ + --pidfile "$DOCKER_PIDFILE" \ + --stdout "$DOCKER_LOGFILE" \ + --stderr "$DOCKER_LOGFILE" \ + -- -d -p "$DOCKER_PIDFILE" + eend $? +} + +stop() { + ebegin "Stopping docker daemon" + start-stop-daemon --stop \ + --exec "$DOCKER_BINARY" \ + --pidfile "$DOCKER_PIDFILE" + eend $? +} diff --git a/app-emulation/docker/files/docker.service b/app-emulation/docker/files/docker.service new file mode 100644 index 0000000..dde89a2 --- /dev/null +++ b/app-emulation/docker/files/docker.service @@ -0,0 +1,12 @@ +[Unit] +Description=Easily create lightweight, portable, self-sufficient containers from any application! +Requires=network.target +After=multi-user.target + +[Service] +Type=simple +ExecStartPre=/bin/mount --make-rprivate / +ExecStart=/usr/bin/docker -d + +[Install] +WantedBy=multi-user.target diff --git a/app-emulation/docker/metadata.xml b/app-emulation/docker/metadata.xml new file mode 100644 index 0000000..7676394 --- /dev/null +++ b/app-emulation/docker/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <longdescription> + Docker is an open-source project to easily create lightweight, + portable, self-sufficient containers from any application. The same + container that a developer builds and tests on a laptop can run at + scale, in production, on VMs, bare metal, OpenStack clusters, public + clouds and more. + </longdescription> + <maintainer status="active"> + <email>admwiggin@gmail.com</email> + <name>Tianon</name> + </maintainer> + <use> + <flag name="aufs"> + Enables dependencies for the "aufs" driver, including necessary + kernel flags. + </flag> + <flag name="device-mapper"> + Enables dependencies for the "device-mapper" driver, including + necessary kernel flags. + </flag> + </use> +</pkgmetadata> |