summaryrefslogtreecommitdiff
path: root/app-emulation/lxd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
commitdc7cbdfa65fd814b3b9aa3c56257da201109e807 (patch)
treec85d72f6f31f21f178069c9d41d41a7c1ff4b362 /app-emulation/lxd
parent0706fc6986773f4e4d391deff4ad5143c464ea4e (diff)
gentoo resync : 05.04.2019
Diffstat (limited to 'app-emulation/lxd')
-rw-r--r--app-emulation/lxd/Manifest10
-rw-r--r--app-emulation/lxd/lxd-3.10.ebuild2
-rw-r--r--app-emulation/lxd/lxd-3.11.ebuild (renamed from app-emulation/lxd/lxd-3.9.ebuild)2
-rw-r--r--app-emulation/lxd/lxd-3.7.ebuild238
-rw-r--r--app-emulation/lxd/lxd-3.8.ebuild241
5 files changed, 5 insertions, 488 deletions
diff --git a/app-emulation/lxd/Manifest b/app-emulation/lxd/Manifest
index 0720b35bbab6..e1dc7022bf64 100644
--- a/app-emulation/lxd/Manifest
+++ b/app-emulation/lxd/Manifest
@@ -4,11 +4,7 @@ AUX lxd.initd 853 BLAKE2B 0b48de1a596767db356850adcb5682c5c351e7477b0d49d81aebf8
AUX lxd.service 174 BLAKE2B 8686d57a79fbc3a9ec2e1a3197012599a5d6b81b62188e779cdb9a86f9f413fa485090c79dab8c4aa8891e0e35604b85fb1cdb1da313918b34a974b61699b24a SHA512 6f9d71d5c08c49653f28511bc793d1365604af6bf105789caea27f4685d721fbb283f888e3b7310997b73ff2fc5bb1a47e7500c4678cb3d39124cab723523140
AUX ptbr-translation-newline.patch 599 BLAKE2B a60e323bfcbdde55bb82f930165a56f0806975370ea090d30a2f40057445b7552b1ff368aac4518e3539f2a4f9b66bd474498f7797002c9bf92d0d837cb72246 SHA512 07c7682ac24b138da10e1a24da02b0cf6144d911200d89ae74d4a03c16fd2a75a22f5956902d071fb93ae1b9b74aacd4ad98e98764678881e19773ab64561581
DIST lxd-3.10.tar.gz 27057432 BLAKE2B b5a5c3cd4f1045419c806510aab21c3bcde8c8687ede808b1b832e2a0caba0ff3af5d79367141b29e84c0bd3bcf6958d917bc813700220e238cd21933963009b SHA512 25ed7675af7b6861d754607b19485e329ae344befac06fe33f326e34030755359bea6f574c414849b85f034533fd5dccb95a326ae0ad9e44b8ea366f7ee44d04
-DIST lxd-3.7.tar.gz 26321652 BLAKE2B ce7faab689ffe3950aa6f57a0fd2601f231ad26fc7fb09f02300f9c2226deda0876183fe2a4a14cc982c3c2a829acc1785e5e6e030f4dbeaf03a8fbba83e4cfc SHA512 a485c26ea04e6686a9fdac2219535e866f1906ff9a8e25fcd954d061a4cfc1585c4fa81b00247c34f571dbfb7f382be3e7208e3da72a4e281b714715a4f145fb
-DIST lxd-3.8.tar.gz 26914475 BLAKE2B 9cf7ee1b5d57a3588d3ccecd47b22ef28da0faa684de03c7273949be1902f77ff7c49f4e7e5c942f7266e4e462ee009b1e70d25362610050cc41d81029d42d7b SHA512 20085f05c59287fc8f350d8ef314c19fd7361f8394812e4a0466f76d9df6957348fc954d952f70e50e7227d593a9db9af994e15f69fd76e6ca4812174bfa907c
-DIST lxd-3.9.tar.gz 27031818 BLAKE2B 7956aa9d0cf773fbdae64e8770ebee474d0b1e20aa1399d96eb317efb8a8e1cc1673bf345cea7a7cf99746905b9e16c6b2b507e571931a0cab37ff7ff5df67fd SHA512 8d61912adeb33d06e4065aab7eaf80ab7b6e9cbc2b20dcca1cc5c74b999838aec32e805af3a6ae1262948514a619f4332ec44912ca720fa1b0e8b962165c117a
-EBUILD lxd-3.10.ebuild 6892 BLAKE2B 803831d6d665bddcc3c81d33764516b6c24f35cfe60ae69eb0e565e61fa6c2d11eef4493b6142473f86072ab8129030504d6d7c1a760d0bfd6e1c8378e9d9af6 SHA512 fc6b94e39829ec8a741963e61f7b9ea030feaf89cc6413f036586c8c683b53e629610d2907b673c04c22e50e6d349b006987b0b83e4969c5f4fc60e0719baa29
-EBUILD lxd-3.7.ebuild 6774 BLAKE2B 9ff0ba0be0f774c308b73e85423a8bc25889c161db96341d689adfbf5fcb9c7395b0d6fb5898a55e78ccf98363c7fef435955d46f3435fa1f6eb28e91b55998b SHA512 c1b0d28b58c01ddde55fbf7b87c3ff9ac3306429d9b79741c19d11acaf4c4cce8407676b3e66ba8ff1cc1d521a6fdcf26485637a0429c0a7f6326bad91f5c319
-EBUILD lxd-3.8.ebuild 6891 BLAKE2B bbb357a94d424fe6c33bf797079bb80e35a4b5e0d7c7a0a6144372a678b37790fa3d9f2ead0a8d226a5ea80cd6873a861ff0cc1834770aacbdbe797da18e9af8 SHA512 56a231f3ad8ace033dea0736b2ae1ad6ce3e29eddaa523457d866735291d0807365b03cc82ab3999ca940dfdc3d1edda5e16d7b58455ae47f905e616f13c3fb3
-EBUILD lxd-3.9.ebuild 6892 BLAKE2B 1fe9e958374a0b3170b64341cc40f65790ce1087092ad1b4c68e5fb414a495d12e01b2cca321653aff72adde818fef56a3a89e64b650966e7c198dd3dec67e41 SHA512 6e615e5334ea1b99d3cca78e4735f00c0169a8e3e45f8eda24d8ad0c43e4fadbd25e4995f3a7a4b564e3cbbc4f4910161e867c6f70924612eaa947e3cb1a53ec
+DIST lxd-3.11.tar.gz 27281796 BLAKE2B 640944cd929b69b7c6f935b7e3587e05b77ec71da8f20b988b831b837f86706b3cb3a81676f4ae456bf06594ea74e9ab44b87d22ddaa78209d4a0f6cbbba3483 SHA512 182a2fd6b69c8228760c26498d77f46c6bdda899018e1ab4470f2382202250582c66fc11f4c2d8d86598f19e3a62a1027dfe190342611c4a819a27ce6e39e78e
+EBUILD lxd-3.10.ebuild 6891 BLAKE2B 91296155f7a1d53ae46e594a9171945fc371c5d03276b28734d180d3eeb4a6b1ef973cdf47abadfdc2d580b5879c1aab77d517c1a9034070b64f6c43aec1c55c SHA512 a3f8525e2da1cba2c1ce2ed4f05ec13f78faa7c76a90e08d11eea5d7d3840b34c2bd0f6e3edff6759cb037974ea7c9f9b9f527fef8bafad314995c42d64fbcd1
+EBUILD lxd-3.11.ebuild 6892 BLAKE2B 803831d6d665bddcc3c81d33764516b6c24f35cfe60ae69eb0e565e61fa6c2d11eef4493b6142473f86072ab8129030504d6d7c1a760d0bfd6e1c8378e9d9af6 SHA512 fc6b94e39829ec8a741963e61f7b9ea030feaf89cc6413f036586c8c683b53e629610d2907b673c04c22e50e6d349b006987b0b83e4969c5f4fc60e0719baa29
MISC metadata.xml 1033 BLAKE2B d50b256487cc43a6d9e529edaafedb5f7f4eb1bb3ec4a8eb5f8ad892f865652e6dc100fe699a5b07a55cbfb5f32ed8127cbc2e9e68befc2a37f4e1d24afbfc78 SHA512 82684b99e51f524ed8201eb2439c4aaadd1a6403287be2febc908c16290f412930fe415d6a1a7e3712b9fbf64111991b01bc74beab07a745c78e4072698aa81c
diff --git a/app-emulation/lxd/lxd-3.10.ebuild b/app-emulation/lxd/lxd-3.10.ebuild
index 988a505aa241..a330cfbac4e1 100644
--- a/app-emulation/lxd/lxd-3.10.ebuild
+++ b/app-emulation/lxd/lxd-3.10.ebuild
@@ -8,7 +8,7 @@ HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
LICENSE="Apache-2.0 BSD BSD-2 LGPL-3 MIT MPL-2.0"
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="amd64"
IUSE="+daemon +ipv6 +dnsmasq nls test tools"
diff --git a/app-emulation/lxd/lxd-3.9.ebuild b/app-emulation/lxd/lxd-3.11.ebuild
index 418cd000141c..988a505aa241 100644
--- a/app-emulation/lxd/lxd-3.9.ebuild
+++ b/app-emulation/lxd/lxd-3.11.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
DESCRIPTION="Fast, dense and secure container management"
HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
diff --git a/app-emulation/lxd/lxd-3.7.ebuild b/app-emulation/lxd/lxd-3.7.ebuild
deleted file mode 100644
index 7f3ceabdddf2..000000000000
--- a/app-emulation/lxd/lxd-3.7.ebuild
+++ /dev/null
@@ -1,238 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="Fast, dense and secure container management"
-HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
-
-LICENSE="Apache-2.0 BSD BSD-2 LGPL-3 MIT MPL-2.0"
-SLOT="0"
-KEYWORDS="amd64"
-
-IUSE="+daemon +ipv6 +dnsmasq nls test tools"
-
-inherit autotools bash-completion-r1 linux-info systemd user
-
-SRC_URI="https://linuxcontainers.org/downloads/${PN}/${P}.tar.gz"
-
-DEPEND="
- dev-lang/tcl
- >=dev-lang/go-1.9.4
- dev-libs/libuv
- dev-libs/protobuf
- nls? ( sys-devel/gettext )
- test? (
- app-misc/jq
- net-misc/curl
- sys-devel/gettext
- )
-"
-
-RDEPEND="
- daemon? (
- app-arch/xz-utils
- >=app-emulation/lxc-2.0.7[seccomp]
- dev-libs/libuv
- dev-libs/lzo
- dev-util/xdelta:3
- dnsmasq? (
- net-dns/dnsmasq[dhcp,ipv6?]
- )
- net-firewall/ebtables
- net-firewall/iptables[ipv6?]
- net-libs/libnfnetlink
- net-misc/rsync[xattr]
- sys-apps/iproute2[ipv6?]
- sys-fs/fuse
- sys-fs/lxcfs
- sys-fs/squashfs-tools
- virtual/acl
- )
-"
-
-CONFIG_CHECK="
- ~BRIDGE
- ~DUMMY
- ~IP6_NF_NAT
- ~IP6_NF_TARGET_MASQUERADE
- ~IPV6
- ~IP_NF_NAT
- ~IP_NF_TARGET_MASQUERADE
- ~MACVLAN
- ~NETFILTER_XT_MATCH_COMMENT
- ~NET_IPGRE
- ~NET_IPGRE_DEMUX
- ~NET_IPIP
- ~NF_NAT_MASQUERADE_IPV4
- ~NF_NAT_MASQUERADE_IPV6
- ~VXLAN
-"
-
-ERROR_BRIDGE="BRIDGE: needed for network commands"
-ERROR_DUMMY="DUMMY: needed for network commands"
-ERROR_IP6_NF_NAT="IP6_NF_NAT: needed for network commands"
-ERROR_IP6_NF_TARGET_MASQUERADE="IP6_NF_TARGET_MASQUERADE: needed for network commands"
-ERROR_IPV6="IPV6: needed for network commands"
-ERROR_IP_NF_NAT="IP_NF_NAT: needed for network commands"
-ERROR_IP_NF_TARGET_MASQUERADE="IP_NF_TARGET_MASQUERADE: needed for network commands"
-ERROR_MACVLAN="MACVLAN: needed for network commands"
-ERROR_NETFILTER_XT_MATCH_COMMENT="NETFILTER_XT_MATCH_COMMENT: needed for network commands"
-ERROR_NET_IPGRE="NET_IPGRE: needed for network commands"
-ERROR_NET_IPGRE_DEMUX="NET_IPGRE_DEMUX: needed for network commands"
-ERROR_NET_IPIP="NET_IPIP: needed for network commands"
-ERROR_NF_NAT_MASQUERADE_IPV4="NF_NAT_MASQUERADE_IPV4: needed for network commands"
-ERROR_NF_NAT_MASQUERADE_IPV6="NF_NAT_MASQUERADE_IPV6: needed for network commands"
-ERROR_VXLAN="VXLAN: needed for network commands"
-
-EGO_PN="github.com/lxc/lxd"
-
-src_prepare() {
- eapply_user
- eapply "${FILESDIR}/de-translation-newline-1.patch"
- eapply "${FILESDIR}/ptbr-translation-newline.patch"
-
- cd "${S}/dist/dqlite" || die "Can't cd to dqlite dir"
- eautoreconf
-}
-
-src_configure() {
- export GOPATH="${S}/dist"
- cd "${GOPATH}/sqlite" || die "Can't cd to sqlite dir"
- econf --enable-replication --disable-amalgamation --disable-tcl --libdir="${EPREFIX}/usr/lib/lxd"
-
- cd "${GOPATH}/dqlite" || die "Can't cd to dqlite dir"
- PKG_CONFIG_PATH="${GOPATH}/sqlite/" econf --libdir=${EPREFIX}/usr/lib/lxd
-}
-
-src_compile() {
- export GOPATH="${S}/dist"
-
- cd "${GOPATH}/sqlite" || die "Can't cd to sqlite dir"
- emake
-
- cd "${GOPATH}/dqlite" || die "Can't cd to dqlite dir"
- emake CFLAGS="-I${GOPATH}/sqlite" LDFLAGS="-L${GOPATH}/sqlite"
-
- # We don't use the Makefile here because it builds targets with the
- # assumption that `pwd` is in a deep gopath namespace, which we're not.
- # It's simpler to manually call "go install" than patching the Makefile.
- cd "${S}"
- go install -v -x ${EGO_PN}/lxc || die "Failed to build the client"
-
- if use daemon; then
-
- # LXD depends on a patched, bundled sqlite with replication
- # capabilities.
- export CGO_CFLAGS="-I${GOPATH}/sqlite/ -I${GOPATH}/dqlite/include/"
- export CGO_LDFLAGS="-L${GOPATH}/sqlite/.libs/ -L${GOPATH}/dqlite/.libs/ -Wl,-rpath,${EPREFIX}/usr/lib/lxd"
- export LD_LIBRARY_PATH="${GOPATH}/sqlite/.libs/:${GOPATH}/dqlite/.libs/"
-
- go install -v -x -tags libsqlite3 ${EGO_PN}/lxd || die "Failed to build the daemon"
- fi
-
- if use tools; then
- go install -v -x ${EGO_PN}/fuidshift || die "Failed to build fuidshift"
- go install -v -x ${EGO_PN}/lxc-to-lxd || die "Failed to build lxc-to-lxd"
- go install -v -x ${EGO_PN}/lxd-benchmark || die "Failed to build lxd-benchmark"
- fi
-
- use nls && emake build-mo
-}
-
-src_test() {
- if use daemon; then
- export GOPATH="${S}/dist"
- # This is mostly a copy/paste from the Makefile's "check" rule, but
- # patching the Makefile to work in a non "fully-qualified" go namespace
- # was more complicated than this modest copy/paste.
- # Also: sorry, for now a network connection is needed to run tests.
- # Will properly bundle test dependencies later.
- go get -v -x github.com/rogpeppe/godeps
- go get -v -x github.com/remyoudompheng/go-misc/deadcode
- go get -v -x github.com/golang/lint/golint
- go test -v ${EGO_PN}/lxd
- else
- einfo "No tests to run for client-only builds"
- fi
-}
-
-src_install() {
- local bindir="dist/bin"
- dobin ${bindir}/lxc
- if use daemon; then
-
- export GOPATH="${S}/dist"
- cd "${GOPATH}/sqlite" || die "Can't cd to sqlite dir"
- emake DESTDIR="${D}" install
-
- cd "${GOPATH}/dqlite" || die "Can't cd to dqlite dir"
- emake DESTDIR="${D}" install
-
- # Must only install libs
- rm "${D}/usr/bin/sqlite3" || die "Can't remove custom sqlite3 binary"
- rm -r "${D}/usr/include" || die "Can't remove include directory"
-
- cd "${S}" || die "Can't cd to \${S}"
- dosbin ${bindir}/lxd
- fi
-
- if use tools; then
- dobin ${bindir}/fuidshift
- dobin ${bindir}/lxc-to-lxd
- dobin ${bindir}/lxd-benchmark
- fi
-
- if use nls; then
- domo po/*.mo
- fi
-
- if use daemon; then
- newinitd "${FILESDIR}"/${PN}.initd lxd
- newconfd "${FILESDIR}"/${PN}.confd lxd
-
- systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service
- fi
-
- newbashcomp scripts/bash/lxd-client lxc
-
- dodoc AUTHORS doc/*
-}
-
-pkg_postinst() {
- elog
- elog "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
- elog "including a Quick Start."
-
- # The messaging below only applies to daemon installs
- use daemon || return 0
-
- # The control socket will be owned by (and writeable by) this group.
- enewgroup lxd
-
- # Ubuntu also defines an lxd user but it appears unused (the daemon
- # must run as root)
-
- elog
- elog "Though not strictly required, some features are enabled at run-time"
- elog "when the relevant helper programs are detected:"
- elog "- sys-apps/apparmor"
- elog "- sys-fs/btrfs-progs"
- elog "- sys-fs/lvm2"
- elog "- sys-fs/zfs"
- elog "- sys-process/criu"
- elog
- elog "Since these features can't be disabled at build-time they are"
- elog "not USE-conditional."
- elog
- elog "Be sure to add your local user to the lxd group."
- elog
- elog "Networks with bridge.mode=fan are unsupported due to requiring"
- elog "a patched kernel and iproute2."
-}
-
-# TODO:
-# - man page, I don't see cobra generating it
-# - maybe implement LXD_CLUSTER_UPDATE per
-# https://discuss.linuxcontainers.org/t/lxd-3-5-has-been-released/2656
-# EM I'm not convinced it's a good design.
diff --git a/app-emulation/lxd/lxd-3.8.ebuild b/app-emulation/lxd/lxd-3.8.ebuild
deleted file mode 100644
index 886ba7e161ba..000000000000
--- a/app-emulation/lxd/lxd-3.8.ebuild
+++ /dev/null
@@ -1,241 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="Fast, dense and secure container management"
-HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
-
-LICENSE="Apache-2.0 BSD BSD-2 LGPL-3 MIT MPL-2.0"
-SLOT="0"
-KEYWORDS="amd64"
-
-IUSE="+daemon +ipv6 +dnsmasq nls test tools"
-
-inherit autotools bash-completion-r1 linux-info systemd user
-
-SRC_URI="https://linuxcontainers.org/downloads/${PN}/${P}.tar.gz"
-
-DEPEND="
- dev-lang/tcl
- >=dev-lang/go-1.9.4
- dev-libs/libuv
- dev-libs/protobuf
- nls? ( sys-devel/gettext )
- test? (
- app-misc/jq
- net-misc/curl
- sys-devel/gettext
- )
-"
-
-RDEPEND="
- daemon? (
- app-arch/xz-utils
- >=app-emulation/lxc-2.0.7[seccomp]
- dev-libs/libuv
- dev-libs/lzo
- dev-util/xdelta:3
- dnsmasq? (
- net-dns/dnsmasq[dhcp,ipv6?]
- )
- net-firewall/ebtables
- net-firewall/iptables[ipv6?]
- net-libs/libnfnetlink
- net-libs/libnsl:0=
- net-misc/rsync[xattr]
- sys-apps/iproute2[ipv6?]
- sys-fs/fuse
- sys-fs/lxcfs
- sys-fs/squashfs-tools
- virtual/acl
- )
-"
-
-CONFIG_CHECK="
- ~BRIDGE
- ~DUMMY
- ~IP6_NF_NAT
- ~IP6_NF_TARGET_MASQUERADE
- ~IPV6
- ~IP_NF_NAT
- ~IP_NF_TARGET_MASQUERADE
- ~MACVLAN
- ~NETFILTER_XT_MATCH_COMMENT
- ~NET_IPGRE
- ~NET_IPGRE_DEMUX
- ~NET_IPIP
- ~NF_NAT_MASQUERADE_IPV4
- ~NF_NAT_MASQUERADE_IPV6
- ~VXLAN
-"
-
-ERROR_BRIDGE="BRIDGE: needed for network commands"
-ERROR_DUMMY="DUMMY: needed for network commands"
-ERROR_IP6_NF_NAT="IP6_NF_NAT: needed for network commands"
-ERROR_IP6_NF_TARGET_MASQUERADE="IP6_NF_TARGET_MASQUERADE: needed for network commands"
-ERROR_IPV6="IPV6: needed for network commands"
-ERROR_IP_NF_NAT="IP_NF_NAT: needed for network commands"
-ERROR_IP_NF_TARGET_MASQUERADE="IP_NF_TARGET_MASQUERADE: needed for network commands"
-ERROR_MACVLAN="MACVLAN: needed for network commands"
-ERROR_NETFILTER_XT_MATCH_COMMENT="NETFILTER_XT_MATCH_COMMENT: needed for network commands"
-ERROR_NET_IPGRE="NET_IPGRE: needed for network commands"
-ERROR_NET_IPGRE_DEMUX="NET_IPGRE_DEMUX: needed for network commands"
-ERROR_NET_IPIP="NET_IPIP: needed for network commands"
-ERROR_NF_NAT_MASQUERADE_IPV4="NF_NAT_MASQUERADE_IPV4: needed for network commands"
-ERROR_NF_NAT_MASQUERADE_IPV6="NF_NAT_MASQUERADE_IPV6: needed for network commands"
-ERROR_VXLAN="VXLAN: needed for network commands"
-
-EGO_PN="github.com/lxc/lxd"
-
-src_prepare() {
- eapply_user
- eapply "${FILESDIR}/de-translation-newline-1.patch"
- eapply "${FILESDIR}/ptbr-translation-newline.patch"
-
- cd "${S}/dist/dqlite" || die "Can't cd to dqlite dir"
- eautoreconf
-}
-
-src_configure() {
- export GOPATH="${S}/dist"
- cd "${GOPATH}/sqlite" || die "Can't cd to sqlite dir"
- econf --enable-replication --disable-amalgamation --disable-tcl --libdir="${EPREFIX}/usr/lib/lxd"
-
- cd "${GOPATH}/dqlite" || die "Can't cd to dqlite dir"
- PKG_CONFIG_PATH="${GOPATH}/sqlite/" econf --libdir=${EPREFIX}/usr/lib/lxd
-}
-
-src_compile() {
- export GOPATH="${S}/dist"
-
- cd "${GOPATH}/sqlite" || die "Can't cd to sqlite dir"
- emake
-
- cd "${GOPATH}/dqlite" || die "Can't cd to dqlite dir"
- emake CFLAGS="-I${GOPATH}/sqlite" LDFLAGS="-L${GOPATH}/sqlite"
-
- # We don't use the Makefile here because it builds targets with the
- # assumption that `pwd` is in a deep gopath namespace, which we're not.
- # It's simpler to manually call "go install" than patching the Makefile.
- cd "${S}"
- go install -v -x ${EGO_PN}/lxc || die "Failed to build the client"
-
- if use daemon; then
-
- # LXD depends on a patched, bundled sqlite with replication
- # capabilities.
- export CGO_CFLAGS="-I${GOPATH}/sqlite/ -I${GOPATH}/dqlite/include/"
- export CGO_LDFLAGS="-L${GOPATH}/sqlite/.libs/ -L${GOPATH}/dqlite/.libs/ -Wl,-rpath,${EPREFIX}/usr/lib/lxd"
- export LD_LIBRARY_PATH="${GOPATH}/sqlite/.libs/:${GOPATH}/dqlite/.libs/"
-
- go install -v -x -tags libsqlite3 ${EGO_PN}/lxd || die "Failed to build the daemon"
- fi
-
- if use tools; then
- go install -v -x ${EGO_PN}/fuidshift || die "Failed to build fuidshift"
- go install -v -x ${EGO_PN}/lxc-to-lxd || die "Failed to build lxc-to-lxd"
- go install -v -x ${EGO_PN}/lxd-benchmark || die "Failed to build lxd-benchmark"
- go install -v -x ${EGO_PN}/lxd-p2c || die "Failed to build lxd-p2c"
- fi
-
- use nls && emake build-mo
-}
-
-src_test() {
- if use daemon; then
- export GOPATH="${S}/dist"
- # This is mostly a copy/paste from the Makefile's "check" rule, but
- # patching the Makefile to work in a non "fully-qualified" go namespace
- # was more complicated than this modest copy/paste.
- # Also: sorry, for now a network connection is needed to run tests.
- # Will properly bundle test dependencies later.
- go get -v -x github.com/rogpeppe/godeps
- go get -v -x github.com/remyoudompheng/go-misc/deadcode
- go get -v -x github.com/golang/lint/golint
- go test -v ${EGO_PN}/lxd
- else
- einfo "No tests to run for client-only builds"
- fi
-}
-
-src_install() {
- local bindir="dist/bin"
- dobin ${bindir}/lxc
- if use daemon; then
-
- export GOPATH="${S}/dist"
- cd "${GOPATH}/sqlite" || die "Can't cd to sqlite dir"
- emake DESTDIR="${D}" install
-
- cd "${GOPATH}/dqlite" || die "Can't cd to dqlite dir"
- emake DESTDIR="${D}" install
-
- # Must only install libs
- rm "${D}/usr/bin/sqlite3" || die "Can't remove custom sqlite3 binary"
- rm -r "${D}/usr/include" || die "Can't remove include directory"
-
- cd "${S}" || die "Can't cd to \${S}"
- dosbin ${bindir}/lxd
- fi
-
- if use tools; then
- dobin ${bindir}/fuidshift
- dobin ${bindir}/lxc-to-lxd
- dobin ${bindir}/lxd-benchmark
- dobin ${bindir}/lxd-p2c
- fi
-
- if use nls; then
- domo po/*.mo
- fi
-
- if use daemon; then
- newinitd "${FILESDIR}"/${PN}.initd lxd
- newconfd "${FILESDIR}"/${PN}.confd lxd
-
- systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service
- fi
-
- newbashcomp scripts/bash/lxd-client lxc
-
- dodoc AUTHORS doc/*
-}
-
-pkg_postinst() {
- elog
- elog "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
- elog "including a Quick Start."
-
- # The messaging below only applies to daemon installs
- use daemon || return 0
-
- # The control socket will be owned by (and writeable by) this group.
- enewgroup lxd
-
- # Ubuntu also defines an lxd user but it appears unused (the daemon
- # must run as root)
-
- elog
- elog "Though not strictly required, some features are enabled at run-time"
- elog "when the relevant helper programs are detected:"
- elog "- sys-apps/apparmor"
- elog "- sys-fs/btrfs-progs"
- elog "- sys-fs/lvm2"
- elog "- sys-fs/zfs"
- elog "- sys-process/criu"
- elog
- elog "Since these features can't be disabled at build-time they are"
- elog "not USE-conditional."
- elog
- elog "Be sure to add your local user to the lxd group."
- elog
- elog "Networks with bridge.mode=fan are unsupported due to requiring"
- elog "a patched kernel and iproute2."
-}
-
-# TODO:
-# - man page, I don't see cobra generating it
-# - maybe implement LXD_CLUSTER_UPDATE per
-# https://discuss.linuxcontainers.org/t/lxd-3-5-has-been-released/2656
-# EM I'm not convinced it's a good design.