Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/docker/
Date: Thu, 28 Jul 2016 15:41:34
Message-Id: 1469720461.95ff9c3bb646e10de02897671b84432cf1ce7df7.williamh@gentoo
1 commit: 95ff9c3bb646e10de02897671b84432cf1ce7df7
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 28 15:41:01 2016 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 28 15:41:01 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95ff9c3b
7
8 app-emulation/docker: remove old
9
10 Package-Manager: portage-2.2.28
11
12 app-emulation/docker/docker-1.12.0_rc5.ebuild | 279 --------------------------
13 1 file changed, 279 deletions(-)
14
15 diff --git a/app-emulation/docker/docker-1.12.0_rc5.ebuild b/app-emulation/docker/docker-1.12.0_rc5.ebuild
16 deleted file mode 100644
17 index dfae766..0000000
18 --- a/app-emulation/docker/docker-1.12.0_rc5.ebuild
19 +++ /dev/null
20 @@ -1,279 +0,0 @@
21 -# Copyright 1999-2016 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -# $Id$
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="e4a0dbc"
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 +device-mapper experimental overlay seccomp"
50 -
51 -# https://github.com/docker/docker/blob/master/hack/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.8
68 - )
69 -"
70 -
71 -# https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#runtime-dependencies
72 -# https://github.com/docker/docker/blob/master/hack/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-0.2.2
83 - app-emulation/runc[apparmor?,seccomp?]
84 -"
85 -
86 -RESTRICT="installsources strip"
87 -
88 -S="${WORKDIR}/${P}/src/${EGO_PN}"
89 -
90 -# see "contrib/check-config.sh" from upstream's sources
91 -CONFIG_CHECK="
92 - ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS
93 - ~DEVPTS_MULTIPLE_INSTANCES
94 - ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG
95 - ~KEYS ~MACVLAN ~VETH ~BRIDGE ~BRIDGE_NETFILTER
96 - ~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE
97 - ~IP_VS
98 - ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK
99 - ~NF_NAT ~NF_NAT_NEEDED
100 -
101 - ~POSIX_MQUEUE
102 -
103 - ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED
104 -
105 - ~BLK_CGROUP ~IOSCHED_CFQ
106 - ~CGROUP_PERF
107 - ~CGROUP_HUGETLB
108 - ~NET_CLS_CGROUP
109 - ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED
110 - ~XFRM_ALGO ~XFRM_USER
111 -"
112 -
113 -ERROR_KEYS="CONFIG_KEYS: is mandatory"
114 -ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
115 -ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering"
116 -
117 -ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering"
118 -ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering"
119 -ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering"
120 -ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering"
121 -ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks"
122 -ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks"
123 -
124 -pkg_setup() {
125 - if kernel_is lt 3 10; then
126 - ewarn ""
127 - ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported."
128 - ewarn " - http://docs.docker.com/installation/binaries/#check-kernel-dependencies"
129 - fi
130 -
131 - # for where these kernel versions come from, see:
132 - # https://www.google.com/search?q=945b2b2d259d1a4364a2799e80e8ff32f8c6ee6f+site%3Akernel.org%2Fpub%2Flinux%2Fkernel+file%3AChangeLog*
133 - if ! {
134 - kernel_is ge 3 16 \
135 - || { kernel_is 3 15 && kernel_is ge 3 15 5; } \
136 - || { kernel_is 3 14 && kernel_is ge 3 14 12; } \
137 - || { kernel_is 3 12 && kernel_is ge 3 12 25; }
138 - }; then
139 - ewarn ""
140 - ewarn "There is a serious Docker-related kernel panic that has been fixed in 3.16+"
141 - ewarn " (and was backported to 3.15.5+, 3.14.12+, and 3.12.25+)"
142 - ewarn ""
143 - ewarn "See also https://github.com/docker/docker/issues/2960"
144 - fi
145 -
146 - if kernel_is le 3 18; then
147 - CONFIG_CHECK+="
148 - ~RESOURCE_COUNTERS
149 - "
150 - fi
151 -
152 - if kernel_is le 3 13; then
153 - CONFIG_CHECK+="
154 - ~NETPRIO_CGROUP
155 - "
156 - else
157 - CONFIG_CHECK+="
158 - ~CGROUP_NET_PRIO
159 - "
160 - fi
161 -
162 - if kernel_is lt 4 5; then
163 - CONFIG_CHECK+="
164 - ~MEMCG_KMEM
165 - "
166 - ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional"
167 - fi
168 -
169 - if use aufs; then
170 - CONFIG_CHECK+="
171 - ~AUFS_FS
172 - ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
173 - "
174 - ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3"
175 - fi
176 -
177 - if use btrfs; then
178 - CONFIG_CHECK+="
179 - ~BTRFS_FS
180 - "
181 - fi
182 -
183 - if use device-mapper; then
184 - CONFIG_CHECK+="
185 - ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
186 - "
187 - fi
188 -
189 - if use overlay; then
190 - CONFIG_CHECK+="
191 - ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL
192 - "
193 - fi
194 -
195 - linux-info_pkg_setup
196 -
197 - # create docker group for the code checking for it in /etc/group
198 - enewgroup docker
199 -}
200 -
201 -src_compile() {
202 - export GOPATH="${WORKDIR}/${P}:${PWD}/vendor"
203 -
204 - # setup CFLAGS and LDFLAGS for separate build target
205 - # see https://github.com/tianon/docker-overlay/pull/10
206 - export CGO_CFLAGS="-I${ROOT}/usr/include"
207 - export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
208 -
209 - # if we're building from a zip, we need the GITCOMMIT value
210 - [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
211 -
212 - if gcc-specs-pie; then
213 - sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die
214 - grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
215 -
216 - sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
217 - -i hack/make/dynbinary-client || die
218 - sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \
219 - -i hack/make/dynbinary-daemon || die
220 - grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed'
221 - grep -q -- '-fno-PIC' hack/make/dynbinary-client || die 'hardened sed failed'
222 - fi
223 -
224 - # let's set up some optional features :)
225 - export DOCKER_BUILDTAGS=''
226 - for gd in aufs btrfs device-mapper overlay; do
227 - if ! use $gd; then
228 - DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
229 - fi
230 - done
231 -
232 - for tag in apparmor seccomp; do
233 - if use $tag; then
234 - DOCKER_BUILDTAGS+=" $tag"
235 - fi
236 - done
237 -
238 - # https://github.com/docker/docker/pull/13338
239 - if use experimental; then
240 - export DOCKER_EXPERIMENTAL=1
241 - else
242 - unset DOCKER_EXPERIMENTAL
243 - fi
244 -
245 - # time to build!
246 - ./hack/make.sh dynbinary || die 'dynbinary failed'
247 -
248 - # build the man pages too
249 - ./man/md2man-all.sh || die "unable to generate man pages"
250 -}
251 -
252 -src_install() {
253 - VERSION="$(cat VERSION)"
254 - newbin "bundles/$VERSION/dynbinary-client/docker-$VERSION" docker
255 - newbin "bundles/$VERSION/dynbinary-daemon/dockerd-$VERSION" dockerd
256 - newbin "bundles/$VERSION/dynbinary-daemon/docker-proxy-$VERSION" docker-proxy
257 - dosym containerd /usr/bin/docker-containerd
258 - dosym containerd-shim /usr/bin/docker-containerd-shim
259 - dosym runc /usr/bin/docker-runc
260 -
261 - newinitd contrib/init/openrc/docker.initd docker
262 - newconfd contrib/init/openrc/docker.confd docker
263 -
264 - systemd_dounit contrib/init/systemd/docker.{service,socket}
265 -
266 - udev_dorules contrib/udev/*.rules
267 -
268 - dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
269 - dodoc -r docs/*
270 - doman man/man*/*
271 -
272 - dobashcomp contrib/completion/bash/*
273 -
274 - insinto /usr/share/zsh/site-functions
275 - doins contrib/completion/zsh/*
276 -
277 - insinto /usr/share/vim/vimfiles
278 - doins -r contrib/syntax/vim/ftdetect
279 - doins -r contrib/syntax/vim/syntax
280 -
281 - # note: intentionally not using "doins" so that we preserve +x bits
282 - mkdir -p "${D}/usr/share/${PN}/contrib"
283 - cp -R contrib/* "${D}/usr/share/${PN}/contrib"
284 -}
285 -
286 -pkg_postinst() {
287 - udev_reload
288 -
289 - elog
290 - elog "To use Docker, the Docker daemon must be running as root. To automatically"
291 - elog "start the Docker daemon at boot, add Docker to the default runlevel:"
292 - elog " rc-update add docker default"
293 - elog "Similarly for systemd:"
294 - elog " systemctl enable docker.service"
295 - elog
296 - elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
297 - elog " usermod -aG docker youruser"
298 - elog
299 -}