1 |
commit: e20a0904091b13d7b69d5f87475d924c57639ac8 |
2 |
Author: Erik Mackdanz <stasibear <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 12 05:42:01 2015 +0000 |
4 |
Commit: Erik Mackdanz <stasibear <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 12 05:42:01 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e20a0904 |
7 |
|
8 |
app-emulation/lxd: remove old |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
app-emulation/lxd/Manifest | 2 - |
13 |
app-emulation/lxd/files/lxd-0.20-dont-go-get.patch | 18 --- |
14 |
.../lxd/files/lxd-0.20-nc-binary-name.patch | 11 -- |
15 |
app-emulation/lxd/files/lxd-0.20.confd | 27 ---- |
16 |
app-emulation/lxd/files/lxd-0.20.initd | 32 ---- |
17 |
app-emulation/lxd/files/lxd-0.21-dont-go-get.patch | 18 --- |
18 |
.../lxd/files/lxd-0.21-nc-binary-name.patch | 11 -- |
19 |
app-emulation/lxd/files/lxd-0.21.confd | 27 ---- |
20 |
app-emulation/lxd/files/lxd-0.21.initd | 32 ---- |
21 |
app-emulation/lxd/lxd-0.20.ebuild | 169 --------------------- |
22 |
app-emulation/lxd/lxd-0.21.ebuild | 169 --------------------- |
23 |
11 files changed, 516 deletions(-) |
24 |
|
25 |
diff --git a/app-emulation/lxd/Manifest b/app-emulation/lxd/Manifest |
26 |
index 9581399..43dc501 100644 |
27 |
--- a/app-emulation/lxd/Manifest |
28 |
+++ b/app-emulation/lxd/Manifest |
29 |
@@ -1,5 +1,3 @@ |
30 |
-DIST lxd-0.20.tar.bz2 2687718 SHA256 a071b92015f676746137e1ffeab1886d90297d0d5832bbf5ee6aff081acc4840 SHA512 2064daa7d1aeb4764a15d559e3d4178918942d82dbba31e964d713aab48d2ee30ce6a63632701c41b13de4aea541acd76d55b52f12de10a99ffeaa3cb945ad44 WHIRLPOOL 1ffa9d6bf1cb7132b82e731002eae7b7ff3544fb03958827916c2e00e02a0bdd10bbadd2401f7799187c2c0338987f24b46d8e138131f7df888162e56b3f4fe5 |
31 |
-DIST lxd-0.21.tar.bz2 2683517 SHA256 06e9ed72d1d45af532664e47d9772a886dc1d757e83d673498b05798249c66c8 SHA512 588225ed77cd8a86b34579ee3f3b2b3ba8166ce9d85872e6076fa5075bc5a3846c82255dee6e701a6d51bdd9bf8280bbd5fab08ca4438de5320de8f0388685eb WHIRLPOOL c85f103e38f44c4cd859faf330764c3d076cede6d09f976b4686d7f91b6ca233e09721df418493fed19cb8bf3118b2a0a6723f3084da532bba4a5344de8a4b9c |
32 |
DIST lxd-0.22.tar.bz2 2685133 SHA256 66dc30b82fba7f606658280d0dbac67a32152644a403ab00285fc3907b50082e SHA512 ab5384143edd03dfa1ef956c64e9fce2d845ce07c5388f719c202fd1ff9059282e104400f39f23ff1c4fefc8a23dd1d4c6c9094b497c40c659b087989bf07d44 WHIRLPOOL 27559c50f6aa55edb533046bb49b04784c63003569e7920261504a7b4c69891a80ff8432421352c13f274bb21876f2cf5266e9de2b1302d69e0254be87c17137 |
33 |
DIST lxd-0.23.tar.bz2 2606330 SHA256 06335bd15b00db2dec06114427b1d934fe1ac5271b85eb19074c508cb2466695 SHA512 2f73817c800c55c722a3017ee3064587c04730d5da9846b44be99b4541e739b466bcb7e924fcb18a15f1d49d010d471510378060530f6a15f6e60363b4d556b3 WHIRLPOOL 455b782ed2d21d5a720e06e356e1dd2115df174893e66710c74d02596deb8a66ff6e77b400f2ebeb047209b3bfed0927ff21a3a9f7cf9924719b84742f0eb5a7 |
34 |
DIST lxd-0.24.tar.bz2 1973022 SHA256 e3851bded0f2639e4aec9c63797135bfa3b27def17123c8e506c784b1ab4c99a SHA512 e7593136fd1fb13542a8415d964ff3bab8bcc7f7a7d806874e7c21fd9d96652aa5716a9d3318cea3d849a19aa96b40bfea27f4edd528c8307efaeeac88971f2e WHIRLPOOL 69b6722a25c9e75e533436a37951dc893cbf3d3c0f5d31b3ccc2cf0a7dede9cf16c53e68562348ab9bf9e621421030b826df21e5fb32df8a496127601fa5d898 |
35 |
|
36 |
diff --git a/app-emulation/lxd/files/lxd-0.20-dont-go-get.patch b/app-emulation/lxd/files/lxd-0.20-dont-go-get.patch |
37 |
deleted file mode 100644 |
38 |
index 1b229ea..0000000 |
39 |
--- a/app-emulation/lxd/files/lxd-0.20-dont-go-get.patch |
40 |
+++ /dev/null |
41 |
@@ -1,18 +0,0 @@ |
42 |
---- Makefile.orig 2015-09-17 20:37:16.481867339 -0500 |
43 |
-+++ Makefile 2015-09-17 20:53:27.715800926 -0500 |
44 |
-@@ -12,15 +12,11 @@ |
45 |
- |
46 |
- .PHONY: default |
47 |
- default: |
48 |
-- -go get -t -v -d ./... |
49 |
-- -go get -t -v -d ./... |
50 |
- go install -v ./... |
51 |
- @echo "LXD built succesfuly" |
52 |
- |
53 |
- .PHONY: client |
54 |
- client: |
55 |
-- -go get -t -v -d ./... |
56 |
-- -go get -t -v -d ./... |
57 |
- go install -v ./lxc |
58 |
- @echo "LXD client built succesfuly" |
59 |
- |
60 |
|
61 |
diff --git a/app-emulation/lxd/files/lxd-0.20-nc-binary-name.patch b/app-emulation/lxd/files/lxd-0.20-nc-binary-name.patch |
62 |
deleted file mode 100644 |
63 |
index b88b7f7..0000000 |
64 |
--- a/app-emulation/lxd/files/lxd-0.20-nc-binary-name.patch |
65 |
+++ /dev/null |
66 |
@@ -1,11 +0,0 @@ |
67 |
---- lxd/rsync.go.orig 2015-09-17 21:00:29.290772099 -0500 |
68 |
-+++ lxd/rsync.go 2015-09-17 21:00:54.737770359 -0500 |
69 |
-@@ -73,7 +73,7 @@ |
70 |
- * command (i.e. the command to run on --server). However, we're |
71 |
- * hardcoding that at the other end, so we can just ignore it. |
72 |
- */ |
73 |
-- rsyncCmd := fmt.Sprintf("sh -c \"nc -U %s\"", f.Name()) |
74 |
-+ rsyncCmd := fmt.Sprintf("sh -c \"nc.openbsd -U %s\"", f.Name()) |
75 |
- cmd := exec.Command("rsync", "-arvP", "--devices", "--partial", path, "localhost:/tmp/foo", "-e", rsyncCmd) |
76 |
- if err := cmd.Start(); err != nil { |
77 |
- return nil, nil, err |
78 |
|
79 |
diff --git a/app-emulation/lxd/files/lxd-0.20.confd b/app-emulation/lxd/files/lxd-0.20.confd |
80 |
deleted file mode 100644 |
81 |
index 3d55327..0000000 |
82 |
--- a/app-emulation/lxd/files/lxd-0.20.confd |
83 |
+++ /dev/null |
84 |
@@ -1,27 +0,0 @@ |
85 |
-# Group which owns the shared socket |
86 |
-LXD_OPTIONS+=" --group lxd" |
87 |
- |
88 |
- |
89 |
- |
90 |
-# Enable cpu profiling into the specified file |
91 |
-#LXD_OPTIONS+=" --cpuprofile /tmp/lxc_cpu_profile" |
92 |
- |
93 |
-# Enable memory profiling into the specified file |
94 |
-#LXD_OPTIONS+=" --memprofile /tmp/lxc_mem_profile" |
95 |
- |
96 |
- |
97 |
- |
98 |
-# Enables debug mode |
99 |
-#LXD_OPTIONS+=" --debug" |
100 |
- |
101 |
-# For debugging, print a complete stack trace every n seconds |
102 |
-#LXD_OPTIONS+=" --print-goroutines-every 5" |
103 |
- |
104 |
-# Enables verbose mode |
105 |
-#LXD_OPTIONS+=" -v" |
106 |
- |
107 |
-# Logfile to log to |
108 |
-#LXD_OPTIONS+=" --logfile /var/log/lxd/lxd.log" |
109 |
- |
110 |
-# Enables syslog logging |
111 |
-#LXD_OPTIONS+=" --syslog" |
112 |
|
113 |
diff --git a/app-emulation/lxd/files/lxd-0.20.initd b/app-emulation/lxd/files/lxd-0.20.initd |
114 |
deleted file mode 100644 |
115 |
index 2b75e51..0000000 |
116 |
--- a/app-emulation/lxd/files/lxd-0.20.initd |
117 |
+++ /dev/null |
118 |
@@ -1,32 +0,0 @@ |
119 |
-#!/sbin/runscript |
120 |
-# Copyright 1999-2015 Gentoo Foundation |
121 |
-# Distributed under the terms of the GNU General Public License v2 |
122 |
-# $Id$ |
123 |
- |
124 |
-DAEMON=/usr/sbin/lxd |
125 |
-PIDFILE=/run/lxd.pid |
126 |
- |
127 |
-depend() { |
128 |
- need cgmanager |
129 |
- need net |
130 |
-} |
131 |
- |
132 |
-start() { |
133 |
- ebegin "Starting lxd server" |
134 |
- |
135 |
- start-stop-daemon --start \ |
136 |
- --pidfile ${PIDFILE} \ |
137 |
- --exec ${DAEMON} \ |
138 |
- --background \ |
139 |
- --make-pidfile \ |
140 |
- -- \ |
141 |
- ${LXD_OPTIONS} |
142 |
- |
143 |
- eend $? |
144 |
-} |
145 |
- |
146 |
-stop() { |
147 |
- ebegin "Stopping lxd server" |
148 |
- start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} |
149 |
- eend $? |
150 |
-} |
151 |
|
152 |
diff --git a/app-emulation/lxd/files/lxd-0.21-dont-go-get.patch b/app-emulation/lxd/files/lxd-0.21-dont-go-get.patch |
153 |
deleted file mode 100644 |
154 |
index 1b229ea..0000000 |
155 |
--- a/app-emulation/lxd/files/lxd-0.21-dont-go-get.patch |
156 |
+++ /dev/null |
157 |
@@ -1,18 +0,0 @@ |
158 |
---- Makefile.orig 2015-09-17 20:37:16.481867339 -0500 |
159 |
-+++ Makefile 2015-09-17 20:53:27.715800926 -0500 |
160 |
-@@ -12,15 +12,11 @@ |
161 |
- |
162 |
- .PHONY: default |
163 |
- default: |
164 |
-- -go get -t -v -d ./... |
165 |
-- -go get -t -v -d ./... |
166 |
- go install -v ./... |
167 |
- @echo "LXD built succesfuly" |
168 |
- |
169 |
- .PHONY: client |
170 |
- client: |
171 |
-- -go get -t -v -d ./... |
172 |
-- -go get -t -v -d ./... |
173 |
- go install -v ./lxc |
174 |
- @echo "LXD client built succesfuly" |
175 |
- |
176 |
|
177 |
diff --git a/app-emulation/lxd/files/lxd-0.21-nc-binary-name.patch b/app-emulation/lxd/files/lxd-0.21-nc-binary-name.patch |
178 |
deleted file mode 100644 |
179 |
index b88b7f7..0000000 |
180 |
--- a/app-emulation/lxd/files/lxd-0.21-nc-binary-name.patch |
181 |
+++ /dev/null |
182 |
@@ -1,11 +0,0 @@ |
183 |
---- lxd/rsync.go.orig 2015-09-17 21:00:29.290772099 -0500 |
184 |
-+++ lxd/rsync.go 2015-09-17 21:00:54.737770359 -0500 |
185 |
-@@ -73,7 +73,7 @@ |
186 |
- * command (i.e. the command to run on --server). However, we're |
187 |
- * hardcoding that at the other end, so we can just ignore it. |
188 |
- */ |
189 |
-- rsyncCmd := fmt.Sprintf("sh -c \"nc -U %s\"", f.Name()) |
190 |
-+ rsyncCmd := fmt.Sprintf("sh -c \"nc.openbsd -U %s\"", f.Name()) |
191 |
- cmd := exec.Command("rsync", "-arvP", "--devices", "--partial", path, "localhost:/tmp/foo", "-e", rsyncCmd) |
192 |
- if err := cmd.Start(); err != nil { |
193 |
- return nil, nil, err |
194 |
|
195 |
diff --git a/app-emulation/lxd/files/lxd-0.21.confd b/app-emulation/lxd/files/lxd-0.21.confd |
196 |
deleted file mode 100644 |
197 |
index 3d55327..0000000 |
198 |
--- a/app-emulation/lxd/files/lxd-0.21.confd |
199 |
+++ /dev/null |
200 |
@@ -1,27 +0,0 @@ |
201 |
-# Group which owns the shared socket |
202 |
-LXD_OPTIONS+=" --group lxd" |
203 |
- |
204 |
- |
205 |
- |
206 |
-# Enable cpu profiling into the specified file |
207 |
-#LXD_OPTIONS+=" --cpuprofile /tmp/lxc_cpu_profile" |
208 |
- |
209 |
-# Enable memory profiling into the specified file |
210 |
-#LXD_OPTIONS+=" --memprofile /tmp/lxc_mem_profile" |
211 |
- |
212 |
- |
213 |
- |
214 |
-# Enables debug mode |
215 |
-#LXD_OPTIONS+=" --debug" |
216 |
- |
217 |
-# For debugging, print a complete stack trace every n seconds |
218 |
-#LXD_OPTIONS+=" --print-goroutines-every 5" |
219 |
- |
220 |
-# Enables verbose mode |
221 |
-#LXD_OPTIONS+=" -v" |
222 |
- |
223 |
-# Logfile to log to |
224 |
-#LXD_OPTIONS+=" --logfile /var/log/lxd/lxd.log" |
225 |
- |
226 |
-# Enables syslog logging |
227 |
-#LXD_OPTIONS+=" --syslog" |
228 |
|
229 |
diff --git a/app-emulation/lxd/files/lxd-0.21.initd b/app-emulation/lxd/files/lxd-0.21.initd |
230 |
deleted file mode 100644 |
231 |
index 2b75e51..0000000 |
232 |
--- a/app-emulation/lxd/files/lxd-0.21.initd |
233 |
+++ /dev/null |
234 |
@@ -1,32 +0,0 @@ |
235 |
-#!/sbin/runscript |
236 |
-# Copyright 1999-2015 Gentoo Foundation |
237 |
-# Distributed under the terms of the GNU General Public License v2 |
238 |
-# $Id$ |
239 |
- |
240 |
-DAEMON=/usr/sbin/lxd |
241 |
-PIDFILE=/run/lxd.pid |
242 |
- |
243 |
-depend() { |
244 |
- need cgmanager |
245 |
- need net |
246 |
-} |
247 |
- |
248 |
-start() { |
249 |
- ebegin "Starting lxd server" |
250 |
- |
251 |
- start-stop-daemon --start \ |
252 |
- --pidfile ${PIDFILE} \ |
253 |
- --exec ${DAEMON} \ |
254 |
- --background \ |
255 |
- --make-pidfile \ |
256 |
- -- \ |
257 |
- ${LXD_OPTIONS} |
258 |
- |
259 |
- eend $? |
260 |
-} |
261 |
- |
262 |
-stop() { |
263 |
- ebegin "Stopping lxd server" |
264 |
- start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} |
265 |
- eend $? |
266 |
-} |
267 |
|
268 |
diff --git a/app-emulation/lxd/lxd-0.20.ebuild b/app-emulation/lxd/lxd-0.20.ebuild |
269 |
deleted file mode 100644 |
270 |
index ab08cd1..0000000 |
271 |
--- a/app-emulation/lxd/lxd-0.20.ebuild |
272 |
+++ /dev/null |
273 |
@@ -1,169 +0,0 @@ |
274 |
-# Copyright 1999-2015 Gentoo Foundation |
275 |
-# Distributed under the terms of the GNU General Public License v2 |
276 |
-# $Id$ |
277 |
- |
278 |
-EAPI=5 |
279 |
- |
280 |
-DESCRIPTION="Fast, dense and secure container management" |
281 |
-HOMEPAGE="https://linuxcontainers.org/lxd/introduction/" |
282 |
-EGO_PN_PARENT="github.com/lxc" |
283 |
-EGO_PN="${EGO_PN_PARENT}/lxd" |
284 |
-SRC_URI="http://961db08fe45d5f5dd062-b8a7a040508aea6d369676e49b80719d.r29.cf2.rackcdn.com/${P}.tar.bz2" |
285 |
-LICENSE="Apache-2.0" |
286 |
-SLOT="0" |
287 |
-KEYWORDS="~amd64" |
288 |
- |
289 |
-PLOCALES="de fr ja" |
290 |
-IUSE="+daemon nls test" |
291 |
- |
292 |
-# IUSE and PLOCALES must be defined before l10n inherited |
293 |
-inherit bash-completion-r1 eutils golang-build l10n systemd user vcs-snapshot |
294 |
- |
295 |
-DEPEND=" |
296 |
- dev-go/go-crypto |
297 |
- >=dev-lang/go-1.4.2:= |
298 |
- dev-libs/protobuf |
299 |
- dev-vcs/git |
300 |
- nls? ( sys-devel/gettext ) |
301 |
- test? ( |
302 |
- app-misc/jq |
303 |
- dev-db/sqlite |
304 |
- net-misc/curl |
305 |
- sys-devel/gettext |
306 |
- ) |
307 |
-" |
308 |
- |
309 |
-RDEPEND=" |
310 |
- daemon? ( |
311 |
- app-admin/cgmanager |
312 |
- app-arch/xz-utils |
313 |
- app-emulation/lxc[cgmanager,seccomp] |
314 |
- net-analyzer/openbsd-netcat |
315 |
- net-misc/bridge-utils |
316 |
- net-misc/rsync[xattr] |
317 |
- sys-apps/iproute2 |
318 |
- virtual/acl |
319 |
- ) |
320 |
-" |
321 |
- |
322 |
-# KNOWN ISSUES: |
323 |
-# - Translations may not work. I've been unsuccessful in forcing |
324 |
-# localized output. Anyway, upstream (Canonical) doesn't install the |
325 |
-# message files. |
326 |
- |
327 |
-# TODO: |
328 |
-# - since 0.15 gccgo is a supported compiler ('make gccgo'). It would |
329 |
-# be preferable for that support to go into the golang-build eclass not |
330 |
-# this package directly. |
331 |
-# - integrate "lxd shutdown" into initscript as custom action (default "stop" |
332 |
-# action should _not_ stop containers amirite?) |
333 |
-# "Perform a clean shutdown of LXD and all running containers" |
334 |
- |
335 |
-src_prepare() { |
336 |
- cd "${S}/src/${EGO_PN}" |
337 |
- |
338 |
- epatch "${FILESDIR}/${P}-dont-go-get.patch" |
339 |
- |
340 |
- # Upstream requires the openbsd flavor of netcat (with -U), but |
341 |
- # Gentoo installs that with a renamed binary |
342 |
- epatch "${FILESDIR}/${P}-nc-binary-name.patch" |
343 |
- |
344 |
- # Warn on unhandled locale changes |
345 |
- l10n_find_plocales_changes po "" .po |
346 |
-} |
347 |
- |
348 |
-src_compile() { |
349 |
- golang-build_src_compile |
350 |
- |
351 |
- cd "${S}/src/${EGO_PN}" |
352 |
- |
353 |
- if use daemon; then |
354 |
- # Build binaries |
355 |
- GOPATH="${S}:$(get_golibdir_gopath)" emake |
356 |
- else |
357 |
- # build client tool |
358 |
- GOPATH="${S}:$(get_golibdir_gopath)" emake client |
359 |
- fi |
360 |
- |
361 |
- use nls && emake build-mo |
362 |
-} |
363 |
- |
364 |
-src_test() { |
365 |
- if use daemon; then |
366 |
- # Go native tests should succeed |
367 |
- golang-build_src_test |
368 |
- fi |
369 |
-} |
370 |
- |
371 |
-src_install() { |
372 |
- # Installs all src,pkg to /usr/lib/go-gentoo |
373 |
- golang-build_src_install |
374 |
- |
375 |
- cd "${S}" |
376 |
- dobin bin/lxc |
377 |
- if use daemon; then |
378 |
- dobin bin/fuidshift |
379 |
- |
380 |
- dosbin bin/lxd |
381 |
- fi |
382 |
- |
383 |
- cd "src/${EGO_PN}" |
384 |
- |
385 |
- if use nls; then |
386 |
- for lingua in ${PLOCALES}; do |
387 |
- if use linguas_${lingua}; then |
388 |
- domo po/${lingua}.mo |
389 |
- fi |
390 |
- done |
391 |
- fi |
392 |
- |
393 |
- if use daemon; then |
394 |
- newinitd "${FILESDIR}"/${P}.initd lxd |
395 |
- newconfd "${FILESDIR}"/${P}.confd lxd |
396 |
- |
397 |
- systemd_dounit "${FILESDIR}"/lxd.service |
398 |
- fi |
399 |
- |
400 |
- newbashcomp config/bash/lxc.in lxc |
401 |
- |
402 |
- dodoc AUTHORS CONTRIBUTING.md README.md |
403 |
- |
404 |
- docinto specs |
405 |
- dodoc specs/* |
406 |
-} |
407 |
- |
408 |
-pkg_postinst() { |
409 |
- einfo |
410 |
- einfo "Consult https://wiki.gentoo.org/wiki/LXD for more information," |
411 |
- einfo "including a Quick Start." |
412 |
- |
413 |
- # The messaging below only applies to daemon installs |
414 |
- use daemon || return 0 |
415 |
- |
416 |
- # The control socket will be owned by (and writeable by) this group. |
417 |
- enewgroup lxd |
418 |
- |
419 |
- # Ubuntu also defines an lxd user but it appears unused (the daemon |
420 |
- # must run as root) |
421 |
- |
422 |
- einfo |
423 |
- einfo "Though not strictly required, some features are enabled at run-time" |
424 |
- einfo "when the relevant helper programs are detected:" |
425 |
- einfo "- sys-apps/apparmor" |
426 |
- einfo "- sys-fs/btrfs-progs" |
427 |
- einfo "- sys-fs/lvm2" |
428 |
- einfo "- sys-fs/zfs" |
429 |
- einfo "- sys-process/criu" |
430 |
- einfo |
431 |
- einfo "Since these features can't be disabled at build-time they are" |
432 |
- einfo "not USE-conditional." |
433 |
- |
434 |
- if test -n "${REPLACING_VERSIONS}"; then |
435 |
- einfo |
436 |
- einfo "If you are upgrading from version 0.14 or older, note that the --tcp" |
437 |
- einfo "is no longer available in /etc/conf.d/lxd. Instead, configure the" |
438 |
- einfo "listen address/port by setting the core.https_address server option." |
439 |
- fi |
440 |
- |
441 |
- einfo |
442 |
-} |
443 |
|
444 |
diff --git a/app-emulation/lxd/lxd-0.21.ebuild b/app-emulation/lxd/lxd-0.21.ebuild |
445 |
deleted file mode 100644 |
446 |
index dd67b7b..0000000 |
447 |
--- a/app-emulation/lxd/lxd-0.21.ebuild |
448 |
+++ /dev/null |
449 |
@@ -1,169 +0,0 @@ |
450 |
-# Copyright 1999-2015 Gentoo Foundation |
451 |
-# Distributed under the terms of the GNU General Public License v2 |
452 |
-# $Id$ |
453 |
- |
454 |
-EAPI=5 |
455 |
- |
456 |
-DESCRIPTION="Fast, dense and secure container management" |
457 |
-HOMEPAGE="https://linuxcontainers.org/lxd/introduction/" |
458 |
-EGO_PN_PARENT="github.com/lxc" |
459 |
-EGO_PN="${EGO_PN_PARENT}/lxd" |
460 |
-SRC_URI="https://dev.gentoo.org/~stasibear/distfiles/${P}.tar.bz2" |
461 |
-LICENSE="Apache-2.0" |
462 |
-SLOT="0" |
463 |
-KEYWORDS="~amd64" |
464 |
- |
465 |
-PLOCALES="de fr ja" |
466 |
-IUSE="+daemon nls test" |
467 |
- |
468 |
-# IUSE and PLOCALES must be defined before l10n inherited |
469 |
-inherit bash-completion-r1 eutils golang-build l10n systemd user vcs-snapshot |
470 |
- |
471 |
-DEPEND=" |
472 |
- dev-go/go-crypto |
473 |
- >=dev-lang/go-1.4.2:= |
474 |
- dev-libs/protobuf |
475 |
- dev-vcs/git |
476 |
- nls? ( sys-devel/gettext ) |
477 |
- test? ( |
478 |
- app-misc/jq |
479 |
- dev-db/sqlite |
480 |
- net-misc/curl |
481 |
- sys-devel/gettext |
482 |
- ) |
483 |
-" |
484 |
- |
485 |
-RDEPEND=" |
486 |
- daemon? ( |
487 |
- app-admin/cgmanager |
488 |
- app-arch/xz-utils |
489 |
- app-emulation/lxc[cgmanager,seccomp] |
490 |
- net-analyzer/openbsd-netcat |
491 |
- net-misc/bridge-utils |
492 |
- net-misc/rsync[xattr] |
493 |
- sys-apps/iproute2 |
494 |
- virtual/acl |
495 |
- ) |
496 |
-" |
497 |
- |
498 |
-# KNOWN ISSUES: |
499 |
-# - Translations may not work. I've been unsuccessful in forcing |
500 |
-# localized output. Anyway, upstream (Canonical) doesn't install the |
501 |
-# message files. |
502 |
- |
503 |
-# TODO: |
504 |
-# - since 0.15 gccgo is a supported compiler ('make gccgo'). It would |
505 |
-# be preferable for that support to go into the golang-build eclass not |
506 |
-# this package directly. |
507 |
-# - integrate "lxd shutdown" into initscript as custom action (default "stop" |
508 |
-# action should _not_ stop containers amirite?) |
509 |
-# "Perform a clean shutdown of LXD and all running containers" |
510 |
- |
511 |
-src_prepare() { |
512 |
- cd "${S}/src/${EGO_PN}" |
513 |
- |
514 |
- epatch "${FILESDIR}/${P}-dont-go-get.patch" |
515 |
- |
516 |
- # Upstream requires the openbsd flavor of netcat (with -U), but |
517 |
- # Gentoo installs that with a renamed binary |
518 |
- epatch "${FILESDIR}/${P}-nc-binary-name.patch" |
519 |
- |
520 |
- # Warn on unhandled locale changes |
521 |
- l10n_find_plocales_changes po "" .po |
522 |
-} |
523 |
- |
524 |
-src_compile() { |
525 |
- golang-build_src_compile |
526 |
- |
527 |
- cd "${S}/src/${EGO_PN}" |
528 |
- |
529 |
- if use daemon; then |
530 |
- # Build binaries |
531 |
- GOPATH="${S}:$(get_golibdir_gopath)" emake |
532 |
- else |
533 |
- # build client tool |
534 |
- GOPATH="${S}:$(get_golibdir_gopath)" emake client |
535 |
- fi |
536 |
- |
537 |
- use nls && emake build-mo |
538 |
-} |
539 |
- |
540 |
-src_test() { |
541 |
- if use daemon; then |
542 |
- # Go native tests should succeed |
543 |
- golang-build_src_test |
544 |
- fi |
545 |
-} |
546 |
- |
547 |
-src_install() { |
548 |
- # Installs all src,pkg to /usr/lib/go-gentoo |
549 |
- golang-build_src_install |
550 |
- |
551 |
- cd "${S}" |
552 |
- dobin bin/lxc |
553 |
- if use daemon; then |
554 |
- dobin bin/fuidshift |
555 |
- |
556 |
- dosbin bin/lxd |
557 |
- fi |
558 |
- |
559 |
- cd "src/${EGO_PN}" |
560 |
- |
561 |
- if use nls; then |
562 |
- for lingua in ${PLOCALES}; do |
563 |
- if use linguas_${lingua}; then |
564 |
- domo po/${lingua}.mo |
565 |
- fi |
566 |
- done |
567 |
- fi |
568 |
- |
569 |
- if use daemon; then |
570 |
- newinitd "${FILESDIR}"/${P}.initd lxd |
571 |
- newconfd "${FILESDIR}"/${P}.confd lxd |
572 |
- |
573 |
- systemd_dounit "${FILESDIR}"/lxd.service |
574 |
- fi |
575 |
- |
576 |
- newbashcomp config/bash/lxc.in lxc |
577 |
- |
578 |
- dodoc AUTHORS CONTRIBUTING.md README.md |
579 |
- |
580 |
- docinto specs |
581 |
- dodoc specs/* |
582 |
-} |
583 |
- |
584 |
-pkg_postinst() { |
585 |
- einfo |
586 |
- einfo "Consult https://wiki.gentoo.org/wiki/LXD for more information," |
587 |
- einfo "including a Quick Start." |
588 |
- |
589 |
- # The messaging below only applies to daemon installs |
590 |
- use daemon || return 0 |
591 |
- |
592 |
- # The control socket will be owned by (and writeable by) this group. |
593 |
- enewgroup lxd |
594 |
- |
595 |
- # Ubuntu also defines an lxd user but it appears unused (the daemon |
596 |
- # must run as root) |
597 |
- |
598 |
- einfo |
599 |
- einfo "Though not strictly required, some features are enabled at run-time" |
600 |
- einfo "when the relevant helper programs are detected:" |
601 |
- einfo "- sys-apps/apparmor" |
602 |
- einfo "- sys-fs/btrfs-progs" |
603 |
- einfo "- sys-fs/lvm2" |
604 |
- einfo "- sys-fs/zfs" |
605 |
- einfo "- sys-process/criu" |
606 |
- einfo |
607 |
- einfo "Since these features can't be disabled at build-time they are" |
608 |
- einfo "not USE-conditional." |
609 |
- |
610 |
- if test -n "${REPLACING_VERSIONS}"; then |
611 |
- einfo |
612 |
- einfo "If you are upgrading from version 0.14 or older, note that the --tcp" |
613 |
- einfo "is no longer available in /etc/conf.d/lxd. Instead, configure the" |
614 |
- einfo "listen address/port by setting the core.https_address server option." |
615 |
- fi |
616 |
- |
617 |
- einfo |
618 |
-} |