diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-22 06:30:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-22 06:30:44 +0000 |
commit | 5a2cecfc8661e1d3a762adf05cf8eb142cd41710 (patch) | |
tree | 341806a72603cc8845e7e1595289e7a8b9570f2a /app-containers/incus | |
parent | d2bcdab82e5f5f38a8ab54026e8aa94edb1b77a6 (diff) |
Diffstat (limited to 'app-containers/incus')
-rw-r--r-- | app-containers/incus/Manifest | 3 | ||||
-rw-r--r-- | app-containers/incus/incus-6.0.3.ebuild | 226 |
2 files changed, 229 insertions, 0 deletions
diff --git a/app-containers/incus/Manifest b/app-containers/incus/Manifest index b70ca757f5fd..84dd603e2f91 100644 --- a/app-containers/incus/Manifest +++ b/app-containers/incus/Manifest @@ -9,11 +9,14 @@ AUX incus-user-0.4.service 247 BLAKE2B 97c181da8dc7c91e8effec89a8bac17b626e8e2f3 AUX incus-user-0.4.socket 204 BLAKE2B df26315099820f77fc875c1619078c0b3adc1cf131f4a2c5f3b6f91609bc07a4535d9fb24d20f91c77b0de7f8334442ba17c704310f35ccbc2864a6148f78389 SHA512 a2541cc29d87e96d6a2ebec1cb72dd5779648b4d739657cf123590c23ae00b8022ebf68a7a2af24cfdb9fcb89a05ec87ecd15e37f3160c7ceedf23f3a2459950 DIST incus-6.0.2.tar.xz 11197324 BLAKE2B fa15816ea05865ce48f7cb668c3138d2d186a1876669d6eaf05ffd335d8feedf7eda41301be9d2e07879aa3fb2e7177a5bd26cb89a3789d46ef648c2fcb06db5 SHA512 ef58bc22154204a3f89b973fd5289385fa98aa2c2a97b0ff3ed2fa2a0c899ee3dc08cb46552ade2e86dc13f5de55f9ef59aea775c60eb3df74d088f8a1e2795a DIST incus-6.0.2.tar.xz.asc 833 BLAKE2B bcdeb0d2a3684dcdcb620166865523a2e9eb595f0e7760f05a06ea0608dc4fc7111b75206fe62a63cfd90a0d0ec79206404994e53770d5e35a639a67e1ad753c SHA512 18587ddc7b7cb41418ee0e7a43875663e71c9d39a505fd55bc29fe83717b5d5cdc876c46912561610735ddf80462631716354a943a272ae5ccf0ee495aff1c1c +DIST incus-6.0.3.tar.xz 11916020 BLAKE2B d3d998bd50124604c52ff007eefed586c216ce1a0a77d45724fd489db1d93f2fa304f5d6e1c368ff2dd4d1170b24605fd24bbf2a6e4506207686ca392936c200 SHA512 6a879e6634cf545b4c427800d923a32e5fe58a6eaf220ad8d0cb08e0ced5e6c4be09274ae095bb9dae25a55445462ea83d3d9235f67bbb9896944f596bf17e1a +DIST incus-6.0.3.tar.xz.asc 833 BLAKE2B 38835ab036709161150992cb40df4ff1ae1887d4f3e0b037d0415f75d2bb711cb3c5945bffe1b91d289acfb7e19e726964278e5c2ab31731ba9f7534f139dec7 SHA512 7d5360ab91aafe1d047a60e38a07e24c3c7b158e753087a943ec5e59d6a27c19a872080c9007b6cf592040d3408845bc188d76f6e732408d0680a3782cebce47 DIST incus-6.7.tar.xz 11313960 BLAKE2B c55ec6c584eeb6123d707b628ff27f96f6555ad5d17a720c55cc69cfb2abee9c6692544fba63ec2c63c5c8cb0d68baf0c9fadc2bb538dfce20362097fa3809ee SHA512 4b7e9af926d6132f63cbc53466d98691b2fb182a1900cf4ac5964df8678829da0241c4a468cfe3e49d448ecb25d2e8b1be0f52ac71c176a87d554fcd59ab5f97 DIST incus-6.7.tar.xz.asc 833 BLAKE2B 6c72ca10f20f55607b1059bf908e4b36d81b499c2b6e329855c8769cafe9def44bf8cc6a320718150192daf6e820f6e42beb1b9e7a90f794b9c906734b0ba742 SHA512 dd6d55f8f3e8538f8050fce0124bbab1495978ad1ccee954a3d38cc1bb33c0a8f9f6a7f673e7e0942e9bc732a2acdbcb71245c110eb091ef0b53015ef05e9d74 DIST incus-6.8.tar.xz 11403916 BLAKE2B 09d8e2a8619a040550600234d7fe2e65eea8c6a7054e0b790f3774721ad5de982dee5d0151f8141cda0f5c6b9d63e18b1c4964e4027bf9470ed44a28d482f999 SHA512 c7b0cc22014f482981777f3cef3b0064c02b46c7ced4e8572fd9548eec45a0d87ac868e94ab8d2af80eb24986db64a930ac578c8555e2759022cad559b74ac5c DIST incus-6.8.tar.xz.asc 833 BLAKE2B 77b937177b4239da27478ff7826c633d34ee3b5e02e988387fdc63ff43fad307786c27dee2c3cefb8c4129ce8777fad3361c2e2a86152d202c55231d4105d7a8 SHA512 3111e196da18d362c2e60482e313da888ba6ffba1b5ae134bf9d7e89951ebf6d2b2af922d78ee6fd2e9b51bffea5ccadd0d11bf0a3527d07d8351733ce66f2e3 EBUILD incus-6.0.2.ebuild 6083 BLAKE2B c9caaeb98078d7dad8bb277196fbe651eb956020bb933fdbd7d84a1f7caef1c2450d7bb31cfb9ea7717d768bf8cd4dde45c68f81508783e15150b56efc492c79 SHA512 0c6cb9391eaff33920b0e18daf1dc3299db0be2f451a547aa146fdbe85d0b3bafea31cf09f8fb744ec305de41d9ac7c3978ff1bc33aeafd0b8c5794817be3d8f +EBUILD incus-6.0.3.ebuild 6271 BLAKE2B c6e13a1cc4efd21365cef8837fd5ca25578fb197a412d8071a58f59d7c1fe39d0c3788bb77563099d6cbc5e13499f34a1026dacf3e213b144d2b50b4ecb355f4 SHA512 275d5a6a9d500ba9895d0d0d99f75eb6ef0d6a6e2d7688d9d5d9d32241b0c2721f5bfb620df80043d1ff281e7e115b6294d0e5fc8abea54387c5e2dccf9038f2 EBUILD incus-6.7.ebuild 6173 BLAKE2B 1ac2d20ccfafee4697587c57ea676835fbfe84d70e4154c33ef8316fd1066f328a44c7b41bc84ec971271ade061b4f09f616c7fc746b22664f45b703fe2f25a3 SHA512 2037e19a3a43be689f666b3d794be77627cfa6da9aff0fb03f5340628ffd8fae375ec9c130f2cfb3f3ffb5c89d6968eeaebcd0e36a881654633809dd18c96c72 EBUILD incus-6.8.ebuild 6383 BLAKE2B 5b00f4b6de57500591485d076152684d5b841d2e4ead9c245607b1c4919fea96d88cfe84896b66c86dfb2049a9f17b2832cedf6a968801f0bd1ba9c8d7075b91 SHA512 7bf9f2b7e203522178a5569faf332bb309d0b68e3d5e27224c111fec441d1ee847a0d3e58c344fa6409bb72fd2884ec3fd1fe94d86fbafe9cc137595ba1ba42a MISC metadata.xml 1696 BLAKE2B d15b2a9b4a9f2197369466403fe00ff6a2a10d3d2b86e2f306a7eeaad4ef3eb6709c22b08df6dc4a8fa0f6d9468da6a240fca27d587c222f081644b8e303da6f SHA512 e07b3700562381e6634ae5bb50163c63fdec2e2798c055da53bd1e84e65a394482b4b95a57effac61f037ecee91440e1d3d608322978846b7c6c5e200e503f0f diff --git a/app-containers/incus/incus-6.0.3.ebuild b/app-containers/incus/incus-6.0.3.ebuild new file mode 100644 index 000000000000..1df5ba531a54 --- /dev/null +++ b/app-containers/incus/incus-6.0.3.ebuild @@ -0,0 +1,226 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module linux-info optfeature systemd toolchain-funcs 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/lts" +KEYWORDS="~amd64 ~arm64" +IUSE="apparmor fuidshift nls qemu" + +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-1.15.6 + dev-libs/lzo + >=dev-libs/raft-0.22.1:=[lz4] + >=dev-util/xdelta-3.0[lzma(+)] + net-dns/dnsmasq[dhcp] + sys-libs/libcap + virtual/udev" +RDEPEND="${DEPEND} + || ( + net-firewall/iptables + net-firewall/nftables + ) + fuidshift? ( !app-containers/lxd ) + sys-apps/iproute2 + sys-fs/fuse:* + >=sys-fs/lxcfs-5.0.0 + sys-fs/squashfs-tools[lzma] + virtual/acl + qemu? ( + app-cdr/cdrtools + app-emulation/qemu[spice,usbredir,virtfs] + sys-apps/gptfdisk + )" +BDEPEND=">=dev-lang/go-1.21 + 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/incus-agent + /usr/bin/incus-benchmark + /usr/bin/incus-migrate + /usr/bin/lxc-to-incus + /usr/sbin/fuidshift + /usr/sbin/incusd + /usr/sbin/lxd-to-incus" + +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" + +src_unpack() { + verify-sig_src_unpack + go-module_src_unpack +} + +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 + + sed -i \ + -e "s:/usr/share/OVMF:/usr/share/edk2/OvmfX64:g" \ + -e "s:OVMF_VARS.ms.fd:OVMF_VARS.fd:g" \ + internal/server/instance/drivers/edk2/driver_edk2.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.4.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" + + for k in incus-benchmark incus-simplestreams incus-user incus lxc-to-incus lxd-to-incus ; do + ego install -v -x "${S}/cmd/${k}" + done + + if use fuidshift ; then + ego install -v -x "${S}/cmd/fuidshift" + fi + + 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 + + use nls && emake build-mo +} + +src_test() { + emake check +} + +src_install() { + export GOPATH="${S}/_dist" + + if tc-is-cross-compiler ; then + local bindir="_dist/bin/linux_${GOARCH}" + else + local bindir="_dist/bin" + fi + + newsbin "${FILESDIR}"/incus-startup-0.4.sh incus-startup + + # Admin tools + for l in incusd incus-user lxd-to-incus ; do + dosbin ${bindir}/${l} + done + + # User tools + for m in incus-agent incus-benchmark incus-migrate incus-simplestreams incus lxc-to-incus ; do + dobin ${bindir}/${m} + done + + # fuidshift, should be moved under admin tools at some point + if use fuidshift ; then + dosbin ${bindir}/fuidshift + fi + + newconfd "${FILESDIR}"/incus-6.0.confd incus + newinitd "${FILESDIR}"/incus-6.0.initd incus + newinitd "${FILESDIR}"/incus-user-0.4.initd incus-user + + systemd_dounit "${T}"/incus.service + systemd_newunit "${FILESDIR}"/incus-0.4.socket incus.socket + systemd_newunit "${FILESDIR}"/incus-startup-0.4.service incus-startup.service + systemd_newunit "${FILESDIR}"/incus-user-0.4.service incus-user.service + systemd_newunit "${FILESDIR}"/incus-user-0.4.socket incus-user.socket + + if ! tc-is-cross-compiler; then + # Generate and install shell completion files. + mkdir -p "${D}"/usr/share/{bash-completion/completions/,fish/vendor_completions.d/,zsh/site-functions/} || die + "${bindir}"/incus completion bash > "${D}"/usr/share/bash-completion/completions/incus || die + "${bindir}"/incus completion fish > "${D}"/usr/share/fish/vendor_completions.d/incus.fish || die + "${bindir}"/incus completion zsh > "${D}"/usr/share/zsh/site-functions/_incus || die + else + ewarn "Shell completion files not installed! Install them manually with incus completion --help" + fi + + dodoc AUTHORS + dodoc -r doc/* + use nls && domo po/*.mo + + # Incus needs INCUS_EDK2_PATH in env to find OVMF files for virtual machines, #946184 + newenvd - 90incus <<- _EOF_ + INCUS_EDK2_PATH=${EPREFIX}/usr/share/edk2-ovmf + _EOF_ +} + +pkg_postinst() { + elog + elog "Please see" + elog " https://wiki.gentoo.org/wiki/Incus" + elog " https://wiki.gentoo.org/wiki/Incus#Migrating_from_LXD" + elog + 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 +} |