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