public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/docker/, app-emulation/docker/files/
Date: Wed, 20 Apr 2016 17:06:32 +0000 (UTC)	[thread overview]
Message-ID: <1461171613.4088cbaef9bea3f24c49e5494b2e2a54485a349b.williamh@gentoo> (raw)

commit:     4088cbaef9bea3f24c49e5494b2e2a54485a349b
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 20 15:33:59 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Apr 20 17:00:13 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4088cbae

app-emulation/docker:  version bump to 1.11.0 for #580564

Package-Manager: portage-2.2.26

 app-emulation/docker/Manifest                      |   1 +
 app-emulation/docker/docker-1.11.0.ebuild          | 274 +++++++++++++++++++++
 app-emulation/docker/files/docker-containerd.patch |  22 ++
 3 files changed, 297 insertions(+)

diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest
index d1f61a2..082892a 100644
--- a/app-emulation/docker/Manifest
+++ b/app-emulation/docker/Manifest
@@ -1,5 +1,6 @@
 DIST docker-1.10.0.tar.gz 9966458 SHA256 4321baec0839a0f57b9bb3a20d84f2ab1ff045fbe631c3aa76bbc1db67012635 SHA512 dc8c421e704990882dce26d23929d71dffeac605e07d595872f1fa5c0920f214a368c902ecd7c739f32a468c276001acf3cef1676aeaeffc8e4530ec028db070 WHIRLPOOL 583f186e338624ddb8d67941e62c5cc9f12af99a13939b20739dbe2d46eff0b3aa21fc8dec508d7b6f8dd13c4ff4e0f52cf7afd174d5289f7966c2cfefa3a081
 DIST docker-1.10.3.tar.gz 9973680 SHA256 6b72fafa4c068a95133f5c9fda9fb148c9412db7a932800689e259a1b1c7ef6d SHA512 0e8f1dc80b8600a3a2d36a0e2a5c1a5cdca540198dafb9b6e32e79e7a2d2bea3d822ec310d6b1655fd0c91dca03874fa93b3ddb77e59607d62aac4fe6062c0da WHIRLPOOL 0d1b09868e958bfad5a722f60a73847ba12745e36abc11e04ff074546728967ccbaf0cf4554dec70dcd97169a2c684144d5cc171ef3b9bf0ba438daf37c24269
+DIST docker-1.11.0.tar.gz 10637394 SHA256 088869b9a19ae17656e068aa6d3d473866e8133365427c601c671da1b2189057 SHA512 ecb7f531a5632fd6274e3eec59a5194c61d0788ab9f3864845cbc248232c2f14671a26c34abab8c5ca85ce6106ae72ea3ae4e5d133ad1efb126069ae82a2dba0 WHIRLPOOL 20b0ef1642d2fea2ae186a17786d95f138fb7df92daa104f00c481488f82eadd5e8f27a0a8e926d68f495fd62bc132d83817a0831f84b3786474a9408d87878f
 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
 DIST docker-1.7.1.tar.gz 6853527 SHA256 9cd26415d68a88d3cf576e7e78c2fe97f42af795404f552728acc5b41dccf4ef SHA512 9b32c3deab77a27a4322a3ccbb3759a2c2a5627605090c4517c3754e6821407abcf5ffa227bad1fdafcbba068cdcaab586015dd8cfe9aed7e8a221d0615463f1 WHIRLPOOL 41b1afd8ea08c3452e5658d73e85c3b79a64f85fb4cb99c4c6a2ce1ab49836cebbe14724afe47898cb8d9bb9d4d69c64ff1c061895f3b9534150bc7ab50e2b22

