Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxd/
Date: Fri, 29 May 2020 13:15:21
Message-Id: 1590758109.779e0763dbddc306e1a729099981b108fac1c744.juippis@gentoo
1 commit: 779e0763dbddc306e1a729099981b108fac1c744
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 29 13:09:46 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Fri May 29 13:15:09 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=779e0763
7
8 app-emulation/lxd: clean old 3.16
9
10 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
11
12 app-emulation/lxd/Manifest | 1 -
13 app-emulation/lxd/lxd-3.16-r1.ebuild | 266 -----------------------------------
14 2 files changed, 267 deletions(-)
15
16 diff --git a/app-emulation/lxd/Manifest b/app-emulation/lxd/Manifest
17 index 5c5d670606b..f5bd47450bf 100644
18 --- a/app-emulation/lxd/Manifest
19 +++ b/app-emulation/lxd/Manifest
20 @@ -1,3 +1,2 @@
21 DIST lxd-3.14.tar.gz 26141949 BLAKE2B 69004501012c9a873eef77a60df7e5dba25c692224d27b02cd2d2b27533012e71bd7562cb64a17920234746e8be2819bb773365c01422c0b776dd2b7c36b69fe SHA512 3d2d4e61298fc9fde49defad776a398fcccf7639485e810173c9c7f7d939c354a9ad8112a4a631b0850f6eb54435012d289236ff61839416caf95434eb23c8ff
22 -DIST lxd-3.16.tar.gz 24863601 BLAKE2B 0087c00d86ea3f623ea31bc008176e4232bb432f5c431c288f5c5ff3e1658abe4e310509088ddc6b23d8db68f8e93997522b8a5c0b19fd243abee13e11d3deb9 SHA512 11c6c5c49ceb23c31979829937e1baad340b8920481ef5b89b2b6d0b6b05967ec1f446f8b0330c11008f6fecea077eed0858af7fe802c50b52148757584fdfb9
23 DIST lxd-4.0.1.tar.gz 25027762 BLAKE2B 1154a427558ad5eda62b63501a2f62a5c3a1b740fac061432b06a1034b75cb906f38d6c43e8215cab8ae0bed328d75a7612c1bb7af3272cdbe3f93235d5bb920 SHA512 1f47f8239cc1d3425fc4cd075487678e219e94deddec10f52a1cd18fbdc0515f54b67552e7b41d0052803c317a861b34cfc83a25776eae7b9673b5c5fd50d70f
24
25 diff --git a/app-emulation/lxd/lxd-3.16-r1.ebuild b/app-emulation/lxd/lxd-3.16-r1.ebuild
26 deleted file mode 100644
27 index 6f15ebbce92..00000000000
28 --- a/app-emulation/lxd/lxd-3.16-r1.ebuild
29 +++ /dev/null
30 @@ -1,266 +0,0 @@
31 -# Copyright 1999-2019 Gentoo Authors
32 -# Distributed under the terms of the GNU General Public License v2
33 -
34 -EAPI=7
35 -
36 -DESCRIPTION="Fast, dense and secure container management"
37 -HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
38 -
39 -LICENSE="Apache-2.0 BSD BSD-2 LGPL-3 MIT MPL-2.0"
40 -SLOT="0"
41 -KEYWORDS="~amd64"
42 -
43 -IUSE="+daemon +ipv6 +dnsmasq nls test tools"
44 -RESTRICT="!test? ( test )"
45 -
46 -inherit autotools bash-completion-r1 linux-info systemd user
47 -
48 -SRC_URI="https://linuxcontainers.org/downloads/${PN}/${P}.tar.gz"
49 -
50 -DEPEND="
51 - dev-lang/tcl
52 - >=dev-lang/go-1.9.4
53 - dev-libs/libuv
54 - dev-libs/protobuf
55 - nls? ( sys-devel/gettext )
56 - test? (
57 - app-misc/jq
58 - net-misc/curl
59 - sys-devel/gettext
60 - )
61 -"
62 -
63 -RDEPEND="
64 - daemon? (
65 - app-arch/xz-utils
66 - >=app-emulation/lxc-2.0.7[seccomp]
67 - dev-libs/libuv
68 - dev-libs/lzo
69 - dev-util/xdelta:3
70 - dnsmasq? (
71 - net-dns/dnsmasq[dhcp,ipv6?]
72 - )
73 - net-firewall/ebtables
74 - net-firewall/iptables[ipv6?]
75 - net-libs/libnfnetlink
76 - net-libs/libnsl:0=
77 - net-misc/rsync[xattr]
78 - sys-apps/iproute2[ipv6?]
79 - sys-fs/fuse:0=
80 - sys-fs/lxcfs
81 - sys-fs/squashfs-tools
82 - virtual/acl
83 - )
84 -"
85 -
86 -CONFIG_CHECK="
87 - ~BRIDGE
88 - ~DUMMY
89 - ~IP6_NF_NAT
90 - ~IP6_NF_TARGET_MASQUERADE
91 - ~IPV6
92 - ~IP_NF_NAT
93 - ~IP_NF_TARGET_MASQUERADE
94 - ~MACVLAN
95 - ~NETFILTER_XT_MATCH_COMMENT
96 - ~NET_IPGRE
97 - ~NET_IPGRE_DEMUX
98 - ~NET_IPIP
99 - ~NF_NAT_MASQUERADE_IPV4
100 - ~NF_NAT_MASQUERADE_IPV6
101 - ~VXLAN
102 -"
103 -
104 -ERROR_BRIDGE="BRIDGE: needed for network commands"
105 -ERROR_DUMMY="DUMMY: needed for network commands"
106 -ERROR_IP6_NF_NAT="IP6_NF_NAT: needed for network commands"
107 -ERROR_IP6_NF_TARGET_MASQUERADE="IP6_NF_TARGET_MASQUERADE: needed for network commands"
108 -ERROR_IPV6="IPV6: needed for network commands"
109 -ERROR_IP_NF_NAT="IP_NF_NAT: needed for network commands"
110 -ERROR_IP_NF_TARGET_MASQUERADE="IP_NF_TARGET_MASQUERADE: needed for network commands"
111 -ERROR_MACVLAN="MACVLAN: needed for network commands"
112 -ERROR_NETFILTER_XT_MATCH_COMMENT="NETFILTER_XT_MATCH_COMMENT: needed for network commands"
113 -ERROR_NET_IPGRE="NET_IPGRE: needed for network commands"
114 -ERROR_NET_IPGRE_DEMUX="NET_IPGRE_DEMUX: needed for network commands"
115 -ERROR_NET_IPIP="NET_IPIP: needed for network commands"
116 -ERROR_NF_NAT_MASQUERADE_IPV4="NF_NAT_MASQUERADE_IPV4: needed for network commands"
117 -ERROR_NF_NAT_MASQUERADE_IPV6="NF_NAT_MASQUERADE_IPV6: needed for network commands"
118 -ERROR_VXLAN="VXLAN: needed for network commands"
119 -
120 -EGO_PN="github.com/lxc/lxd"
121 -
122 -src_prepare() {
123 - eapply_user
124 - eapply "${FILESDIR}/de-translation-newline-1.patch"
125 -
126 - cd "${S}/_dist/deps/raft" || die "Can't cd to raft dir"
127 - # Workaround for " * ACCESS DENIED: open_wr: /dev/zfs"
128 - sed -i 's#zfs version | cut -f 2#< /sys/module/zfs/version cut -f 1#' configure.ac || die "Can't sed configure.ac for raft"
129 - eautoreconf
130 -
131 - cd "${S}/_dist/deps/dqlite" || die "Can't cd to dqlite dir"
132 - eautoreconf
133 -
134 -}
135 -
136 -src_configure() {
137 - export GOPATH="${S}/_dist"
138 - cd "${GOPATH}/deps/sqlite" || die "Can't cd to sqlite dir"
139 - econf --enable-replication --disable-amalgamation --disable-tcl --libdir="${EPREFIX}/usr/lib/lxd"
140 -
141 - cd "${GOPATH}/deps/raft" || die "Can't cd to raft dir"
142 - PKG_CONFIG_PATH="${GOPATH}/raft/" econf --libdir=${EPREFIX}/usr/lib/lxd
143 -
144 - cd "${GOPATH}/deps/dqlite" || die "Can't cd to dqlite dir"
145 - export RAFT_CFLAGS="-I${GOPATH}/deps/raft/include/"
146 - export RAFT_LIBS="${GOPATH}/deps/raft/.libs"
147 - export CO_CFLAGS="-I${GOPATH}/deps/libco/"
148 - export CO_LIBS="${GOPATH}/deps/libco/"
149 - PKG_CONFIG_PATH="${GOPATH}/sqlite/" econf --libdir=${EPREFIX}/usr/lib/lxd
150 -}
151 -
152 -src_compile() {
153 - export GOPATH="${S}/_dist"
154 -
155 - cd "${GOPATH}/deps/sqlite" || die "Can't cd to sqlite dir"
156 - emake
157 -
158 - cd "${GOPATH}/deps/raft" || die "Can't cd to raft dir"
159 - emake
160 -
161 - cd "${GOPATH}/deps/libco" || die "Can't cd to libco dir"
162 - emake
163 -
164 - cd "${GOPATH}/deps/dqlite" || die "Can't cd to dqlite dir"
165 - emake CFLAGS="-I${GOPATH}/deps/sqlite -I${GOPATH}/deps/raft/include" LDFLAGS="-L${GOPATH}/deps/sqlite -L${GOPATH}/deps/raft"
166 -
167 - # We don't use the Makefile here because it builds targets with the
168 - # assumption that `pwd` is in a deep gopath namespace, which we're not.
169 - # It's simpler to manually call "go install" than patching the Makefile.
170 - cd "${S}"
171 - go install -v -x ${EGO_PN}/lxc || die "Failed to build the client"
172 -
173 - if use daemon; then
174 -
175 - # LXD depends on a patched, bundled sqlite with replication
176 - # capabilities.
177 - export CGO_CFLAGS="${CGO_CFLAGS} -I${GOPATH}/deps/sqlite/ -I${GOPATH}/deps/dqlite/include/ -I${GOPATH}/deps/raft/include/ -I${GOPATH}/deps/libco/"
178 - export CGO_LDFLAGS="${CGO_LDFLAGS} -L${GOPATH}/deps/sqlite/.libs/ -L${GOPATH}/deps/dqlite/.libs/ -L${GOPATH}/deps/raft/.libs -L${GOPATH}/deps/libco/ -Wl,-rpath,${EPREFIX}/usr/lib/lxd"
179 - export LD_LIBRARY_PATH="${GOPATH}/deps/sqlite/.libs/:${GOPATH}/deps/dqlite/.libs/:${GOPATH}/deps/raft/.libs:${GOPATH}/deps/libco/:${LD_LIBRARY_PATH}"
180 -
181 - go install -v -x -tags libsqlite3 ${EGO_PN}/lxd || die "Failed to build the daemon"
182 - fi
183 -
184 - if use tools; then
185 - go install -v -x ${EGO_PN}/fuidshift || die "Failed to build fuidshift"
186 - go install -v -x ${EGO_PN}/lxc-to-lxd || die "Failed to build lxc-to-lxd"
187 - go install -v -x ${EGO_PN}/lxd-benchmark || die "Failed to build lxd-benchmark"
188 - go install -v -x ${EGO_PN}/lxd-p2c || die "Failed to build lxd-p2c"
189 - fi
190 -
191 - use nls && emake build-mo
192 -}
193 -
194 -src_test() {
195 - if use daemon; then
196 - export GOPATH="${S}/_dist"
197 - # This is mostly a copy/paste from the Makefile's "check" rule, but
198 - # patching the Makefile to work in a non "fully-qualified" go namespace
199 - # was more complicated than this modest copy/paste.
200 - # Also: sorry, for now a network connection is needed to run tests.
201 - # Will properly bundle test dependencies later.
202 - go get -v -x github.com/rogpeppe/godeps
203 - go get -v -x github.com/remyoudompheng/go-misc/deadcode
204 - go get -v -x github.com/golang/lint/golint
205 - go test -v ${EGO_PN}/lxd
206 - else
207 - einfo "No tests to run for client-only builds"
208 - fi
209 -}
210 -
211 -src_install() {
212 - local bindir="_dist/bin"
213 - dobin ${bindir}/lxc
214 - if use daemon; then
215 -
216 - export GOPATH="${S}/_dist"
217 - cd "${GOPATH}/deps/sqlite" || die "Can't cd to sqlite dir"
218 - emake DESTDIR="${D}" install
219 -
220 - cd "${GOPATH}/deps/raft" || die "Can't cd to raft dir"
221 - emake DESTDIR="${D}" install
222 -
223 - cd "${GOPATH}/deps/libco" || die "Can't cd to libco dir"
224 - dolib.so libco.so
225 -
226 - cd "${GOPATH}/deps/dqlite" || die "Can't cd to dqlite dir"
227 - emake DESTDIR="${D}" install
228 -
229 - # Must only install libs
230 - rm "${D}/usr/bin/sqlite3" || die "Can't remove custom sqlite3 binary"
231 - rm -r "${D}/usr/include" || die "Can't remove include directory"
232 -
233 - cd "${S}" || die "Can't cd to \${S}"
234 - dosbin ${bindir}/lxd
235 - fi
236 -
237 - if use tools; then
238 - dobin ${bindir}/fuidshift
239 - dobin ${bindir}/lxc-to-lxd
240 - dobin ${bindir}/lxd-benchmark
241 - dobin ${bindir}/lxd-p2c
242 - fi
243 -
244 - if use nls; then
245 - domo po/*.mo
246 - fi
247 -
248 - if use daemon; then
249 - newinitd "${FILESDIR}"/${PN}.initd lxd
250 - newconfd "${FILESDIR}"/${PN}.confd lxd
251 -
252 - systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service
253 - fi
254 -
255 - newbashcomp scripts/bash/lxd-client lxc
256 -
257 - dodoc AUTHORS doc/*
258 -}
259 -
260 -pkg_postinst() {
261 - elog
262 - elog "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
263 - elog "including a Quick Start."
264 -
265 - # The messaging below only applies to daemon installs
266 - use daemon || return 0
267 -
268 - # The control socket will be owned by (and writeable by) this group.
269 - enewgroup lxd
270 -
271 - # Ubuntu also defines an lxd user but it appears unused (the daemon
272 - # must run as root)
273 -
274 - elog
275 - elog "Though not strictly required, some features are enabled at run-time"
276 - elog "when the relevant helper programs are detected:"
277 - elog "- sys-apps/apparmor"
278 - elog "- sys-fs/btrfs-progs"
279 - elog "- sys-fs/lvm2"
280 - elog "- sys-fs/zfs"
281 - elog "- sys-process/criu"
282 - elog
283 - elog "Since these features can't be disabled at build-time they are"
284 - elog "not USE-conditional."
285 - elog
286 - elog "Be sure to add your local user to the lxd group."
287 - elog
288 - elog "Networks with bridge.mode=fan are unsupported due to requiring"
289 - elog "a patched kernel and iproute2."
290 -}
291 -
292 -# TODO:
293 -# - man page, I don't see cobra generating it
294 -# - maybe implement LXD_CLUSTER_UPDATE per
295 -# https://discuss.linuxcontainers.org/t/lxd-3-5-has-been-released/2656
296 -# EM I'm not convinced it's a good design.