summaryrefslogtreecommitdiff
path: root/app-emulation/lxd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-04 08:53:53 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-04 08:53:53 +0100
commite3872864be25f7421015bef2732fa57c0c9fb726 (patch)
tree9cb29a544215119b5c5538e37211b994ce1c87ae /app-emulation/lxd
parent480486b52ea64765faf696c88b2c6a26a5a454d4 (diff)
gentoo resync : 04.08.2018
Diffstat (limited to 'app-emulation/lxd')
-rw-r--r--app-emulation/lxd/Manifest4
-rw-r--r--app-emulation/lxd/lxd-3.2.ebuild2
-rw-r--r--app-emulation/lxd/lxd-3.3.ebuild183
3 files changed, 187 insertions, 2 deletions
diff --git a/app-emulation/lxd/Manifest b/app-emulation/lxd/Manifest
index e6f75e1bf3fd..8bdf568e3249 100644
--- a/app-emulation/lxd/Manifest
+++ b/app-emulation/lxd/Manifest
@@ -51,7 +51,9 @@ DIST github.com-syndtr-gocapability-db04d3cc01c8b54962a58ec7e491717d06cfcc16.tar
DIST lxd-2.21.tar.gz 882352 BLAKE2B 80542bcc03c05667ee0207dfbfd2bf41c5a6ef69178aec06ad62fe3521ed012ed9b82c68c0254e0299e8e1dfd274a0622f32bde730480a950ab6ba15ddae5f4b SHA512 9a8ec3a97e4c861a80311dbdecbf5a485c0af85d6ba6b20680ca17e6ac877de3f27cfdcf0a111ba0db2b7c562dfe2f41336b562b7c13350c4543505b3c17357e
DIST lxd-3.1.tar.gz 27979442 BLAKE2B 0b74e3f76a7ab835b042b52b469a6fe11e7077d567e0658d13fab2192fd25d99518d65ba319c981a2e4677319e280cccae26f70ef99e9911264dc028ca5628fd SHA512 61f64d08dd80f7f676f386912f4dfc0d0af38cce0287de7865123b9da667b54ab91d22b76ffe03480e04ae0fbd8dc837d7d519d0e34409377c3d7e6624bf636c
DIST lxd-3.2.tar.gz 28183660 BLAKE2B 9aabc9fd0bd66d3b4e0178448a65ca39c69e4e7a14d01309e0e023501de1c17b2b7887a9da5b84fcfde27db3f521cce3451beace9955232da9bd5e5136bc0043 SHA512 82c37e87d75e328a29b1f2876a24fedec43a253bb72f3ea55fa9cdb928d11947eda723a01e758f90ef77ed4492f86ec6dd5f1f88240d05e771d926dfdc9888fb
+DIST lxd-3.3.tar.gz 28414680 BLAKE2B 7f3eecf400761548935e6e3c81d894379cd667ffbe6d8ef67a7dd3ad4f1c13846f524fcefc4cdc306674fb990706bda0b2c4ef390f320c41561fa86cf610586c SHA512 ed5d792c1080f2be7f48f34051fbfa28d138b4ccb5405edb13cd630776ec34312da491a1881f77dddbe1a121e589b44952e73ce1e61f2cba72243f3b8f4c0177
EBUILD lxd-2.21.ebuild 7883 BLAKE2B f933f15dd551c335bbe7cf95a9dbe35f4b272ff720e7aa080f984705e899e5da47c4e6f0617860896467bcec481a50591f6f3c0f731f1f2ff2df0178aaaf8882 SHA512 27167d7c8a2dc7aa988016cbb90bd3ae272732a709d8938ae3b77ffbacf12b818df27bf1ddaec9c3372403ad1380dcc7b9df6f8bce237742d02fb881b60aa552
EBUILD lxd-3.1.ebuild 5334 BLAKE2B 14511c25eb06a4c72ea07c3f297aaec32c9d1dd78248620c6f8326f1b74fe23bf4b149041ad23381c8d196da2a3872b83da53255c98234263b9de39618bfb739 SHA512 f7e998cbfaa91ce34eda0e1694091a51da236dc5d82e10380f66484c0c1454dd852ad5af605e8280a9f03c30aa35292c88014d9393b5a9a29ce12d24ff1831fb
-EBUILD lxd-3.2.ebuild 5378 BLAKE2B 400bea1de1cd22ab422a89bcbbd7449b7009f0fbf756d1fa578133c7b9c7de3804cc01d725ace16c6063f04fe18816fc28f6eb688437ef1173c70d929ddb882a SHA512 c26e49f6a8e242e5ed3be12a9e4a0f5a68e60471f98c5338460bd4b290093504a5d6afc8535d0989da310cddc48c3d0dfc5c00a417261ca08b7bda7d3fe07511
+EBUILD lxd-3.2.ebuild 5377 BLAKE2B 504f1656d7e12e51651198100973e398ceab70c04fcce54c98e5086f3358c60a87c916130d2ed1423a1578c91a0dcea9aa653c139790c7b754d9d7c70f454867 SHA512 2ae8e8837c1ab9694c3aaf6495252567bdaa866ac6b4b6781e1bb9e7790069ab29855d1280a9cd277c5b09312c3dc81d4c4127bee004848060350bccdf772262
+EBUILD lxd-3.3.ebuild 5443 BLAKE2B 6e73f0272c1415f7f17224bd610644be5489d87c7aee4addb054abf67d0619d848a8160864331afd1b6110480cccfef27b6aa631071539fc704a6ea9f9672394 SHA512 ba13c312f9f0dc9aca75119c1246fd7ceb97a6ffe5fdc95ee3e611ab027efe5e2fc57d0e40f32952e44a15e91a4bc3798a19b142135e31e9a334e6e076a6a030
MISC metadata.xml 966 BLAKE2B ea90426aa76918bdf1d5a90d07ad3626990cce2d7161f104a0793121aecc0430750c0e1df5fe973d1304dd6d1077b98345d489989875d1a83c54185ded58fe60 SHA512 4f95b628aa3467ba6213758bfacdd8d41922307d11c51bee12ad3cdff568ac095a0147976a913bacfa4625cc9e6d5f101c68f1077d7d8acac663c06d4411d1e7
diff --git a/app-emulation/lxd/lxd-3.2.ebuild b/app-emulation/lxd/lxd-3.2.ebuild
index 1f0f3db33a23..473f52df5378 100644
--- a/app-emulation/lxd/lxd-3.2.ebuild
+++ b/app-emulation/lxd/lxd-3.2.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"
diff --git a/app-emulation/lxd/lxd-3.3.ebuild b/app-emulation/lxd/lxd-3.3.ebuild
new file mode 100644
index 000000000000..16a412be6a96
--- /dev/null
+++ b/app-emulation/lxd/lxd-3.3.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2018 Gentoo Foundation
+# 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"
+
+inherit bash-completion-r1 linux-info systemd user
+
+SRC_URI="https://linuxcontainers.org/downloads/${PN}/${P}.tar.gz"
+
+DEPEND="
+ >=dev-lang/go-1.9.4
+ 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]
+ dnsmasq? (
+ net-dns/dnsmasq[dhcp,ipv6?]
+ )
+ net-misc/rsync[xattr]
+ sys-apps/iproute2[ipv6?]
+ 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"
+
+PATCHES=(
+ "${FILESDIR}/ja-translation-newline.patch" # https://github.com/lxc/lxd/pull/4572
+ "${FILESDIR}/de-translation-newline.patch"
+)
+
+# LXD tarball is packaged with a nice "dist" folder containing all dependencies
+# that were vendored by upstream at release time. That saves us the trouble of
+# vendoring the dependencies ourselves. This is why there was this drastic drop
+# in ebuild complexity compared to pre 3.0.0-r2 ebuilds.
+src_compile() {
+ export GOPATH="${S}/dist"
+
+ # 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.
+ #
+ # ABOUT "-tags libsqlite3": we used to link to the system's sqlite3 library
+ # but since v3.0.0, LXD depends on github.com/CanonicalLtd/dqlite which
+ # at the time of this writing, depends on patched version of sqlite with
+ # replication capabilities added. We don't have that patch in dev-db/sqlite.
+ # Therefore, we let LXD use its own private copy of sqlite.
+ go install -v -x ${EGO_PN}/lxc || die "Failed to build the client"
+
+ if use daemon; then
+ go install -v -x ${EGO_PN}/fuidshift || die "Failed to build fuidshift"
+ go install -v -x ${EGO_PN}/lxd || die "Failed to build the daemon"
+ 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
+ dosbin ${bindir}/lxd
+ dobin ${bindir}/fuidshift
+ fi
+
+ if use nls; then
+ domo po/*.mo
+ fi
+
+ if use daemon; then
+ newinitd "${FILESDIR}"/${PN}.initd lxd
+ newconfd "${FILESDIR}"/${PN}.confd.1 lxd
+
+ systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service
+ fi
+
+ newbashcomp scripts/bash/lxd-client lxc
+
+ dodoc AUTHORS README.md doc/*
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
+ einfo "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)
+
+ einfo
+ einfo "Though not strictly required, some features are enabled at run-time"
+ einfo "when the relevant helper programs are detected:"
+ einfo "- sys-apps/apparmor"
+ einfo "- sys-fs/btrfs-progs"
+ einfo "- sys-fs/lvm2"
+ einfo "- sys-fs/lxcfs"
+ einfo "- sys-fs/zfs"
+ einfo "- sys-process/criu"
+ einfo
+ einfo "Since these features can't be disabled at build-time they are"
+ einfo "not USE-conditional."
+ einfo
+ einfo "Be sure to add your local user to the lxd group."
+ einfo
+ einfo "Networks with bridge.mode=fan are unsupported due to requiring"
+ einfo "a patched kernel and iproute2."
+}