1 |
commit: 9eafaf5363140bb6586b7afe07dfdee1017b017b |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 1 12:33:37 2021 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 1 12:38:54 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9eafaf53 |
7 |
|
8 |
app-emulation/docker: add 20.10.11 |
9 |
|
10 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
11 |
|
12 |
app-emulation/docker/Manifest | 1 + |
13 |
app-emulation/docker/docker-20.10.11.ebuild | 279 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 280 insertions(+) |
15 |
|
16 |
diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest |
17 |
index 270e1495a88f..a368014a8dae 100644 |
18 |
--- a/app-emulation/docker/Manifest |
19 |
+++ b/app-emulation/docker/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST docker-20.10.10.tar.gz 11086463 BLAKE2B 8d165a0a8d4fdd0fbc6744e3127675f85e6808648608c594bd2fa56c228419f31c7ee733e2228dab6e06250140cae7e09d146baf4fe45f7bd30f429abcc416b7 SHA512 7232d9709b40d46b6e6c7ab9e224380af49d2144be6275ca567ac8d9986bb7acf4ecd8784a4868dbaac353342d2f20b5483866ce4e23a73816d3eb50375d226a |
22 |
+DIST docker-20.10.11.tar.gz 11093318 BLAKE2B fb0e74a9fd67656ff9fd3288298dc3022a7a640fee07f45bafc84d6c79abc52896c7ad901c5387e22fe53ac0e5853f61e6e6174baac72d94dd00d1cfa0a99d56 SHA512 ac947e882abb02d52aea4aecb5dcfef6e23c86aadf98b49e3312ca3079dac7a01d6c936c0a4e51b3561def926ae50b4c5587063b8c58cac5c5de3c5e7985b120 |
23 |
DIST docker-20.10.9.tar.gz 11083239 BLAKE2B 16dbd22b67ecd626b638406fffaec3c62eeee7dc93e661f982e12436afa10f230da4257a22a38ab1df366026033207d00e6571f3b853477852f3e14f24d9f567 SHA512 e4ae9e37633c821892e929e7a5f9dab652fe17f348a24cd37778bc4bfc33d99cdb347e2f575966364a37664dcfa83d1500f2bff7d0b0398a890f2039155a0c0c |
24 |
|
25 |
diff --git a/app-emulation/docker/docker-20.10.11.ebuild b/app-emulation/docker/docker-20.10.11.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..38272e8a2df2 |
28 |
--- /dev/null |
29 |
+++ b/app-emulation/docker/docker-20.10.11.ebuild |
30 |
@@ -0,0 +1,279 @@ |
31 |
+# Copyright 1999-2021 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+EGO_PN=github.com/docker/docker |
36 |
+MY_PV=${PV/_/-} |
37 |
+GIT_COMMIT=847da184ad |
38 |
+inherit linux-info systemd udev golang-vcs-snapshot |
39 |
+ |
40 |
+DESCRIPTION="The core functions you need to create Docker images and run Docker containers" |
41 |
+HOMEPAGE="https://www.docker.com/" |
42 |
+SRC_URI="https://github.com/moby/moby/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="Apache-2.0" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
47 |
+IUSE="apparmor aufs btrfs +cli +container-init device-mapper hardened overlay seccomp" |
48 |
+ |
49 |
+DEPEND=" |
50 |
+ acct-group/docker |
51 |
+ >=dev-db/sqlite-3.7.9:3 |
52 |
+ apparmor? ( sys-libs/libapparmor ) |
53 |
+ btrfs? ( >=sys-fs/btrfs-progs-3.16.1 ) |
54 |
+ device-mapper? ( >=sys-fs/lvm2-2.02.89[thin] ) |
55 |
+ seccomp? ( >=sys-libs/libseccomp-2.2.1 ) |
56 |
+" |
57 |
+ |
58 |
+# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies |
59 |
+# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#optional-dependencies |
60 |
+# https://github.com/moby/moby/tree/master//hack/dockerfile/install |
61 |
+# make sure docker-proxy is pinned to exact version from ^, |
62 |
+# for appropriate branchch/version of course |
63 |
+RDEPEND=" |
64 |
+ ${DEPEND} |
65 |
+ >=net-firewall/iptables-1.4 |
66 |
+ sys-process/procps |
67 |
+ >=dev-vcs/git-1.7 |
68 |
+ >=app-arch/xz-utils-4.9 |
69 |
+ dev-libs/libltdl |
70 |
+ >=app-emulation/containerd-1.4.12[apparmor?,btrfs?,device-mapper?,seccomp?] |
71 |
+ ~app-emulation/docker-proxy-0.8.0_p20210525 |
72 |
+ cli? ( app-emulation/docker-cli ) |
73 |
+ container-init? ( >=sys-process/tini-0.19.0[static] ) |
74 |
+" |
75 |
+ |
76 |
+# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies |
77 |
+BDEPEND=" |
78 |
+ >=dev-lang/go-1.16.9 |
79 |
+ dev-go/go-md2man |
80 |
+ virtual/pkgconfig |
81 |
+" |
82 |
+# tests require running dockerd as root and downloading containers |
83 |
+RESTRICT="installsources strip test" |
84 |
+ |
85 |
+S="${WORKDIR}/${P}/src/${EGO_PN}" |
86 |
+ |
87 |
+# https://bugs.gentoo.org/748984 https://github.com/etcd-io/etcd/pull/12552 |
88 |
+PATCHES=( |
89 |
+ "${FILESDIR}/etcd-F_OFD_GETLK-fix.patch" |
90 |
+ "${FILESDIR}/ppc64-buildmode.patch" |
91 |
+) |
92 |
+ |
93 |
+# see "contrib/check-config.sh" from upstream's sources |
94 |
+CONFIG_CHECK=" |
95 |
+ ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS |
96 |
+ ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG |
97 |
+ ~CGROUP_NET_PRIO |
98 |
+ ~KEYS |
99 |
+ ~VETH ~BRIDGE ~BRIDGE_NETFILTER |
100 |
+ ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE ~NETFILTER_XT_MARK |
101 |
+ ~NETFILTER_NETLINK ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK ~NETFILTER_XT_MATCH_IPVS |
102 |
+ ~IP_NF_NAT ~NF_NAT |
103 |
+ ~POSIX_MQUEUE |
104 |
+ |
105 |
+ ~USER_NS |
106 |
+ ~SECCOMP |
107 |
+ ~CGROUP_PIDS |
108 |
+ ~MEMCG_SWAP |
109 |
+ |
110 |
+ ~BLK_CGROUP ~BLK_DEV_THROTTLING |
111 |
+ ~CGROUP_PERF |
112 |
+ ~CGROUP_HUGETLB |
113 |
+ ~NET_CLS_CGROUP |
114 |
+ ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED |
115 |
+ ~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR |
116 |
+ |
117 |
+ ~VXLAN |
118 |
+ ~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH ~XFRM_ALGO ~XFRM_USER |
119 |
+ ~IPVLAN |
120 |
+ ~MACVLAN ~DUMMY |
121 |
+ |
122 |
+ ~OVERLAY_FS ~!OVERLAY_FS_REDIRECT_DIR |
123 |
+ ~EXT4_FS_SECURITY |
124 |
+ ~EXT4_FS_POSIX_ACL |
125 |
+" |
126 |
+ |
127 |
+ERROR_KEYS="CONFIG_KEYS: is mandatory" |
128 |
+ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers" |
129 |
+ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering" |
130 |
+ |
131 |
+ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering" |
132 |
+ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering" |
133 |
+ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering" |
134 |
+ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering" |
135 |
+ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks" |
136 |
+ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks" |
137 |
+ |
138 |
+pkg_setup() { |
139 |
+ |
140 |
+ if kernel_is lt 4 5; then |
141 |
+ CONFIG_CHECK+=" |
142 |
+ ~MEMCG_KMEM |
143 |
+ " |
144 |
+ ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional" |
145 |
+ fi |
146 |
+ |
147 |
+ if kernel_is lt 4 7; then |
148 |
+ CONFIG_CHECK+=" |
149 |
+ ~DEVPTS_MULTIPLE_INSTANCES |
150 |
+ " |
151 |
+ fi |
152 |
+ |
153 |
+ if kernel_is lt 5 1; then |
154 |
+ CONFIG_CHECK+=" |
155 |
+ ~NF_NAT_IPV4 |
156 |
+ ~IOSCHED_CFQ |
157 |
+ ~CFQ_GROUP_IOSCHED |
158 |
+ " |
159 |
+ fi |
160 |
+ |
161 |
+ if kernel_is lt 5 2; then |
162 |
+ CONFIG_CHECK+=" |
163 |
+ ~NF_NAT_NEEDED |
164 |
+ " |
165 |
+ fi |
166 |
+ |
167 |
+ if kernel_is lt 5 8; then |
168 |
+ CONFIG_CHECK+=" |
169 |
+ ~MEMCG_SWAP_ENABLED |
170 |
+ " |
171 |
+ fi |
172 |
+ |
173 |
+ if use aufs; then |
174 |
+ CONFIG_CHECK+=" |
175 |
+ ~AUFS_FS |
176 |
+ ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY |
177 |
+ " |
178 |
+ ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs is patched to kernel instead of using standalone" |
179 |
+ fi |
180 |
+ |
181 |
+ if use btrfs; then |
182 |
+ CONFIG_CHECK+=" |
183 |
+ ~BTRFS_FS |
184 |
+ ~BTRFS_FS_POSIX_ACL |
185 |
+ " |
186 |
+ fi |
187 |
+ |
188 |
+ if use device-mapper; then |
189 |
+ CONFIG_CHECK+=" |
190 |
+ ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY |
191 |
+ " |
192 |
+ fi |
193 |
+ |
194 |
+ linux-info_pkg_setup |
195 |
+} |
196 |
+ |
197 |
+src_compile() { |
198 |
+ export DOCKER_GITCOMMIT="${GIT_COMMIT}" |
199 |
+ export GOPATH="${WORKDIR}/${P}" |
200 |
+ export VERSION=${PV} |
201 |
+ |
202 |
+ # setup CFLAGS and LDFLAGS for separate build target |
203 |
+ # see https://github.com/tianon/docker-overlay/pull/10 |
204 |
+ export CGO_CFLAGS="-I${ESYSROOT}/usr/include" |
205 |
+ export CGO_LDFLAGS="-L${ESYSROOT}/usr/$(get_libdir)" |
206 |
+ |
207 |
+ # let's set up some optional features :) |
208 |
+ export DOCKER_BUILDTAGS='' |
209 |
+ for gd in aufs btrfs device-mapper overlay; do |
210 |
+ if ! use $gd; then |
211 |
+ DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" |
212 |
+ fi |
213 |
+ done |
214 |
+ |
215 |
+ for tag in apparmor seccomp; do |
216 |
+ if use $tag; then |
217 |
+ DOCKER_BUILDTAGS+=" $tag" |
218 |
+ fi |
219 |
+ done |
220 |
+ |
221 |
+ if use hardened; then |
222 |
+ sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die |
223 |
+ grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed' |
224 |
+ sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \ |
225 |
+ -i hack/make/dynbinary-daemon || die |
226 |
+ grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed' |
227 |
+ fi |
228 |
+ |
229 |
+ # build daemon |
230 |
+ ./hack/make.sh dynbinary || die 'dynbinary failed' |
231 |
+} |
232 |
+ |
233 |
+src_install() { |
234 |
+ dosym containerd /usr/bin/docker-containerd |
235 |
+ dosym containerd-shim /usr/bin/docker-containerd-shim |
236 |
+ dosym runc /usr/bin/docker-runc |
237 |
+ use container-init && dosym tini /usr/bin/docker-init |
238 |
+ newbin bundles/dynbinary-daemon/dockerd dockerd |
239 |
+ |
240 |
+ newinitd contrib/init/openrc/docker.initd docker |
241 |
+ newconfd contrib/init/openrc/docker.confd docker |
242 |
+ |
243 |
+ systemd_dounit contrib/init/systemd/docker.{service,socket} |
244 |
+ |
245 |
+ udev_dorules contrib/udev/*.rules |
246 |
+ |
247 |
+ dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md |
248 |
+ dodoc -r docs/* |
249 |
+ |
250 |
+ # note: intentionally not using "doins" so that we preserve +x bits |
251 |
+ dodir /usr/share/${PN}/contrib |
252 |
+ cp -R contrib/* "${ED}/usr/share/${PN}/contrib" |
253 |
+} |
254 |
+ |
255 |
+pkg_postinst() { |
256 |
+ udev_reload |
257 |
+ |
258 |
+ elog |
259 |
+ elog "To use Docker, the Docker daemon must be running as root. To automatically" |
260 |
+ elog "start the Docker daemon at boot:" |
261 |
+ if systemd_is_booted || has_version sys-apps/systemd; then |
262 |
+ elog " systemctl enable docker.service" |
263 |
+ else |
264 |
+ elog " rc-update add docker default" |
265 |
+ fi |
266 |
+ elog |
267 |
+ elog "To use Docker as a non-root user, add yourself to the 'docker' group:" |
268 |
+ elog ' usermod -aG docker <youruser>' |
269 |
+ elog |
270 |
+ |
271 |
+ if use device-mapper; then |
272 |
+ elog " Devicemapper storage driver has been deprecated" |
273 |
+ elog " It will be removed in a future release" |
274 |
+ elog |
275 |
+ fi |
276 |
+ |
277 |
+ if use overlay; then |
278 |
+ elog " Overlay storage driver/USEflag has been deprecated" |
279 |
+ elog " in favor of overlay2 (enabled unconditionally)" |
280 |
+ elog |
281 |
+ fi |
282 |
+ |
283 |
+ if has_version sys-fs/zfs; then |
284 |
+ elog " ZFS storage driver is available" |
285 |
+ elog " Check https://docs.docker.com/storage/storagedriver/zfs-driver for more info" |
286 |
+ elog |
287 |
+ fi |
288 |
+ |
289 |
+ if use cli; then |
290 |
+ ewarn "Starting with docker 20.10.2, docker has been split into" |
291 |
+ ewarn "two packages upstream, so Gentoo has followed suit." |
292 |
+ ewarn |
293 |
+ ewarn "app-emulation/docker contains the daemon and" |
294 |
+ ewarn "app-emulation/docker-cli contains the docker command." |
295 |
+ ewarn |
296 |
+ ewarn "docker currently installs docker-cli using the cli use flag." |
297 |
+ ewarn |
298 |
+ ewarn "This use flag is temporary, so you need to take the" |
299 |
+ ewarn "following actions:" |
300 |
+ ewarn |
301 |
+ ewarn "First, disable the cli use flag for app-emulation/docker" |
302 |
+ ewarn |
303 |
+ ewarn "Then, if you need docker-cli and docker on the same machine," |
304 |
+ ewarn "run the following command:" |
305 |
+ ewarn |
306 |
+ ewarn "# emerge --noreplace docker-cli" |
307 |
+ ewarn |
308 |
+ fi |
309 |
+} |