Gentoo Archives: gentoo-commits

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