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, 11 Apr 2019 10:01:12
Message-Id: 1554976847.22cd7f49bc0d0cc7a8521f32d35456e125500a72.mrueg@gentoo
1 commit: 22cd7f49bc0d0cc7a8521f32d35456e125500a72
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 11 10:00:47 2019 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 11 10:00:47 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22cd7f49
7
8 app-emulation/docker: Drop unmaintained live ebuild
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Manuel Rüger <mrueg <AT> gentoo.org>
12
13 app-emulation/docker/docker-9999.ebuild | 289 --------------------------------
14 1 file changed, 289 deletions(-)
15
16 diff --git a/app-emulation/docker/docker-9999.ebuild b/app-emulation/docker/docker-9999.ebuild
17 deleted file mode 100644
18 index 9892842ffeb..00000000000
19 --- a/app-emulation/docker/docker-9999.ebuild
20 +++ /dev/null
21 @@ -1,289 +0,0 @@
22 -# Copyright 1999-2018 Gentoo Foundation
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=6
26 -
27 -EGO_PN="github.com/docker/docker"
28 -
29 -if [[ ${PV} = *9999* ]]; then
30 - # Docker cannot be fetched via "go get", thanks to autogenerated code
31 - EGIT_REPO_URI="https://${EGO_PN}.git"
32 - EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}"
33 - inherit git-r3
34 -else
35 - MY_PV="${PV/_/-}"
36 - DOCKER_GITCOMMIT=""
37 - EGIT_COMMIT="v${MY_PV}"
38 - SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
39 - KEYWORDS="~amd64"
40 - [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
41 - inherit golang-vcs-snapshot
42 -fi
43 -inherit bash-completion-r1 golang-base linux-info systemd udev user
44 -
45 -DESCRIPTION="The core functions you need to create Docker images and run Docker containers"
46 -HOMEPAGE="https://dockerproject.org"
47 -LICENSE="Apache-2.0"
48 -SLOT="0"
49 -IUSE="apparmor aufs btrfs +container-init +device-mapper hardened overlay pkcs11 seccomp"
50 -
51 -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
52 -CDEPEND="
53 - >=dev-db/sqlite-3.7.9:3
54 - device-mapper? (
55 - >=sys-fs/lvm2-2.02.89[thin]
56 - )
57 - seccomp? ( >=sys-libs/libseccomp-2.2.1 )
58 - apparmor? ( sys-libs/libapparmor )
59 -"
60 -
61 -DEPEND="
62 - ${CDEPEND}
63 -
64 - dev-go/go-md2man
65 -
66 - btrfs? (
67 - >=sys-fs/btrfs-progs-3.16.1
68 - )
69 -"
70 -
71 -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
72 -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#optional-dependencies
73 -RDEPEND="
74 - ${CDEPEND}
75 -
76 - !app-emulation/docker-bin
77 - >=net-firewall/iptables-1.4
78 - sys-process/procps
79 - >=dev-vcs/git-1.7
80 - >=app-arch/xz-utils-4.9
81 -
82 - >=app-emulation/containerd-1.0.0
83 - app-emulation/runc[apparmor?,seccomp?]
84 - app-emulation/docker-proxy
85 - container-init? ( >=sys-process/tini-0.13.0[static] )
86 -"
87 -
88 -RESTRICT="installsources strip"
89 -
90 -S="${WORKDIR}/${P}/src/${EGO_PN}"
91 -
92 -# see "contrib/check-config.sh" from upstream's sources
93 -CONFIG_CHECK="
94 - ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS
95 - ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG
96 - ~KEYS
97 - ~VETH ~BRIDGE ~BRIDGE_NETFILTER
98 - ~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE
99 - ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK
100 - ~NF_NAT ~NF_NAT_NEEDED
101 - ~POSIX_MQUEUE
102 -
103 - ~USER_NS
104 - ~SECCOMP
105 - ~CGROUP_PIDS
106 - ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED
107 -
108 - ~BLK_CGROUP ~BLK_DEV_THROTTLING ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED
109 - ~CGROUP_PERF
110 - ~CGROUP_HUGETLB
111 - ~NET_CLS_CGROUP
112 - ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED
113 - ~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR
114 -
115 - ~VXLAN
116 - ~XFRM_ALGO ~XFRM_USER
117 - ~IPVLAN
118 - ~MACVLAN ~DUMMY
119 -"
120 -
121 -ERROR_KEYS="CONFIG_KEYS: is mandatory"
122 -ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
123 -ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering"
124 -
125 -ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering"
126 -ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering"
127 -ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering"
128 -ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering"
129 -ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks"
130 -ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks"
131 -
132 -pkg_setup() {
133 - if kernel_is lt 3 10; then
134 - ewarn ""
135 - ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported."
136 - ewarn " - http://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies"
137 - fi
138 -
139 - # for where these kernel versions come from, see:
140 - # https://www.google.com/search?q=945b2b2d259d1a4364a2799e80e8ff32f8c6ee6f+site%3Akernel.org%2Fpub%2Flinux%2Fkernel+file%3AChangeLog*
141 - if ! {
142 - kernel_is ge 3 16 \
143 - || { kernel_is 3 15 && kernel_is ge 3 15 5; } \
144 - || { kernel_is 3 14 && kernel_is ge 3 14 12; } \
145 - || { kernel_is 3 12 && kernel_is ge 3 12 25; }
146 - }; then
147 - ewarn ""
148 - ewarn "There is a serious Docker-related kernel panic that has been fixed in 3.16+"
149 - ewarn " (and was backported to 3.15.5+, 3.14.12+, and 3.12.25+)"
150 - ewarn ""
151 - ewarn "See also https://github.com/docker/docker/issues/2960"
152 - fi
153 -
154 - if kernel_is le 3 18; then
155 - CONFIG_CHECK+="
156 - ~RESOURCE_COUNTERS
157 - "
158 - fi
159 -
160 - if kernel_is le 3 13; then
161 - CONFIG_CHECK+="
162 - ~NETPRIO_CGROUP
163 - "
164 - else
165 - CONFIG_CHECK+="
166 - ~CGROUP_NET_PRIO
167 - "
168 - fi
169 -
170 - if kernel_is lt 4 5; then
171 - CONFIG_CHECK+="
172 - ~MEMCG_KMEM
173 - "
174 - ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional"
175 - fi
176 -
177 - if kernel_is lt 4 7; then
178 - CONFIG_CHECK+="
179 - ~DEVPTS_MULTIPLE_INSTANCES
180 - "
181 - fi
182 -
183 - if use aufs; then
184 - CONFIG_CHECK+="
185 - ~AUFS_FS
186 - ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
187 - "
188 - ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3"
189 - fi
190 -
191 - if use btrfs; then
192 - CONFIG_CHECK+="
193 - ~BTRFS_FS
194 - ~BTRFS_FS_POSIX_ACL
195 - "
196 - fi
197 -
198 - if use device-mapper; then
199 - CONFIG_CHECK+="
200 - ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
201 - "
202 - fi
203 -
204 - if use overlay; then
205 - CONFIG_CHECK+="
206 - ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL
207 - "
208 - fi
209 -
210 - linux-info_pkg_setup
211 -
212 - # create docker group for the code checking for it in /etc/group
213 - enewgroup docker
214 -}
215 -
216 -src_compile() {
217 - export GOPATH="${WORKDIR}/${P}:${PWD}/vendor"
218 -
219 - # setup CFLAGS and LDFLAGS for separate build target
220 - # see https://github.com/tianon/docker-overlay/pull/10
221 - export CGO_CFLAGS="-I${ROOT}/usr/include"
222 - export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
223 -
224 - # if we're building from a tarball, we need the GITCOMMIT value
225 - [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
226 -
227 - if use hardened; then
228 - sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die
229 - grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
230 -
231 - sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
232 - -i hack/make/dynbinary-client || die
233 - sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
234 - -i hack/make/dynbinary-daemon || die
235 - grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed'
236 - grep -q -- '-fno-PIC' hack/make/dynbinary-client || die 'hardened sed failed'
237 - fi
238 -
239 - # let's set up some optional features :)
240 - export DOCKER_BUILDTAGS=''
241 - for gd in aufs btrfs device-mapper overlay; do
242 - if ! use $gd; then
243 - DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
244 - fi
245 - done
246 -
247 - for tag in apparmor pkcs11 seccomp; do
248 - if use $tag; then
249 - DOCKER_BUILDTAGS+=" $tag"
250 - fi
251 - done
252 -
253 - # time to build!
254 - ./hack/make.sh dynbinary || die 'dynbinary failed'
255 -
256 - # build the man pages too
257 - ./man/md2man-all.sh || die "unable to generate man pages"
258 -}
259 -
260 -src_install() {
261 - VERSION="$(cat VERSION)"
262 - newbin "bundles/$VERSION/dynbinary-client/docker-$VERSION" docker
263 - newbin "bundles/$VERSION/dynbinary-daemon/dockerd-$VERSION" dockerd
264 - dosym containerd /usr/bin/docker-containerd
265 - dosym containerd-shim /usr/bin/docker-containerd-shim
266 - dosym runc /usr/bin/docker-runc
267 - use container-init && dosym tini /usr/bin/docker-init
268 -
269 - newinitd contrib/init/openrc/docker.initd docker
270 - newconfd contrib/init/openrc/docker.confd docker
271 -
272 - systemd_dounit contrib/init/systemd/docker.{service,socket}
273 -
274 - udev_dorules contrib/udev/*.rules
275 -
276 - dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
277 - dodoc -r docs/*
278 - doman man/man*/*
279 -
280 - dobashcomp contrib/completion/bash/*
281 -
282 - insinto /usr/share/zsh/site-functions
283 - doins contrib/completion/zsh/_*
284 -
285 - insinto /usr/share/fish/vendor_completions.d/
286 - doins contrib/completion/fish/docker.fish
287 -
288 - insinto /usr/share/vim/vimfiles
289 - doins -r contrib/syntax/vim/ftdetect
290 - doins -r contrib/syntax/vim/syntax
291 -
292 - # note: intentionally not using "doins" so that we preserve +x bits
293 - dodir /usr/share/${PN}/contrib
294 - cp -R contrib/* "${ED}/usr/share/${PN}/contrib"
295 -}
296 -
297 -pkg_postinst() {
298 - udev_reload
299 -
300 - elog
301 - elog "To use Docker, the Docker daemon must be running as root. To automatically"
302 - elog "start the Docker daemon at boot, add Docker to the default runlevel:"
303 - elog " rc-update add docker default"
304 - elog "Similarly for systemd:"
305 - elog " systemctl enable docker.service"
306 - elog
307 - elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
308 - elog " usermod -aG docker youruser"
309 - elog
310 -}