1 |
commit: 6639436bf8159440af2ebf817605f882fc207db0 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 31 19:13:36 2021 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 31 19:41:30 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6639436b |
7 |
|
8 |
app-emulation/docker: remove unstable versions |
9 |
|
10 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
11 |
|
12 |
app-emulation/docker/Manifest | 2 - |
13 |
app-emulation/docker/docker-20.10.3-r2.ebuild | 293 -------------------------- |
14 |
app-emulation/docker/docker-20.10.4.ebuild | 273 ------------------------ |
15 |
3 files changed, 568 deletions(-) |
16 |
|
17 |
diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest |
18 |
index 23ad1890cb5..730b80b336e 100644 |
19 |
--- a/app-emulation/docker/Manifest |
20 |
+++ b/app-emulation/docker/Manifest |
21 |
@@ -1,4 +1,2 @@ |
22 |
DIST docker-19.03.15.tar.gz 18284803 BLAKE2B a1fac5d841934382d12c781353546b7c7a8167d0f2dc4150659a4aece210ea7361c59de25e3d450dae20fd536ea8dc33a18e55f9565ee4fdc818166810391fbf SHA512 ffd8e683a93a6ce69789603d24457aebe3379594692cb3dadc25bc8d407771a29d76087b0ca70856707f151622b1853f283a1071311c033ff90a1e44b0d9ffbc |
23 |
-DIST docker-20.10.3.tar.gz 11063792 BLAKE2B 9309573dd83d0746bb492cf68e06d69e60550718f8f934a065b33d1538847a4effcf6310638daa9b535515bc43cc1b47636482c90d4499f2b46b74aa37882dd7 SHA512 8389980e0b47e34872301bbe703d7abfc7819946736bab0ef4fee983daa4f798c7c6373d823dc62a3995076e71ca6bc86dc793f736b68e8ec1040332193cfdb8 |
24 |
-DIST docker-20.10.4.tar.gz 11068487 BLAKE2B 2bff1f36f646de8664731650590d06b4d3b0cc2538aee216f049df6ba394d837154fed4f4b29047f11514eb1bff19c0862a170461be681afd8ab00c4ffbe358b SHA512 6cbead817d37dc3a4d2686556562d3b52f802ac2cd611a1ff6e373db0464080d8babefd3af31175487b700905fbc876ec8ce235989780b037a4408febdf70985 |
25 |
DIST docker-20.10.5.tar.gz 11068359 BLAKE2B 16021065f20b6298e47f7b235f522a81ee1cbf046420edf43b241750f39ae19ddee8250090710c124ce09d9c0b20de58378b7df056b37d040a44884e32c5d12d SHA512 620a5345d99be16b4c6ba7321e91e4896128f7d638dfe2220554a6cadeb78b21dd3003cff6db60ed5ffd671ea243b310b21cc1123543b0e0cbfa93eec2900973 |
26 |
|
27 |
diff --git a/app-emulation/docker/docker-20.10.3-r2.ebuild b/app-emulation/docker/docker-20.10.3-r2.ebuild |
28 |
deleted file mode 100644 |
29 |
index 7f4e790bf85..00000000000 |
30 |
--- a/app-emulation/docker/docker-20.10.3-r2.ebuild |
31 |
+++ /dev/null |
32 |
@@ -1,293 +0,0 @@ |
33 |
-# Copyright 1999-2021 Gentoo Authors |
34 |
-# Distributed under the terms of the GNU General Public License v2 |
35 |
- |
36 |
-EAPI=7 |
37 |
-EGO_PN=github.com/docker/docker |
38 |
-GIT_COMMIT=46229ca1d8 |
39 |
-inherit bash-completion-r1 linux-info systemd udev golang-vcs-snapshot |
40 |
- |
41 |
-DESCRIPTION="The core functions you need to create Docker images and run Docker containers" |
42 |
-HOMEPAGE="https://www.docker.com/" |
43 |
-MY_PV=${PV/_/-} |
44 |
-SRC_URI="https://github.com/moby/moby/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" |
45 |
- |
46 |
-LICENSE="Apache-2.0" |
47 |
-SLOT="0" |
48 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
49 |
-IUSE="apparmor aufs btrfs +cli +container-init device-mapper hardened overlay seccomp" |
50 |
- |
51 |
-DEPEND=" |
52 |
- acct-group/docker |
53 |
- >=dev-db/sqlite-3.7.9:3 |
54 |
- apparmor? ( sys-libs/libapparmor ) |
55 |
- btrfs? ( >=sys-fs/btrfs-progs-3.16.1 ) |
56 |
- device-mapper? ( >=sys-fs/lvm2-2.02.89[thin] ) |
57 |
- seccomp? ( >=sys-libs/libseccomp-2.2.1 ) |
58 |
-" |
59 |
- |
60 |
-# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies |
61 |
-# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#optional-dependencies |
62 |
-# https://github.com/moby/moby/tree/master//hack/dockerfile/install |
63 |
-# make sure containerd, docker-proxy and tini pinned to exact versions from ^, |
64 |
-# for appropriate branchch/version of course |
65 |
-RDEPEND=" |
66 |
- ${DEPEND} |
67 |
- >=net-firewall/iptables-1.4 |
68 |
- sys-process/procps |
69 |
- >=dev-vcs/git-1.7 |
70 |
- >=app-arch/xz-utils-4.9 |
71 |
- dev-libs/libltdl |
72 |
- >=app-emulation/containerd-1.4.1[apparmor?,btrfs?,device-mapper?,seccomp?] |
73 |
- ~app-emulation/docker-proxy-0.8.0_p20201215 |
74 |
- cli? ( app-emulation/docker-cli ) |
75 |
- container-init? ( >=sys-process/tini-0.19.0[static] ) |
76 |
-" |
77 |
- |
78 |
-# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies |
79 |
-BDEPEND=" |
80 |
- >=dev-lang/go-1.13.12 |
81 |
- dev-go/go-md2man |
82 |
- virtual/pkgconfig |
83 |
-" |
84 |
- |
85 |
-RESTRICT="installsources strip" |
86 |
- |
87 |
-S="${WORKDIR}/${P}/src/${EGO_PN}" |
88 |
- |
89 |
-# see "contrib/check-config.sh" from upstream's sources |
90 |
-CONFIG_CHECK=" |
91 |
- ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS |
92 |
- ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG |
93 |
- ~KEYS |
94 |
- ~VETH ~BRIDGE ~BRIDGE_NETFILTER |
95 |
- ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE ~NETFILTER_XT_MARK |
96 |
- ~NETFILTER_NETLINK ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK ~NETFILTER_XT_MATCH_IPVS |
97 |
- ~IP_NF_NAT ~NF_NAT |
98 |
- ~POSIX_MQUEUE |
99 |
- |
100 |
- ~USER_NS |
101 |
- ~SECCOMP |
102 |
- ~CGROUP_PIDS |
103 |
- ~MEMCG_SWAP |
104 |
- |
105 |
- ~BLK_CGROUP ~BLK_DEV_THROTTLING |
106 |
- ~CGROUP_PERF |
107 |
- ~CGROUP_HUGETLB |
108 |
- ~NET_CLS_CGROUP |
109 |
- ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED |
110 |
- ~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR |
111 |
- |
112 |
- ~VXLAN |
113 |
- ~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH ~XFRM_ALGO ~XFRM_USER |
114 |
- ~IPVLAN |
115 |
- ~MACVLAN ~DUMMY |
116 |
- |
117 |
- ~OVERLAY_FS ~!OVERLAY_FS_REDIRECT_DIR |
118 |
- ~EXT4_FS_SECURITY |
119 |
- ~EXT4_FS_POSIX_ACL |
120 |
-" |
121 |
- |
122 |
-ERROR_KEYS="CONFIG_KEYS: is mandatory" |
123 |
-ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers" |
124 |
-ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering" |
125 |
- |
126 |
-ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering" |
127 |
-ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering" |
128 |
-ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering" |
129 |
-ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering" |
130 |
-ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks" |
131 |
-ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks" |
132 |
- |
133 |
-pkg_setup() { |
134 |
- if kernel_is lt 3 10; then |
135 |
- ewarn "" |
136 |
- ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported." |
137 |
- ewarn " - http://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies" |
138 |
- fi |
139 |
- |
140 |
- if kernel_is le 3 18; then |
141 |
- CONFIG_CHECK+=" |
142 |
- ~RESOURCE_COUNTERS |
143 |
- " |
144 |
- fi |
145 |
- |
146 |
- if kernel_is le 3 13; then |
147 |
- CONFIG_CHECK+=" |
148 |
- ~NETPRIO_CGROUP |
149 |
- " |
150 |
- else |
151 |
- CONFIG_CHECK+=" |
152 |
- ~CGROUP_NET_PRIO |
153 |
- " |
154 |
- fi |
155 |
- |
156 |
- if kernel_is lt 4 5; then |
157 |
- CONFIG_CHECK+=" |
158 |
- ~MEMCG_KMEM |
159 |
- " |
160 |
- ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional" |
161 |
- fi |
162 |
- |
163 |
- if kernel_is lt 4 7; then |
164 |
- CONFIG_CHECK+=" |
165 |
- ~DEVPTS_MULTIPLE_INSTANCES |
166 |
- " |
167 |
- fi |
168 |
- |
169 |
- if kernel_is lt 5 1; then |
170 |
- CONFIG_CHECK+=" |
171 |
- ~NF_NAT_IPV4 |
172 |
- ~IOSCHED_CFQ |
173 |
- ~CFQ_GROUP_IOSCHED |
174 |
- " |
175 |
- fi |
176 |
- |
177 |
- if kernel_is lt 5 2; then |
178 |
- CONFIG_CHECK+=" |
179 |
- ~NF_NAT_NEEDED |
180 |
- " |
181 |
- fi |
182 |
- |
183 |
- if kernel_is lt 5 8; then |
184 |
- CONFIG_CHECK+=" |
185 |
- ~MEMCG_SWAP_ENABLED |
186 |
- " |
187 |
- fi |
188 |
- |
189 |
- if use aufs; then |
190 |
- CONFIG_CHECK+=" |
191 |
- ~AUFS_FS |
192 |
- ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY |
193 |
- " |
194 |
- ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs is patched to kernel instead of using standalone" |
195 |
- fi |
196 |
- |
197 |
- if use btrfs; then |
198 |
- CONFIG_CHECK+=" |
199 |
- ~BTRFS_FS |
200 |
- ~BTRFS_FS_POSIX_ACL |
201 |
- " |
202 |
- fi |
203 |
- |
204 |
- if use device-mapper; then |
205 |
- CONFIG_CHECK+=" |
206 |
- ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY |
207 |
- " |
208 |
- fi |
209 |
- |
210 |
- linux-info_pkg_setup |
211 |
-} |
212 |
- |
213 |
-src_compile() { |
214 |
- export DOCKER_GITCOMMIT="${GIT_COMMIT}" |
215 |
- export GOPATH="${WORKDIR}/${P}" |
216 |
- export VERSION=${PV} |
217 |
- |
218 |
- # setup CFLAGS and LDFLAGS for separate build target |
219 |
- # see https://github.com/tianon/docker-overlay/pull/10 |
220 |
- export CGO_CFLAGS="-I${ROOT}/usr/include" |
221 |
- export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)" |
222 |
- |
223 |
- # let's set up some optional features :) |
224 |
- export DOCKER_BUILDTAGS='' |
225 |
- for gd in aufs btrfs device-mapper overlay; do |
226 |
- if ! use $gd; then |
227 |
- DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" |
228 |
- fi |
229 |
- done |
230 |
- |
231 |
- for tag in apparmor seccomp; do |
232 |
- if use $tag; then |
233 |
- DOCKER_BUILDTAGS+=" $tag" |
234 |
- fi |
235 |
- done |
236 |
- |
237 |
- if use hardened; then |
238 |
- sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die |
239 |
- grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed' |
240 |
- sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \ |
241 |
- -i hack/make/dynbinary-daemon || die |
242 |
- grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed' |
243 |
- fi |
244 |
- |
245 |
- # build daemon |
246 |
- ./hack/make.sh dynbinary || die 'dynbinary failed' |
247 |
-} |
248 |
- |
249 |
-src_install() { |
250 |
- dosym containerd /usr/bin/docker-containerd |
251 |
- dosym containerd-shim /usr/bin/docker-containerd-shim |
252 |
- dosym runc /usr/bin/docker-runc |
253 |
- use container-init && dosym tini /usr/bin/docker-init |
254 |
- newbin bundles/dynbinary-daemon/dockerd dockerd |
255 |
- |
256 |
- newinitd contrib/init/openrc/docker.initd docker |
257 |
- newconfd contrib/init/openrc/docker.confd docker |
258 |
- |
259 |
- systemd_dounit contrib/init/systemd/docker.{service,socket} |
260 |
- |
261 |
- udev_dorules contrib/udev/*.rules |
262 |
- |
263 |
- dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md |
264 |
- dodoc -r docs/* |
265 |
- |
266 |
- # note: intentionally not using "doins" so that we preserve +x bits |
267 |
- dodir /usr/share/${PN}/contrib |
268 |
- cp -R contrib/* "${ED}/usr/share/${PN}/contrib" |
269 |
-} |
270 |
- |
271 |
-pkg_postinst() { |
272 |
- udev_reload |
273 |
- |
274 |
- elog |
275 |
- elog "To use Docker, the Docker daemon must be running as root. To automatically" |
276 |
- elog "start the Docker daemon at boot:" |
277 |
- if systemd_is_booted || has_version sys-apps/systemd; then |
278 |
- elog " systemctl enable docker.service" |
279 |
- else |
280 |
- elog " rc-update add docker default" |
281 |
- fi |
282 |
- elog |
283 |
- elog "To use Docker as a non-root user, add yourself to the 'docker' group:" |
284 |
- elog ' usermod -aG docker <youruser>' |
285 |
- elog |
286 |
- |
287 |
- if use device-mapper; then |
288 |
- elog " Devicemapper storage driver has been deprecated" |
289 |
- elog " It will be removed in a future release" |
290 |
- elog |
291 |
- fi |
292 |
- |
293 |
- if use overlay; then |
294 |
- elog " Overlay storage driver/USEflag has been deprecated" |
295 |
- elog " in favor of overlay2 (enabled unconditionally)" |
296 |
- elog |
297 |
- fi |
298 |
- |
299 |
- if has_version sys-fs/zfs; then |
300 |
- elog " ZFS storage driver is available" |
301 |
- elog " Check https://docs.docker.com/storage/storagedriver/zfs-driver for more info" |
302 |
- elog |
303 |
- fi |
304 |
- |
305 |
- if use cli; then |
306 |
- ewarn "Starting with docker 20.10.2, docker has been split into" |
307 |
- ewarn "two packages upstream, so Gentoo has followed suit." |
308 |
- ewarn |
309 |
- ewarn "app-emulation/docker contains the daemon and" |
310 |
- ewarn "app-emulation/docker-cli contains the docker command." |
311 |
- ewarn |
312 |
- ewarn "docker currently installs docker-cli using the cli use flag." |
313 |
- ewarn |
314 |
- ewarn "This use flag is temporary, so you need to take the" |
315 |
- ewarn "following actions:" |
316 |
- ewarn |
317 |
- ewarn "First, disable the cli use flag for app-emulation/docker" |
318 |
- ewarn |
319 |
- ewarn "Then, if you need docker-cli and docker on the same machine," |
320 |
- ewarn "run the following command:" |
321 |
- ewarn |
322 |
- ewarn "# emerge --noreplace docker-cli" |
323 |
- ewarn |
324 |
- fi |
325 |
-} |
326 |
|
327 |
diff --git a/app-emulation/docker/docker-20.10.4.ebuild b/app-emulation/docker/docker-20.10.4.ebuild |
328 |
deleted file mode 100644 |
329 |
index 5691d4f83eb..00000000000 |
330 |
--- a/app-emulation/docker/docker-20.10.4.ebuild |
331 |
+++ /dev/null |
332 |
@@ -1,273 +0,0 @@ |
333 |
-# Copyright 1999-2021 Gentoo Authors |
334 |
-# Distributed under the terms of the GNU General Public License v2 |
335 |
- |
336 |
-EAPI=7 |
337 |
-EGO_PN=github.com/docker/docker |
338 |
-GIT_COMMIT=46229ca1d8 |
339 |
-inherit bash-completion-r1 linux-info systemd udev golang-vcs-snapshot |
340 |
- |
341 |
-DESCRIPTION="The core functions you need to create Docker images and run Docker containers" |
342 |
-HOMEPAGE="https://www.docker.com/" |
343 |
-MY_PV=${PV/_/-} |
344 |
-SRC_URI="https://github.com/moby/moby/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" |
345 |
- |
346 |
-LICENSE="Apache-2.0" |
347 |
-SLOT="0" |
348 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
349 |
-IUSE="apparmor aufs btrfs +cli +container-init device-mapper hardened overlay seccomp" |
350 |
- |
351 |
-DEPEND=" |
352 |
- acct-group/docker |
353 |
- >=dev-db/sqlite-3.7.9:3 |
354 |
- apparmor? ( sys-libs/libapparmor ) |
355 |
- btrfs? ( >=sys-fs/btrfs-progs-3.16.1 ) |
356 |
- device-mapper? ( >=sys-fs/lvm2-2.02.89[thin] ) |
357 |
- seccomp? ( >=sys-libs/libseccomp-2.2.1 ) |
358 |
-" |
359 |
- |
360 |
-# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies |
361 |
-# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#optional-dependencies |
362 |
-# https://github.com/moby/moby/tree/master//hack/dockerfile/install |
363 |
-# make sure docker-proxy is pinned to exact version from ^, |
364 |
-# for appropriate branchch/version of course |
365 |
-RDEPEND=" |
366 |
- ${DEPEND} |
367 |
- >=net-firewall/iptables-1.4 |
368 |
- sys-process/procps |
369 |
- >=dev-vcs/git-1.7 |
370 |
- >=app-arch/xz-utils-4.9 |
371 |
- dev-libs/libltdl |
372 |
- >=app-emulation/containerd-1.4.1[apparmor?,btrfs?,device-mapper?,seccomp?] |
373 |
- ~app-emulation/docker-proxy-0.8.0_p20201215 |
374 |
- cli? ( app-emulation/docker-cli ) |
375 |
- container-init? ( >=sys-process/tini-0.19.0[static] ) |
376 |
-" |
377 |
- |
378 |
-# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies |
379 |
-BDEPEND=" |
380 |
- >=dev-lang/go-1.13.12 |
381 |
- dev-go/go-md2man |
382 |
- virtual/pkgconfig |
383 |
-" |
384 |
- |
385 |
-RESTRICT="installsources strip" |
386 |
- |
387 |
-S="${WORKDIR}/${P}/src/${EGO_PN}" |
388 |
- |
389 |
-# see "contrib/check-config.sh" from upstream's sources |
390 |
-CONFIG_CHECK=" |
391 |
- ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS |
392 |
- ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG |
393 |
- ~CGROUP_NET_PRIO |
394 |
- ~KEYS |
395 |
- ~VETH ~BRIDGE ~BRIDGE_NETFILTER |
396 |
- ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE ~NETFILTER_XT_MARK |
397 |
- ~NETFILTER_NETLINK ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK ~NETFILTER_XT_MATCH_IPVS |
398 |
- ~IP_NF_NAT ~NF_NAT |
399 |
- ~POSIX_MQUEUE |
400 |
- |
401 |
- ~USER_NS |
402 |
- ~SECCOMP |
403 |
- ~CGROUP_PIDS |
404 |
- ~MEMCG_SWAP |
405 |
- |
406 |
- ~BLK_CGROUP ~BLK_DEV_THROTTLING |
407 |
- ~CGROUP_PERF |
408 |
- ~CGROUP_HUGETLB |
409 |
- ~NET_CLS_CGROUP |
410 |
- ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED |
411 |
- ~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR |
412 |
- |
413 |
- ~VXLAN |
414 |
- ~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH ~XFRM_ALGO ~XFRM_USER |
415 |
- ~IPVLAN |
416 |
- ~MACVLAN ~DUMMY |
417 |
- |
418 |
- ~OVERLAY_FS ~!OVERLAY_FS_REDIRECT_DIR |
419 |
- ~EXT4_FS_SECURITY |
420 |
- ~EXT4_FS_POSIX_ACL |
421 |
-" |
422 |
- |
423 |
-ERROR_KEYS="CONFIG_KEYS: is mandatory" |
424 |
-ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers" |
425 |
-ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering" |
426 |
- |
427 |
-ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering" |
428 |
-ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering" |
429 |
-ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering" |
430 |
-ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering" |
431 |
-ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks" |
432 |
-ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks" |
433 |
- |
434 |
-pkg_setup() { |
435 |
- |
436 |
- if kernel_is lt 4 5; then |
437 |
- CONFIG_CHECK+=" |
438 |
- ~MEMCG_KMEM |
439 |
- " |
440 |
- ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional" |
441 |
- fi |
442 |
- |
443 |
- if kernel_is lt 4 7; then |
444 |
- CONFIG_CHECK+=" |
445 |
- ~DEVPTS_MULTIPLE_INSTANCES |
446 |
- " |
447 |
- fi |
448 |
- |
449 |
- if kernel_is lt 5 1; then |
450 |
- CONFIG_CHECK+=" |
451 |
- ~NF_NAT_IPV4 |
452 |
- ~IOSCHED_CFQ |
453 |
- ~CFQ_GROUP_IOSCHED |
454 |
- " |
455 |
- fi |
456 |
- |
457 |
- if kernel_is lt 5 2; then |
458 |
- CONFIG_CHECK+=" |
459 |
- ~NF_NAT_NEEDED |
460 |
- " |
461 |
- fi |
462 |
- |
463 |
- if kernel_is lt 5 8; then |
464 |
- CONFIG_CHECK+=" |
465 |
- ~MEMCG_SWAP_ENABLED |
466 |
- " |
467 |
- fi |
468 |
- |
469 |
- if use aufs; then |
470 |
- CONFIG_CHECK+=" |
471 |
- ~AUFS_FS |
472 |
- ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY |
473 |
- " |
474 |
- ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs is patched to kernel instead of using standalone" |
475 |
- fi |
476 |
- |
477 |
- if use btrfs; then |
478 |
- CONFIG_CHECK+=" |
479 |
- ~BTRFS_FS |
480 |
- ~BTRFS_FS_POSIX_ACL |
481 |
- " |
482 |
- fi |
483 |
- |
484 |
- if use device-mapper; then |
485 |
- CONFIG_CHECK+=" |
486 |
- ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY |
487 |
- " |
488 |
- fi |
489 |
- |
490 |
- linux-info_pkg_setup |
491 |
-} |
492 |
- |
493 |
-src_compile() { |
494 |
- export DOCKER_GITCOMMIT="${GIT_COMMIT}" |
495 |
- export GOPATH="${WORKDIR}/${P}" |
496 |
- export VERSION=${PV} |
497 |
- |
498 |
- # setup CFLAGS and LDFLAGS for separate build target |
499 |
- # see https://github.com/tianon/docker-overlay/pull/10 |
500 |
- export CGO_CFLAGS="-I${ROOT}/usr/include" |
501 |
- export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)" |
502 |
- |
503 |
- # let's set up some optional features :) |
504 |
- export DOCKER_BUILDTAGS='' |
505 |
- for gd in aufs btrfs device-mapper overlay; do |
506 |
- if ! use $gd; then |
507 |
- DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" |
508 |
- fi |
509 |
- done |
510 |
- |
511 |
- for tag in apparmor seccomp; do |
512 |
- if use $tag; then |
513 |
- DOCKER_BUILDTAGS+=" $tag" |
514 |
- fi |
515 |
- done |
516 |
- |
517 |
- if use hardened; then |
518 |
- sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die |
519 |
- grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed' |
520 |
- sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \ |
521 |
- -i hack/make/dynbinary-daemon || die |
522 |
- grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed' |
523 |
- fi |
524 |
- |
525 |
- # build daemon |
526 |
- ./hack/make.sh dynbinary || die 'dynbinary failed' |
527 |
-} |
528 |
- |
529 |
-src_install() { |
530 |
- dosym containerd /usr/bin/docker-containerd |
531 |
- dosym containerd-shim /usr/bin/docker-containerd-shim |
532 |
- dosym runc /usr/bin/docker-runc |
533 |
- use container-init && dosym tini /usr/bin/docker-init |
534 |
- newbin bundles/dynbinary-daemon/dockerd dockerd |
535 |
- |
536 |
- newinitd contrib/init/openrc/docker.initd docker |
537 |
- newconfd contrib/init/openrc/docker.confd docker |
538 |
- |
539 |
- systemd_dounit contrib/init/systemd/docker.{service,socket} |
540 |
- |
541 |
- udev_dorules contrib/udev/*.rules |
542 |
- |
543 |
- dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md |
544 |
- dodoc -r docs/* |
545 |
- |
546 |
- # note: intentionally not using "doins" so that we preserve +x bits |
547 |
- dodir /usr/share/${PN}/contrib |
548 |
- cp -R contrib/* "${ED}/usr/share/${PN}/contrib" |
549 |
-} |
550 |
- |
551 |
-pkg_postinst() { |
552 |
- udev_reload |
553 |
- |
554 |
- elog |
555 |
- elog "To use Docker, the Docker daemon must be running as root. To automatically" |
556 |
- elog "start the Docker daemon at boot:" |
557 |
- if systemd_is_booted || has_version sys-apps/systemd; then |
558 |
- elog " systemctl enable docker.service" |
559 |
- else |
560 |
- elog " rc-update add docker default" |
561 |
- fi |
562 |
- elog |
563 |
- elog "To use Docker as a non-root user, add yourself to the 'docker' group:" |
564 |
- elog ' usermod -aG docker <youruser>' |
565 |
- elog |
566 |
- |
567 |
- if use device-mapper; then |
568 |
- elog " Devicemapper storage driver has been deprecated" |
569 |
- elog " It will be removed in a future release" |
570 |
- elog |
571 |
- fi |
572 |
- |
573 |
- if use overlay; then |
574 |
- elog " Overlay storage driver/USEflag has been deprecated" |
575 |
- elog " in favor of overlay2 (enabled unconditionally)" |
576 |
- elog |
577 |
- fi |
578 |
- |
579 |
- if has_version sys-fs/zfs; then |
580 |
- elog " ZFS storage driver is available" |
581 |
- elog " Check https://docs.docker.com/storage/storagedriver/zfs-driver for more info" |
582 |
- elog |
583 |
- fi |
584 |
- |
585 |
- if use cli; then |
586 |
- ewarn "Starting with docker 20.10.2, docker has been split into" |
587 |
- ewarn "two packages upstream, so Gentoo has followed suit." |
588 |
- ewarn |
589 |
- ewarn "app-emulation/docker contains the daemon and" |
590 |
- ewarn "app-emulation/docker-cli contains the docker command." |
591 |
- ewarn |
592 |
- ewarn "docker currently installs docker-cli using the cli use flag." |
593 |
- ewarn |
594 |
- ewarn "This use flag is temporary, so you need to take the" |
595 |
- ewarn "following actions:" |
596 |
- ewarn |
597 |
- ewarn "First, disable the cli use flag for app-emulation/docker" |
598 |
- ewarn |
599 |
- ewarn "Then, if you need docker-cli and docker on the same machine," |
600 |
- ewarn "run the following command:" |
601 |
- ewarn |
602 |
- ewarn "# emerge --noreplace docker-cli" |
603 |
- ewarn |
604 |
- fi |
605 |
-} |