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