diff --git a/app-emulation/docker/docker-1.11.0.ebuild b/app-emulation/docker/docker-1.11.0.ebuild
new file mode 100644
index 0000000..eabd8d8
--- /dev/null
+++ b/app-emulation/docker/docker-1.11.0.ebuild
@@ -0,0 +1,274 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGO_PN="github.com/docker/docker"
+
+if [[ ${PV} = *9999* ]]; then
+	# Docker cannot be fetched via "go get", thanks to autogenerated code
+	EGIT_REPO_URI="https://${EGO_PN}.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}"
+	inherit golang-base git-r3
+else
+	MY_PV="${PV/_/-}"
+	DOCKER_GITCOMMIT="4dc5990"
+	EGIT_COMMIT="v${MY_PV}"
+	SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64"
+	[ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
+	inherit golang-vcs-snapshot
+fi
+inherit bash-completion-r1 linux-info multilib systemd udev user
+
+DESCRIPTION="Docker complements kernel namespacing with a high-level API which operates at the process level"
+HOMEPAGE="https://dockerproject.org"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="apparmor aufs btrfs +device-mapper experimental overlay seccomp"
+
+# 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]
+	)
+	seccomp? (
+		>=sys-libs/libseccomp-2.2.1[static-libs]
+	)
+"
+
+DEPEND="
+	${CDEPEND}
+
+	dev-go/go-md2man
+
+	btrfs? (
+		>=sys-fs/btrfs-progs-3.8
+	)
+"
+
+# 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
+
+	>=app-emulation/containerd-0.2.0
+	>=app-emulation/runc-0.1.0
+
+	apparmor? (
+		sys-libs/libapparmor[static-libs]
+	)
+"
+
+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 ~MEMCG
+	~MACVLAN ~VETH ~BRIDGE ~BRIDGE_NETFILTER
+	~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_KMEM ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED
+
+	~BLK_CGROUP ~IOSCHED_CFQ
+	~CGROUP_PERF
+	~CGROUP_HUGETLB
+	~NET_CLS_CGROUP
+	~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED
+"
+
+ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional"
+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_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering"
+ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: 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
+		ewarn ""
+		ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported."
+		ewarn " - http://docs.docker.com/installation/binaries/#check-kernel-dependencies"
+	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 kernel_is le 3 18; then
+		CONFIG_CHECK+="
+			~RESOURCE_COUNTERS
+		"
+	fi
+
+	if kernel_is le 3 13; then
+		CONFIG_CHECK+="
+			~NETPRIO_CGROUP
+		"
+	else
+		CONFIG_CHECK+="
+			~CGROUP_NET_PRIO
+		"
+	fi
+
+	if use aufs; then
+		CONFIG_CHECK+="
+			~AUFS_FS
+			~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
+		"
+		ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3"
+	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
+
+	# create docker group for the code checking for it in /etc/group
+	enewgroup docker
+}
+
+src_prepare() {
+	cd "src/${EGO_PN}" || die
+	epatch "${FILESDIR}/docker-containerd.patch"
+	# allow user patches (use sparingly - upstream won't support them)
+	epatch_user
+}
+
+src_compile() {
+	cd "src/${EGO_PN}" || die
+	export GOPATH="${WORKDIR}/${P}:${PWD}/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/$(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='/&-fno-PIC /" hack/make.sh || die
+		grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
+
+		sed  "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
+			-i 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
+
+	for tag in apparmor seccomp; do
+		if use $tag; then
+			DOCKER_BUILDTAGS+=" $tag"
+		fi
+	done
+
+	# https://github.com/docker/docker/pull/13338
+	if use experimental; then
+		export DOCKER_EXPERIMENTAL=1
+	else
+		unset DOCKER_EXPERIMENTAL
+	fi
+
+	# time to build!
+	./hack/make.sh dynbinary || die 'dynbinary failed'
+
+	# build the man pages too
+	./man/md2man-all.sh || die "unable to generate man pages"
+}
+
+src_install() {
+	cd "src/${EGO_PN}" || die
+	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
+	dodoc -r docs/*
+	doman man/man*/*
+
+	dobashcomp contrib/completion/bash/*
+
+	insinto /usr/share/zsh/site-functions
+	doins contrib/completion/zsh/*
+
+	insinto /usr/share/vim/vimfiles
+	doins -r contrib/syntax/vim/ftdetect
+	doins -r contrib/syntax/vim/syntax
+
+	# note: intentionally not using "doins" so that we preserve +x bits
+	mkdir -p "${D}/usr/share/${PN}/contrib"
+	cp -R contrib/* "${D}/usr/share/${PN}/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
+	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/docker-containerd.patch b/app-emulation/docker/files/docker-containerd.patch
new file mode 100644
index 0000000..c53e82e
--- /dev/null
+++ b/app-emulation/docker/files/docker-containerd.patch
@@ -0,0 +1,22 @@
+diff --git a/libcontainerd/remote_linux.go b/libcontainerd/remote_linux.go
+index f0284ca..e44a1d1 100644
+--- a/libcontainerd/remote_linux.go
++++ b/libcontainerd/remote_linux.go
+@@ -27,7 +27,7 @@ const (
+ 	maxConnectionRetryCount   = 3
+ 	connectionRetryDelay      = 3 * time.Second
+ 	containerdShutdownTimeout = 15 * time.Second
+-	containerdBinary          = "docker-containerd"
++	containerdBinary          = "containerd"
+ 	containerdPidFilename     = "docker-containerd.pid"
+ 	containerdSockFilename    = "docker-containerd.sock"
+ 	eventTimestampFilename    = "event.ts"
+@@ -338,7 +338,7 @@ func (r *remote) runContainerdDaemon() error {
+ 	}
+ 
+ 	// Start a new instance
+-	args := []string{"-l", r.rpcAddr, "--runtime", "docker-runc"}
++	args := []string{"-l", r.rpcAddr, "--runtime", "runc"}
+ 	if r.debugLog {
+ 		args = append(args, "--debug", "true")
+ 	}


             reply	other threads:[~2016-04-20 17:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 17:06 William Hubbs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-10 23:27 [gentoo-commits] repo/gentoo:master commit in: app-emulation/docker/, app-emulation/docker/files/ Georgy Yakovlev
2021-04-22 16:42 Georgy Yakovlev
2021-04-22  7:48 Georgy Yakovlev
2018-10-28 17:30 Manuel Rüger
2018-04-06 22:03 Manuel Rüger
2017-02-27 21:17 William Hubbs
2015-08-27 15:42 Kacper Kowalik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461171613.4088cbaef9bea3f24c49e5494b2e2a54485a349b.williamh@gentoo \
    --to=williamh@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox