Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxd/, app-emulation/lxd/files/
Date: Wed, 24 Aug 2016 10:38:19
Message-Id: 1472035069.909327211eb03cecf7b16f41e65722c2d2f5fd23.pacho@gentoo
1 commit: 909327211eb03cecf7b16f41e65722c2d2f5fd23
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 24 10:33:07 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 24 10:37:49 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90932721
7
8 app-emulation/lxd: Drop old
9
10 Package-Manager: portage-2.3.0
11
12 app-emulation/lxd/Manifest | 2 -
13 .../lxd/files/lxd-2.0.1-dont-go-get.patch | 20 ---
14 app-emulation/lxd/files/lxd-2.0.1.confd | 27 ----
15 app-emulation/lxd/files/lxd-2.0.1.initd | 50 -------
16 .../lxd/files/lxd-2.0.2-dont-go-get.patch | 20 ---
17 app-emulation/lxd/files/lxd-2.0.2.confd | 27 ----
18 app-emulation/lxd/files/lxd-2.0.2.initd | 50 -------
19 app-emulation/lxd/lxd-2.0.1.ebuild | 149 --------------------
20 app-emulation/lxd/lxd-2.0.2.ebuild | 149 --------------------
21 app-emulation/lxd/lxd-2.0.3.ebuild | 155 ---------------------
22 10 files changed, 649 deletions(-)
23
24 diff --git a/app-emulation/lxd/Manifest b/app-emulation/lxd/Manifest
25 index 5d37b24..5ecedc5 100644
26 --- a/app-emulation/lxd/Manifest
27 +++ b/app-emulation/lxd/Manifest
28 @@ -1,3 +1 @@
29 -DIST lxd-2.0.1.tar.bz2 2330217 SHA256 b9a315825bfc66469a442f3b3da73e2af97dba270ffe1bc18c871cd6c1c7ad69 SHA512 67b1c42a0957bd2f4963c860372211dbbc38cb8e9346e83c6319749efd9e1a188c00033865901d285650298531460b9f54cba0e88d0973179c0c17bcd30cc97d WHIRLPOOL 4ae640fc6410dff9d08816a6ac7ddb47a4cce9dfbbfaa65baf8456517aca25a501b0e680d9a6855a0fa3b9efe8cd1eddb0a9981d43de9ef573c16be936f5104a
30 -DIST lxd-2.0.2.tar.bz2 2340565 SHA256 0054b0e79ba0bc1a1189eb63ca8ac2ca2bafd10c500ce53f67abbd5abc03b542 SHA512 c79f1c7f0aeb289ba7bea745917aaac0d339baf0e6b4fe62cbcb67b8da072ef135e971d4c17546e2e208aeae921ad2853073493f9e7a6e300876bd72b808e516 WHIRLPOOL a30bddfc79ad0c7d941db811f1942fff67afc79a217a251d55b1cf37d80cdb21f8f1f72df268382cbcd34d408005ef4185f5bd59f95369b51558938352f05c60
31 DIST lxd-2.0.3.tar.bz2 2349842 SHA256 fb8a56e08da776f5210970a12e61b2e7b751328b5628e6fbebde231952b907a9 SHA512 62ac76bee0ff151343d0686da9376ff16965af5de19b50055bad86461dc2dd8e06544ee39640537f8352ec03b584ed32cf70cce9c7c961285d9ea567c617330e WHIRLPOOL 60204498c0a104310ddb28e42ea8889830c2f0e8c830c683b51d5cdbc92380de7c7964961fc7a34b32c7cb4dccaa4222f017b0d8948f54d5044770c066141319
32
33 diff --git a/app-emulation/lxd/files/lxd-2.0.1-dont-go-get.patch b/app-emulation/lxd/files/lxd-2.0.1-dont-go-get.patch
34 deleted file mode 100644
35 index d2e622e..00000000
36 --- a/app-emulation/lxd/files/lxd-2.0.1-dont-go-get.patch
37 +++ /dev/null
38 @@ -1,20 +0,0 @@
39 ---- Makefile.orig 2016-02-19 00:16:40.720102639 +0000
40 -+++ Makefile 2016-02-19 00:18:10.886096473 +0000
41 -@@ -12,17 +12,11 @@
42 -
43 - .PHONY: default
44 - default:
45 -- # Must run twice due to go get race
46 -- -go get -t -v -d ./...
47 -- -go get -t -v -d ./...
48 - go install -v $(DEBUG) ./...
49 - @echo "LXD built successfully"
50 -
51 - .PHONY: client
52 - client:
53 -- # Must run twice due to go get race
54 -- -go get -t -v -d ./...
55 -- -go get -t -v -d ./...
56 - go install -v $(DEBUG) ./lxc
57 - @echo "LXD client built successfully"
58 -
59
60 diff --git a/app-emulation/lxd/files/lxd-2.0.1.confd b/app-emulation/lxd/files/lxd-2.0.1.confd
61 deleted file mode 100644
62 index 3d55327..00000000
63 --- a/app-emulation/lxd/files/lxd-2.0.1.confd
64 +++ /dev/null
65 @@ -1,27 +0,0 @@
66 -# Group which owns the shared socket
67 -LXD_OPTIONS+=" --group lxd"
68 -
69 -
70 -
71 -# Enable cpu profiling into the specified file
72 -#LXD_OPTIONS+=" --cpuprofile /tmp/lxc_cpu_profile"
73 -
74 -# Enable memory profiling into the specified file
75 -#LXD_OPTIONS+=" --memprofile /tmp/lxc_mem_profile"
76 -
77 -
78 -
79 -# Enables debug mode
80 -#LXD_OPTIONS+=" --debug"
81 -
82 -# For debugging, print a complete stack trace every n seconds
83 -#LXD_OPTIONS+=" --print-goroutines-every 5"
84 -
85 -# Enables verbose mode
86 -#LXD_OPTIONS+=" -v"
87 -
88 -# Logfile to log to
89 -#LXD_OPTIONS+=" --logfile /var/log/lxd/lxd.log"
90 -
91 -# Enables syslog logging
92 -#LXD_OPTIONS+=" --syslog"
93
94 diff --git a/app-emulation/lxd/files/lxd-2.0.1.initd b/app-emulation/lxd/files/lxd-2.0.1.initd
95 deleted file mode 100644
96 index ec23258..00000000
97 --- a/app-emulation/lxd/files/lxd-2.0.1.initd
98 +++ /dev/null
99 @@ -1,50 +0,0 @@
100 -#!/sbin/runscript
101 -# Copyright 1999-2015 Gentoo Foundation
102 -# Distributed under the terms of the GNU General Public License v2
103 -# $Id$
104 -
105 -DAEMON=/usr/sbin/lxd
106 -PIDFILE=/run/lxd.pid
107 -
108 -extra_commands="stopall"
109 -
110 -depend() {
111 - need net
112 - use lxcfs
113 -
114 - # remove with 2.0 release
115 - need cgmanager
116 -}
117 -
118 -start() {
119 - ebegin "Starting lxd server"
120 -
121 - start-stop-daemon --start \
122 - --pidfile ${PIDFILE} \
123 - --exec ${DAEMON} \
124 - --background \
125 - --make-pidfile \
126 - -- \
127 - ${LXD_OPTIONS}
128 -
129 - eend $?
130 -}
131 -
132 -stop() {
133 - if [[ $RC_GOINGDOWN = YES ]] || [[ $RC_REBOOT = YES ]]; then
134 - stopall
135 - else
136 - ebegin "Stopping lxd service (but not containers)"
137 - start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
138 - eend $?
139 - fi
140 -}
141 -
142 -stopall() {
143 - ebegin "Stopping lxd service and containers"
144 - if "${DAEMON}" shutdown; then
145 - /etc/init.d/lxd zap
146 - rm -f ${PIDFILE}
147 - fi
148 - eend $?
149 -}
150
151 diff --git a/app-emulation/lxd/files/lxd-2.0.2-dont-go-get.patch b/app-emulation/lxd/files/lxd-2.0.2-dont-go-get.patch
152 deleted file mode 100644
153 index d2e622e..00000000
154 --- a/app-emulation/lxd/files/lxd-2.0.2-dont-go-get.patch
155 +++ /dev/null
156 @@ -1,20 +0,0 @@
157 ---- Makefile.orig 2016-02-19 00:16:40.720102639 +0000
158 -+++ Makefile 2016-02-19 00:18:10.886096473 +0000
159 -@@ -12,17 +12,11 @@
160 -
161 - .PHONY: default
162 - default:
163 -- # Must run twice due to go get race
164 -- -go get -t -v -d ./...
165 -- -go get -t -v -d ./...
166 - go install -v $(DEBUG) ./...
167 - @echo "LXD built successfully"
168 -
169 - .PHONY: client
170 - client:
171 -- # Must run twice due to go get race
172 -- -go get -t -v -d ./...
173 -- -go get -t -v -d ./...
174 - go install -v $(DEBUG) ./lxc
175 - @echo "LXD client built successfully"
176 -
177
178 diff --git a/app-emulation/lxd/files/lxd-2.0.2.confd b/app-emulation/lxd/files/lxd-2.0.2.confd
179 deleted file mode 100644
180 index 3d55327..00000000
181 --- a/app-emulation/lxd/files/lxd-2.0.2.confd
182 +++ /dev/null
183 @@ -1,27 +0,0 @@
184 -# Group which owns the shared socket
185 -LXD_OPTIONS+=" --group lxd"
186 -
187 -
188 -
189 -# Enable cpu profiling into the specified file
190 -#LXD_OPTIONS+=" --cpuprofile /tmp/lxc_cpu_profile"
191 -
192 -# Enable memory profiling into the specified file
193 -#LXD_OPTIONS+=" --memprofile /tmp/lxc_mem_profile"
194 -
195 -
196 -
197 -# Enables debug mode
198 -#LXD_OPTIONS+=" --debug"
199 -
200 -# For debugging, print a complete stack trace every n seconds
201 -#LXD_OPTIONS+=" --print-goroutines-every 5"
202 -
203 -# Enables verbose mode
204 -#LXD_OPTIONS+=" -v"
205 -
206 -# Logfile to log to
207 -#LXD_OPTIONS+=" --logfile /var/log/lxd/lxd.log"
208 -
209 -# Enables syslog logging
210 -#LXD_OPTIONS+=" --syslog"
211
212 diff --git a/app-emulation/lxd/files/lxd-2.0.2.initd b/app-emulation/lxd/files/lxd-2.0.2.initd
213 deleted file mode 100644
214 index c1aef37..00000000
215 --- a/app-emulation/lxd/files/lxd-2.0.2.initd
216 +++ /dev/null
217 @@ -1,50 +0,0 @@
218 -#!/sbin/openrc-run
219 -# Copyright 1999-2016 Gentoo Foundation
220 -# Distributed under the terms of the GNU General Public License v2
221 -# $Id$
222 -
223 -DAEMON=/usr/sbin/lxd
224 -PIDFILE=/run/lxd.pid
225 -
226 -extra_commands="stopall"
227 -
228 -depend() {
229 - need net
230 - use lxcfs
231 -
232 - # remove with 2.0 release
233 - need cgmanager
234 -}
235 -
236 -start() {
237 - ebegin "Starting lxd server"
238 -
239 - start-stop-daemon --start \
240 - --pidfile ${PIDFILE} \
241 - --exec ${DAEMON} \
242 - --background \
243 - --make-pidfile \
244 - -- \
245 - ${LXD_OPTIONS}
246 -
247 - eend $?
248 -}
249 -
250 -stop() {
251 - if [[ $RC_GOINGDOWN = YES ]] || [[ $RC_REBOOT = YES ]]; then
252 - stopall
253 - else
254 - ebegin "Stopping lxd service (but not containers)"
255 - start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
256 - eend $?
257 - fi
258 -}
259 -
260 -stopall() {
261 - ebegin "Stopping lxd service and containers"
262 - if "${DAEMON}" shutdown; then
263 - /etc/init.d/lxd zap
264 - rm -f ${PIDFILE}
265 - fi
266 - eend $?
267 -}
268
269 diff --git a/app-emulation/lxd/lxd-2.0.1.ebuild b/app-emulation/lxd/lxd-2.0.1.ebuild
270 deleted file mode 100644
271 index fdb143b..00000000
272 --- a/app-emulation/lxd/lxd-2.0.1.ebuild
273 +++ /dev/null
274 @@ -1,149 +0,0 @@
275 -# Copyright 1999-2016 Gentoo Foundation
276 -# Distributed under the terms of the GNU General Public License v2
277 -# $Id$
278 -
279 -EAPI=5
280 -
281 -DESCRIPTION="Fast, dense and secure container management"
282 -HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
283 -EGO_PN_PARENT="github.com/lxc"
284 -EGO_PN="${EGO_PN_PARENT}/lxd"
285 -SRC_URI="https://dev.gentoo.org/~stasibear/distfiles/${P}.tar.bz2"
286 -LICENSE="Apache-2.0"
287 -SLOT="0"
288 -KEYWORDS="~amd64"
289 -
290 -PLOCALES="de fr ja"
291 -IUSE="+daemon nls test"
292 -
293 -# IUSE and PLOCALES must be defined before l10n inherited
294 -inherit bash-completion-r1 eutils golang-build l10n systemd user vcs-snapshot
295 -
296 -DEPEND="
297 - dev-go/go-crypto
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-misc/rsync[xattr]
315 - sys-apps/iproute2
316 - virtual/acl
317 - )
318 -"
319 -
320 -# KNOWN ISSUES:
321 -# - Translations may not work. I've been unsuccessful in forcing
322 -# localized output. Anyway, upstream (Canonical) doesn't install the
323 -# message files.
324 -
325 -# TODO:
326 -# - since 0.15 gccgo is a supported compiler ('make gccgo'). It would
327 -# be preferable for that support to go into the golang-build eclass not
328 -# this package directly.
329 -
330 -src_prepare() {
331 - cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir"
332 -
333 - epatch "${FILESDIR}/${P}-dont-go-get.patch"
334 -
335 - tmpgoroot="${T}/goroot"
336 - mkdir -p "$tmpgoroot" || die "Failed to create temporary GOROOT"
337 - cp -sR "$(get_golibdir_gopath)"/* "${tmpgoroot}" || die "Failed to copy files to temporary GOROOT"
338 -
339 - # Warn on unhandled locale changes
340 - l10n_find_plocales_changes po "" .po
341 -}
342 -
343 -src_compile() {
344 - golang-build_src_compile
345 -
346 - cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir"
347 -
348 - tmpgoroot="${T}/goroot"
349 - if use daemon; then
350 - # Build binaries
351 - GOPATH="${S}:${tmpgoroot}" emake
352 - else
353 - # build client tool
354 - GOPATH="${S}:${tmpgoroot}" emake client
355 - fi
356 -
357 - use nls && emake build-mo
358 -}
359 -
360 -src_test() {
361 - if use daemon; then
362 - # Go native tests should succeed
363 - golang-build_src_test
364 - fi
365 -}
366 -
367 -src_install() {
368 - # Installs all src,pkg to /usr/lib/go-gentoo
369 - golang-build_src_install
370 -
371 - cd "${S}"
372 - dobin bin/lxc
373 - use daemon && dosbin bin/lxd
374 -
375 - cd "src/${EGO_PN}"
376 -
377 - if use nls; then
378 - for lingua in ${PLOCALES}; do
379 - if use linguas_${lingua}; then
380 - domo po/${lingua}.mo
381 - fi
382 - done
383 - fi
384 -
385 - if use daemon; then
386 - newinitd "${FILESDIR}"/${P}.initd lxd
387 - newconfd "${FILESDIR}"/${P}.confd lxd
388 -
389 - systemd_dounit "${FILESDIR}"/lxd.service
390 - fi
391 -
392 - newbashcomp config/bash/lxd-client lxc
393 -
394 - dodoc AUTHORS CONTRIBUTING.md README.md doc/*
395 -}
396 -
397 -pkg_postinst() {
398 - einfo
399 - einfo "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
400 - einfo "including a Quick Start."
401 -
402 - # The messaging below only applies to daemon installs
403 - use daemon || return 0
404 -
405 - # The control socket will be owned by (and writeable by) this group.
406 - enewgroup lxd
407 -
408 - # Ubuntu also defines an lxd user but it appears unused (the daemon
409 - # must run as root)
410 -
411 - einfo
412 - einfo "Though not strictly required, some features are enabled at run-time"
413 - einfo "when the relevant helper programs are detected:"
414 - einfo "- sys-apps/apparmor"
415 - einfo "- sys-fs/btrfs-progs"
416 - einfo "- sys-fs/lvm2"
417 - einfo "- sys-fs/lxcfs"
418 - einfo "- sys-fs/zfs"
419 - einfo "- sys-process/criu"
420 - einfo
421 - einfo "Since these features can't be disabled at build-time they are"
422 - einfo "not USE-conditional."
423 -}
424
425 diff --git a/app-emulation/lxd/lxd-2.0.2.ebuild b/app-emulation/lxd/lxd-2.0.2.ebuild
426 deleted file mode 100644
427 index fdb143b..00000000
428 --- a/app-emulation/lxd/lxd-2.0.2.ebuild
429 +++ /dev/null
430 @@ -1,149 +0,0 @@
431 -# Copyright 1999-2016 Gentoo Foundation
432 -# Distributed under the terms of the GNU General Public License v2
433 -# $Id$
434 -
435 -EAPI=5
436 -
437 -DESCRIPTION="Fast, dense and secure container management"
438 -HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
439 -EGO_PN_PARENT="github.com/lxc"
440 -EGO_PN="${EGO_PN_PARENT}/lxd"
441 -SRC_URI="https://dev.gentoo.org/~stasibear/distfiles/${P}.tar.bz2"
442 -LICENSE="Apache-2.0"
443 -SLOT="0"
444 -KEYWORDS="~amd64"
445 -
446 -PLOCALES="de fr ja"
447 -IUSE="+daemon nls test"
448 -
449 -# IUSE and PLOCALES must be defined before l10n inherited
450 -inherit bash-completion-r1 eutils golang-build l10n systemd user vcs-snapshot
451 -
452 -DEPEND="
453 - dev-go/go-crypto
454 - dev-libs/protobuf
455 - dev-vcs/git
456 - nls? ( sys-devel/gettext )
457 - test? (
458 - app-misc/jq
459 - dev-db/sqlite
460 - net-misc/curl
461 - sys-devel/gettext
462 - )
463 -"
464 -
465 -RDEPEND="
466 - daemon? (
467 - app-admin/cgmanager
468 - app-arch/xz-utils
469 - app-emulation/lxc[cgmanager,seccomp]
470 - net-misc/rsync[xattr]
471 - sys-apps/iproute2
472 - virtual/acl
473 - )
474 -"
475 -
476 -# KNOWN ISSUES:
477 -# - Translations may not work. I've been unsuccessful in forcing
478 -# localized output. Anyway, upstream (Canonical) doesn't install the
479 -# message files.
480 -
481 -# TODO:
482 -# - since 0.15 gccgo is a supported compiler ('make gccgo'). It would
483 -# be preferable for that support to go into the golang-build eclass not
484 -# this package directly.
485 -
486 -src_prepare() {
487 - cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir"
488 -
489 - epatch "${FILESDIR}/${P}-dont-go-get.patch"
490 -
491 - tmpgoroot="${T}/goroot"
492 - mkdir -p "$tmpgoroot" || die "Failed to create temporary GOROOT"
493 - cp -sR "$(get_golibdir_gopath)"/* "${tmpgoroot}" || die "Failed to copy files to temporary GOROOT"
494 -
495 - # Warn on unhandled locale changes
496 - l10n_find_plocales_changes po "" .po
497 -}
498 -
499 -src_compile() {
500 - golang-build_src_compile
501 -
502 - cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir"
503 -
504 - tmpgoroot="${T}/goroot"
505 - if use daemon; then
506 - # Build binaries
507 - GOPATH="${S}:${tmpgoroot}" emake
508 - else
509 - # build client tool
510 - GOPATH="${S}:${tmpgoroot}" emake client
511 - fi
512 -
513 - use nls && emake build-mo
514 -}
515 -
516 -src_test() {
517 - if use daemon; then
518 - # Go native tests should succeed
519 - golang-build_src_test
520 - fi
521 -}
522 -
523 -src_install() {
524 - # Installs all src,pkg to /usr/lib/go-gentoo
525 - golang-build_src_install
526 -
527 - cd "${S}"
528 - dobin bin/lxc
529 - use daemon && dosbin bin/lxd
530 -
531 - cd "src/${EGO_PN}"
532 -
533 - if use nls; then
534 - for lingua in ${PLOCALES}; do
535 - if use linguas_${lingua}; then
536 - domo po/${lingua}.mo
537 - fi
538 - done
539 - fi
540 -
541 - if use daemon; then
542 - newinitd "${FILESDIR}"/${P}.initd lxd
543 - newconfd "${FILESDIR}"/${P}.confd lxd
544 -
545 - systemd_dounit "${FILESDIR}"/lxd.service
546 - fi
547 -
548 - newbashcomp config/bash/lxd-client lxc
549 -
550 - dodoc AUTHORS CONTRIBUTING.md README.md doc/*
551 -}
552 -
553 -pkg_postinst() {
554 - einfo
555 - einfo "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
556 - einfo "including a Quick Start."
557 -
558 - # The messaging below only applies to daemon installs
559 - use daemon || return 0
560 -
561 - # The control socket will be owned by (and writeable by) this group.
562 - enewgroup lxd
563 -
564 - # Ubuntu also defines an lxd user but it appears unused (the daemon
565 - # must run as root)
566 -
567 - einfo
568 - einfo "Though not strictly required, some features are enabled at run-time"
569 - einfo "when the relevant helper programs are detected:"
570 - einfo "- sys-apps/apparmor"
571 - einfo "- sys-fs/btrfs-progs"
572 - einfo "- sys-fs/lvm2"
573 - einfo "- sys-fs/lxcfs"
574 - einfo "- sys-fs/zfs"
575 - einfo "- sys-process/criu"
576 - einfo
577 - einfo "Since these features can't be disabled at build-time they are"
578 - einfo "not USE-conditional."
579 -}
580
581 diff --git a/app-emulation/lxd/lxd-2.0.3.ebuild b/app-emulation/lxd/lxd-2.0.3.ebuild
582 deleted file mode 100644
583 index e45469a..00000000
584 --- a/app-emulation/lxd/lxd-2.0.3.ebuild
585 +++ /dev/null
586 @@ -1,155 +0,0 @@
587 -# Copyright 1999-2016 Gentoo Foundation
588 -# Distributed under the terms of the GNU General Public License v2
589 -# $Id$
590 -
591 -EAPI=6
592 -
593 -DESCRIPTION="Fast, dense and secure container management"
594 -HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
595 -EGO_PN_PARENT="github.com/lxc"
596 -EGO_PN="${EGO_PN_PARENT}/lxd"
597 -
598 -# The source is repackaged using a script at:
599 -# https://dev.gentoo.org/~stasibear/lxd_repackage.py
600 -# This is necessary because go's native package management assumes
601 -# that a build starts with checking out many git repositories, often
602 -# from HEAD. This provides no way to build the same code repeatably,
603 -# and anyway portage requires that fetching is only done from SRC_URI.
604 -# The only sane alternative I've seen is in the consul ebuild, which
605 -# is more transparent but raises other questions.
606 -SRC_URI="https://dev.gentoo.org/~stasibear/distfiles/${P}.tar.bz2"
607 -
608 -LICENSE="Apache-2.0"
609 -SLOT="0"
610 -KEYWORDS="~amd64"
611 -
612 -PLOCALES="de fr ja"
613 -IUSE="+daemon nls test"
614 -
615 -# IUSE and PLOCALES must be defined before l10n inherited
616 -inherit bash-completion-r1 golang-build l10n systemd user vcs-snapshot
617 -
618 -DEPEND="
619 - dev-go/go-crypto
620 - dev-libs/protobuf
621 - nls? ( sys-devel/gettext )
622 - test? (
623 - app-misc/jq
624 - dev-db/sqlite
625 - net-misc/curl
626 - sys-devel/gettext
627 - )
628 -"
629 -
630 -RDEPEND="
631 - daemon? (
632 - app-admin/cgmanager
633 - app-arch/xz-utils
634 - app-emulation/lxc[cgmanager,seccomp]
635 - net-misc/rsync[xattr]
636 - sys-apps/iproute2
637 - virtual/acl
638 - )
639 -"
640 -
641 -PATCHES=("${FILESDIR}/${P}-dont-go-get.patch")
642 -
643 -# KNOWN ISSUES:
644 -# - Translations may not work. I've been unsuccessful in forcing
645 -# localized output. Anyway, upstream (Canonical) doesn't install the
646 -# message files.
647 -
648 -src_prepare() {
649 - cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir"
650 -
651 - default_src_prepare
652 -
653 - tmpgoroot="${T}/goroot"
654 - mkdir -p "$tmpgoroot" || die "Failed to create temporary GOROOT"
655 - cp -sR "$(get_golibdir_gopath)"/* "${tmpgoroot}" || die "Failed to copy files to temporary GOROOT"
656 -
657 - # Warn on unhandled locale changes
658 - l10n_find_plocales_changes po "" .po
659 -}
660 -
661 -src_compile() {
662 - golang-build_src_compile
663 -
664 - cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir"
665 -
666 - tmpgoroot="${T}/goroot"
667 - if use daemon; then
668 - # Build binaries
669 - GOPATH="${S}:${tmpgoroot}" emake
670 - else
671 - # build client tool
672 - GOPATH="${S}:${tmpgoroot}" emake client
673 - fi
674 -
675 - use nls && emake build-mo
676 -}
677 -
678 -src_test() {
679 - if use daemon; then
680 - # Go native tests should succeed
681 - golang-build_src_test
682 - fi
683 -}
684 -
685 -src_install() {
686 - # Installs all src,pkg to /usr/lib/go-gentoo
687 - golang-build_src_install
688 -
689 - cd "${S}"
690 - dobin bin/lxc
691 - use daemon && dosbin bin/lxd
692 -
693 - cd "src/${EGO_PN}"
694 -
695 - if use nls; then
696 - for lingua in ${PLOCALES}; do
697 - if use linguas_${lingua}; then
698 - domo po/${lingua}.mo
699 - fi
700 - done
701 - fi
702 -
703 - if use daemon; then
704 - newinitd "${FILESDIR}"/${P}.initd lxd
705 - newconfd "${FILESDIR}"/${P}.confd lxd
706 -
707 - systemd_dounit "${FILESDIR}"/lxd.service
708 - fi
709 -
710 - newbashcomp config/bash/lxd-client lxc
711 -
712 - dodoc AUTHORS CONTRIBUTING.md README.md doc/*
713 -}
714 -
715 -pkg_postinst() {
716 - einfo
717 - einfo "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
718 - einfo "including a Quick Start."
719 -
720 - # The messaging below only applies to daemon installs
721 - use daemon || return 0
722 -
723 - # The control socket will be owned by (and writeable by) this group.
724 - enewgroup lxd
725 -
726 - # Ubuntu also defines an lxd user but it appears unused (the daemon
727 - # must run as root)
728 -
729 - einfo
730 - einfo "Though not strictly required, some features are enabled at run-time"
731 - einfo "when the relevant helper programs are detected:"
732 - einfo "- sys-apps/apparmor"
733 - einfo "- sys-fs/btrfs-progs"
734 - einfo "- sys-fs/lvm2"
735 - einfo "- sys-fs/lxcfs"
736 - einfo "- sys-fs/zfs"
737 - einfo "- sys-process/criu"
738 - einfo
739 - einfo "Since these features can't be disabled at build-time they are"
740 - einfo "not USE-conditional."
741 -}