Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/docker/
Date: Thu, 27 Jun 2019 21:57:53
Message-Id: 1561672653.9019ec6bb81ee24f31e62d968bd9b27b3e3477db.mrueg@gentoo
1 commit: 9019ec6bb81ee24f31e62d968bd9b27b3e3477db
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 27 21:53:57 2019 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 27 21:57:33 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9019ec6b
7
8 app-emulation/docker: Version bump to 18.09.7
9
10 Package-Manager: Portage-2.3.67, Repoman-2.3.11
11 Signed-off-by: Manuel Rüger <mrueg <AT> gentoo.org>
12
13 app-emulation/docker/Manifest | 1 +
14 app-emulation/docker/docker-18.09.7.ebuild | 300 +++++++++++++++++++++++++++++
15 2 files changed, 301 insertions(+)
16
17 diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest
18 index 162e9f958f7..5927e3556f6 100644
19 --- a/app-emulation/docker/Manifest
20 +++ b/app-emulation/docker/Manifest
21 @@ -1,4 +1,5 @@
22 DIST docker-18.09.5.tar.gz 15256899 BLAKE2B c55ef822b3e655b0bec9585de6ee346e73d48d388225141097768db9f5ddaeca2d1937274a7131e3e301686e2214a9ed2051dd72c07893bcfccb00424d02df73 SHA512 a6012d202761d6449e347b03759d92f5f45309e72562fd4a619b2a21c62b3f50b1256d2e4820317aa6b412f1eecda66dbd960d322293699433417a5f7ee73486
23 DIST docker-18.09.6.tar.gz 15257416 BLAKE2B e0f93f09c403f043d3b2f390d50da83565b0520d18b695a8166aa240817cc713eb9eff314d4c7eeba242c25e35c0b6a9ea3a7f1d661d6aca4a40f7e77856a05d SHA512 f05fc78f5891fa0308878690576e245eebb1e72f306f5b629b0e82dc96a04812202a2393ee6fd352bc59a1c5d29d398f0d6cddf545d57b483a051d14d7a0ee28
24 DIST docker-18.09.6_p20190604.tar.gz 15259344 BLAKE2B f958063ab9fc851fda13117210dade6b7fb211426c9565c62f2786a2b5878194ea052f866da1b2e489bd75d622cdf77bafccc538377cc5c261f86f50163cb151 SHA512 da518f07cfd9f90ad46796f5047156ef517fa75ff27daa16ab16b868b7f1c9822cb61ce2ee558b1632c4acfdd8d74a608f5b6cb5cb5ca932aca5bf42d497d6a9
25 +DIST docker-18.09.7.tar.gz 15264213 BLAKE2B 5aa4be6d63271fd0b9a8ea480ed55a1dc312d479d7d387a35573963393b33da96086741dbb817aff765cceb81e309fd76122b3622dd91640a492a9f46c9dbd64 SHA512 7d06ab01673b5931a8dde1d2fcebf442d1a107c98c95cd8fe3b886c123b48470950601782fe0c83e7537a1e856069e79a096b9f4523fea7984fd3e773b243b66
26 DIST docker-18.09.7_rc1.tar.gz 15264071 BLAKE2B d124cff1e32cedda35d8d0fac074a2227d078673639e99a1313e42b73b2c84b0c97af5470d3d4c8f2684e93898ab9d081fe536cd4e428ef8a8a5639761bd380b SHA512 377a07c7a1515a8f08c412d2117e10d9c9100a4a55dc5df69e8a8b822362b0b41812b3d4ee8fc8a1e7bc7258c15ee3da6aa42c7bc71fd86def1f6cda9f1566cd
27
28 diff --git a/app-emulation/docker/docker-18.09.7.ebuild b/app-emulation/docker/docker-18.09.7.ebuild
29 new file mode 100644
30 index 00000000000..2da1efbfefa
31 --- /dev/null
32 +++ b/app-emulation/docker/docker-18.09.7.ebuild
33 @@ -0,0 +1,300 @@
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 + DOCKER_GITCOMMIT="2d0083d"
48 + MY_PV=${PV/_/-}
49 + SRC_URI="https://${EGO_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
50 + KEYWORDS="~amd64 ~arm ~arm64"
51 + [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
52 + inherit golang-vcs-snapshot
53 +fi
54 +inherit bash-completion-r1 golang-base linux-info systemd udev user
55 +
56 +DESCRIPTION="The core functions you need to create Docker images and run Docker containers"
57 +HOMEPAGE="https://dockerproject.org"
58 +LICENSE="Apache-2.0"
59 +SLOT="0"
60 +IUSE="apparmor aufs btrfs +container-init device-mapper hardened +overlay seccomp"
61 +
62 +# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
63 +CDEPEND="
64 + >=dev-db/sqlite-3.7.9:3
65 + device-mapper? (
66 + >=sys-fs/lvm2-2.02.89[thin]
67 + )
68 + seccomp? ( >=sys-libs/libseccomp-2.2.1 )
69 + apparmor? ( sys-libs/libapparmor )
70 +"
71 +
72 +DEPEND="
73 + ${CDEPEND}
74 +
75 + dev-go/go-md2man
76 +
77 + btrfs? (
78 + >=sys-fs/btrfs-progs-3.16.1
79 + )
80 +"
81 +
82 +# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
83 +# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#optional-dependencies
84 +RDEPEND="
85 + ${CDEPEND}
86 + >=net-firewall/iptables-1.4
87 + sys-process/procps
88 + >=dev-vcs/git-1.7
89 + >=app-arch/xz-utils-4.9
90 + dev-libs/libltdl
91 + ~app-emulation/containerd-1.2.6
92 + ~app-emulation/runc-1.0.0_rc8[apparmor?,seccomp?]
93 + ~app-emulation/docker-proxy-0.8.0_p20190513
94 + container-init? ( >=sys-process/tini-0.18.0[static] )
95 +"
96 +
97 +RESTRICT="installsources strip"
98 +
99 +S="${WORKDIR}/${P}/src/${EGO_PN}"
100 +
101 +# see "contrib/check-config.sh" from upstream's sources
102 +CONFIG_CHECK="
103 + ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS
104 + ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG
105 + ~KEYS
106 + ~VETH ~BRIDGE ~BRIDGE_NETFILTER
107 + ~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE
108 + ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK ~NETFILTER_XT_MATCH_IPVS
109 + ~IP_NF_NAT ~NF_NAT ~NF_NAT_NEEDED
110 + ~POSIX_MQUEUE
111 +
112 + ~USER_NS
113 + ~SECCOMP
114 + ~CGROUP_PIDS
115 + ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED
116 +
117 + ~BLK_CGROUP ~BLK_DEV_THROTTLING ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED
118 + ~CGROUP_PERF
119 + ~CGROUP_HUGETLB
120 + ~NET_CLS_CGROUP
121 + ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED
122 + ~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR
123 +
124 + ~VXLAN
125 + ~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH ~XFRM_ALGO ~XFRM_USER
126 + ~IPVLAN
127 + ~MACVLAN ~DUMMY
128 +"
129 +
130 +ERROR_KEYS="CONFIG_KEYS: is mandatory"
131 +ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
132 +ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering"
133 +
134 +ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering"
135 +ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering"
136 +ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering"
137 +ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering"
138 +ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks"
139 +ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks"
140 +
141 +pkg_setup() {
142 + if kernel_is lt 3 10; then
143 + ewarn ""
144 + ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported."
145 + ewarn " - http://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies"
146 + fi
147 +
148 + if kernel_is le 3 18; then
149 + CONFIG_CHECK+="
150 + ~RESOURCE_COUNTERS
151 + "
152 + fi
153 +
154 + if kernel_is le 3 13; then
155 + CONFIG_CHECK+="
156 + ~NETPRIO_CGROUP
157 + "
158 + else
159 + CONFIG_CHECK+="
160 + ~CGROUP_NET_PRIO
161 + "
162 + fi
163 +
164 + if kernel_is lt 4 5; then
165 + CONFIG_CHECK+="
166 + ~MEMCG_KMEM
167 + "
168 + ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional"
169 + fi
170 +
171 + if kernel_is lt 4 7; then
172 + CONFIG_CHECK+="
173 + ~DEVPTS_MULTIPLE_INSTANCES
174 + "
175 + fi
176 +
177 + if use aufs; then
178 + CONFIG_CHECK+="
179 + ~AUFS_FS
180 + ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
181 + "
182 + ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3"
183 + fi
184 +
185 + if use btrfs; then
186 + CONFIG_CHECK+="
187 + ~BTRFS_FS
188 + ~BTRFS_FS_POSIX_ACL
189 + "
190 + fi
191 +
192 + if use device-mapper; then
193 + CONFIG_CHECK+="
194 + ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
195 + "
196 + fi
197 +
198 + if use overlay; then
199 + CONFIG_CHECK+="
200 + ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL
201 + "
202 + fi
203 +
204 + linux-info_pkg_setup
205 +
206 + # create docker group for the code checking for it in /etc/group
207 + enewgroup docker
208 +}
209 +
210 +src_compile() {
211 + export GOPATH="${WORKDIR}/${P}"
212 +
213 + # setup CFLAGS and LDFLAGS for separate build target
214 + # see https://github.com/tianon/docker-overlay/pull/10
215 + export CGO_CFLAGS="-I${ROOT}/usr/include"
216 + export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
217 +
218 + # if we're building from a tarball, we need the GITCOMMIT value
219 + [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
220 +
221 + # fake golang layout
222 + ln -s docker-ce/components/engine ../docker || die
223 + ln -s docker-ce/components/cli ../cli || die
224 +
225 + # let's set up some optional features :)
226 + export DOCKER_BUILDTAGS=''
227 + for gd in aufs btrfs device-mapper overlay; do
228 + if ! use $gd; then
229 + DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
230 + fi
231 + done
232 +
233 + for tag in apparmor seccomp; do
234 + if use $tag; then
235 + DOCKER_BUILDTAGS+=" $tag"
236 + fi
237 + done
238 +
239 + pushd components/engine || die
240 +
241 + if use hardened; then
242 + sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die
243 + grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
244 + sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
245 + -i hack/make/dynbinary-daemon || die
246 + grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed'
247 + fi
248 +
249 + # build daemon
250 + VERSION="$(cat ../../VERSION)" \
251 + ./hack/make.sh dynbinary || die 'dynbinary failed'
252 +
253 + popd || die # components/engine
254 +
255 + pushd components/cli || die
256 +
257 + # build cli
258 + emake \
259 + LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \
260 + VERSION="$(cat ../../VERSION)" \
261 + GITCOMMIT="${DOCKER_GITCOMMIT}" \
262 + DISABLE_WARN_OUTSIDE_CONTAINER=1 \
263 + dynbinary || die
264 +
265 + # build man pages
266 + go build -o gen-manpages github.com/docker/cli/man || die
267 + ./gen-manpages --root . --target ./man/man1 || die
268 + ./man/md2man-all.sh -q || die
269 + rm gen-manpages || die
270 + # see "components/cli/scripts/docs/generate-man.sh" (which also does "go get" for go-md2man)
271 +
272 + popd || die # components/cli
273 +}
274 +
275 +src_install() {
276 + dosym containerd /usr/bin/docker-containerd
277 + dosym containerd-shim /usr/bin/docker-containerd-shim
278 + dosym runc /usr/bin/docker-runc
279 + use container-init && dosym tini /usr/bin/docker-init
280 +
281 + pushd components/engine || die
282 + newbin "$(readlink -f bundles/latest/dynbinary-daemon/dockerd)" dockerd
283 +
284 + newinitd contrib/init/openrc/docker.initd docker
285 + newconfd contrib/init/openrc/docker.confd docker
286 +
287 + systemd_dounit contrib/init/systemd/docker.{service,socket}
288 +
289 + udev_dorules contrib/udev/*.rules
290 +
291 + dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
292 + dodoc -r docs/*
293 +
294 + insinto /usr/share/vim/vimfiles
295 + doins -r contrib/syntax/vim/ftdetect
296 + doins -r contrib/syntax/vim/syntax
297 +
298 + # note: intentionally not using "doins" so that we preserve +x bits
299 + dodir /usr/share/${PN}/contrib
300 + cp -R contrib/* "${ED}/usr/share/${PN}/contrib"
301 + popd || die # components/engine
302 +
303 + pushd components/cli || die
304 +
305 + newbin build/docker-* docker
306 +
307 + doman man/man*/*
308 +
309 + dobashcomp contrib/completion/bash/*
310 + insinto /usr/share/fish/vendor_completions.d/
311 + doins contrib/completion/fish/docker.fish
312 + insinto /usr/share/zsh/site-functions
313 + doins contrib/completion/zsh/_*
314 + popd || die # components/cli
315 +}
316 +
317 +pkg_postinst() {
318 + udev_reload
319 +
320 + elog
321 + elog "To use Docker, the Docker daemon must be running as root. To automatically"
322 + elog "start the Docker daemon at boot, add Docker to the default runlevel:"
323 + elog " rc-update add docker default"
324 + elog "Similarly for systemd:"
325 + elog " systemctl enable docker.service"
326 + elog
327 + elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
328 + elog " usermod -aG docker youruser"
329 + elog
330 +
331 + elog " Devicemapper storage driver has been deprecated"
332 + elog " It will be removed in a future release"
333 +}