summaryrefslogtreecommitdiff
path: root/app-containers
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-22 06:30:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-22 06:30:44 +0000
commit5a2cecfc8661e1d3a762adf05cf8eb142cd41710 (patch)
tree341806a72603cc8845e7e1595289e7a8b9570f2a /app-containers
parentd2bcdab82e5f5f38a8ab54026e8aa94edb1b77a6 (diff)
gentoo auto-resync : 22:12:2024 - 06:30:44HEADmaster
Diffstat (limited to 'app-containers')
-rw-r--r--app-containers/Manifest.gzbin9218 -> 9228 bytes
-rw-r--r--app-containers/incus/Manifest3
-rw-r--r--app-containers/incus/incus-6.0.3.ebuild226
-rw-r--r--app-containers/lxc/Manifest3
-rw-r--r--app-containers/lxc/lxc-6.0.3.ebuild168
5 files changed, 400 insertions, 0 deletions
diff --git a/app-containers/Manifest.gz b/app-containers/Manifest.gz
index f10ced3bc9f3..e228c6dadcd1 100644
--- a/app-containers/Manifest.gz
+++ b/app-containers/Manifest.gz
Binary files differ
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
+}
diff --git a/app-containers/lxc/Manifest b/app-containers/lxc/Manifest
index 515a9dce620d..c1542823a95f 100644
--- a/app-containers/lxc/Manifest
+++ b/app-containers/lxc/Manifest
@@ -7,6 +7,9 @@ DIST lxc-5.0.3.tar.gz 975269 BLAKE2B 533d97fe4d986acbf5d562bb2c295a63df2a9a8bfc2
DIST lxc-5.0.3.tar.gz.asc 833 BLAKE2B c35278ed17cad76d2ea94b3985e0110731efea751fb5f1c2d1c9db71486e4844285f372a94c8611dcfe91fdb16459694843b9e0a8273cfc68a56f549c7162cfb SHA512 a5ce5769d49abdf35d94de8273fd3e9c2a8ba4fafea71cf33ee6bce1d83531c8b550d972f7080409a4cc5a92e9d04ece50ed108f92c6aec4868d150e58d7d11a
DIST lxc-6.0.2.tar.gz 964007 BLAKE2B 55c0155a66194d4d10fff5ffc7edc6d6afab730245a401671f8d1bd6f54bd8558bd0644c0f42bd49b5b470bc343809091f1893c27b5830674870f6b91f23d6e0 SHA512 52841b5f48eeb4b2b63e0437e3abc38cec6a801778eb2fab264c78d7ee3be957bd45aa839c9fcd281396464fa0af84bb2fc8bf4bfadc9509fae3b4dc52b44da5
DIST lxc-6.0.2.tar.gz.asc 833 BLAKE2B b4b6b56e65239c2125864e16e947a88c2d4d97a1b2dfa6920ca5c2f89b3df7d44d9ec8eb9a56753d6009143a53f6bb5bbd13f3b5b7f26e537aa6f1f1d0d0cc85 SHA512 741caccb3dc0ef1043c04122c75a3e3f6d8e6024a65bf905b186da0aabef971a1224e60f9adee069d1a2c24f43c408be1ccc32e5d4faba85860e9a19d9e4c0d9
+DIST lxc-6.0.3.tar.gz 964210 BLAKE2B 8d5dec7f088111a2ca82aadd6cd90eb30a3a1b61900aa47123caba2ff95d10e68cfcd6a94ec6b3e36657777578c8b113c95aad9112b48b9dc964e4ed73783b48 SHA512 4ed41155b74afa135ae8e01f55a8cbbc7284a80e9789aaa2e69264d6b90a6527baf51f9c68dd3364aa83e7939d070f5c7dad924c751927783e883adce539fbdf
+DIST lxc-6.0.3.tar.gz.asc 833 BLAKE2B 3a23eacfdd248a95c9fa41a6edcb55abb07abc81314fa227649663ac264a9e5fdcf81cb38b79f1bd51b9172a70a0aee5bf65ecfdaf438c944c25f11c882ab562 SHA512 5de32e772bd2864e3b688a90fd9f08d98829d61ba3e1cc76a9b403fc005256149f55ad034e186c3329f3abe52a8815f60c5027b16de46be0bc81b14d0134babd
EBUILD lxc-5.0.3.ebuild 5052 BLAKE2B 99a20e705617194a9e38ec6dabbc52fd43dbd5615a6b00379921f4ba200c2110f666878c00195917109f37cfed961258978b79bc3db0814986c36429537e660c SHA512 050ebb35250bd258a602ee84f9f1b1c35531caa0c3f9954bb8380927a8c262ffd66776cc0af643aaf69a7e0c51dccfe82bb2e3993e264ba2a0c91de8bd94faf5
EBUILD lxc-6.0.2.ebuild 5601 BLAKE2B 8885d5a0fe2400dbecf8ccbe8766f3d5795fd675094387d0319ad1e8bfcb3f0b052b2a20e42c3fb11cd4961b0500580356349001755904c52adc7c1298f932d1 SHA512 68e97e42d5ca082c867f089c36264d545bbe69dde4df07136bdcd3c4458b9c986fc2b2c879485ea2348f745d19585953a1ac2032fa99a69c8ab542aaada1ffa1
+EBUILD lxc-6.0.3.ebuild 5414 BLAKE2B 14da79e37b0ef4bf03ec9082b9aa3324b2b7848ce0228b3489d55c74a227bff090c077505062b99971da5a9888336d2898edb66ac6d2df3f3944b61823dd101b SHA512 b31cc99781e8f5ab93100dbdc90c8b2fd335ca7303a1d05d27524a289a5a5bc3d51d20206ae69bd5109363c11ff9f0254457e384e89acb0f03b385818a4cb93c
MISC metadata.xml 721 BLAKE2B 8aaa67af4ae36f07ac2d893f0d67d86de08d9da065b5ca7118a7a795a2b2ecb55b37a87b95b456ebc8806bbdc9f36e92901b6888cb75f494a7151393b33b6d44 SHA512 3b90cb1c80e2ee9ef3d30273c91ab625ec79ad240edc40dea011078ab44759b03c3ac28484cfc639b4108557a7c5e00e798b4e335da9ba94a5a836f51ee7701a
diff --git a/app-containers/lxc/lxc-6.0.3.ebuild b/app-containers/lxc/lxc-6.0.3.ebuild
new file mode 100644
index 000000000000..804d6c7d0bee
--- /dev/null
+++ b/app-containers/lxc/lxc-6.0.3.ebuild
@@ -0,0 +1,168 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 linux-info meson optfeature systemd verify-sig
+
+DESCRIPTION="A userspace interface for the Linux kernel containment features"
+HOMEPAGE="https://linuxcontainers.org/ https://github.com/lxc/lxc"
+SRC_URI="https://linuxcontainers.org/downloads/lxc/${P}.tar.gz
+ verify-sig? ( https://linuxcontainers.org/downloads/lxc/${P}.tar.gz.asc )"
+
+LICENSE="GPL-2 LGPL-2.1 LGPL-3"
+SLOT="0/1.8" # SONAME liblxc.so.1 + ${PV//./} _if_ breaking ABI change while bumping.
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="apparmor +caps examples io-uring man pam seccomp selinux ssl systemd test +tools"
+
+RDEPEND="acct-group/lxc
+ acct-user/lxc
+ apparmor? ( sys-libs/libapparmor )
+ caps? ( sys-libs/libcap )
+ io-uring? ( >=sys-libs/liburing-2:= )
+ pam? ( sys-libs/pam )
+ seccomp? ( sys-libs/libseccomp )
+ selinux? ( sys-libs/libselinux )
+ ssl? ( dev-libs/openssl:0= )
+ systemd? (
+ sys-apps/dbus
+ sys-apps/systemd:=
+ )
+ tools? ( sys-libs/libcap )"
+DEPEND="${RDEPEND}
+ caps? ( sys-libs/libcap[static-libs] )
+ tools? ( sys-libs/libcap[static-libs] )
+ sys-kernel/linux-headers"
+BDEPEND="virtual/pkgconfig
+ man? ( app-text/docbook2X )
+ verify-sig? ( sec-keys/openpgp-keys-linuxcontainers )"
+
+RESTRICT="!test? ( test )"
+
+CONFIG_CHECK="~!NETPRIO_CGROUP
+ ~CGROUPS
+ ~CGROUP_CPUACCT
+ ~CGROUP_DEVICE
+ ~CGROUP_FREEZER
+
+ ~CGROUP_SCHED
+ ~CPUSETS
+ ~IPC_NS
+ ~MACVLAN
+
+ ~MEMCG
+ ~NAMESPACES
+ ~NET_NS
+ ~PID_NS
+
+ ~POSIX_MQUEUE
+ ~USER_NS
+ ~UTS_NS
+ ~VETH"
+
+ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
+ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
+ERROR_MEMCG="CONFIG_MEMCG: needed for memory resource control in containers"
+ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
+ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
+ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
+ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/linuxcontainers.asc
+
+DOCS=( AUTHORS CONTRIBUTING MAINTAINERS README.md doc/FAQ.txt )
+
+pkg_setup() {
+ linux-info_pkg_setup
+}
+
+src_configure() {
+
+ # -Dtools-multicall=false: will create a single binary called 'lxc' that conflicts with LXD.
+ local emesonargs=(
+ --localstatedir "${EPREFIX}/var"
+
+ -Dcoverity-build=false
+ -Dinstall-state-dirs=false
+ -Doss-fuzz=false
+ -Dspecfile=false
+ -Dtools-multicall=false
+
+ -Dcommands=true
+ -Dinstall-init-files=true
+ -Dmemfd-rexec=true
+ -Dthread-safety=true
+
+ $(meson_use apparmor)
+ $(meson_use caps capabilities)
+ $(meson_use examples)
+ $(meson_use io-uring io-uring-event-loop)
+ $(meson_use man)
+ $(meson_use pam pam-cgroup)
+ $(meson_use seccomp)
+ $(meson_use selinux)
+ $(meson_use ssl openssl)
+ $(meson_use test tests)
+ $(meson_use tools)
+
+ $(usex systemd -Ddbus=true -Ddbus=false)
+ $(usex systemd -Dinit-script="systemd" -Dinit-script="sysvinit")
+
+ -Ddata-path=/var/lib/lxc
+ -Ddoc-path=/usr/share/doc/${PF}
+ -Dlog-path=/var/log/lxc
+ -Drootfs-mount-path=/var/lib/lxc/rootfs
+ -Druntime-path=/run
+ )
+
+ use tools && local emesonargs+=( -Dcapabilities=true )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ # The main bash-completion file will collide with lxd, need to relocate and update symlinks.
+ local lxcbashcompdir="${D}/$(get_bashcompdir)"
+ mkdir -p "${lxcbashcompdir}" || die "Failed to create bashcompdir."
+ mv "${lxcbashcompdir}"/_lxc "${lxcbashcompdir}"/lxc-start || die "Failed to move _lxc bash completion file."
+
+ # Build system will install all bash completion files regardless of our 'tools' use flag.
+ # Though installing them all will add bash completions for commands that don't exist, it's
+ # cleaner than dealing with individual files based on the use flag status.
+ bashcomp_alias lxc-start lxc-{attach,autostart,cgroup,checkpoint,config,console,copy,create,destroy,device,execute,freeze,info,ls,monitor,snapshot,stop,top,unfreeze,unshare,update-config,usernsexec,wait}
+
+ find "${ED}" -name '*.la' -delete -o -name '*.a' -delete || die
+
+ # Replace upstream sysvinit/systemd files.
+ if use systemd ; then
+ rm -r "${D}$(systemd_get_systemunitdir)" || die "Failed to remove systemd lib dir"
+ else
+ rm "${ED}"/etc/init.d/lxc-{containers,net} || die "Failed to remove sysvinit scripts"
+ fi
+
+ newinitd "${FILESDIR}/${PN}.initd.9" ${PN}
+ systemd_newunit "${FILESDIR}"/lxc-monitord.service.5.0.0 lxc-monitord.service
+ systemd_newunit "${FILESDIR}"/lxc-net.service.5.0.0 lxc-net.service
+ systemd_newunit "${FILESDIR}"/lxc.service-5.0.0 lxc.service
+ systemd_newunit "${FILESDIR}"/lxc_at.service.5.0.0 "lxc@.service"
+
+ if ! use apparmor; then
+ sed -i '/lxc-apparmor-load/d' "${D}$(systemd_get_systemunitdir)/lxc.service" ||
+ die "Failed to remove apparmor references from lxc.service systemd unit."
+ fi
+}
+
+pkg_postinst() {
+ elog "Please refer to "
+ elog "https://wiki.gentoo.org/wiki/LXC for introduction and usage guide."
+ elog
+ elog "Run 'lxc-checkconfig' to see optional kernel features."
+ elog
+
+ optfeature "creating your own LXC containers" app-containers/distrobuilder
+ optfeature "automatic template scripts" app-containers/lxc-templates
+ optfeature "Debian-based distribution container image support" dev-util/debootstrap
+ optfeature "snapshot & restore functionality" sys-process/criu
+}