diff options
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/docker/ChangeLog | 10 | ||||
-rw-r--r-- | app-emulation/docker/Manifest | 38 | ||||
-rw-r--r-- | app-emulation/docker/docker-1.6.2.ebuild | 248 | ||||
-rw-r--r-- | app-emulation/docker/files/7179-add-audit_write-cap.patch | 29 | ||||
-rwxr-xr-x | app-emulation/docker/files/docker-r2.initd | 8 | ||||
-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 | 3 |
9 files changed, 387 insertions, 24 deletions
diff --git a/app-emulation/docker/ChangeLog b/app-emulation/docker/ChangeLog index 638e70101b62..5de7c690450a 100644 --- a/app-emulation/docker/ChangeLog +++ b/app-emulation/docker/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-emulation/docker # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/ChangeLog,v 1.50 2015/07/04 23:10:51 alunduil Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/ChangeLog,v 1.51 2015/07/04 23:14:50 alunduil Exp $ + +*docker-1.6.2 (04 Jul 2015) + + 04 Jul 2015; Alex Brandt <alunduil@gentoo.org> +docker-1.6.2.ebuild, + +files/7179-add-audit_write-cap.patch, +files/docker-r3.confd, + +files/docker-r3.initd, +files/docker.initd, files/docker-r2.confd, + files/docker-r2.initd, files/docker.service: + add version 1.6.2 fixes bug #553706 04 Jul 2015; Alex Brandt <alunduil@gentoo.org> metadata.xml: add alunduil to maintainers diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest index 61145d463dd3..c6b1e065af23 100644 --- a/app-emulation/docker/Manifest +++ b/app-emulation/docker/Manifest @@ -1,27 +1,33 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX 7179-add-audit_write-cap.patch 901 SHA256 a776377cf2aae6f832eda127153817b9bd8564295a02a4ffe1cc75a13b3f4828 SHA512 59c6859e3e843c44650706d359cded1fce42033c13e9c332abd28f8d6434bc4396559ec7d204a5da78535b388546797b2edb03dd765a25f346db33a925d2a734 WHIRLPOOL 6ceecfda3af9de7e31c03716a65c91d228b2ec99cf76e0e8dfdebc59c73ce1ca82b0880259f50566b935c48551b2897c817b72fd002c8ebd550aec5630bdbfb6 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 +AUX docker-r2.initd 1732 SHA256 26c279641244cfa62e0eed3ad1516eaadc0685b0897f3087e22e15b8b370ff3e SHA512 938a4f1d44300a0d334ddbde3adc87301e031801f4644126622ffe5dce0a74107f3e38a91c71c0319a526a100e0e93b5054f681b7f4e1eb1f96b61fd834f9a5c WHIRLPOOL 493afe48326adf2784e39b163b386aa6d5add054a9857874eee038af15fe1e4af91d936ce70340e939a63c3004893f98b1e7035aae4ea86fbed76115641d6bd9 +AUX docker-r3.confd 356 SHA256 be66cae5c678687ad989e8b8409b98e99c6f7dc484babb6018907ce53a01c33d SHA512 3fed48b59ca329f755f883fe794556179fb85c093342716f0455b716c0408e3e7a074ba32fe66579f0ca79b7a0cc82718a1d05c84c5d69f53a474b6f1e167eb0 WHIRLPOOL fef81b13617bba43a31f32c0df8a25173556ddb4accf8a985435cf374cf939c5f2da657a3435d03cf9e551858a4c1bcc714e2a1744a7e4abb3d097df8fbb7c8c +AUX docker-r3.initd 895 SHA256 664b530dbf078cd8f064d170ba181365b282c694eedbfba08810b0f88d4cb960 SHA512 63ca66401128392616cf3421309c759386f3353a6bc1d53f75285769ac20b1a6b1a3b1b63c99d42b6c06c2d7962c24a04777c26da48f685b852dee7c9fa13ac5 WHIRLPOOL 02c33fed0ad8a069f57857dd5881122235449e5c5acbce2b63fedc1dd2519d1f9de34e1dc1bd31a9543bb5e7b97b2b53f4aa9087bf80fcf50fe012bf8d870db7 +AUX docker.initd 883 SHA256 578713158150ecf246b1a2a039191c7a15537c851e0bcdedc5cef3871af3727f SHA512 b8323f4e909dd547ce299f2bbc5e11daacf746fe6e49ec2134f64cdab6bda918f65a01baf47f0df9ae7b81893218d3661b40584ccfd5bc0d674f72574eeba366 WHIRLPOOL dff3d0a13598ca6e05e9ec602a0bdcae29ecb135040305a16d7327a1b814d05fa5128cd3f173700f3a72807d6af5f34a3c4a4577dc0192d0a29d7150aa204a58 +AUX docker.service 285 SHA256 848c73b11cfd0071076b7119bc4a45db83d7abfb8b1ff3ba571c0dffc5d50071 SHA512 63e3b10d3af77254e0b78eae80386247ad4ffb2b4a3a3843b635121ae42ad4a313a0e589ec420a9bd4ddbea35d7f5eea04de82b565e30d42989abbd1f9b2a930 WHIRLPOOL a95de86ac6a6a5000bbd37be43a4344e0e9b3115e4d5dd1a0e68517ea4d1df1f87aa3fbf5e095b2a6aa0c081ee512019d8c9a9d52abadf6d46cc492149249caa DIST docker-1.6.1.tar.gz 5713944 SHA256 aa3534277d11b32bc3564b801aeed0502f067317e7e111bd91ce2d989d34c51e SHA512 d2647f191fd295c8a9326e11ddbf6e77f33b70f14e3ebd37db3c9fa1f4946e0e3f426078ee847f52d7c57fc7783d26afe3e5d2e7ff17d8e6bb4f71609e8f5ef2 WHIRLPOOL e12c799ef63a0646f7393b00b6c1e200f350f7089445c58819ae5b53d66d18d985cb9f8fde1cd3ecfa55c2f0186064fc7080b7ebba132404aa15502029881602 +DIST docker-1.6.2.tar.gz 5714121 SHA256 f3a031b23ea9ff0fdbf3ffb9449c64ec51bb053491b47b28000eb4cce9f23203 SHA512 c27bdafabcb8ad2e49bee9e1529141a25596ba2b59435fb9368fc406950d0d7d1cbd876f1f4248dfc7089a22b8a2d13009dd164bde87e37b95a8e502bb49cac9 WHIRLPOOL aea4105ba30104d751203153b6208e363ce0abb3145ee134e675c4bc640e888afb281e7ba9009a30b9af37e829185684427a33b947d8710b49562e3352526c06 EBUILD docker-1.6.1.ebuild 6989 SHA256 c4ee05783aa758c88d04f446e41cce27ea966eb6ce4cf1f0eb58101c59fde242 SHA512 b2242d3e3b3a71b77faa6b7404f032d8b3e49262bb056471b10286780fd2deb8f3dce6def5cc3a9307f9a663260ada855fd01dfc1ea023f92041d118d72de790 WHIRLPOOL cc93426aac944d27c092942a440c3ae521c31b6d27688f9df903ca728c967714adf5d1805780301358c528f95901d25a47751ba713bd54b8c53a307c9479c574 -MISC ChangeLog 7985 SHA256 cfe70eb0fba81623bcaa8f218207ec3073859f658a9b4c86b0e5bbaa525647c4 SHA512 ec683471cee53db36abb7407c05a0c35807dd1fd679023de9d7a2f141bd4f5565e75cdd11f539500f66c92216727ac7af3a77767d6cfd8fb568768f70d5c9ba1 WHIRLPOOL a11b9bf5faa220f97776c5a6131e2f3ad17cd4eb74b7c3258761b2e469492318dcaec8ea0f2929a56d34d35aae2978bf5d08ac51a112b2501f36daf9276fabf4 +EBUILD docker-1.6.2.ebuild 7038 SHA256 874cacf2a8d0803ee7c8a5fdf37cbe849e194f9ede997d8c3141dfff53e2c032 SHA512 6d324553756cc41974f712e7dc3a93c775da5e079eb1321f2620dfaf5550e77070ce55d18d74dc0b5de9c6ab1071ec262221560eb4ecadff7d1a41fd0f39a980 WHIRLPOOL 106f8479129c3618df4c0821d8ec56ec4a9ce2b2a294e61a5a40c58316a62ddedff129e57c3a6649d4469c53fe6f8a01f171157f267ee0f4ddc63d98376cd71a +MISC ChangeLog 8307 SHA256 8067aea1bd11b04002ddddd1d48ba618e3323d6aa838bf54171c7884de7e2be4 SHA512 678cd6a6a9c3aa0f6ed6843edced0d88a504d4dfdeb6832cadb186202a5cd62b509f2300a9baa7c5754d7baf75343fda08cddbeeb200b11765468a454e6b6122 WHIRLPOOL d1ea593012709f511f365125a93029d4cde68ef2d5b643eba1e544fcd6251ebdd2d779e0a6df798635cea04e0e3bb09a5e4813e6d93ea8072994efab06d7603b MISC metadata.xml 1575 SHA256 0b4b691312c6ea19666276d43c129a87b0730cf9c1692cb268471ea9399acbff SHA512 5a041671948ec79737a2ede4011b818cdff3a775bfdb621a1aed8bb87be837eadb8897a5b817cff45ce24c23c7cff3316aa7e97968b42a9e1fe06da59bc95bd8 WHIRLPOOL 058c5d162f4aba4a62e526df770c0d9c949d239adffc2e76c68b0c1ca1461903ae11b0731c958d24f3c2414d7ecb69ce012cbce4f3bfd4e707575670ca177c43 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQIcBAEBCAAGBQJVmGf8AAoJECZUyt4RqCF8LcUP/05URoVzZKxH3xKlk4Mb8XKJ -hJUmsoBimPYVgOpTWUZ2qq81QsONABsByRt0UjYKejpHUl/q0HU/1F94X3g4/JM/ -MV/mLGbe6F0Tls/LqpMdLZyJgrEHwhbNj2mZlw3HyTMzLx0fQ8vDRccJybSoHbm2 -p5TbyFXXyjHw0PmEk1UPJUihIylD2GKQZ76HXS0Zf4sqUgG77eUQxLdo3pfuQtrX -4MZuCDZJoYdFf/5R3/UK9Ii+WlUMk5PXK1fSCfAmFw/zuNcaUHKxJnO/NINsxrPf -HpDAHF17kGqt1wPvTLsP88P3QMc0U1YXaJSNIV5/qliYI0Wes+TisqZ2GYrevBcn -0+EW6Xl4whLRT5vE3UjpODFzI1gCVuz9zuIbVPfd1AScRpafe8UXxDYpxMkM2VwY -9k8A75JZNrry2vhG4KEvWYJNV/W9W1meNl6UxToX7EOU7FFEdy1Ztg4pqKht1t00 -FRBmOYdrza6hBC5oYfY75+yEs7QuqvekGd0BS3l7gV/IF3tX7e2k20LOwEJbnRNZ -4KWZdd/k4T7dFCKje0Sf/OBR86AhsufK5wuHZkgBZ+VLNsvMseNw+oiaTqoJwbxo -IDUimupYhylPZQAXmllS7rTsFjAIc9Imjpp7Gfu/zi0Ow0SAAP4807OYgSYGG5f5 -ulnzIsRkBGeGOorgV412 -=vD62 +iQIcBAEBCAAGBQJVmGjrAAoJECZUyt4RqCF8MOoP/jVgNynruSZuV8MJZVXAAd+K +kxALfhFXEExgBngDnfLkawAFNlGb+V1xNRs7gslmTaiOB3nmgcktr+1hb76Xml0T +dTP40xDwXeyHN0U3xxrLmGS9LJmT3Z8kBfiIhstv3RwLq+9hirekd+WlgjQbCFTj +TdG8AMxYp501Xs135sGh03uW/zULtYqCSxudshl46wH58fXjCuKDgzEzj1198TzZ +skDgm7ltb+D43R7exOfgrjlSaoD4jvBTz2+Y4MDoobO0cgviamAOvKLCi8Sy+hYZ +Fy8f8l1dBbt4bNgQ25HExcH+rQQVot+JHgWo8Zml0Wr+5VDiPGId0D+AcNdPFy7e ++cbUGIeZ7vaiR5uQj1uisN0wPKZDFyZH4RyswOKb30bELWtfRopgw+DVR2IPcr2I +Dwg8PuNQT5Vsh3MIgXLU4fNhHEkWxK2RObn2nqeOo694CBdYG0WAY8RKKUKagxxJ +/5dZfjZSghtb97NwjNe+lkqqY3DI+rPfWEU1tyPn1H51RnHk6XFOkRJ9kNzQus60 +XzNJ1FrkqA7ywKzRgr72Vd2mqBmUxNxqCLLK8CL/4fPwO+MOT1LL+NlsGRv/2+Cm +ia3e8xLO4mBekfK9fy0d9qHLzS+8P+rOmOrA3Hwoq+gDiazqtdeY2woZuAzokvM6 +kgpU5HUYsC4CkxrcHGmU +=wo9X -----END PGP SIGNATURE----- diff --git a/app-emulation/docker/docker-1.6.2.ebuild b/app-emulation/docker/docker-1.6.2.ebuild new file mode 100644 index 000000000000..a38912368944 --- /dev/null +++ b/app-emulation/docker/docker-1.6.2.ebuild @@ -0,0 +1,248 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/docker-1.6.2.ebuild,v 1.1 2015/07/04 23:14:50 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 + MY_PV="${PV/_/-}" + MY_P="${PN}-${MY_PV}" + SRC_URI="https://${GITHUB_URI}/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz" + S="${WORKDIR}/${MY_P}" + DOCKER_GITCOMMIT="7c8fca2" + 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 overlay 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 + 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.7 + ) + aufs? ( + || ( + sys-fs/aufs3 + sys-fs/aufs4 + 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 CPUSETS + 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 + + POSIX_MQUEUE + + ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED + ~RESOURCE_COUNTERS + ~CGROUP_PERF + ~CFS_BANDWIDTH +" + +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" +ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering" + +pkg_setup() { + if kernel_is lt 3 10; then + eerror "" + eerror "Using Docker with kernels older than 3.10 is unstable and unsupported." + eerror " - http://docs.docker.com/installation/binaries/#check-kernel-dependencies" + die 'Kernel is too old - need 3.10 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 + ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY + " + # 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 ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY + " + fi + + if use overlay; then + CONFIG_CHECK+=" + ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL + " + 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 overlay; 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 "" +} diff --git a/app-emulation/docker/files/7179-add-audit_write-cap.patch b/app-emulation/docker/files/7179-add-audit_write-cap.patch new file mode 100644 index 000000000000..6263698cea22 --- /dev/null +++ b/app-emulation/docker/files/7179-add-audit_write-cap.patch @@ -0,0 +1,29 @@ +From 29ecc95c31ecfe15e3b3d8db94cea1c555e526a3 Mon Sep 17 00:00:00 2001 +From: Alexandr Morozov <lk4d4math@gmail.com> +Date: Wed, 23 Jul 2014 09:57:41 +0400 +Subject: [PATCH] Add AUDIT_WRITE cap + +Fixes #6345 + +Thanks @larsks for outstanding investigation + +Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4) +--- + daemon/execdriver/native/template/default_template.go | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/daemon/execdriver/native/template/default_template.go b/daemon/execdriver/native/template/default_template.go +index cc5cc4f..be3dd5a 100644 +--- a/daemon/execdriver/native/template/default_template.go ++++ b/daemon/execdriver/native/template/default_template.go +@@ -23,6 +23,7 @@ func New() *libcontainer.Config { + "NET_BIND_SERVICE", + "SYS_CHROOT", + "KILL", ++ "AUDIT_WRITE", + }, + Namespaces: map[string]bool{ + "NEWNS": true, +-- +2.0.3 + diff --git a/app-emulation/docker/files/docker-r2.initd b/app-emulation/docker/files/docker-r2.initd index e74ad7d99caa..915a70aefac9 100755 --- a/app-emulation/docker/files/docker-r2.initd +++ b/app-emulation/docker/files/docker-r2.initd @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/files/docker-r2.initd,v 1.1 2013/09/25 03:22:15 gregkh Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/files/docker-r2.initd,v 1.2 2015/07/04 23:14:50 alunduil Exp $ DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log} DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid} @@ -10,9 +10,7 @@ DOCKER_WORKAROUND_1422=${DOCKER_WORKAROUND_1422:-0} DOCKER_WORKAROUND_1422_DELAY=${DOCKER_WORKAROUND_1422_DELAY:-1} start() { - touch "$DOCKER_LOGFILE" - chown root:docker "$DOCKER_LOGFILE" - chmod 0644 "$DOCKER_LOGFILE" + checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE" ebegin "Starting docker daemon" start-stop-daemon --start --background \ diff --git a/app-emulation/docker/files/docker-r3.confd b/app-emulation/docker/files/docker-r3.confd new file mode 100644 index 000000000000..ae247c007e33 --- /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 000000000000..3bcfe9a4845d --- /dev/null +++ b/app-emulation/docker/files/docker-r3.initd @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/files/docker-r3.initd,v 1.1 2015/07/04 23:14:50 alunduil Exp $ + +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 000000000000..2f83c061e630 --- /dev/null +++ b/app-emulation/docker/files/docker.initd @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/files/docker.initd,v 1.3 2015/07/04 23:14:50 alunduil Exp $ + +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 index d841dcc374c0..dde89a214adb 100644 --- a/app-emulation/docker/files/docker.service +++ b/app-emulation/docker/files/docker.service @@ -1,5 +1,5 @@ [Unit] -Description=Docker - The Linux Container Engine +Description=Easily create lightweight, portable, self-sufficient containers from any application! Requires=network.target After=multi-user.target @@ -7,7 +7,6 @@ After=multi-user.target Type=simple ExecStartPre=/bin/mount --make-rprivate / ExecStart=/usr/bin/docker -d -TimeoutSec=60 [Install] WantedBy=multi-user.target |