Gentoo Archives: gentoo-commits

From: "Greg Kroah-Hartman (gregkh)" <gregkh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/docker: docker-1.0.1.ebuild ChangeLog
Date: Sun, 29 Jun 2014 02:00:45
Message-Id: 20140629020040.06E132004E@flycatcher.gentoo.org
1 gregkh 14/06/29 02:00:39
2
3 Modified: ChangeLog
4 Added: docker-1.0.1.ebuild
5 Log:
6 1.0.1 version bump
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key )
9
10 Revision Changes Path
11 1.24 app-emulation/docker/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/docker/ChangeLog?rev=1.24&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/docker/ChangeLog?rev=1.24&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/docker/ChangeLog?r1=1.23&r2=1.24
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-emulation/docker/ChangeLog,v
20 retrieving revision 1.23
21 retrieving revision 1.24
22 diff -u -r1.23 -r1.24
23 --- ChangeLog 25 Jun 2014 04:34:23 -0000 1.23
24 +++ ChangeLog 29 Jun 2014 02:00:39 -0000 1.24
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.23 2014/06/25 04:34:23 patrick Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/ChangeLog,v 1.24 2014/06/29 02:00:39 gregkh Exp $
30 +
31 +*docker-1.0.1 (29 Jun 2014)
32 +
33 + 29 Jun 2014; Greg Kroah-Hartman <gregkh@g.o> +docker-1.0.1.ebuild:
34 + 1.0.1 version bump
35
36 25 Jun 2014; Patrick Lauer <patrick@g.o> -docker-0.7.0.ebuild:
37 Remove ebuild that fetches from live git
38
39
40
41 1.1 app-emulation/docker/docker-1.0.1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/docker/docker-1.0.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/docker/docker-1.0.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: docker-1.0.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.0.1.ebuild,v 1.1 2014/06/29 02:00:39 gregkh 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.io/"
56
57 GITHUB_URI="github.com/dotcloud/docker"
58
59 if [[ ${PV} == *9999 ]]; then
60 SRC_URI=""
61 EGIT_REPO_URI="git://${GITHUB_URI}.git"
62 inherit git-2
63 KEYWORDS=""
64 else
65 SRC_URI="https://${GITHUB_URI}/archive/v${PV}.zip -> ${P}.zip"
66 DOCKER_GITCOMMIT="990021a"
67 KEYWORDS="~amd64"
68 [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
69 fi
70
71 inherit bash-completion-r1 linux-info systemd udev user
72
73 LICENSE="Apache-2.0"
74 SLOT="0"
75 IUSE="aufs btrfs +contrib +device-mapper doc lxc vim-syntax zsh-completion"
76
77 # TODO work with upstream to allow us to build without lvm2 installed if we have -device-mapper
78 CDEPEND="
79 >=dev-db/sqlite-3.7.9:3
80 device-mapper? (
81 sys-fs/lvm2[thin]
82 )
83 "
84 DEPEND="
85 ${CDEPEND}
86 >=dev-lang/go-1.2
87 btrfs? (
88 >=sys-fs/btrfs-progs-0.20
89 )
90 dev-vcs/git
91 dev-vcs/mercurial
92 "
93 RDEPEND="
94 ${CDEPEND}
95 !app-emulation/docker-bin
96 >=net-firewall/iptables-1.4
97 lxc? (
98 >=app-emulation/lxc-1.0
99 )
100 >=dev-vcs/git-1.7
101 >=app-arch/xz-utils-4.9
102 aufs? (
103 || (
104 sys-fs/aufs3
105 sys-kernel/aufs-sources
106 )
107 )
108 "
109
110 RESTRICT="installsources strip"
111
112 pkg_setup() {
113 if kernel_is lt 3 8; then
114 ewarn ""
115 ewarn "Using Docker with kernels older than 3.8 is unstable and unsupported."
116 ewarn ""
117 fi
118
119 # many of these were borrowed from the app-emulation/lxc ebuild
120 CONFIG_CHECK+="
121 ~CGROUPS
122 ~CGROUP_CPUACCT
123 ~CGROUP_DEVICE
124 ~CGROUP_FREEZER
125 ~CGROUP_SCHED
126 ~CPUSETS
127 ~MEMCG_SWAP
128 ~RESOURCE_COUNTERS
129
130 ~IPC_NS
131 ~NAMESPACES
132 ~PID_NS
133
134 ~DEVPTS_MULTIPLE_INSTANCES
135 ~MACVLAN
136 ~NET_NS
137 ~UTS_NS
138 ~VETH
139
140 ~!NETPRIO_CGROUP
141 ~POSIX_MQUEUE
142
143 ~BRIDGE
144 ~IP_NF_TARGET_MASQUERADE
145 ~NETFILTER_XT_MATCH_ADDRTYPE
146 ~NETFILTER_XT_MATCH_CONNTRACK
147 ~NF_NAT
148 ~NF_NAT_NEEDED
149
150 ~!GRKERNSEC_CHROOT_CAPS
151 ~!GRKERNSEC_CHROOT_CHMOD
152 ~!GRKERNSEC_CHROOT_DOUBLE
153 ~!GRKERNSEC_CHROOT_MOUNT
154 ~!GRKERNSEC_CHROOT_PIVOT
155 "
156
157 ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
158
159 for c in GRKERNSEC_CHROOT_MOUNT GRKERNSEC_CHROOT_DOUBLE GRKERNSEC_CHROOT_PIVOT GRKERNSEC_CHROOT_CHMOD; do
160 declare "ERROR_$c"="CONFIG_$c: see app-emulation/lxc postinst notes for why some GRSEC features make containers unusuable"
161 done
162
163 if use aufs; then
164 CONFIG_CHECK+="
165 ~AUFS_FS
166 "
167 ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used"
168 fi
169
170 if use btrfs; then
171 CONFIG_CHECK+="
172 ~BTRFS_FS
173 "
174 fi
175
176 if use device-mapper; then
177 CONFIG_CHECK+="
178 ~BLK_DEV_DM
179 ~DM_THIN_PROVISIONING
180 ~EXT4_FS
181 "
182 fi
183
184 check_extra_config
185 }
186
187 src_compile() {
188 # if we treat them right, Docker's build scripts will set up a
189 # reasonable GOPATH for us
190 export AUTO_GOPATH=1
191
192 # setup CFLAGS and LDFLAGS for separate build target
193 # see https://github.com/tianon/docker-overlay/pull/10
194 export CGO_CFLAGS="-I${ROOT}/usr/include"
195 export CGO_LDFLAGS="-L${ROOT}/usr/lib"
196
197 # if we're building from a zip, we need the GITCOMMIT value
198 [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
199
200 if gcc-specs-pie; then
201 sed -i "s/EXTLDFLAGS_STATIC='/EXTLDFLAGS_STATIC='-fno-PIC /" hack/make.sh || die
202 grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
203
204 sed -i 's/LDFLAGS_STATIC_DOCKER="/LDFLAGS_STATIC_DOCKER="-extldflags -fno-PIC /' hack/make/dynbinary || die
205 grep -q -- '-fno-PIC' hack/make/dynbinary || die 'hardened sed failed'
206 fi
207
208 # let's set up some optional features :)
209 export DOCKER_BUILDTAGS=''
210 for gd in aufs btrfs device-mapper; do
211 if ! use $gd; then
212 DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
213 fi
214 done
215
216 # time to build!
217 ./hack/make.sh dynbinary || die
218
219 # TODO pandoc the man pages using contrib/man/md/md2man-all.sh
220 }
221
222 src_install() {
223 VERSION=$(cat VERSION)
224 newbin bundles/$VERSION/dynbinary/docker-$VERSION docker
225 exeinto /usr/libexec/docker
226 newexe bundles/$VERSION/dynbinary/dockerinit-$VERSION dockerinit
227
228 newinitd contrib/init/openrc/docker.initd docker
229 newconfd contrib/init/openrc/docker.confd docker
230
231 systemd_dounit contrib/init/systemd/docker.service
232
233 udev_dorules contrib/udev/*.rules
234
235 dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
236 if use doc; then
237 # TODO doman contrib/man/man*/*
238
239 docompress -x /usr/share/doc/${PF}/md
240 docinto md
241 dodoc -r docs/sources/*
242 fi
243
244 dobashcomp contrib/completion/bash/*
245
246 if use zsh-completion; then
247 insinto /usr/share/zsh/site-functions
248 doins contrib/completion/zsh/*
249 fi
250
251 if use vim-syntax; then
252 insinto /usr/share/vim/vimfiles
253 doins -r contrib/syntax/vim/ftdetect
254 doins -r contrib/syntax/vim/syntax
255 fi
256
257 if use contrib; then
258 mkdir -p "${D}/usr/share/${PN}/contrib"
259 cp -R contrib/* "${D}/usr/share/${PN}/contrib"
260 fi
261 }
262
263 pkg_postinst() {
264 udev_reload
265
266 elog ""
267 elog "To use docker, the docker daemon must be running as root. To automatically"
268 elog "start the docker daemon at boot, add docker to the default runlevel:"
269 elog " rc-update add docker default"
270 elog "Similarly for systemd:"
271 elog " systemctl enable docker.service"
272 elog ""
273
274 # create docker group if the code checking for it in /etc/group exists
275 enewgroup docker
276
277 elog "To use docker as a non-root user, add yourself to the docker group."
278 elog ""
279 }