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