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