1 |
commit: cf56f038b5fbc704f3199dab73bd43c2869bf0f7 |
2 |
Author: Kacper Kowalik <xarthisius <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 28 12:19:44 2016 +0000 |
4 |
Commit: Kacper Kowalik <xarthisius <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 28 12:19:44 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf56f038 |
7 |
|
8 |
app-emulation/docker: version bump |
9 |
|
10 |
Fixes #578330 |
11 |
|
12 |
Reported-by: Vasilis Lourdas <bugs <AT> lourdas.eu> |
13 |
|
14 |
Package-Manager: portage-2.2.27 |
15 |
|
16 |
app-emulation/docker/Manifest | 1 + |
17 |
app-emulation/docker/docker-1.10.3.ebuild | 270 ++++++++++++++++++++++++++++++ |
18 |
2 files changed, 271 insertions(+) |
19 |
|
20 |
diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest |
21 |
index df68785..d1f61a2 100644 |
22 |
--- a/app-emulation/docker/Manifest |
23 |
+++ b/app-emulation/docker/Manifest |
24 |
@@ -1,4 +1,5 @@ |
25 |
DIST docker-1.10.0.tar.gz 9966458 SHA256 4321baec0839a0f57b9bb3a20d84f2ab1ff045fbe631c3aa76bbc1db67012635 SHA512 dc8c421e704990882dce26d23929d71dffeac605e07d595872f1fa5c0920f214a368c902ecd7c739f32a468c276001acf3cef1676aeaeffc8e4530ec028db070 WHIRLPOOL 583f186e338624ddb8d67941e62c5cc9f12af99a13939b20739dbe2d46eff0b3aa21fc8dec508d7b6f8dd13c4ff4e0f52cf7afd174d5289f7966c2cfefa3a081 |
26 |
+DIST docker-1.10.3.tar.gz 9973680 SHA256 6b72fafa4c068a95133f5c9fda9fb148c9412db7a932800689e259a1b1c7ef6d SHA512 0e8f1dc80b8600a3a2d36a0e2a5c1a5cdca540198dafb9b6e32e79e7a2d2bea3d822ec310d6b1655fd0c91dca03874fa93b3ddb77e59607d62aac4fe6062c0da WHIRLPOOL 0d1b09868e958bfad5a722f60a73847ba12745e36abc11e04ff074546728967ccbaf0cf4554dec70dcd97169a2c684144d5cc171ef3b9bf0ba438daf37c24269 |
27 |
DIST docker-1.6.1.tar.gz 5713944 SHA256 aa3534277d11b32bc3564b801aeed0502f067317e7e111bd91ce2d989d34c51e SHA512 d2647f191fd295c8a9326e11ddbf6e77f33b70f14e3ebd37db3c9fa1f4946e0e3f426078ee847f52d7c57fc7783d26afe3e5d2e7ff17d8e6bb4f71609e8f5ef2 WHIRLPOOL e12c799ef63a0646f7393b00b6c1e200f350f7089445c58819ae5b53d66d18d985cb9f8fde1cd3ecfa55c2f0186064fc7080b7ebba132404aa15502029881602 |
28 |
DIST docker-1.6.2.tar.gz 5714121 SHA256 f3a031b23ea9ff0fdbf3ffb9449c64ec51bb053491b47b28000eb4cce9f23203 SHA512 c27bdafabcb8ad2e49bee9e1529141a25596ba2b59435fb9368fc406950d0d7d1cbd876f1f4248dfc7089a22b8a2d13009dd164bde87e37b95a8e502bb49cac9 WHIRLPOOL aea4105ba30104d751203153b6208e363ce0abb3145ee134e675c4bc640e888afb281e7ba9009a30b9af37e829185684427a33b947d8710b49562e3352526c06 |
29 |
DIST docker-1.7.1.tar.gz 6853527 SHA256 9cd26415d68a88d3cf576e7e78c2fe97f42af795404f552728acc5b41dccf4ef SHA512 9b32c3deab77a27a4322a3ccbb3759a2c2a5627605090c4517c3754e6821407abcf5ffa227bad1fdafcbba068cdcaab586015dd8cfe9aed7e8a221d0615463f1 WHIRLPOOL 41b1afd8ea08c3452e5658d73e85c3b79a64f85fb4cb99c4c6a2ce1ab49836cebbe14724afe47898cb8d9bb9d4d69c64ff1c061895f3b9534150bc7ab50e2b22 |
30 |
|
31 |
diff --git a/app-emulation/docker/docker-1.10.3.ebuild b/app-emulation/docker/docker-1.10.3.ebuild |
32 |
new file mode 100644 |
33 |
index 0000000..8ab8d73 |
34 |
--- /dev/null |
35 |
+++ b/app-emulation/docker/docker-1.10.3.ebuild |
36 |
@@ -0,0 +1,270 @@ |
37 |
+# Copyright 1999-2016 Gentoo Foundation |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+# $Id$ |
40 |
+ |
41 |
+EAPI=5 |
42 |
+ |
43 |
+EGO_PN="github.com/docker/docker" |
44 |
+ |
45 |
+if [[ ${PV} = *9999* ]]; then |
46 |
+ # Docker cannot be fetched via "go get", thanks to autogenerated code |
47 |
+ EGIT_REPO_URI="https://${EGO_PN}.git" |
48 |
+ EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}" |
49 |
+ inherit git-r3 |
50 |
+else |
51 |
+ MY_PV="${PV/_/-}" |
52 |
+ DOCKER_GITCOMMIT="20f81dd" |
53 |
+ EGIT_COMMIT="v${MY_PV}" |
54 |
+ SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" |
55 |
+ KEYWORDS="~amd64" |
56 |
+ [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!" |
57 |
+ inherit golang-vcs-snapshot |
58 |
+fi |
59 |
+inherit bash-completion-r1 linux-info multilib systemd udev user |
60 |
+ |
61 |
+DESCRIPTION="Docker complements kernel namespacing with a high-level API which operates at the process level" |
62 |
+HOMEPAGE="https://dockerproject.org" |
63 |
+LICENSE="Apache-2.0" |
64 |
+SLOT="0" |
65 |
+IUSE="apparmor aufs btrfs +device-mapper experimental overlay seccomp" |
66 |
+ |
67 |
+# https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#build-dependencies |
68 |
+CDEPEND=" |
69 |
+ >=dev-db/sqlite-3.7.9:3 |
70 |
+ device-mapper? ( |
71 |
+ >=sys-fs/lvm2-2.02.89[thin] |
72 |
+ ) |
73 |
+ seccomp? ( |
74 |
+ >=sys-libs/libseccomp-2.2.1[static-libs] |
75 |
+ ) |
76 |
+" |
77 |
+ |
78 |
+DEPEND=" |
79 |
+ ${CDEPEND} |
80 |
+ |
81 |
+ dev-go/go-md2man |
82 |
+ |
83 |
+ btrfs? ( |
84 |
+ >=sys-fs/btrfs-progs-3.8 |
85 |
+ ) |
86 |
+" |
87 |
+ |
88 |
+# https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#runtime-dependencies |
89 |
+# https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#optional-dependencies |
90 |
+RDEPEND=" |
91 |
+ ${CDEPEND} |
92 |
+ |
93 |
+ !app-emulation/docker-bin |
94 |
+ >=net-firewall/iptables-1.4 |
95 |
+ sys-process/procps |
96 |
+ >=dev-vcs/git-1.7 |
97 |
+ >=app-arch/xz-utils-4.9 |
98 |
+ |
99 |
+ apparmor? ( |
100 |
+ sys-libs/libapparmor[static-libs] |
101 |
+ ) |
102 |
+" |
103 |
+ |
104 |
+RESTRICT="installsources strip" |
105 |
+ |
106 |
+# see "contrib/check-config.sh" from upstream's sources |
107 |
+CONFIG_CHECK=" |
108 |
+ ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS |
109 |
+ ~DEVPTS_MULTIPLE_INSTANCES |
110 |
+ ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG |
111 |
+ ~MACVLAN ~VETH ~BRIDGE ~BRIDGE_NETFILTER |
112 |
+ ~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE |
113 |
+ ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK |
114 |
+ ~NF_NAT ~NF_NAT_NEEDED |
115 |
+ |
116 |
+ ~POSIX_MQUEUE |
117 |
+ |
118 |
+ ~MEMCG_KMEM ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED |
119 |
+ |
120 |
+ ~BLK_CGROUP ~IOSCHED_CFQ |
121 |
+ ~CGROUP_PERF |
122 |
+ ~CGROUP_HUGETLB |
123 |
+ ~NET_CLS_CGROUP |
124 |
+ ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED |
125 |
+" |
126 |
+ |
127 |
+ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional" |
128 |
+ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers" |
129 |
+ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering" |
130 |
+ |
131 |
+ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering" |
132 |
+ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering" |
133 |
+ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering" |
134 |
+ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering" |
135 |
+ |
136 |
+pkg_setup() { |
137 |
+ if kernel_is lt 3 10; then |
138 |
+ ewarn "" |
139 |
+ ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported." |
140 |
+ ewarn " - http://docs.docker.com/installation/binaries/#check-kernel-dependencies" |
141 |
+ fi |
142 |
+ |
143 |
+ # for where these kernel versions come from, see: |
144 |
+ # https://www.google.com/search?q=945b2b2d259d1a4364a2799e80e8ff32f8c6ee6f+site%3Akernel.org%2Fpub%2Flinux%2Fkernel+file%3AChangeLog* |
145 |
+ if ! { |
146 |
+ kernel_is ge 3 16 \ |
147 |
+ || { kernel_is 3 15 && kernel_is ge 3 15 5; } \ |
148 |
+ || { kernel_is 3 14 && kernel_is ge 3 14 12; } \ |
149 |
+ || { kernel_is 3 12 && kernel_is ge 3 12 25; } |
150 |
+ }; then |
151 |
+ ewarn "" |
152 |
+ ewarn "There is a serious Docker-related kernel panic that has been fixed in 3.16+" |
153 |
+ ewarn " (and was backported to 3.15.5+, 3.14.12+, and 3.12.25+)" |
154 |
+ ewarn "" |
155 |
+ ewarn "See also https://github.com/docker/docker/issues/2960" |
156 |
+ fi |
157 |
+ |
158 |
+ if kernel_is le 3 18; then |
159 |
+ CONFIG_CHECK+=" |
160 |
+ ~RESOURCE_COUNTERS |
161 |
+ " |
162 |
+ fi |
163 |
+ |
164 |
+ if kernel_is le 3 13; then |
165 |
+ CONFIG_CHECK+=" |
166 |
+ ~NETPRIO_CGROUP |
167 |
+ " |
168 |
+ else |
169 |
+ CONFIG_CHECK+=" |
170 |
+ ~CGROUP_NET_PRIO |
171 |
+ " |
172 |
+ fi |
173 |
+ |
174 |
+ if use aufs; then |
175 |
+ CONFIG_CHECK+=" |
176 |
+ ~AUFS_FS |
177 |
+ ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY |
178 |
+ " |
179 |
+ ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3" |
180 |
+ fi |
181 |
+ |
182 |
+ if use btrfs; then |
183 |
+ CONFIG_CHECK+=" |
184 |
+ ~BTRFS_FS |
185 |
+ " |
186 |
+ fi |
187 |
+ |
188 |
+ if use device-mapper; then |
189 |
+ CONFIG_CHECK+=" |
190 |
+ ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY |
191 |
+ " |
192 |
+ fi |
193 |
+ |
194 |
+ if use overlay; then |
195 |
+ CONFIG_CHECK+=" |
196 |
+ ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL |
197 |
+ " |
198 |
+ fi |
199 |
+ |
200 |
+ linux-info_pkg_setup |
201 |
+ |
202 |
+ # create docker group for the code checking for it in /etc/group |
203 |
+ enewgroup docker |
204 |
+} |
205 |
+ |
206 |
+src_prepare() { |
207 |
+ cd "src/${EGO_PN}" || die |
208 |
+ # allow user patches (use sparingly - upstream won't support them) |
209 |
+ epatch_user |
210 |
+} |
211 |
+ |
212 |
+src_compile() { |
213 |
+ cd "src/${EGO_PN}" || die |
214 |
+ export GOPATH="${WORKDIR}/${P}:${PWD}/vendor" |
215 |
+ |
216 |
+ # setup CFLAGS and LDFLAGS for separate build target |
217 |
+ # see https://github.com/tianon/docker-overlay/pull/10 |
218 |
+ export CGO_CFLAGS="-I${ROOT}/usr/include" |
219 |
+ export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)" |
220 |
+ |
221 |
+ # if we're building from a zip, we need the GITCOMMIT value |
222 |
+ [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT |
223 |
+ |
224 |
+ if gcc-specs-pie; then |
225 |
+ sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die |
226 |
+ grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed' |
227 |
+ |
228 |
+ sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \ |
229 |
+ -i hack/make/dynbinary || die |
230 |
+ grep -q -- '-fno-PIC' hack/make/dynbinary || die 'hardened sed failed' |
231 |
+ fi |
232 |
+ |
233 |
+ # let's set up some optional features :) |
234 |
+ export DOCKER_BUILDTAGS='' |
235 |
+ for gd in aufs btrfs device-mapper overlay; do |
236 |
+ if ! use $gd; then |
237 |
+ DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" |
238 |
+ fi |
239 |
+ done |
240 |
+ |
241 |
+ for tag in apparmor seccomp; do |
242 |
+ if use $tag; then |
243 |
+ DOCKER_BUILDTAGS+=" $tag" |
244 |
+ fi |
245 |
+ done |
246 |
+ |
247 |
+ # https://github.com/docker/docker/pull/13338 |
248 |
+ if use experimental; then |
249 |
+ export DOCKER_EXPERIMENTAL=1 |
250 |
+ else |
251 |
+ unset DOCKER_EXPERIMENTAL |
252 |
+ fi |
253 |
+ |
254 |
+ # time to build! |
255 |
+ ./hack/make.sh dynbinary || die 'dynbinary failed' |
256 |
+ |
257 |
+ # build the man pages too |
258 |
+ ./man/md2man-all.sh || die "unable to generate man pages" |
259 |
+} |
260 |
+ |
261 |
+src_install() { |
262 |
+ cd "src/${EGO_PN}" || die |
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 |
+ dodoc -r docs/* |
277 |
+ doman man/man*/* |
278 |
+ |
279 |
+ dobashcomp contrib/completion/bash/* |
280 |
+ |
281 |
+ insinto /usr/share/zsh/site-functions |
282 |
+ doins contrib/completion/zsh/* |
283 |
+ |
284 |
+ insinto /usr/share/vim/vimfiles |
285 |
+ doins -r contrib/syntax/vim/ftdetect |
286 |
+ doins -r contrib/syntax/vim/syntax |
287 |
+ |
288 |
+ # note: intentionally not using "doins" so that we preserve +x bits |
289 |
+ mkdir -p "${D}/usr/share/${PN}/contrib" |
290 |
+ cp -R contrib/* "${D}/usr/share/${PN}/contrib" |
291 |
+} |
292 |
+ |
293 |
+pkg_postinst() { |
294 |
+ udev_reload |
295 |
+ |
296 |
+ elog |
297 |
+ elog "To use Docker, the Docker daemon must be running as root. To automatically" |
298 |
+ elog "start the Docker daemon at boot, add Docker to the default runlevel:" |
299 |
+ elog " rc-update add docker default" |
300 |
+ elog "Similarly for systemd:" |
301 |
+ elog " systemctl enable docker.service" |
302 |
+ elog |
303 |
+ elog "To use Docker as a non-root user, add yourself to the 'docker' group:" |
304 |
+ elog " usermod -aG docker youruser" |
305 |
+ elog |
306 |
+} |