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