1 |
commit: 8de6c3972af40ff465b538bbd08054070dfc7881 |
2 |
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 28 12:32:27 2018 +0000 |
4 |
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 28 12:32:27 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8de6c397 |
7 |
|
8 |
app-emulation/docker: Version bump to 17.12.1 |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
app-emulation/docker/Manifest | 1 + |
13 |
app-emulation/docker/docker-17.12.1.ebuild | 301 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 302 insertions(+) |
15 |
|
16 |
diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest |
17 |
index fee5c244e9c..a61b5b6552b 100644 |
18 |
--- a/app-emulation/docker/Manifest |
19 |
+++ b/app-emulation/docker/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
DIST docker-17.09.1.tar.gz 10135978 BLAKE2B 4c2dea48b3593332ac7b02bfcc7bf037b858adf87e5dd8ff84b03aca75d711375fafb06683a6a57cd2549c1a0a0edb2d7c7c1d4cf1b9ceefce18f4f91164b931 SHA512 e968ced32c379b74602053d1e9fe9ee5abe595078bb8d5f0d994c7eafd1557158d58fa48489ca8d7d578dbc7a5241182288b3ab37885b53abb8364d7aa9d2a4f |
22 |
DIST docker-17.12.0-r1.tar.gz 11008332 BLAKE2B 95a95bdf64bc6d6aa7a60d515d5661589c0e94ba687d5d766010579a5511dc85f2675dc2b22d628b153ef6fc018be9015ea80a4bcdaea4c10689a7c70eddea79 SHA512 7381bddf4b2538b2b76229d962925eee74a38ddbb18a6f988ccff2a2ce0ef334148ea76d9697e89acc6c9018cb6f785b59c27450dfb930ead01fa5684c6a90b1 |
23 |
+DIST docker-17.12.1.tar.gz 11046888 BLAKE2B f50236826d8b064023e76a6c23a52c307eada73338d25fcc4fd3448a855f91b0f1d3080408bc9e58102467a9605c54c20080773b46851135566b85ce00f7dfb8 SHA512 ca9c28a489c6c65de27cb64e68c783336e2ddca7e7b2d241e9557a43e62e33146afb644aa67fe92afce658522c02fbe0378b3c1318a32628c1a1a046c67a4fb7 |
24 |
DIST docker-18.02.0.tar.gz 12659242 BLAKE2B 0aac95ec6e6cbf980ec163cd40d9646207ef46df93dab9dab397ddc9a5a29addd25c014b810056a48f7498b5e2cb0d5772f99eed0b2b4d12eac815822ac22609 SHA512 4d1bd0ffc893e70fc524f46cacdc4ab035d8b7e0fd7e8de9faf6d9c30b9920b68a99764101e47a8375425b774fe93c317213509b2d1ace87c7598b2b939b849b |
25 |
|
26 |
diff --git a/app-emulation/docker/docker-17.12.1.ebuild b/app-emulation/docker/docker-17.12.1.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..c4904cb6c7a |
29 |
--- /dev/null |
30 |
+++ b/app-emulation/docker/docker-17.12.1.ebuild |
31 |
@@ -0,0 +1,301 @@ |
32 |
+# Copyright 1999-2018 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=6 |
36 |
+ |
37 |
+EGO_PN="github.com/docker/docker-ce" |
38 |
+ |
39 |
+if [[ ${PV} = *9999* ]]; then |
40 |
+ # Docker cannot be fetched via "go get", thanks to autogenerated code |
41 |
+ EGIT_REPO_URI="https://${EGO_PN}.git" |
42 |
+ EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}" |
43 |
+ inherit git-r3 |
44 |
+else |
45 |
+ inherit versionator |
46 |
+ if [ "$(get_version_component_count)" = 4 ]; then |
47 |
+ MY_PV="$(replace_version_separator 3 '-ce-')" |
48 |
+ else |
49 |
+ MY_PV="$PV-ce" |
50 |
+ fi |
51 |
+ DOCKER_GITCOMMIT="7390fc6" |
52 |
+ EGIT_COMMIT="v${MY_PV}" |
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 |
+RDEPEND=" |
89 |
+ ${CDEPEND} |
90 |
+ >=net-firewall/iptables-1.4 |
91 |
+ sys-process/procps |
92 |
+ >=dev-vcs/git-1.7 |
93 |
+ >=app-arch/xz-utils-4.9 |
94 |
+ dev-libs/libltdl |
95 |
+ ~app-emulation/containerd-1.0.1 |
96 |
+ ~app-emulation/docker-runc-1.0.0_rc4_p20180122[apparmor?,seccomp?] |
97 |
+ >=app-emulation/docker-proxy-0.8.0_p20170917 |
98 |
+ container-init? ( >=sys-process/tini-0.16.1[static] ) |
99 |
+" |
100 |
+ |
101 |
+RESTRICT="installsources strip" |
102 |
+ |
103 |
+S="${WORKDIR}/${P}/src/${EGO_PN}" |
104 |
+ |
105 |
+# see "contrib/check-config.sh" from upstream's sources |
106 |
+CONFIG_CHECK=" |
107 |
+ ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS |
108 |
+ ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG |
109 |
+ ~KEYS |
110 |
+ ~VETH ~BRIDGE ~BRIDGE_NETFILTER |
111 |
+ ~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE |
112 |
+ ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK ~NETFILTER_XT_MATCH_IPVS |
113 |
+ ~IP_NF_NAT ~NF_NAT ~NF_NAT_NEEDED |
114 |
+ ~POSIX_MQUEUE |
115 |
+ |
116 |
+ ~USER_NS |
117 |
+ ~SECCOMP |
118 |
+ ~CGROUP_PIDS |
119 |
+ ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED |
120 |
+ |
121 |
+ ~BLK_CGROUP ~BLK_DEV_THROTTLING ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED |
122 |
+ ~CGROUP_PERF |
123 |
+ ~CGROUP_HUGETLB |
124 |
+ ~NET_CLS_CGROUP |
125 |
+ ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED |
126 |
+ ~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR |
127 |
+ |
128 |
+ ~VXLAN |
129 |
+ ~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH ~XFRM_ALGO ~XFRM_USER |
130 |
+ ~IPVLAN |
131 |
+ ~MACVLAN ~DUMMY |
132 |
+" |
133 |
+ |
134 |
+ERROR_KEYS="CONFIG_KEYS: is mandatory" |
135 |
+ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers" |
136 |
+ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering" |
137 |
+ |
138 |
+ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering" |
139 |
+ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering" |
140 |
+ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering" |
141 |
+ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering" |
142 |
+ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks" |
143 |
+ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks" |
144 |
+ |
145 |
+pkg_setup() { |
146 |
+ if kernel_is lt 3 10; then |
147 |
+ ewarn "" |
148 |
+ ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported." |
149 |
+ ewarn " - http://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies" |
150 |
+ fi |
151 |
+ |
152 |
+ if kernel_is le 3 18; then |
153 |
+ CONFIG_CHECK+=" |
154 |
+ ~RESOURCE_COUNTERS |
155 |
+ " |
156 |
+ fi |
157 |
+ |
158 |
+ if kernel_is le 3 13; then |
159 |
+ CONFIG_CHECK+=" |
160 |
+ ~NETPRIO_CGROUP |
161 |
+ " |
162 |
+ else |
163 |
+ CONFIG_CHECK+=" |
164 |
+ ~CGROUP_NET_PRIO |
165 |
+ " |
166 |
+ fi |
167 |
+ |
168 |
+ if kernel_is lt 4 5; then |
169 |
+ CONFIG_CHECK+=" |
170 |
+ ~MEMCG_KMEM |
171 |
+ " |
172 |
+ ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional" |
173 |
+ fi |
174 |
+ |
175 |
+ if kernel_is lt 4 7; then |
176 |
+ CONFIG_CHECK+=" |
177 |
+ ~DEVPTS_MULTIPLE_INSTANCES |
178 |
+ " |
179 |
+ fi |
180 |
+ |
181 |
+ if use aufs; then |
182 |
+ CONFIG_CHECK+=" |
183 |
+ ~AUFS_FS |
184 |
+ ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY |
185 |
+ " |
186 |
+ ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3" |
187 |
+ fi |
188 |
+ |
189 |
+ if use btrfs; then |
190 |
+ CONFIG_CHECK+=" |
191 |
+ ~BTRFS_FS |
192 |
+ ~BTRFS_FS_POSIX_ACL |
193 |
+ " |
194 |
+ fi |
195 |
+ |
196 |
+ if use device-mapper; then |
197 |
+ CONFIG_CHECK+=" |
198 |
+ ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY |
199 |
+ " |
200 |
+ fi |
201 |
+ |
202 |
+ if use overlay; then |
203 |
+ CONFIG_CHECK+=" |
204 |
+ ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL |
205 |
+ " |
206 |
+ fi |
207 |
+ |
208 |
+ linux-info_pkg_setup |
209 |
+ |
210 |
+ # create docker group for the code checking for it in /etc/group |
211 |
+ enewgroup docker |
212 |
+} |
213 |
+ |
214 |
+src_compile() { |
215 |
+ export GOPATH="${WORKDIR}/${P}" |
216 |
+ |
217 |
+ # setup CFLAGS and LDFLAGS for separate build target |
218 |
+ # see https://github.com/tianon/docker-overlay/pull/10 |
219 |
+ export CGO_CFLAGS="-I${ROOT}/usr/include" |
220 |
+ export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)" |
221 |
+ |
222 |
+ # if we're building from a tarball, we need the GITCOMMIT value |
223 |
+ [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT |
224 |
+ |
225 |
+ # fake golang layout |
226 |
+ ln -s docker-ce/components/engine ../docker || die |
227 |
+ ln -s docker-ce/components/cli ../cli || die |
228 |
+ |
229 |
+ # let's set up some optional features :) |
230 |
+ export DOCKER_BUILDTAGS='' |
231 |
+ for gd in aufs btrfs device-mapper overlay; do |
232 |
+ if ! use $gd; then |
233 |
+ DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" |
234 |
+ fi |
235 |
+ done |
236 |
+ |
237 |
+ for tag in apparmor pkcs11 seccomp; do |
238 |
+ if use $tag; then |
239 |
+ DOCKER_BUILDTAGS+=" $tag" |
240 |
+ fi |
241 |
+ done |
242 |
+ |
243 |
+ pushd components/engine || die |
244 |
+ |
245 |
+ if use hardened; then |
246 |
+ sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die |
247 |
+ grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed' |
248 |
+ sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \ |
249 |
+ -i hack/make/dynbinary-daemon || die |
250 |
+ grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed' |
251 |
+ fi |
252 |
+ |
253 |
+ # build daemon |
254 |
+ VERSION="$(cat ../../VERSION)" \ |
255 |
+ ./hack/make.sh dynbinary || die 'dynbinary failed' |
256 |
+ |
257 |
+ popd || die # components/engine |
258 |
+ |
259 |
+ pushd components/cli || die |
260 |
+ |
261 |
+ # build cli |
262 |
+ emake \ |
263 |
+ LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \ |
264 |
+ VERSION="$(cat ../../VERSION)" \ |
265 |
+ GITCOMMIT="${DOCKER_GITCOMMIT}" \ |
266 |
+ DISABLE_WARN_OUTSIDE_CONTAINER=1 \ |
267 |
+ dynbinary || die |
268 |
+ |
269 |
+ # build man pages |
270 |
+ go build -o gen-manpages github.com/docker/cli/man || die |
271 |
+ ./gen-manpages --root . --target ./man/man1 || die |
272 |
+ ./man/md2man-all.sh -q || die |
273 |
+ rm gen-manpages || die |
274 |
+ # see "components/cli/scripts/docs/generate-man.sh" (which also does "go get" for go-md2man) |
275 |
+ |
276 |
+ popd || die # components/cli |
277 |
+} |
278 |
+ |
279 |
+src_install() { |
280 |
+ dosym containerd /usr/bin/docker-containerd |
281 |
+ dosym containerd-shim /usr/bin/docker-containerd-shim |
282 |
+ dosym runc /usr/bin/docker-runc |
283 |
+ use container-init && dosym tini /usr/bin/docker-init |
284 |
+ |
285 |
+ pushd components/engine || die |
286 |
+ newbin "$(readlink -f bundles/latest/dynbinary-daemon/dockerd)" dockerd |
287 |
+ |
288 |
+ newinitd contrib/init/openrc/docker.initd docker |
289 |
+ newconfd contrib/init/openrc/docker.confd docker |
290 |
+ |
291 |
+ systemd_dounit contrib/init/systemd/docker.{service,socket} |
292 |
+ |
293 |
+ udev_dorules contrib/udev/*.rules |
294 |
+ |
295 |
+ dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md |
296 |
+ dodoc -r docs/* |
297 |
+ |
298 |
+ insinto /usr/share/vim/vimfiles |
299 |
+ doins -r contrib/syntax/vim/ftdetect |
300 |
+ doins -r contrib/syntax/vim/syntax |
301 |
+ |
302 |
+ # note: intentionally not using "doins" so that we preserve +x bits |
303 |
+ dodir /usr/share/${PN}/contrib |
304 |
+ cp -R contrib/* "${ED}/usr/share/${PN}/contrib" |
305 |
+ popd || die # components/engine |
306 |
+ |
307 |
+ pushd components/cli || die |
308 |
+ |
309 |
+ newbin build/docker-* docker |
310 |
+ |
311 |
+ doman man/man*/* |
312 |
+ |
313 |
+ dobashcomp contrib/completion/bash/* |
314 |
+ insinto /usr/share/zsh/site-functions |
315 |
+ doins contrib/completion/zsh/_* |
316 |
+ popd || die # components/cli |
317 |
+} |
318 |
+ |
319 |
+pkg_postinst() { |
320 |
+ udev_reload |
321 |
+ |
322 |
+ elog |
323 |
+ elog "To use Docker, the Docker daemon must be running as root. To automatically" |
324 |
+ elog "start the Docker daemon at boot, add Docker to the default runlevel:" |
325 |
+ elog " rc-update add docker default" |
326 |
+ elog "Similarly for systemd:" |
327 |
+ elog " systemctl enable docker.service" |
328 |
+ elog |
329 |
+ elog "To use Docker as a non-root user, add yourself to the 'docker' group:" |
330 |
+ elog " usermod -aG docker youruser" |
331 |
+ elog |
332 |
+} |