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