Gentoo Archives: gentoo-commits

From: "Kacper Kowalik (xarthisius)" <xarthisius@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/docker: docker-1.7.1.ebuild ChangeLog docker-1.7.0-r1.ebuild docker-1.7.0.ebuild
Date: Fri, 24 Jul 2015 18:48:45
Message-Id: 20150724184839.D57FFBB@oystercatcher.gentoo.org
1 xarthisius 15/07/24 18:48:39
2
3 Modified: ChangeLog
4 Added: docker-1.7.1.ebuild
5 Removed: docker-1.7.0-r1.ebuild docker-1.7.0.ebuild
6 Log:
7 Version bump, grabbed from tianon's docker overlay. Fixes #554306. Drop old
8
9 (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 0x5D21B852895192F9)
10
11 Revision Changes Path
12 1.55 app-emulation/docker/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/docker/ChangeLog?rev=1.55&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/docker/ChangeLog?rev=1.55&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/docker/ChangeLog?r1=1.54&r2=1.55
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-emulation/docker/ChangeLog,v
21 retrieving revision 1.54
22 retrieving revision 1.55
23 diff -u -r1.54 -r1.55
24 --- ChangeLog 7 Jul 2015 20:19:11 -0000 1.54
25 +++ ChangeLog 24 Jul 2015 18:48:39 -0000 1.55
26 @@ -1,6 +1,12 @@
27 # ChangeLog for app-emulation/docker
28 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/ChangeLog,v 1.54 2015/07/07 20:19:11 williamh Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/ChangeLog,v 1.55 2015/07/24 18:48:39 xarthisius Exp $
31 +
32 +*docker-1.7.1 (24 Jul 2015)
33 +
34 + 24 Jul 2015; Kacper Kowalik <xarthisius@g.o> +docker-1.7.1.ebuild,
35 + -docker-1.7.0-r1.ebuild, -docker-1.7.0.ebuild:
36 + Version bump, grabbed from tianon's docker overlay. Fixes #554306. Drop old
37
38 *docker-1.7.0-r1 (07 Jul 2015)
39
40
41
42
43 1.1 app-emulation/docker/docker-1.7.1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/docker/docker-1.7.1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/docker/docker-1.7.1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: docker-1.7.1.ebuild
49 ===================================================================
50 # Copyright 1999-2015 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/docker-1.7.1.ebuild,v 1.1 2015/07/24 18:48:39 xarthisius Exp $
53
54 EAPI=5
55
56 DESCRIPTION="Docker complements kernel namespacing with a high-level API which operates at the process level"
57 HOMEPAGE="https://www.docker.com"
58
59 GITHUB_URI="github.com/docker/docker"
60
61 if [[ ${PV} == *9999 ]]; then
62 SRC_URI=""
63 EGIT_REPO_URI="git://${GITHUB_URI}.git"
64 inherit git-2
65 else
66 MY_PV="${PV/_/-}"
67 MY_P="${PN}-${MY_PV}"
68 SRC_URI="https://${GITHUB_URI}/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
69 S="${WORKDIR}/${MY_P}"
70 DOCKER_GITCOMMIT="786b29d"
71 KEYWORDS="~amd64"
72 [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
73 fi
74
75 inherit bash-completion-r1 linux-info multilib systemd udev user
76
77 LICENSE="Apache-2.0"
78 SLOT="0"
79 IUSE="apparmor aufs btrfs +contrib +device-mapper doc experimental lxc overlay vim-syntax"
80
81 # https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#build-dependencies
82 CDEPEND="
83 >=dev-db/sqlite-3.7.9:3
84 device-mapper? (
85 >=sys-fs/lvm2-2.02.89[thin]
86 )
87 "
88
89 DEPEND="
90 ${CDEPEND}
91 >=dev-lang/go-1.4:=
92 btrfs? (
93 >=sys-fs/btrfs-progs-3.8
94 )
95 "
96
97 # https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#runtime-dependencies
98 # https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#optional-dependencies
99 RDEPEND="
100 ${CDEPEND}
101
102 !app-emulation/docker-bin
103 >=net-firewall/iptables-1.4
104 sys-process/procps
105 >=dev-vcs/git-1.7
106 >=app-arch/xz-utils-4.9
107
108 lxc? (
109 >=app-emulation/lxc-1.0.7
110 )
111 aufs? (
112 || (
113 sys-fs/aufs3
114 sys-fs/aufs4
115 sys-kernel/aufs-sources
116 )
117 )
118
119 apparmor? (
120 sys-libs/libapparmor[static-libs]
121 )
122 "
123
124 RESTRICT="installsources strip"
125
126 # see "contrib/check-config.sh" from upstream's sources
127 CONFIG_CHECK="
128 NAMESPACES NET_NS PID_NS IPC_NS UTS_NS
129 DEVPTS_MULTIPLE_INSTANCES
130 CGROUPS CGROUP_CPUACCT CGROUP_DEVICE CGROUP_FREEZER CGROUP_SCHED CPUSETS
131 MACVLAN VETH BRIDGE BRIDGE_NETFILTER
132 NF_NAT_IPV4 IP_NF_FILTER IP_NF_TARGET_MASQUERADE
133 NETFILTER_XT_MATCH_ADDRTYPE NETFILTER_XT_MATCH_CONNTRACK
134 NF_NAT NF_NAT_NEEDED
135
136 POSIX_MQUEUE
137
138 ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED
139
140 ~BLK_CGROUP
141 ~IOSCHED_CFQ
142 ~CGROUP_PERF
143 ~CFS_BANDWIDTH
144 "
145
146 ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
147 ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering"
148 ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering"
149 ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering"
150
151 pkg_setup() {
152 if kernel_is lt 3 10; then
153 eerror ""
154 eerror "Using Docker with kernels older than 3.10 is unstable and unsupported."
155 eerror " - http://docs.docker.com/installation/binaries/#check-kernel-dependencies"
156 die 'Kernel is too old - need 3.10 or above'
157 fi
158
159 # for where these kernel versions come from, see:
160 # https://www.google.com/search?q=945b2b2d259d1a4364a2799e80e8ff32f8c6ee6f+site%3Akernel.org%2Fpub%2Flinux%2Fkernel+file%3AChangeLog*
161 if ! {
162 kernel_is ge 3 16 \
163 || { kernel_is 3 15 && kernel_is ge 3 15 5; } \
164 || { kernel_is 3 14 && kernel_is ge 3 14 12; } \
165 || { kernel_is 3 12 && kernel_is ge 3 12 25; }
166 }; then
167 ewarn ""
168 ewarn "There is a serious Docker-related kernel panic that has been fixed in 3.16+"
169 ewarn " (and was backported to 3.15.5+, 3.14.12+, and 3.12.25+)"
170 ewarn ""
171 ewarn "See also https://github.com/docker/docker/issues/2960"
172 fi
173
174 if kernel_is le 3 18; then
175 CONFIG_CHECK+="
176 ~RESOURCE_COUNTERS
177 "
178 fi
179
180 if use aufs; then
181 CONFIG_CHECK+="
182 ~AUFS_FS
183 ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
184 "
185 # TODO there must be a way to detect "sys-kernel/aufs-sources" so we don't warn "sys-fs/aufs3" users about this
186 # an even better solution would be to check if the current kernel sources include CONFIG_AUFS_FS as an option, but that sounds hairy and error-prone
187 ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used"
188 fi
189
190 if use btrfs; then
191 CONFIG_CHECK+="
192 ~BTRFS_FS
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
211 src_prepare() {
212 # allow user patches (use sparingly - upstream won't support them)
213 epatch_user
214 }
215
216 src_compile() {
217 # if we treat them right, Docker's build scripts will set up a
218 # reasonable GOPATH for us
219 export AUTO_GOPATH=1
220
221 # setup CFLAGS and LDFLAGS for separate build target
222 # see https://github.com/tianon/docker-overlay/pull/10
223 export CGO_CFLAGS="-I${ROOT}/usr/include"
224 export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
225
226 # if we're building from a zip, we need the GITCOMMIT value
227 [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
228
229 if gcc-specs-pie; then
230 sed -i "s/EXTLDFLAGS_STATIC='/EXTLDFLAGS_STATIC='-fno-PIC /" hack/make.sh || die
231 grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
232
233 sed -i "s/LDFLAGS_STATIC_DOCKER='/LDFLAGS_STATIC_DOCKER='-extldflags -fno-PIC /" hack/make/dynbinary || die
234 grep -q -- '-fno-PIC' hack/make/dynbinary || die 'hardened sed failed'
235 fi
236
237 # let's set up some optional features :)
238 export DOCKER_BUILDTAGS=''
239 for gd in aufs btrfs device-mapper overlay; do
240 if ! use $gd; then
241 DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
242 fi
243 done
244
245 if use apparmor; then
246 DOCKER_BUILDTAGS+=' apparmor'
247 fi
248
249 # https://github.com/docker/docker/pull/13338
250 if use experimental; then
251 export DOCKER_EXPERIMENTAL=1
252 else
253 unset DOCKER_EXPERIMENTAL
254 fi
255
256 # time to build!
257 ./hack/make.sh dynbinary || die 'dynbinary failed'
258
259 # TODO get go-md2man and then include the man pages using man/md2man-all.sh
260 }
261
262 src_install() {
263 VERSION=$(cat VERSION)
264 newbin bundles/$VERSION/dynbinary/docker-$VERSION docker
265 exeinto /usr/libexec/docker
266 newexe bundles/$VERSION/dynbinary/dockerinit-$VERSION dockerinit
267
268 newinitd contrib/init/openrc/docker.initd docker
269 newconfd contrib/init/openrc/docker.confd docker
270
271 systemd_dounit contrib/init/systemd/docker.{service,socket}
272
273 udev_dorules contrib/udev/*.rules
274
275 dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
276 if use doc; then
277 # TODO doman man/man*/*
278
279 docompress -x /usr/share/doc/${PF}/md
280 docinto md
281 dodoc -r docs/*
282 fi
283
284 dobashcomp contrib/completion/bash/*
285
286 insinto /usr/share/zsh/site-functions
287 doins contrib/completion/zsh/*
288
289 if use vim-syntax; then
290 insinto /usr/share/vim/vimfiles
291 doins -r contrib/syntax/vim/ftdetect
292 doins -r contrib/syntax/vim/syntax
293 fi
294
295 if use contrib; then
296 mkdir -p "${D}/usr/share/${PN}/contrib"
297 cp -R contrib/* "${D}/usr/share/${PN}/contrib"
298 fi
299 }
300
301 pkg_postinst() {
302 udev_reload
303
304 elog ""
305 elog "To use Docker, the Docker daemon must be running as root. To automatically"
306 elog "start the Docker daemon at boot, add Docker to the default runlevel:"
307 elog " rc-update add docker default"
308 elog "Similarly for systemd:"
309 elog " systemctl enable docker.service"
310 elog ""
311
312 # create docker group if the code checking for it in /etc/group exists
313 enewgroup docker
314
315 elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
316 elog " usermod -aG docker youruser"
317 elog ""
318 }