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