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