1 |
commit: aef61f3e7622e190f8833f0738661647c279a4f9 |
2 |
Author: Erik Mackdanz <stasibear <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 8 20:04:56 2018 +0000 |
4 |
Commit: Erik Mackdanz <stasibear <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 8 20:04:56 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aef61f3e |
7 |
|
8 |
app-emulation/lxd: Support latest confd options |
9 |
|
10 |
Closes: https://bugs.gentoo.org/652206 |
11 |
Package-Manager: Portage-2.3.26, Repoman-2.3.7 |
12 |
|
13 |
app-emulation/lxd/files/lxd.confd.1 | 24 ++++ |
14 |
app-emulation/lxd/lxd-3.0.0-r1.ebuild | 251 ++++++++++++++++++++++++++++++++++ |
15 |
app-emulation/lxd/metadata.xml | 4 +- |
16 |
3 files changed, 277 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/app-emulation/lxd/files/lxd.confd.1 b/app-emulation/lxd/files/lxd.confd.1 |
19 |
new file mode 100644 |
20 |
index 00000000000..8e342cc62d1 |
21 |
--- /dev/null |
22 |
+++ b/app-emulation/lxd/files/lxd.confd.1 |
23 |
@@ -0,0 +1,24 @@ |
24 |
+# Group which owns the shared socket |
25 |
+LXD_OPTIONS+=" --group lxd" |
26 |
+ |
27 |
+ |
28 |
+ |
29 |
+# Enable cpu profiling into the specified file |
30 |
+#LXD_OPTIONS+=" --cpuprofile /tmp/lxc_cpu_profile" |
31 |
+ |
32 |
+# Enable memory profiling into the specified file |
33 |
+#LXD_OPTIONS+=" --memprofile /tmp/lxc_mem_profile" |
34 |
+ |
35 |
+ |
36 |
+ |
37 |
+# Enables debug mode |
38 |
+#LXD_OPTIONS+=" --debug" |
39 |
+ |
40 |
+# For debugging, print a complete stack trace every n seconds |
41 |
+#LXD_OPTIONS+=" --print-goroutines 5" |
42 |
+ |
43 |
+# Enables verbose mode |
44 |
+#LXD_OPTIONS+=" --verbose" |
45 |
+ |
46 |
+# Logfile to log to |
47 |
+#LXD_OPTIONS+=" --logfile /var/log/lxd/lxd.log" |
48 |
|
49 |
diff --git a/app-emulation/lxd/lxd-3.0.0-r1.ebuild b/app-emulation/lxd/lxd-3.0.0-r1.ebuild |
50 |
new file mode 100644 |
51 |
index 00000000000..6330fcb2112 |
52 |
--- /dev/null |
53 |
+++ b/app-emulation/lxd/lxd-3.0.0-r1.ebuild |
54 |
@@ -0,0 +1,251 @@ |
55 |
+# Copyright 1999-2018 Gentoo Foundation |
56 |
+# Distributed under the terms of the GNU General Public License v2 |
57 |
+ |
58 |
+EAPI=6 |
59 |
+ |
60 |
+DESCRIPTION="Fast, dense and secure container management" |
61 |
+HOMEPAGE="https://linuxcontainers.org/lxd/introduction/" |
62 |
+EGO_PN_PARENT="github.com/lxc" |
63 |
+EGO_PN="${EGO_PN_PARENT}/lxd" |
64 |
+ |
65 |
+# Maintained with https://github.com/hsoft/gentoo-ego-vendor-update |
66 |
+# The "# branch" comments are there for the script, they're important. |
67 |
+EGO_VENDOR=( |
68 |
+ "github.com/lxc/lxd e641ae45dc13cc27510c9d2127eece46ed9ac16b" |
69 |
+ "github.com/CanonicalLtd/go-sqlite3 730012cee3364e7717c28f7e9b05ee6dd8684bae" |
70 |
+ "github.com/CanonicalLtd/dqlite 9334841532709c77fc79e13a08408694e4bb3616" |
71 |
+ "github.com/CanonicalLtd/go-grpc-sql 534b56d0c689ed437e6cff44868964d45d3ec85c" |
72 |
+ "github.com/CanonicalLtd/raft-http e4290d0af830073ec140538e8974aa4393495ea1" |
73 |
+ "github.com/CanonicalLtd/raft-membership 26ef52960f54c472f52fb3701f19f25319e1032e" |
74 |
+ "github.com/CanonicalLtd/raft-test 22441a088d5630ddd2e971eae68074d2b645f1b7" |
75 |
+ "github.com/dustinkirkland/golang-petname d3c2ba80e75eeef10c5cf2fc76d2c809637376b3" |
76 |
+ "github.com/flosch/pongo2 97eac295f74b5fbb7fd3113e35f4ccf3c816e389" |
77 |
+ "github.com/juju/errors c7d06af17c68cd34c835053720b21f6549d9b0ee" |
78 |
+ "github.com/juju/idmclient 15392b0e99abe5983297959c737b8d000e43b34c" |
79 |
+ "github.com/juju/httprequest 77d36ac4b71a6095506c0617d5881846478558cb" |
80 |
+ "github.com/juju/utils d18e608d01400189bcda3e2669505cbd30e9dda9" |
81 |
+ "github.com/juju/loggo 7f1609ff1f3fcf3519ed62ccaaa9e609ea287838" |
82 |
+ "github.com/juju/webbrowser 54b8c57083b4afb7dc75da7f13e2967b2606a507" |
83 |
+ "github.com/juju/gomaasapi 663f786f595ba1707f56f62f7f4f2284c47c0f1d" |
84 |
+ "github.com/juju/schema e4f08199aa80d3194008c0bd2e14ef5edc0e6be6" |
85 |
+ "github.com/juju/version b64dbd566305c836274f0268fa59183a52906b36" |
86 |
+ "github.com/juju/persistent-cookiejar d5e5a8405ef9633c84af42fbcc734ec8dd73c198" |
87 |
+ "github.com/juju/go4 40d72ab9641a2a8c36a9c46a51e28367115c8e59" |
88 |
+ "github.com/juju/testing 43f926548f91d55be6bae26ecb7d2386c64e887c" |
89 |
+ "github.com/juju/retry 1998d01ba1c3eeb4a4728c4a50660025b2fe7c8f" |
90 |
+ "github.com/golang/protobuf e09c5db296004fbe3f74490e84dcd62c3c5ddb1b" |
91 |
+ "github.com/golang/glog 23def4e6c14b4da8ac2ed8007337bc5eb5007998" |
92 |
+ "github.com/gorilla/mux 4dbd923b0c9e99ff63ad54b0e9705ff92d3cdb06" |
93 |
+ "github.com/gorilla/websocket eb925808374e5ca90c83401a40d711dc08c0c0f6" |
94 |
+ "github.com/julienschmidt/httprouter d1898390779332322e6b5ca5011da4bf249bb056" |
95 |
+ "github.com/rogpeppe/fastuuid 6724a57986aff9bff1a1770e9347036def7c89f6" |
96 |
+ "github.com/pkg/errors 816c9085562cd7ee03e7f8188a1cfd942858cded" |
97 |
+ "github.com/ryanfaerman/fsm 3dc1bc0980272fd56d81167a48a641dab8356e29" |
98 |
+ "github.com/hashicorp/raft a3fb4581fb07b16ecf1c3361580d4bdb17de9d98" |
99 |
+ "github.com/hashicorp/go-immutable-radix 7f3cd4390caab3250a57f30efdb2a65dd7649ecf" |
100 |
+ "github.com/hashicorp/golang-lru 0fb14efe8c47ae851c0034ed7a448854d3d34cf3" |
101 |
+ "github.com/hashicorp/go-msgpack fa3f63826f7c23912c15263591e65d54d080b458" |
102 |
+ "github.com/hashicorp/raft-boltdb 6e5ba93211eaf8d9a2ad7e41ffad8c6f160f9fe3" |
103 |
+ "github.com/armon/go-metrics 783273d703149aaeb9897cf58613d5af48861c25" |
104 |
+ "github.com/stretchr/testify c679ae2cc0cb27ec3293fea7e254e47386f05d69" |
105 |
+ "github.com/boltdb/bolt fd01fc79c553a8e99d512a07e8e0c63d4a3ccfc5" |
106 |
+ "github.com/mattn/go-colorable efa589957cd060542a26d2dd7832fd6a6c6c3ade" |
107 |
+ "github.com/mattn/go-isatty 6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c" |
108 |
+ "github.com/mattn/go-runewidth a9d6d1e4dc51df2130326793d49971f238839169" |
109 |
+ "github.com/syndtr/gocapability 33e07d32887e1e06b7c025f27ce52f62c7990bc0" |
110 |
+ "github.com/pborman/uuid c65b2f87fee37d1c7854c9164a450713c28d50cd" |
111 |
+ "github.com/spf13/cobra 4dab30cb33e6633c33c787106bafbfbfdde7842d" |
112 |
+ "github.com/spf13/pflag 1cd4a0c365d95803411bec89fb7b76bade17053b" |
113 |
+ "github.com/cpuguy83/go-md2man 48d8747a2ca13185e7cc8efe6e9fc196a83f71a5" |
114 |
+ "github.com/gosexy/gettext 74466a0a0c4a62fea38f44aa161d4bbfbe79dd6b" |
115 |
+ "github.com/frankban/quicktest 536e76da5efc46dc247088384c2d2cea7da968aa" |
116 |
+ "github.com/google/go-cmp 5411ab924f9ffa6566244a9e504bc347edacffd3" |
117 |
+ "github.com/kr/pretty cfb55aafdaf3ec08f0db22699ab822c50091b1c4" |
118 |
+ "github.com/kr/text 7cafcd837844e784b526369c9bce262804aebc60" |
119 |
+ "github.com/olekukonko/tablewriter b8a9be070da40449e501c3c4730a889e42d87a9e" |
120 |
+ "google.golang.org/genproto ab0870e398d5dd054b868c0db1481ab029b9a9f2 github.com/google/go-genproto" |
121 |
+ "google.golang.org/grpc 2dfcc11f7a6d4791ba627222d783eedf268b4b95 github.com/grpc/grpc-go" |
122 |
+ "golang.org/x/crypto 12892e8c234f4fe6f6803f052061de9057903bb2 github.com/golang/crypto" |
123 |
+ "golang.org/x/net b68f30494add4df6bd8ef5e82803f308e7f7c59c github.com/golang/net" |
124 |
+ "golang.org/x/sys 378d26f46672a356c46195c28f61bdb4c0a781dd github.com/golang/sys" |
125 |
+ "golang.org/x/text ece95c760240037f89ebcbdd7155ac8cb52e38fa github.com/golang/text" |
126 |
+ "gopkg.in/errgo.v1 442357a80af5c6bf9b6d51ae791a39c3421004f3 github.com/go-errgo/errgo" # branch v1 |
127 |
+ "gopkg.in/juju/names.v2 54f00845ae470a362430a966fe17f35f8784ac92 github.com/juju/names" # branch v2 |
128 |
+ "gopkg.in/juju/environschema.v1 7359fc7857abe2b11b5b3e23811a9c64cb6b01e0 github.com/juju/environschema" # branch v1 |
129 |
+ "gopkg.in/yaml.v2 5420a8b6744d3b0345ab293f6fcba19c978f1183 github.com/go-yaml/yaml" # branch v2.2.1 |
130 |
+ "gopkg.in/macaroon-bakery.v2 94012773d2874a067572bd16d7d11ae02968b47b github.com/go-macaroon-bakery/macaroon-bakery" # branch v2.0.1 |
131 |
+ "gopkg.in/macaroon.v2 bed2a428da6e56d950bed5b41fcbae3141e5b0d0 github.com/go-macaroon/macaroon" # branch v2.0.0 |
132 |
+ "gopkg.in/httprequest.v1 1a21782420ea13c3c6fb1d03578f446b3248edb1 github.com/go-httprequest/httprequest" # branch v1.1.1 |
133 |
+ "gopkg.in/lxc/go-lxc.v2 2660c429a942a4a21455765c7046dde612c1baa7 github.com/lxc/go-lxc" # branch v2 |
134 |
+ "gopkg.in/tomb.v2 d5d1b5820637886def9eef33e03a27a9f166942c github.com/go-tomb/tomb" # branch v2 |
135 |
+ "gopkg.in/mgo.v2 3f83fa5005286a7fe593b055f0d7771a7dce4655 github.com/go-mgo/mgo" # branch v2 |
136 |
+ "gopkg.in/retry.v1 2d7c7c65cc71d024968d9ff4385d5e7ad3a83fcc github.com/go-retry/retry" # branch v1.0.0 |
137 |
+ "gopkg.in/check.v1 20d25e2804050c1cd24a7eea1e7a6447dd0e74ec github.com/go-check/check" # branch v1 |
138 |
+) |
139 |
+ |
140 |
+ARCHIVE_URI="https://${EGO_PN}/archive/${P}.tar.gz -> ${P}.tar.gz" |
141 |
+LICENSE="Apache-2.0 BSD BSD-2 LGPL-3 MIT MPL-2.0" |
142 |
+SLOT="0" |
143 |
+KEYWORDS="~amd64" |
144 |
+ |
145 |
+IUSE="+daemon +ipv6 +dnsmasq nls test" |
146 |
+ |
147 |
+inherit bash-completion-r1 linux-info systemd user golang-vcs-snapshot |
148 |
+ |
149 |
+SRC_URI="${ARCHIVE_URI} |
150 |
+ ${EGO_VENDOR_URI}" |
151 |
+ |
152 |
+DEPEND=" |
153 |
+ >=dev-lang/go-1.7.1 |
154 |
+ dev-libs/protobuf |
155 |
+ nls? ( sys-devel/gettext ) |
156 |
+ test? ( |
157 |
+ app-misc/jq |
158 |
+ dev-db/sqlite |
159 |
+ net-misc/curl |
160 |
+ sys-devel/gettext |
161 |
+ ) |
162 |
+" |
163 |
+ |
164 |
+RDEPEND=" |
165 |
+ daemon? ( |
166 |
+ app-arch/xz-utils |
167 |
+ >=app-emulation/lxc-2.0.7[seccomp] |
168 |
+ dnsmasq? ( |
169 |
+ net-dns/dnsmasq[dhcp,ipv6?] |
170 |
+ ) |
171 |
+ net-misc/rsync[xattr] |
172 |
+ sys-apps/iproute2[ipv6?] |
173 |
+ sys-fs/squashfs-tools |
174 |
+ virtual/acl |
175 |
+ ) |
176 |
+" |
177 |
+ |
178 |
+CONFIG_CHECK=" |
179 |
+ ~BRIDGE |
180 |
+ ~DUMMY |
181 |
+ ~IP6_NF_NAT |
182 |
+ ~IP6_NF_TARGET_MASQUERADE |
183 |
+ ~IPV6 |
184 |
+ ~IP_NF_NAT |
185 |
+ ~IP_NF_TARGET_MASQUERADE |
186 |
+ ~MACVLAN |
187 |
+ ~NETFILTER_XT_MATCH_COMMENT |
188 |
+ ~NET_IPGRE |
189 |
+ ~NET_IPGRE_DEMUX |
190 |
+ ~NET_IPIP |
191 |
+ ~NF_NAT_MASQUERADE_IPV4 |
192 |
+ ~NF_NAT_MASQUERADE_IPV6 |
193 |
+ ~VXLAN |
194 |
+" |
195 |
+ |
196 |
+ERROR_BRIDGE="BRIDGE: needed for network commands" |
197 |
+ERROR_DUMMY="DUMMY: needed for network commands" |
198 |
+ERROR_IP6_NF_NAT="IP6_NF_NAT: needed for network commands" |
199 |
+ERROR_IP6_NF_TARGET_MASQUERADE="IP6_NF_TARGET_MASQUERADE: needed for network commands" |
200 |
+ERROR_IPV6="IPV6: needed for network commands" |
201 |
+ERROR_IP_NF_NAT="IP_NF_NAT: needed for network commands" |
202 |
+ERROR_IP_NF_TARGET_MASQUERADE="IP_NF_TARGET_MASQUERADE: needed for network commands" |
203 |
+ERROR_MACVLAN="MACVLAN: needed for network commands" |
204 |
+ERROR_NETFILTER_XT_MATCH_COMMENT="NETFILTER_XT_MATCH_COMMENT: needed for network commands" |
205 |
+ERROR_NET_IPGRE="NET_IPGRE: needed for network commands" |
206 |
+ERROR_NET_IPGRE_DEMUX="NET_IPGRE_DEMUX: needed for network commands" |
207 |
+ERROR_NET_IPIP="NET_IPIP: needed for network commands" |
208 |
+ERROR_NF_NAT_MASQUERADE_IPV4="NF_NAT_MASQUERADE_IPV4: needed for network commands" |
209 |
+ERROR_NF_NAT_MASQUERADE_IPV6="NF_NAT_MASQUERADE_IPV6: needed for network commands" |
210 |
+ERROR_VXLAN="VXLAN: needed for network commands" |
211 |
+ |
212 |
+PATCHES=( |
213 |
+ "${FILESDIR}/${PN}-dont-go-get.patch" |
214 |
+) |
215 |
+ |
216 |
+src_prepare() { |
217 |
+ default_src_prepare |
218 |
+ |
219 |
+ # Examples in go-lxc make our build fail. |
220 |
+ rm -rf "${S}/src/${EGO_PN}/vendor/gopkg.in/lxc/go-lxc.v2/examples" || die |
221 |
+} |
222 |
+ |
223 |
+src_compile() { |
224 |
+ export GOPATH="${S}" |
225 |
+ |
226 |
+ cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir" |
227 |
+ |
228 |
+ tmpgoroot="${T}/goroot" |
229 |
+ if use daemon; then |
230 |
+ # Build binaries |
231 |
+ emake |
232 |
+ else |
233 |
+ # build client tool |
234 |
+ emake client |
235 |
+ fi |
236 |
+ |
237 |
+ use nls && emake build-mo |
238 |
+} |
239 |
+ |
240 |
+src_test() { |
241 |
+ if use daemon; then |
242 |
+ export GOPATH="${S}" |
243 |
+ cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir" |
244 |
+ |
245 |
+ emake check |
246 |
+ else |
247 |
+ einfo "No tests to run for client-only builds" |
248 |
+ fi |
249 |
+} |
250 |
+ |
251 |
+src_install() { |
252 |
+ dobin bin/lxc |
253 |
+ if use daemon; then |
254 |
+ dosbin bin/lxd |
255 |
+ dobin bin/fuidshift |
256 |
+ fi |
257 |
+ |
258 |
+ cd "src/${EGO_PN}" || die "can't cd into ${S}/src/${EGO_PN}" |
259 |
+ |
260 |
+ if use nls; then |
261 |
+ domo po/*.mo |
262 |
+ fi |
263 |
+ |
264 |
+ if use daemon; then |
265 |
+ newinitd "${FILESDIR}"/${PN}.initd lxd |
266 |
+ newconfd "${FILESDIR}"/${PN}.confd.1 lxd |
267 |
+ |
268 |
+ systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service |
269 |
+ fi |
270 |
+ |
271 |
+ newbashcomp scripts/bash/lxd-client lxc |
272 |
+ |
273 |
+ dodoc AUTHORS README.md doc/* |
274 |
+} |
275 |
+ |
276 |
+pkg_postinst() { |
277 |
+ einfo |
278 |
+ einfo "Consult https://wiki.gentoo.org/wiki/LXD for more information," |
279 |
+ einfo "including a Quick Start." |
280 |
+ |
281 |
+ # The messaging below only applies to daemon installs |
282 |
+ use daemon || return 0 |
283 |
+ |
284 |
+ # The control socket will be owned by (and writeable by) this group. |
285 |
+ enewgroup lxd |
286 |
+ |
287 |
+ # Ubuntu also defines an lxd user but it appears unused (the daemon |
288 |
+ # must run as root) |
289 |
+ |
290 |
+ einfo |
291 |
+ einfo "Though not strictly required, some features are enabled at run-time" |
292 |
+ einfo "when the relevant helper programs are detected:" |
293 |
+ einfo "- sys-apps/apparmor" |
294 |
+ einfo "- sys-fs/btrfs-progs" |
295 |
+ einfo "- sys-fs/lvm2" |
296 |
+ einfo "- sys-fs/lxcfs" |
297 |
+ einfo "- sys-fs/zfs" |
298 |
+ einfo "- sys-process/criu" |
299 |
+ einfo |
300 |
+ einfo "Since these features can't be disabled at build-time they are" |
301 |
+ einfo "not USE-conditional." |
302 |
+ einfo |
303 |
+ einfo "Networks with bridge.mode=fan are unsupported due to requiring" |
304 |
+ einfo "a patched kernel and iproute2." |
305 |
+} |
306 |
|
307 |
diff --git a/app-emulation/lxd/metadata.xml b/app-emulation/lxd/metadata.xml |
308 |
index d4ab64b98a1..a0dd29a5f4e 100644 |
309 |
--- a/app-emulation/lxd/metadata.xml |
310 |
+++ b/app-emulation/lxd/metadata.xml |
311 |
@@ -10,8 +10,8 @@ |
312 |
<name>Virgil Dupras</name> |
313 |
</maintainer> |
314 |
<maintainer type="project"> |
315 |
- <email>proxy-maint@g.o</email> |
316 |
- <name>Proxy Maintainers</name> |
317 |
+ <email>virtualization@g.o</email> |
318 |
+ <name>Gentoo Virtualization Project</name> |
319 |
</maintainer> |
320 |
<longdescription> |
321 |
By combining the speed and density of containers with |