summaryrefslogtreecommitdiff
path: root/app-containers/incus
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-13 11:40:30 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-13 11:40:30 +0000
commit0ded23e9afc3d3424aef90e5cec3f2ca6d6b4c30 (patch)
tree93ef9828fae35063d273f386b2fa4a7130add56b /app-containers/incus
parent22b4e2ee9c8011b75d7c030d6129a7487494aeba (diff)
gentoo auto-resync : 13:12:2023 - 11:40:30
Diffstat (limited to 'app-containers/incus')
-rw-r--r--app-containers/incus/Manifest2
-rw-r--r--app-containers/incus/files/incus-0.3-lxd-5.20-compatibility.patch26
-rw-r--r--app-containers/incus/incus-0.3-r1.ebuild191
3 files changed, 219 insertions, 0 deletions
diff --git a/app-containers/incus/Manifest b/app-containers/incus/Manifest
index ac702f16a460..65cf811b65ab 100644
--- a/app-containers/incus/Manifest
+++ b/app-containers/incus/Manifest
@@ -2,8 +2,10 @@ AUX incus-0.1.confd 604 BLAKE2B 05239d520a5792971dd79a042d0d8ff06414b5822a774065
AUX incus-0.1.initd 1746 BLAKE2B 57cc012f4319717cc43897660c76abdab6a8d2ed4c949848c83760f04937dc2274f15a61d7d794eafaaf16eb9db7a9c3ab3880277de934ff861ec4e8835cd165 SHA512 97ab528676071160cfccdd2c9e1e6a18f9c35fbb11db70f8fcd675e7b1f978a085c084f65801db9dbf8eaffe05fdb8ea006c9a6203d45be89fcbb56bcb145d38
AUX incus-0.1.service 638 BLAKE2B 1478a9e84c63fc2f118f3c08c1473e5ac56ef4689bc6b4cefaf0cab39ada77876bde41ae1d4cc7610aec718bd7252f8349dc2fbecc0de26754c9fdbc485c7121 SHA512 141f0fca28db8f116f333c3bd9eecc10fc0ed3ebbd807d08a953b19ce957c626eb03f5716a2ca74e7d3a63537551acfb78b3decabbae7e135b0a7ac34f52762d
AUX incus-0.1.socket 207 BLAKE2B d1fb41c9a90e0f06eb34c466a460e2d202250769ef3db381b35502ffc19f3246af68069bc63ae62ddf6a34d6730b57c2b509f77b7fea8c4fcad24259658be0bb SHA512 55bf659ff4a1095ab922b87ccf4ef01cbcccd897f67406fa2021151f2c6c16fe59590908c6a6026a8db194598f20708cdf4d6d3d27d9438e746d5f6e39444de5
+AUX incus-0.3-lxd-5.20-compatibility.patch 939 BLAKE2B be2198f501cfd1dc72784b450dbfd0115266b54a99e54f1714caeb8739eac936ccc493b28ecbafc33db5aaf5a9bfd19e67194f82582fbfa8f13b8ca5dadf0686 SHA512 4983ad94b5b63de9338de44de29cd7c467a4b6f0f9be378a23a4b7fb8f006212a32926c35026aa6f26faeae381b289503a05f043da80c7be4ba2a165d7f145de
AUX incus-containers-0.1.service 338 BLAKE2B af0849575d2d7578634228576fcf449f8ab54b6fa3a974baec4f91009dec4a6e76253f3724c532f38fc7484ccc6caffae4badf1591c1b04abb3414f4959d550c SHA512 9a9b072442a63683cb9ed71d706606da682e821f609f1f4daea0562ddcea1cc2d6157b29fd466e0aeab149f31b54ab0fff4cf41831e6b2378c47619b8dfd0b55
DIST incus-0.3.tar.xz 13344380 BLAKE2B 8160843df4ff419ef8890fcdd6b6b7e2c3cdec509ae072ec195c2b2c44e61ab3dc20a0488e9023d891b7ee2f2c700cfb8206ebe29236c29705a7121e5436d64f SHA512 d3f3141f72a8ecf007faca8c2f2d1465d766d12f763e714d296fd28acd7e3095dd49834d428f42bf142e301cf1af7ee00ef74005d128c49aa147fb4d9348dbde
DIST incus-0.3.tar.xz.asc 833 BLAKE2B 532ee90f3ed1d4798a19dcc9df8fe6587ab5ab93d18accae7aae8e44cb8c8086c77702a572a371a966eee4ebed84a2d7941f52001152a1894e1d74aa235a06e0 SHA512 afd2aab52a19b618d194eab71974f84d1d3eb9639b2672d8e94153ac23b05764667374504b5f1355238341c4194de282d3bc7635335375fd347ba513eb66e685
+EBUILD incus-0.3-r1.ebuild 5256 BLAKE2B 88cc719bcd9f67aae827f2e53e17adebbb83b09b9d50d168b68afcf074c064fb5415302ea847d782b40a9c25447767b0b2553f3a22838adbba5046248eb47f45 SHA512 7d20e69dc5e3f5ff4cea2a42ec71677bc5d65a18e6f4281619faf041fec89bf672898c00214ecdaa7de258b852f8130e2123357559fcf55a242967d6eae20fd4
EBUILD incus-0.3.ebuild 5190 BLAKE2B e4e9ff9904f50eea1fe9a98774c022ed52de663b15405359a0fbacc670027e95b7f18b8665a820bc614b709b475eb6296fe0ce80817cb3ee9120fefac44b6dc5 SHA512 dae31f75947b52467c01e4b0f00f0b2884486c9c68591789fe77dbeffb832d86f57ffae3a6e7c9dd69b962357fa9d89dcfaa6f1115c821a66363862362e29fba
MISC metadata.xml 1471 BLAKE2B d3447fd360c4d3de95ffafefd39f9e65dd257cd39cbdb14fc2e2c513239fafe48b0fef44653fe8fdaaf54151afe59cf48f3f0909097d0c0c4a82cbd87aac4d44 SHA512 393edc7c7f202fac4f08abd2544d1fb41cfc83cea66ccf239eb4441c1f13ea85dd519de84094b1ba022b1a17658612591ee4354a77484da4d8095af917a87c25
diff --git a/app-containers/incus/files/incus-0.3-lxd-5.20-compatibility.patch b/app-containers/incus/files/incus-0.3-lxd-5.20-compatibility.patch
new file mode 100644
index 000000000000..a20b40105119
--- /dev/null
+++ b/app-containers/incus/files/incus-0.3-lxd-5.20-compatibility.patch
@@ -0,0 +1,26 @@
+From 8bd2b3b3f889787de515eaea532ff728527a8788 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
+Date: Tue, 12 Dec 2023 23:12:41 -0500
+Subject: [PATCH] lxd-to-incus: Update for LXD 5.20
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
+---
+ cmd/lxd-to-incus/validate.go | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmd/lxd-to-incus/validate.go b/cmd/lxd-to-incus/validate.go
+index 8e8020ebf..0078f8793 100644
+--- a/cmd/lxd-to-incus/validate.go
++++ b/cmd/lxd-to-incus/validate.go
+@@ -13,7 +13,7 @@ import (
+ )
+
+ var minLXDVersion = &version.DottedVersion{4, 0, 0}
+-var maxLXDVersion = &version.DottedVersion{5, 19, 0}
++var maxLXDVersion = &version.DottedVersion{5, 20, 0}
+
+ func (c *cmdMigrate) validate(source Source, target Target) error {
+ srcClient, err := source.Connect()
diff --git a/app-containers/incus/incus-0.3-r1.ebuild b/app-containers/incus/incus-0.3-r1.ebuild
new file mode 100644
index 000000000000..3b29b5fe5570
--- /dev/null
+++ b/app-containers/incus/incus-0.3-r1.ebuild
@@ -0,0 +1,191 @@
+# 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://linuxcontainers.org/incus/introduction/ https://github.com/lxc/incus"
+SRC_URI="https://linuxcontainers.org/downloads/incus/${P}.tar.xz
+ verify-sig? ( https://linuxcontainers.org/downloads/incus/${P}.tar.xz.asc )"
+
+LICENSE="Apache-2.0 BSD LGPL-3 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="apparmor nls"
+
+DEPEND="acct-group/incus
+ acct-group/incus-admin
+ app-arch/xz-utils
+ >=app-containers/lxc-5.0.0:=[apparmor?,seccomp(+)]
+ dev-db/sqlite:3
+ dev-libs/cowsql
+ 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/ebtables
+ net-firewall/iptables
+ sys-apps/iproute2
+ sys-fs/fuse:*
+ >=sys-fs/lxcfs-5.0.0
+ sys-fs/squashfs-tools[lzma]
+ virtual/acl"
+BDEPEND="dev-lang/go
+ nls? ( sys-devel/gettext )
+ verify-sig? ( sec-keys/openpgp-keys-linuxcontainers )"
+
+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/incus
+ /usr/bin/lxc-to-incus
+ /usr/bin/incus-agent
+ /usr/bin/incus-benchmark
+ /usr/bin/incus-migrate
+ /usr/sbin/lxd-to-incus
+ /usr/sbin/incusd"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/linuxcontainers.asc
+
+# The testsuite must be run as root.
+# make: *** [Makefile:156: check] Error 1
+RESTRICT="test"
+
+GOPATH="${S}/_dist"
+
+PATCHES=( "${FILESDIR}"/incus-0.3-lxd-5.20-compatibility.patch )
+
+src_prepare() {
+ export GOPATH="${S}/_dist"
+
+ default
+
+ sed -i \
+ -e "s:\./configure:./configure --prefix=/usr --libdir=${EPREFIX}/usr/lib/incus: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 \
+ internal/server/apparmor/instance.go \
+ internal/server/apparmor/instance_qemu.go \
+ internal/server/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" \
+ internal/server/device/device_utils_disk.go || die "Failed to fix virtfs-proxy-helper path."
+
+ cp "${FILESDIR}"/incus-0.1.service "${T}"/incus.service || die
+ if use apparmor; then
+ sed -i \
+ '/^EnvironmentFile=.*/a ExecStartPre=\/usr\/libexec\/lxc\/lxc-apparmor-load' \
+ "${T}"/incus.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"
+
+ # fuidshift should be packaged for incus-lts, making it conflict with lxd.
+ for k in incus-benchmark incus-user incus lxc-to-incus ; do
+ ego install -v -x "${S}/cmd/${k}"
+ done
+
+ ego install -v -x -tags libsqlite3 "${S}"/cmd/incusd
+
+ # Needs to be built statically
+ CGO_ENABLED=0 go install -v -tags netgo "${S}"/cmd/incus-migrate
+ CGO_ENABLED=0 go install -v -tags agent,netgo "${S}"/cmd/incus-agent
+
+ cd "${S}"/cmd/lxd-to-incus || die
+ ego build -v -x ./
+ cd "${S}" || die
+
+ use nls && emake build-mo
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ export GOPATH="${S}/_dist"
+ local bindir="_dist/bin"
+
+ dosbin ${bindir}/incusd
+ dosbin cmd/lxd-to-incus/lxd-to-incus
+
+ for l in incus-agent incus-benchmark incus-migrate incus-user incus lxc-to-incus ; do
+ dobin ${bindir}/${l}
+ done
+
+ dobashcomp scripts/bash/incus
+
+ newconfd "${FILESDIR}"/incus-0.1.confd incus
+ newinitd "${FILESDIR}"/incus-0.1.initd incus
+
+ systemd_dounit "${T}"/incus.service
+ systemd_newunit "${FILESDIR}"/incus-containers-0.1.service incus-containers.service
+ systemd_newunit "${FILESDIR}"/incus-0.1.socket incus.socket
+
+ dodoc AUTHORS
+ dodoc -r doc/*
+ use nls && domo po/*.mo
+}
+
+pkg_postinst() {
+ elog
+ elog "Please see"
+ elog " https://linuxcontainers.org/incus/introduction/"
+ elog " https://linuxcontainers.org/incus/docs/main/tutorial/first_steps/"
+ elog " https://linuxcontainers.org/incus/docs/main/howto/server_migrate_lxd/"
+ elog "before a Gentoo Wiki page is made."
+ 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 incus-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 incus group."
+ elog
+}