Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/docker/
Date: Tue, 09 May 2017 11:49:18
Message-Id: 1494330540.83462cf277c41e19768ff1278c588c66f31f7636.mrueg@gentoo
1 commit: 83462cf277c41e19768ff1278c588c66f31f7636
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 9 11:49:00 2017 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Tue May 9 11:49:00 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83462cf2
7
8 app-emulation/docker: Remove old
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.2
11
12 app-emulation/docker/Manifest | 2 -
13 app-emulation/docker/docker-17.04.0.ebuild | 288 ------------------------
14 app-emulation/docker/docker-17.05.0_rc3.ebuild | 290 -------------------------
15 3 files changed, 580 deletions(-)
16
17 diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest
18 index 40fb3680b8f..9ac1f368738 100644
19 --- a/app-emulation/docker/Manifest
20 +++ b/app-emulation/docker/Manifest
21 @@ -1,5 +1,3 @@
22 DIST docker-1.12.6.tar.gz 13694205 SHA256 0413f3513c2a6842ed9cf837154c8a722e9b34cb36b33430348489baa183707e SHA512 98e0fa0ec0dad4d392188b0d2cf42b2b564403463c369e1fe060f1abc2e97d97375a88587080671ef905e6a34b991d83265f43c3112575af019cf85eef0c2c25 WHIRLPOOL 55d10e4c4ab960320094637a847768ad85dc1fccaa6cc77ea0ca82f2d23b27e92e2f2c0cbc03f53676012c95883f65c6fa16d26970138fa129d37bf278fc8c0b
23 DIST docker-17.03.1.tar.gz 7773296 SHA256 a8f1eefadf3966885ad0579facfc2017cca7dd3a0b20d086dfd798168716cb83 SHA512 51e2a9d6ca529ac67d63794b9fd257f962278019ae1a36a39ff635c742d6ca16286cc164470333ff6cd88d709ecf2cb90343b2dd94bb3939747550f74fb442d5 WHIRLPOOL 9178bdf5b13851650e31d95370a090a72c8c70b53416e83693ffbdbc549d3992f3004908c1db5b26c013552f02293dddf9f761b8b5b9d2e0f0bf7cfab5330ca9
24 -DIST docker-17.04.0.tar.gz 7023868 SHA256 b6ee0aa93ecea44e956d3627907e10557b3ec37d13ddfb40e436656e5037c640 SHA512 b84bf25ebbdf066ee61272b9bce4736f61c2605e17529088bea33f5a4de172c2297cf8e7bd3f48170d50de069f94343d2403f81b763e9677ca2e750192ba1519 WHIRLPOOL 30354c38ae07f8528fdcbcde866ccc0048d6ea9e4001dfcc04c535b169c7b6c7d87f1c621039f215466d5f1fba4f0c886e231c77f70fc9d7ea109398e8e0df26
25 DIST docker-17.05.0.tar.gz 7166613 SHA256 4716df117d867b82ddab2e82395cd40aa3d0925a689eedcec8919729e4c9f121 SHA512 9d4fea1d6ce2ca3d65e6d2e6d2a0629ec0dbbc3397088ffb1e608b31d705a380356df0b23bb87b86ef51660e5196beffc90602bf59d8c5138c0e4f906fafe441 WHIRLPOOL c87e985360a0997ba3172c304101754d553bd503f5108809f1e788355dac50bc850ded0e1efccad6e332ac22fe0c5807a3d5354fab5bfd754fdec99d16b07bfb
26 -DIST docker-17.05.0_rc3.tar.gz 7167106 SHA256 227bcbceda2c4d763f1ea18a31bfac1dad670ddd1a11462c05282fb81cecfa1a SHA512 e3bc4454f895cc04858e6ca23e907efe0336da4602bd36912a92dbbf8278d1c59b56e150930e41b59906df1a5684314d05331a286459d471bb57c6434b97e3cc WHIRLPOOL 8de0a72422f9f0f02f2606d6370611d6cbfa8e65a9b3e76016fab0447b25b3d4871e62dafce0e983caf700f6742bbfe91ac475d79dcc6ad0f301c112ad05cbfa
27
28 diff --git a/app-emulation/docker/docker-17.04.0.ebuild b/app-emulation/docker/docker-17.04.0.ebuild
29 deleted file mode 100644
30 index 6e27bbf4285..00000000000
31 --- a/app-emulation/docker/docker-17.04.0.ebuild
32 +++ /dev/null
33 @@ -1,288 +0,0 @@
34 -# Copyright 1999-2017 Gentoo Foundation
35 -# Distributed under the terms of the GNU General Public License v2
36 -
37 -EAPI=6
38 -
39 -EGO_PN="github.com/docker/docker"
40 -
41 -if [[ ${PV} = *9999* ]]; then
42 - # Docker cannot be fetched via "go get", thanks to autogenerated code
43 - EGIT_REPO_URI="https://${EGO_PN}.git"
44 - EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}"
45 - inherit git-r3
46 -else
47 - MY_PV="${PV/_/-}"
48 - DOCKER_GITCOMMIT="4845c56"
49 - EGIT_COMMIT="v${MY_PV}-ce"
50 - SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
51 - KEYWORDS="~amd64 ~arm"
52 - [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
53 - inherit golang-vcs-snapshot
54 -fi
55 -inherit bash-completion-r1 golang-base linux-info systemd udev user
56 -
57 -DESCRIPTION="The core functions you need to create Docker images and run Docker containers"
58 -HOMEPAGE="https://dockerproject.org"
59 -LICENSE="Apache-2.0"
60 -SLOT="0"
61 -IUSE="apparmor aufs btrfs +container-init +device-mapper hardened overlay pkcs11 seccomp"
62 -
63 -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
64 -CDEPEND="
65 - >=dev-db/sqlite-3.7.9:3
66 - device-mapper? (
67 - >=sys-fs/lvm2-2.02.89[thin]
68 - )
69 - seccomp? ( >=sys-libs/libseccomp-2.2.1 )
70 - apparmor? ( sys-libs/libapparmor )
71 -"
72 -
73 -DEPEND="
74 - ${CDEPEND}
75 -
76 - dev-go/go-md2man
77 -
78 - btrfs? (
79 - >=sys-fs/btrfs-progs-3.16.1
80 - )
81 -"
82 -
83 -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
84 -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#optional-dependencies
85 -# Runc/Containerd: Unfortunately docker does not version the releases, in order to avoid
86 -# incompatiblities we depend on snapshots
87 -RDEPEND="
88 - ${CDEPEND}
89 -
90 - !app-emulation/docker-bin
91 - >=net-firewall/iptables-1.4
92 - sys-process/procps
93 - >=dev-vcs/git-1.7
94 - >=app-arch/xz-utils-4.9
95 -
96 - >=app-emulation/containerd-0.2.5_p20170315
97 - ~app-emulation/docker-runc-1.0.0_rc2_p20170310[apparmor?,seccomp?]
98 - app-emulation/docker-proxy
99 - container-init? ( >=sys-process/tini-0.13.0[static] )
100 -"
101 -
102 -RESTRICT="installsources strip"
103 -
104 -S="${WORKDIR}/${P}/src/${EGO_PN}"
105 -
106 -# see "contrib/check-config.sh" from upstream's sources
107 -CONFIG_CHECK="
108 - ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS
109 - ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG
110 - ~KEYS
111 - ~VETH ~BRIDGE ~BRIDGE_NETFILTER
112 - ~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE
113 - ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK
114 - ~NF_NAT ~NF_NAT_NEEDED
115 - ~POSIX_MQUEUE
116 -
117 - ~USER_NS
118 - ~SECCOMP
119 - ~CGROUP_PIDS
120 - ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED
121 -
122 - ~BLK_CGROUP ~BLK_DEV_THROTTLING ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED
123 - ~CGROUP_PERF
124 - ~CGROUP_HUGETLB
125 - ~NET_CLS_CGROUP
126 - ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED
127 - ~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR
128 -
129 - ~VXLAN
130 - ~XFRM_ALGO ~XFRM_USER
131 - ~IPVLAN
132 - ~MACVLAN ~DUMMY
133 -"
134 -
135 -ERROR_KEYS="CONFIG_KEYS: is mandatory"
136 -ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
137 -ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering"
138 -
139 -ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering"
140 -ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering"
141 -ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering"
142 -ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering"
143 -ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks"
144 -ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks"
145 -
146 -pkg_setup() {
147 - if kernel_is lt 3 10; then
148 - ewarn ""
149 - ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported."
150 - ewarn " - http://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies"
151 - fi
152 -
153 - # for where these kernel versions come from, see:
154 - # https://www.google.com/search?q=945b2b2d259d1a4364a2799e80e8ff32f8c6ee6f+site%3Akernel.org%2Fpub%2Flinux%2Fkernel+file%3AChangeLog*
155 - if ! {
156 - kernel_is ge 3 16 \
157 - || { kernel_is 3 15 && kernel_is ge 3 15 5; } \
158 - || { kernel_is 3 14 && kernel_is ge 3 14 12; } \
159 - || { kernel_is 3 12 && kernel_is ge 3 12 25; }
160 - }; then
161 - ewarn ""
162 - ewarn "There is a serious Docker-related kernel panic that has been fixed in 3.16+"
163 - ewarn " (and was backported to 3.15.5+, 3.14.12+, and 3.12.25+)"
164 - ewarn ""
165 - ewarn "See also https://github.com/docker/docker/issues/2960"
166 - fi
167 -
168 - if kernel_is le 3 18; then
169 - CONFIG_CHECK+="
170 - ~RESOURCE_COUNTERS
171 - "
172 - fi
173 -
174 - if kernel_is le 3 13; then
175 - CONFIG_CHECK+="
176 - ~NETPRIO_CGROUP
177 - "
178 - else
179 - CONFIG_CHECK+="
180 - ~CGROUP_NET_PRIO
181 - "
182 - fi
183 -
184 - if kernel_is lt 4 5; then
185 - CONFIG_CHECK+="
186 - ~MEMCG_KMEM
187 - "
188 - ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional"
189 - fi
190 -
191 - if kernel_is lt 4 7; then
192 - CONFIG_CHECK+="
193 - ~DEVPTS_MULTIPLE_INSTANCES
194 - "
195 - fi
196 -
197 - if use aufs; then
198 - CONFIG_CHECK+="
199 - ~AUFS_FS
200 - ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
201 - "
202 - ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3"
203 - fi
204 -
205 - if use btrfs; then
206 - CONFIG_CHECK+="
207 - ~BTRFS_FS
208 - ~BTRFS_FS_POSIX_ACL
209 - "
210 - fi
211 -
212 - if use device-mapper; then
213 - CONFIG_CHECK+="
214 - ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
215 - "
216 - fi
217 -
218 - if use overlay; then
219 - CONFIG_CHECK+="
220 - ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL
221 - "
222 - fi
223 -
224 - linux-info_pkg_setup
225 -
226 - # create docker group for the code checking for it in /etc/group
227 - enewgroup docker
228 -}
229 -
230 -src_compile() {
231 - export GOPATH="${WORKDIR}/${P}:${PWD}/vendor"
232 -
233 - # setup CFLAGS and LDFLAGS for separate build target
234 - # see https://github.com/tianon/docker-overlay/pull/10
235 - export CGO_CFLAGS="-I${ROOT}/usr/include"
236 - export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
237 -
238 - # if we're building from a tarball, we need the GITCOMMIT value
239 - [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
240 -
241 - if use hardened; then
242 - sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die
243 - grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
244 -
245 - sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
246 - -i hack/make/dynbinary-client || die
247 - sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
248 - -i hack/make/dynbinary-daemon || die
249 - grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed'
250 - grep -q -- '-fno-PIC' hack/make/dynbinary-client || die 'hardened sed failed'
251 - fi
252 -
253 - # let's set up some optional features :)
254 - export DOCKER_BUILDTAGS=''
255 - for gd in aufs btrfs device-mapper overlay; do
256 - if ! use $gd; then
257 - DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
258 - fi
259 - done
260 -
261 - for tag in apparmor pkcs11 seccomp; do
262 - if use $tag; then
263 - DOCKER_BUILDTAGS+=" $tag"
264 - fi
265 - done
266 -
267 - # time to build!
268 - ./hack/make.sh dynbinary || die 'dynbinary failed'
269 -
270 - # build the man pages too
271 - ./man/md2man-all.sh || die "unable to generate man pages"
272 -}
273 -
274 -src_install() {
275 - VERSION="$(cat VERSION)"
276 - newbin "bundles/$VERSION/dynbinary-client/docker-$VERSION" docker
277 - newbin "bundles/$VERSION/dynbinary-daemon/dockerd-$VERSION" dockerd
278 - dosym containerd /usr/bin/docker-containerd
279 - dosym containerd-shim /usr/bin/docker-containerd-shim
280 - dosym runc /usr/bin/docker-runc
281 - use container-init && dosym tini /usr/bin/docker-init
282 -
283 - newinitd contrib/init/openrc/docker.initd docker
284 - newconfd contrib/init/openrc/docker.confd docker
285 -
286 - systemd_dounit contrib/init/systemd/docker.{service,socket}
287 -
288 - udev_dorules contrib/udev/*.rules
289 -
290 - dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
291 - dodoc -r docs/*
292 - doman man/man*/*
293 -
294 - dobashcomp contrib/completion/bash/*
295 -
296 - insinto /usr/share/zsh/site-functions
297 - doins contrib/completion/zsh/_*
298 -
299 - insinto /usr/share/vim/vimfiles
300 - doins -r contrib/syntax/vim/ftdetect
301 - doins -r contrib/syntax/vim/syntax
302 -
303 - # note: intentionally not using "doins" so that we preserve +x bits
304 - dodir /usr/share/${PN}/contrib
305 - cp -R contrib/* "${ED}/usr/share/${PN}/contrib"
306 -}
307 -
308 -pkg_postinst() {
309 - udev_reload
310 -
311 - elog
312 - elog "To use Docker, the Docker daemon must be running as root. To automatically"
313 - elog "start the Docker daemon at boot, add Docker to the default runlevel:"
314 - elog " rc-update add docker default"
315 - elog "Similarly for systemd:"
316 - elog " systemctl enable docker.service"
317 - elog
318 - elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
319 - elog " usermod -aG docker youruser"
320 - elog
321 -}
322
323 diff --git a/app-emulation/docker/docker-17.05.0_rc3.ebuild b/app-emulation/docker/docker-17.05.0_rc3.ebuild
324 deleted file mode 100644
325 index 0dae3c6412d..00000000000
326 --- a/app-emulation/docker/docker-17.05.0_rc3.ebuild
327 +++ /dev/null
328 @@ -1,290 +0,0 @@
329 -# Copyright 1999-2017 Gentoo Foundation
330 -# Distributed under the terms of the GNU General Public License v2
331 -
332 -EAPI=6
333 -
334 -EGO_PN="github.com/docker/docker"
335 -
336 -if [[ ${PV} = *9999* ]]; then
337 - # Docker cannot be fetched via "go get", thanks to autogenerated code
338 - EGIT_REPO_URI="https://${EGO_PN}.git"
339 - EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}"
340 - inherit git-r3
341 -else
342 - inherit versionator
343 - MY_PV="$(get_version_component_range 1-3)"
344 - [[ -n "$(get_version_component_range 4)" ]] && MY_PVRC="-$(get_version_component_range 4)" || MY_PVRC=""
345 - DOCKER_GITCOMMIT="90d35ab"
346 - EGIT_COMMIT="v${MY_PV}-ce${MY_PVRC}"
347 - SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
348 - KEYWORDS="~amd64 ~arm"
349 - [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
350 - inherit golang-vcs-snapshot
351 -fi
352 -inherit bash-completion-r1 golang-base linux-info systemd udev user
353 -
354 -DESCRIPTION="The core functions you need to create Docker images and run Docker containers"
355 -HOMEPAGE="https://dockerproject.org"
356 -LICENSE="Apache-2.0"
357 -SLOT="0"
358 -IUSE="apparmor aufs btrfs +container-init +device-mapper hardened overlay pkcs11 seccomp"
359 -
360 -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
361 -CDEPEND="
362 - >=dev-db/sqlite-3.7.9:3
363 - device-mapper? (
364 - >=sys-fs/lvm2-2.02.89[thin]
365 - )
366 - seccomp? ( >=sys-libs/libseccomp-2.2.1 )
367 - apparmor? ( sys-libs/libapparmor )
368 -"
369 -
370 -DEPEND="
371 - ${CDEPEND}
372 -
373 - dev-go/go-md2man
374 -
375 - btrfs? (
376 - >=sys-fs/btrfs-progs-3.16.1
377 - )
378 -"
379 -
380 -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
381 -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#optional-dependencies
382 -# Runc/Containerd: Unfortunately docker does not version the releases, in order to avoid
383 -# incompatiblities we depend on snapshots
384 -RDEPEND="
385 - ${CDEPEND}
386 -
387 - !app-emulation/docker-bin
388 - >=net-firewall/iptables-1.4
389 - sys-process/procps
390 - >=dev-vcs/git-1.7
391 - >=app-arch/xz-utils-4.9
392 -
393 - >=app-emulation/containerd-0.2.5_p20170329
394 - ~app-emulation/docker-runc-1.0.0_rc2_p20170310[apparmor?,seccomp?]
395 - app-emulation/docker-proxy
396 - container-init? ( >=sys-process/tini-0.13.1[static] )
397 -"
398 -
399 -RESTRICT="installsources strip"
400 -
401 -S="${WORKDIR}/${P}/src/${EGO_PN}"
402 -
403 -# see "contrib/check-config.sh" from upstream's sources
404 -CONFIG_CHECK="
405 - ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS
406 - ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG
407 - ~KEYS
408 - ~VETH ~BRIDGE ~BRIDGE_NETFILTER
409 - ~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE
410 - ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK
411 - ~NF_NAT ~NF_NAT_NEEDED
412 - ~POSIX_MQUEUE
413 -
414 - ~USER_NS
415 - ~SECCOMP
416 - ~CGROUP_PIDS
417 - ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED
418 -
419 - ~BLK_CGROUP ~BLK_DEV_THROTTLING ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED
420 - ~CGROUP_PERF
421 - ~CGROUP_HUGETLB
422 - ~NET_CLS_CGROUP
423 - ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED
424 - ~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR
425 -
426 - ~VXLAN
427 - ~XFRM_ALGO ~XFRM_USER
428 - ~IPVLAN
429 - ~MACVLAN ~DUMMY
430 -"
431 -
432 -ERROR_KEYS="CONFIG_KEYS: is mandatory"
433 -ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
434 -ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering"
435 -
436 -ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering"
437 -ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering"
438 -ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering"
439 -ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering"
440 -ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks"
441 -ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks"
442 -
443 -pkg_setup() {
444 - if kernel_is lt 3 10; then
445 - ewarn ""
446 - ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported."
447 - ewarn " - http://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies"
448 - fi
449 -
450 - # for where these kernel versions come from, see:
451 - # https://www.google.com/search?q=945b2b2d259d1a4364a2799e80e8ff32f8c6ee6f+site%3Akernel.org%2Fpub%2Flinux%2Fkernel+file%3AChangeLog*
452 - if ! {
453 - kernel_is ge 3 16 \
454 - || { kernel_is 3 15 && kernel_is ge 3 15 5; } \
455 - || { kernel_is 3 14 && kernel_is ge 3 14 12; } \
456 - || { kernel_is 3 12 && kernel_is ge 3 12 25; }
457 - }; then
458 - ewarn ""
459 - ewarn "There is a serious Docker-related kernel panic that has been fixed in 3.16+"
460 - ewarn " (and was backported to 3.15.5+, 3.14.12+, and 3.12.25+)"
461 - ewarn ""
462 - ewarn "See also https://github.com/docker/docker/issues/2960"
463 - fi
464 -
465 - if kernel_is le 3 18; then
466 - CONFIG_CHECK+="
467 - ~RESOURCE_COUNTERS
468 - "
469 - fi
470 -
471 - if kernel_is le 3 13; then
472 - CONFIG_CHECK+="
473 - ~NETPRIO_CGROUP
474 - "
475 - else
476 - CONFIG_CHECK+="
477 - ~CGROUP_NET_PRIO
478 - "
479 - fi
480 -
481 - if kernel_is lt 4 5; then
482 - CONFIG_CHECK+="
483 - ~MEMCG_KMEM
484 - "
485 - ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional"
486 - fi
487 -
488 - if kernel_is lt 4 7; then
489 - CONFIG_CHECK+="
490 - ~DEVPTS_MULTIPLE_INSTANCES
491 - "
492 - fi
493 -
494 - if use aufs; then
495 - CONFIG_CHECK+="
496 - ~AUFS_FS
497 - ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
498 - "
499 - ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3"
500 - fi
501 -
502 - if use btrfs; then
503 - CONFIG_CHECK+="
504 - ~BTRFS_FS
505 - ~BTRFS_FS_POSIX_ACL
506 - "
507 - fi
508 -
509 - if use device-mapper; then
510 - CONFIG_CHECK+="
511 - ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
512 - "
513 - fi
514 -
515 - if use overlay; then
516 - CONFIG_CHECK+="
517 - ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL
518 - "
519 - fi
520 -
521 - linux-info_pkg_setup
522 -
523 - # create docker group for the code checking for it in /etc/group
524 - enewgroup docker
525 -}
526 -
527 -src_compile() {
528 - export GOPATH="${WORKDIR}/${P}:${PWD}/vendor"
529 -
530 - # setup CFLAGS and LDFLAGS for separate build target
531 - # see https://github.com/tianon/docker-overlay/pull/10
532 - export CGO_CFLAGS="-I${ROOT}/usr/include"
533 - export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
534 -
535 - # if we're building from a tarball, we need the GITCOMMIT value
536 - [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
537 -
538 - if use hardened; then
539 - sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die
540 - grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
541 -
542 - sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
543 - -i hack/make/dynbinary-client || die
544 - sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
545 - -i hack/make/dynbinary-daemon || die
546 - grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed'
547 - grep -q -- '-fno-PIC' hack/make/dynbinary-client || die 'hardened sed failed'
548 - fi
549 -
550 - # let's set up some optional features :)
551 - export DOCKER_BUILDTAGS=''
552 - for gd in aufs btrfs device-mapper overlay; do
553 - if ! use $gd; then
554 - DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
555 - fi
556 - done
557 -
558 - for tag in apparmor pkcs11 seccomp; do
559 - if use $tag; then
560 - DOCKER_BUILDTAGS+=" $tag"
561 - fi
562 - done
563 -
564 - # time to build!
565 - ./hack/make.sh dynbinary || die 'dynbinary failed'
566 -
567 - # build the man pages too
568 - ./man/md2man-all.sh || die "unable to generate man pages"
569 -}
570 -
571 -src_install() {
572 - VERSION="$(cat VERSION)"
573 - newbin "bundles/$VERSION/dynbinary-client/docker-$VERSION" docker
574 - newbin "bundles/$VERSION/dynbinary-daemon/dockerd-$VERSION" dockerd
575 - dosym containerd /usr/bin/docker-containerd
576 - dosym containerd-shim /usr/bin/docker-containerd-shim
577 - dosym runc /usr/bin/docker-runc
578 - use container-init && dosym tini /usr/bin/docker-init
579 -
580 - newinitd contrib/init/openrc/docker.initd docker
581 - newconfd contrib/init/openrc/docker.confd docker
582 -
583 - systemd_dounit contrib/init/systemd/docker.{service,socket}
584 -
585 - udev_dorules contrib/udev/*.rules
586 -
587 - dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
588 - dodoc -r docs/*
589 - doman man/man*/*
590 -
591 - dobashcomp contrib/completion/bash/*
592 -
593 - insinto /usr/share/zsh/site-functions
594 - doins contrib/completion/zsh/_*
595 -
596 - insinto /usr/share/vim/vimfiles
597 - doins -r contrib/syntax/vim/ftdetect
598 - doins -r contrib/syntax/vim/syntax
599 -
600 - # note: intentionally not using "doins" so that we preserve +x bits
601 - dodir /usr/share/${PN}/contrib
602 - cp -R contrib/* "${ED}/usr/share/${PN}/contrib"
603 -}
604 -
605 -pkg_postinst() {
606 - udev_reload
607 -
608 - elog
609 - elog "To use Docker, the Docker daemon must be running as root. To automatically"
610 - elog "start the Docker daemon at boot, add Docker to the default runlevel:"
611 - elog " rc-update add docker default"
612 - elog "Similarly for systemd:"
613 - elog " systemctl enable docker.service"
614 - elog
615 - elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
616 - elog " usermod -aG docker youruser"
617 - elog
618 -}