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