summaryrefslogtreecommitdiff
path: root/app-containers/lxd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-12 23:32:21 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-12 23:32:21 +0000
commit05644e4ce4886d97a712fcdca7d4144a7ced4191 (patch)
tree3954657c7c37c0621e63080b0e0530b9e1d8ad50 /app-containers/lxd
parent3bcdaa6f06fae7659c3ac8294503c45e6736a2e1 (diff)
gentoo auto-resync : 12:12:2023 - 23:32:21
Diffstat (limited to 'app-containers/lxd')
-rw-r--r--app-containers/lxd/Manifest3
-rw-r--r--app-containers/lxd/lxd-5.20.ebuild188
2 files changed, 191 insertions, 0 deletions
diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 6e97df1a028b..96c235e2dd71 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -13,7 +13,10 @@ DIST lxd-5.0.2.tar.gz 16258766 BLAKE2B a0d4e3108664724c064fb8c16031ff7dfa3f49735
DIST lxd-5.0.2.tar.gz.asc 833 BLAKE2B 606cae1439148060acd3fb04fdb108654a351ce2b7484081f7874ab2b0af8de2b5befc5a5409a94af0da25308622234db2e3b411edb20324df458fe85f46ac21 SHA512 884c921a263a8baf2d94958c72e232a0a47d0747f5a9d36ed8fc270edfa18dfc240d1e858e75dcc03eae921dae08d3ddfd34d9146d1510de6a09031da26aaccc
DIST lxd-5.19.tar.gz 22506800 BLAKE2B 94940a9e886d005495f8888d4491e5a8f8beee60c44051c767d32fd3dead9a93c1e546c0117207aefb60280a289d464615fba7e80385df23f397388a88be1386 SHA512 11d712245fc9cb77e7eabc748cfac38c1936be1c49b8dc4a2a7ebc06d0797f4d0d728b275cee27f9c2c64bc13275fc29ac57fc8d0dce9c24d6636b51248e9b4f
DIST lxd-5.19.tar.gz.asc 833 BLAKE2B 591f12c8e93199061b588bdffded5d159f714d91c68a0d8003590bc672cec787418611f0597fe8e137b3c2b61e8171ca6393db912b8f55ded39db934d55d3df1 SHA512 2337d42f0a7dfdbb2870511442f05e1dd9c214e1b0d96b20ee677a3a345bf41c15c0b1cb0d42ddd15766813e4ae405577f8b49fa60fdc541fb3db35c0bc569ed
+DIST lxd-5.20.tar.gz 22825821 BLAKE2B 616e6659c75e87027883dc6643c8c42cce75f69e7781b93371ca8d00078a7c5086679d70dfd5497ec6be9f917f07d81ef826fc0bdd09317d7b98e435f053c465 SHA512 cf593f967d9d595577ab9b05bad99d04b9c30031461fdd4769f4746e651b3aa8e94fca53548da1aec22ff312a91ff46710ab88043a633fbd78ffafe130fed3e3
+DIST lxd-5.20.tar.gz.asc 833 BLAKE2B 03d469429fee81e6b061de458eeffe7aacf19ccc1dacb73e2e9cf3530439c82fcd016496aa7757d3ff54af2da7372c5ecf0642b3adddff950065b1ceb1e64103 SHA512 e48af466194523903a472a246dfa81cd67ec4ad7b1be6edb1ce9135945be8a810fca3f98de5a4d8b93390119cb0e4eda78a323d5dea0330b0c92e755781982a3
EBUILD lxd-4.0.9-r4.ebuild 4910 BLAKE2B e49519f08b5214bf26ac9859f4fc514361aae85f6e6ac9bc80463e23b54547ce724682eba8dcbf34bb9a024d615f58fc717b20612c2a97db4c974b339df7cad1 SHA512 85b77939031b81a5bfa544d04b2274ed45abb6337faa0db9bde6a6ac4624230b5c69eb469ae1035e7e79a2219e0d4538d07122cf5c803a90c6ae5df26f1bce5b
EBUILD lxd-5.0.2-r3.ebuild 5899 BLAKE2B b4e6beb45164e5bed163cba3bf1cd12d5431ce32d1bf009a4d4b698da08d95f933e18d19b774ea480e5ca0ad3164b1ec1c316ca7a4fc88109aea033382cf326f SHA512 e264f5fc588460fa670bba08cb22e8dbba1cd42aa0dc72414a4893e299d8ec50f7733880b8605374755e0ff26b3b45a03e3d46ae1b6fd3cd815f32f0408b35f1
EBUILD lxd-5.19.ebuild 5005 BLAKE2B a371a53672b07efa199bae9495f04053898a9c970e371492f5043c5e992b786411fa9a3d8a8a0484abb3e8332edf01f25334b282cc92ebe57b9756fe55caea39 SHA512 87ffbcc2800fad290c9d95ed654b56e2ac8341863c01555c34d524a49877d47f32abd12bda30cbbca6eabd9bc5129c0219319c0e1afd6b35f41b65b455931c0e
+EBUILD lxd-5.20.ebuild 5020 BLAKE2B 734801638d1567d7200e7e3f3c890d37c820eaf51521f10b5e03d422cbf724e7491e25e31860f8b1cd4d431ce95de7dbd71a417c8176d19bc0653d07172e5d58 SHA512 bd6635b11cbdb71ec8efe29a22d4273937c51887f4abcfdb9eb181f12f2aea35c1b1584c3d9feaf118176da9f7caf64e9cf6de62f12de78243c5c2205c8cab83
MISC metadata.xml 1607 BLAKE2B efd749f3764c659858a53c597b47ed2d6d6bb33e8c15700f01eedb9b78ea925ce8aa27578249b190be1da52b3855b895445bf866ddb8d5bb13db5daf2d0027a8 SHA512 e9d1ca983014ec8ac8ce8b1635d2b2cda308c615650c1350a09bd40870b2bde0c771fb7577d1e949bd73cf9c340a44b63a638b15ef66d93d947105edb1f4c46d
diff --git a/app-containers/lxd/lxd-5.20.ebuild b/app-containers/lxd/lxd-5.20.ebuild
new file mode 100644
index 000000000000..13dccccabf6c
--- /dev/null
+++ b/app-containers/lxd/lxd-5.20.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 go-module linux-info optfeature systemd verify-sig
+
+DESCRIPTION="Modern, secure and powerful system container and virtual machine manager"
+HOMEPAGE="https://ubuntu.com/lxd https://github.com/canonical/lxd"
+SRC_URI="https://github.com/canonical/lxd/releases/download/${P}/${P}.tar.gz
+ verify-sig? ( https://github.com/canonical/lxd/releases/download/${P}/${P}.tar.gz.asc
+)"
+
+LICENSE="Apache-2.0 AGPL-3+ BSD LGPL-3 MIT"
+SLOT="0/stable"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="apparmor nls"
+
+DEPEND="acct-group/lxd
+ app-arch/xz-utils
+ >=app-containers/lxc-5.0.0:=[apparmor?,seccomp(+)]
+ dev-db/sqlite:3
+ >=dev-libs/dqlite-1.13.0:=
+ dev-libs/lzo
+ >=dev-libs/raft-0.17.1:=[lz4]
+ >=dev-util/xdelta-3.0[lzma(+)]
+ net-dns/dnsmasq[dhcp]
+ sys-libs/libcap
+ virtual/udev"
+RDEPEND="${DEPEND}
+ || (
+ net-firewall/nftables[json]
+ (
+ net-firewall/ebtables
+ net-firewall/iptables
+ )
+ )
+ sys-apps/iproute2
+ sys-fs/fuse:3
+ >=sys-fs/lxcfs-5.0.0
+ sys-fs/squashfs-tools[lzma]
+ virtual/acl"
+BDEPEND=">=dev-lang/go-1.20
+ nls? ( sys-devel/gettext )
+ verify-sig? ( sec-keys/openpgp-keys-canonical )"
+
+CONFIG_CHECK="
+ ~CGROUPS
+ ~IPC_NS
+ ~NET_NS
+ ~PID_NS
+
+ ~SECCOMP
+ ~USER_NS
+ ~UTS_NS
+
+ ~KVM
+ ~MACVTAP
+ ~VHOST_VSOCK
+"
+
+ERROR_IPC_NS="CONFIG_IPC_NS is required."
+ERROR_NET_NS="CONFIG_NET_NS is required."
+ERROR_PID_NS="CONFIG_PID_NS is required."
+ERROR_SECCOMP="CONFIG_SECCOMP is required."
+ERROR_UTS_NS="CONFIG_UTS_NS is required."
+
+WARNING_KVM="CONFIG_KVM and CONFIG_KVM_AMD/-INTEL is required for virtual machines."
+WARNING_MACVTAP="CONFIG_MACVTAP is required for virtual machines."
+WARNING_VHOST_VSOCK="CONFIG_VHOST_VSOCK is required for virtual machines."
+
+# Go magic.
+QA_PREBUILT="/usr/bin/fuidshift
+ /usr/bin/lxc
+ /usr/bin/lxc-to-lxd
+ /usr/bin/lxd-agent
+ /usr/bin/lxd-benchmark
+ /usr/bin/lxd-migrate
+ /usr/sbin/lxd"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/canonical.asc
+
+# The testsuite must be run as root.
+# make: *** [Makefile:156: check] Error 1
+RESTRICT="test"
+
+GOPATH="${S}/_dist"
+
+src_prepare() {
+ export GOPATH="${S}/_dist"
+
+ default
+
+ sed -i \
+ -e "s:\./configure:./configure --prefix=/usr --libdir=${EPREFIX}/usr/lib/lxd:g" \
+ -e "s:make:make ${MAKEOPTS}:g" \
+ Makefile || die
+
+ # Fix hardcoded ovmf file path, see bug 763180
+ sed -i \
+ -e "s:/usr/share/OVMF:/usr/share/edk2-ovmf:g" \
+ -e "s:OVMF_VARS.ms.fd:OVMF_VARS.fd:g" \
+ doc/environment.md \
+ lxd/apparmor/instance.go \
+ lxd/apparmor/instance_qemu.go \
+ lxd/instance/drivers/driver_qemu.go || die "Failed to fix hardcoded ovmf paths."
+
+ # Fix hardcoded virtfs-proxy-helper file path, see bug 798924
+ sed -i \
+ -e "s:/usr/lib/qemu/virtfs-proxy-helper:/usr/libexec/virtfs-proxy-helper:g" \
+ lxd/device/device_utils_disk.go || die "Failed to fix virtfs-proxy-helper path."
+
+ cp "${FILESDIR}"/lxd-4.0.9-r1.service "${T}"/lxd.service || die
+ if use apparmor; then
+ sed -i \
+ '/^EnvironmentFile=.*/a ExecStartPre=\/usr\/libexec\/lxc\/lxc-apparmor-load' \
+ "${T}"/lxd.service || die
+ fi
+
+ # Disable -Werror's from go modules.
+ find "${S}" -name "cgo.go" -exec sed -i "s/ -Werror / /g" {} + || die
+}
+
+src_configure() { :; }
+
+src_compile() {
+ export GOPATH="${S}/_dist"
+ export CGO_LDFLAGS_ALLOW="-Wl,-z,now"
+
+ for k in fuidshift lxd-benchmark lxc lxc-to-lxd; do
+ go install -v -x "${S}/${k}" || die "failed compiling ${k}"
+ done
+
+ go install -v -x -tags libsqlite3 "${S}"/lxd || die "Failed to build the daemon"
+
+ # Needs to be built statically
+ CGO_ENABLED=0 go install -v -tags netgo "${S}"/lxd-migrate
+ CGO_ENABLED=0 go install -v -tags agent,netgo "${S}"/lxd-agent
+
+ use nls && emake build-mo
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ export GOPATH="${S}/_dist"
+ local bindir="_dist/bin"
+
+ dosbin ${bindir}/lxd
+
+ for l in fuidshift lxd-agent lxd-benchmark lxd-migrate lxc lxc-to-lxd; do
+ dobin ${bindir}/${l}
+ done
+
+ newbashcomp scripts/bash/lxd-client lxc
+
+ newconfd "${FILESDIR}"/lxd-4.0.0.confd lxd
+ newinitd "${FILESDIR}"/lxd-5.0.2-r1.initd lxd
+
+ systemd_dounit "${T}"/lxd.service
+ systemd_newunit "${FILESDIR}"/lxd-containers-4.0.0.service lxd-containers.service
+ systemd_newunit "${FILESDIR}"/lxd-4.0.0.socket lxd.socket
+
+ dodoc AUTHORS
+ dodoc -r doc/*
+ use nls && domo po/*.mo
+}
+
+pkg_postinst() {
+ elog
+ elog "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
+ elog "including a Quick Start."
+ elog "For virtual machine support, see:"
+ elog "https://wiki.gentoo.org/wiki/LXD#Virtual_machines"
+ elog
+ elog "Please run 'lxc-checkconfig' to see all optional kernel features."
+ elog
+ optfeature "virtual machine support" app-emulation/qemu[spice,usbredir,virtfs]
+ optfeature "btrfs storage backend" sys-fs/btrfs-progs
+ optfeature "ipv6 support" net-dns/dnsmasq[ipv6]
+ optfeature "full lxd-migrate support" net-misc/rsync
+ optfeature "lvm2 storage backend" sys-fs/lvm2
+ optfeature "zfs storage backend" sys-fs/zfs
+ elog
+ elog "Be sure to add your local user to the lxd group."
+}