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